@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #f97316;
    --primary-gradient: linear-gradient(135deg, #FF8C00 0%, #f97316 100%);
    --primary-light: #fb923c;
    --primary-dark: #ea580c;
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg-light: #f1f5f9;
    --white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.05), 0 5px 20px -5px rgba(0, 0, 0, 0.02);
    --shadow-premium: 0 20px 25px -5px rgba(249, 115, 22, 0.1), 0 10px 10px -5px rgba(249, 115, 22, 0.04);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: transparent;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

.sidenav {
    width: 260px;
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    padding: 16px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.4s ease;
}

/* Glassmorphism System */
.glass-panel {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.glass-card {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border-radius: 24px;
}

/* Glassy Tabs */
.glass-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.glass-tabs {
    display: flex;
    background: rgba(241, 245, 249, 0.9); /* More opaque for better depth */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 10px;
    border-radius: 26px;
    border: 1px solid rgba(249, 116, 22, 0.235);
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.12), 0 10px 20px -15px rgba(0,0,0,0.08);
}

.glass-tab-item {
    padding: 14px 36px;
    border-radius: 18px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.glass-tab-item i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.glass-tab-item.active {
    background: #ffffff !important; /* Pure white */
    color: var(--primary);
    box-shadow: 0 15px 30px -10px rgba(0,0,0,0.12); /* More prominent active shadow */
}

.glass-tab-item.active i {
    transform: scale(1.1);
}

.glass-tab-item:not(.active):hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

/* Background Blobs for Glass Effect */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: #f8fafc;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.08;
    border-radius: 50%;
}

.blob-1 { top: -200px; right: -200px; background: #f97316; }
.blob-2 { bottom: -200px; left: -200px; background: #ea580c; }
.blob-3 { top: 40%; left: 30%; background: #fb923c; width: 400px; height: 400px; opacity: 0.05; }

/* Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding-bottom: 24px;
}

/* Sidebar (Premium Dark Theme) */
.sidenav {
    width: 260px;
    /* background: #0f172a !important;  */
    background:#000 !important;
    backdrop-filter: none !important;
    border-right: none !important;
    padding: 24px 16px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidenav-header {
    margin-bottom: 40px;
    padding: 0 12px;
}

.sidenav-header h4 {
    font-size: 22px;
    letter-spacing: -0.5px;
    color: #fff !important;
}

.sidenav-menu .nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #c0c8d0 !important; /* Slate 300 - Lighter */
    text-decoration: none;
    border-radius: 16px;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.sidenav-menu .nav-item i {
    font-size: 18px;
    margin-right: 14px;
    opacity: 0.7;
}

.sidenav-menu .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidenav-menu .nav-item.active {
    background: var(--primary-gradient);
    color: white !important;
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.5);
}

.sidenav-menu .nav-item.active i {
    opacity: 1;
}

.sidebar-footer {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-footer .status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
}

/* Stat Cards (Premium Horizontal) */
.stat-card-premium {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-premium:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.stat-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
}

.stat-icon.total { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.stat-icon.pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.stat-icon.urgent { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.stat-icon.disposed { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

.stat-info span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.stat-info h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

/* Hearing Pipeline Card (Vertical) */
.hearing-card-premium {
    background: var(--white);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.02);
    height: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hearing-card-premium:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.04);
}

.urgent-pill {
    background: #fee2e2;
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.case-time-badge {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}

.action-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    transition: all 0.3s ease;
    margin-top: auto;
}

.hearing-card-premium:hover .action-arrow {
    background: var(--primary);
    color: white;
}

/* Updates List (Image 0) */
.update-card {
    background: var(--white);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* Steps Indicator (Image 1, 4) */
.steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

/* Buttons */
.btn-primary-neat {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: 0 10px 20px -10px rgba(249, 115, 22, 0.5);
    transition: all 0.3s ease;
}

.btn-primary-neat:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(249, 115, 22, 0.6);
    color: white;
}

.btn-outline-neat {
    background: rgba(249, 115, 22, 0.05);
    color: var(--primary);
    border: 1.5px solid rgba(249, 115, 22, 0.3);
    padding: 10px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-outline-neat:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.2);
}

/* Mobile Sidebar Adjustments */
@media (max-width: 768px) {
    .sidenav {
        position: fixed;
        left: -280px;
        z-index: 2000;
        transition: left 0.3s ease;
        box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    }
    
    .sidenav.active {
        left: 0;
    }
    
    .main-content {
        width: 100%;
    }

    .tab-content {
        padding: 16px !important;
    }
    /* Overlay when sidebar active */
    .sidenav.active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        z-index: 1999;
    }
}

/* Tables Premium */
.table th {
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

.table td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.02);
}

.badge-role {
    padding: 6px 12px;
    font-weight: 600;
    font-size: 11px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
/* Header Glass */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 900;
}

/* Sidebar Menu Enhancements */
.sidenav-menu .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 16px;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.sidenav-menu .nav-item i {
    font-size: 18px;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.sidenav-menu .nav-item:hover {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary);
    transform: translateX(4px);
}

.sidenav-menu .nav-item.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(249, 115, 22, 0.5);
}

.sidenav-menu .nav-item.active i {
    transform: scale(1.1);
}

.shadow-soft {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

/* Timeline Neat */
.timeline-neat {
    position: relative;
    padding-left: 20px;
}
.timeline-neat::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(249, 115, 22, 0.1); 
}
.timeline-item {
    position: relative;
    padding-bottom: 24px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f97316;
    border: 2px solid #fff;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
    z-index: 1;
}
.timeline-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f97316;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.timeline-content {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}
.timeline-content p {
    margin-bottom: 4px;
}
.timeline-content .small-meta {
    font-size: 0.7rem;
    color: #6c757d;
}
.timeline-content .counter-field {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 5px;
}
.bg-counter-yes { background: #dcfce7; color: #15803d; }
.bg-counter-no { background: #fee2e2; color: #b91c1c; }

.tab-pane-glass {
    display: none;
    animation: fadeInSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-pane-glass.active {
    display: block;
}

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

/* Logout Modal Premium Tweaks */
.logout-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logout-icon-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid rgba(249, 115, 22, 0.2);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.animate-pulse {
    animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.shadow-premium {
    box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.1), 0 10px 10px -5px rgba(249, 115, 22, 0.04) !important;
}
/* A4 Paper Display for AI Drafts */
.a4-container {
    background: #f1f5f9;
    padding: 40px 20px;
    border-radius: 16px;
    overflow-y: auto;
    max-height: 850px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    border: 1px inset rgba(0,0,0,0.05);
}

.a4-paper {
    background: white;
    width: 210mm !important;
    height: 297mm !important;
    min-width: 210mm !important;
    min-height: 297mm !important;
    max-width: 210mm !important;
    max-height: 297mm !important;
    padding: 20mm 20mm 25mm 20mm;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-family: 'Inter', 'Outfit', sans-serif;
    line-height: 1.6;
    color: #1e293b;
    position: relative;
    font-size: 15px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0 !important; /* Prevents pages from being squished */
}

.a4-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    height: auto;
    padding: 0;
    margin: 0;
}

.page-number {
    position: absolute;
    bottom: 20mm;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    background: white;
    padding-top: 5mm;
}

@media print {
    body * { visibility: hidden; }
    .a4-container-print, .a4-container-print * { visibility: visible; }
    .a4-container-print { position: absolute; left: 0; top: 0; width: 100%; }
    .a4-paper { margin: 0 !important; box-shadow: none !important; border: none !important; page-break-after: always; }
}

@media (max-width: 992px) {
    .a4-paper {
        width: 100%;
        padding: 15mm;
    }
}

.a4-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 15px;
}

.a4-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Holiday Calendar Premium Styles */
#calendar-grid .card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

#calendar-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important;
    background: #fff;
}

.calendar-mini-grid {
    user-select: none;
}

.calendar-mini-grid div:not(:empty) {
    transition: all 0.2s ease;
    cursor: default;
}

.calendar-mini-grid div:not(:empty):hover {
    transform: scale(1.1);
    background: rgba(249, 115, 22, 0.05);
}

.holiday-list {
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.holiday-list::-webkit-scrollbar {
    width: 4px;
}

.holiday-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.animate-up {
    animation: slideUp 0.5s ease backwards;
}

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

/* Delay for staggered animation */
#calendar-grid .col-md-4:nth-child(1) { animation-delay: 0.05s; }
#calendar-grid .col-md-4:nth-child(2) { animation-delay: 0.1s; }
#calendar-grid .col-md-4:nth-child(3) { animation-delay: 0.15s; }
#calendar-grid .col-md-4:nth-child(4) { animation-delay: 0.2s; }
#calendar-grid .col-md-4:nth-child(5) { animation-delay: 0.25s; }
#calendar-grid .col-md-4:nth-child(6) { animation-delay: 0.3s; }
#calendar-grid .col-md-4:nth-child(12) { animation-delay: 0.6s; }
/* AI Premium Loader */
.ai-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    animation: fadeIn 0.5s ease-out;
}

.ai-pulse-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-gradient);
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    animation: pulse-ring 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
}

.ai-pulse-ring i {
    color: white;
    font-size: 32px;
    animation: float 2s infinite ease-in-out;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 30px rgba(249, 115, 22, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.ai-typing-text {
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.ai-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: fetch-flicker 1s infinite;
}

@keyframes fetch-flicker {
    0% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.3; transform: scale(0.8); }
}
