/* Reset & CSS variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #070b13;
    --bg-card: rgba(13, 20, 35, 0.45);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(56, 189, 248, 0.4);
    
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --secondary: rgba(255, 255, 255, 0.08);
    --secondary-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --glow-blue: rgba(56, 189, 248, 0.15);
    --glow-indigo: rgba(99, 102, 241, 0.15);
    
    --tag-dockets: #f59e0b;
    --tag-charging: #ef4444;
    --tag-detention: #ec4899;
    --tag-motions: #10b981;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Ambient Glows */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.45;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--glow-blue) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-indigo) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
}

/* Header styling */
.app-header {
    padding: 5rem 1rem 3rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, rgba(7, 11, 19, 0.8), rgba(7, 11, 19, 0));
    backdrop-filter: blur(8px);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
}

.badge-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.status-badge {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--primary);
    animation: pulse 2s infinite;
}

.update-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.case-meta {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 800px;
    margin: 0 auto;
}

.case-meta strong {
    color: var(--text-primary);
}

.case-meta .divider {
    color: var(--border-color);
    margin: 0 0.75rem;
}

/* Layout container */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem 1.5rem;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.icon-charge {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.icon-plea {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.icon-counsel {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.stat-val {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

/* Two-column layout */
.layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Left column style */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease forwards;
}

.panel h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.info-block {
    margin-bottom: 2rem;
}

.info-block:last-child {
    margin-bottom: 0;
}

.info-block h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.info-block p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.info-block p strong {
    color: var(--text-primary);
}

.info-block ul {
    list-style: none;
    padding-left: 0;
}

.info-block ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.info-block ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0.2rem;
    top: -0.1rem;
}

/* Specific Block Variants */
.warning-block {
    background: rgba(239, 68, 68, 0.03);
    border-left: 3px solid #ef4444;
    padding: 1.25rem 1.5rem;
    border-radius: 0 12px 12px 0;
}

.disclaimer {
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 1rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), rgba(56, 189, 248, 0.1));
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 3px solid var(--primary);
    box-shadow: 0 0 8px var(--primary);
    z-index: 1;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Right column styling (Documents) */
.documents-header {
    margin-bottom: 2rem;
}

.documents-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.documents-header .sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Document cards */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease forwards;
}

.doc-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px -10px rgba(56, 189, 248, 0.12);
}

.doc-badge {
    position: absolute;
    top: 1.75rem;
    right: 1.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

.badge-dockets {
    background: rgba(245, 158, 11, 0.1);
    color: var(--tag-dockets);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-charging {
    background: rgba(239, 68, 68, 0.1);
    color: var(--tag-charging);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-detention {
    background: rgba(236, 72, 153, 0.1);
    color: var(--tag-detention);
    border: 1px solid rgba(236, 72, 153, 0.25);
}

.badge-motions {
    background: rgba(16, 185, 129, 0.1);
    color: var(--tag-motions);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.doc-info {
    padding-right: 6rem;
}

.doc-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.doc-filename {
    display: inline-block;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.doc-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.doc-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.doc-actions {
    display: flex;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: #070b13;
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Footer Section */
.app-footer-bar {
    border-top: 1px solid var(--border-color);
    padding: 3rem 1.5rem;
    background-color: rgba(7, 11, 19, 0.8);
    backdrop-filter: blur(10px);
    margin-top: 5rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.auth-note strong {
    color: var(--primary);
}

.lock-icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

/* Keyframes & Animations */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(56, 189, 248, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive styles */
@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .app-header {
        padding: 3rem 1rem 2rem 1rem;
    }
    
    .container {
        padding: 2rem 1rem 4rem 1rem;
    }
    
    .panel {
        padding: 1.5rem;
    }
    
    .doc-info {
        padding-right: 0;
    }
    
    .doc-badge {
        position: static;
        display: inline-block;
        margin-bottom: 1rem;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* Notes Section Styles */
.notes-panel {
    margin-top: 2.5rem;
}

.notes-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-row {
    display: flex;
    gap: 0.75rem;
}

.notes-form input,
.notes-form select,
.notes-form textarea {
    background: rgba(7, 11, 19, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.notes-form input:focus,
.notes-form select:focus,
.notes-form textarea:focus {
    border-color: var(--primary);
}

.notes-form input {
    flex: 1;
}

.notes-form select {
    width: 130px;
    cursor: pointer;
}

.notes-form textarea {
    resize: vertical;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-top: 1rem;
}

/* Custom scrollbar for notes list */
.notes-list::-webkit-scrollbar {
    width: 6px;
}
.notes-list::-webkit-scrollbar-track {
    background: transparent;
}
.notes-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.notes-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notes-loading {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    padding: 2rem 0;
}

.note-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    animation: fadeInUp 0.3s ease;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.note-type-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.badge-note-type-note {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.badge-note-type-question {
    background: rgba(239, 68, 68, 0.1);
    color: var(--tag-charging);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.note-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.note-body {
    color: var(--text-secondary);
    font-size: 0.95rem;
    word-break: break-word;
    white-space: pre-wrap;
}
