/**
 * Premium Styling for Paperless Office Management System
 * Custom design tokens, glassmorphic touches, and micro-interactions
 */

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

:root {
    --primary-color: #4f46e5;      /* Sleek indigo */
    --primary-hover: #4338ca;
    --secondary-color: #0ea5e9;    /* Clean sky blue */
    --success-color: #10b981;      /* Emerald green */
    --warning-color: #f59e0b;      /* Vibrant amber */
    --danger-color: #ef4444;       /* Coral red */
    
    --bg-dark-sidebar: #0f172a;    /* Deep navy dark */
    --bg-dark-sidebar-hover: #1e293b;
    --text-light-sidebar: #cbd5e1;
    
    --body-bg: #f8fafc;            /* Clean light slate */
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    
    --primary-focus-shadow: rgba(79, 70, 229, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--body-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar customizations */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Layout Framework */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Styling */
#sidebar {
    min-width: 260px;
    max-width: 260px;
    background-color: var(--bg-dark-sidebar);
    color: var(--text-light-sidebar);
    transition: all 0.3s ease;
    min-height: 100vh;
    z-index: 1000;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

#sidebar.active {
    margin-left: -260px;
}

#sidebar .sidebar-header {
    padding: 24px;
    background-color: #0b0f19;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar .sidebar-header h4 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
}

#sidebar .sidebar-profile {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.3) 0%, transparent 100%);
}

#sidebar ul.components {
    padding: 15px 0;
    list-style: none;
    flex-grow: 1;
}

#sidebar ul li a {
    padding: 12px 24px;
    font-size: 15px;
    display: block;
    color: var(--text-light-sidebar);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

#sidebar ul li a i {
    font-size: 18px;
    width: 28px;
    display: inline-block;
    vertical-align: middle;
}

#sidebar ul li a:hover {
    color: #ffffff;
    background: var(--bg-dark-sidebar-hover);
    border-left-color: var(--secondary-color);
}

#sidebar ul li.active > a {
    color: #ffffff;
    background: rgba(79, 70, 229, 0.15);
    border-left-color: var(--primary-color);
}

#sidebar .sidebar-footer {
    padding: 15px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    background-color: #0b0f19;
}

/* Content Container */
#content {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 100vh;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Top Navbar */
.top-navbar {
    position: relative;
    z-index: 1030;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    min-height: 70px;
    box-shadow: var(--glass-shadow);
}

.top-navbar .container-fluid,
.container-fluid {
    min-width: 0;
}

.dropdown-menu {
    z-index: 1060 !important;
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.08);
}

/* Stat Cards */
.stat-card-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.3);
}

.stat-card-sky {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    color: #ffffff;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(2, 132, 199, 0.3);
}

.stat-card-emerald {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: #ffffff;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.3);
}

.stat-card-amber {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(217, 119, 6, 0.3);
}

/* Buttons micro-animations */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.2);
}

/* File Drop Area */
.file-drop-area {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 45px 20px;
    text-align: center;
    background: var(--card-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.file-drop-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.02);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01), 0 10px 25px -10px rgba(79, 70, 229, 0.15);
}

.file-drop-area.dragover {
    border-color: var(--success-color) !important;
    background-color: rgba(16, 185, 129, 0.03) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01), 0 0 15px rgba(16, 185, 129, 0.2) !important;
    animation: dropAreaPulse 1.2s infinite;
}

@keyframes dropAreaPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.file-drop-icon {
    font-size: 54px;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s;
}

.file-drop-area:hover .file-drop-icon {
    transform: translateY(-8px) scale(1.05);
    color: var(--primary-color);
}

.file-drop-area.dragover .file-drop-icon {
    transform: translateY(-8px) scale(1.08);
    color: var(--success-color) !important;
}

/* Custom Badges */
.status-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-draft {
    background-color: #f1f5f9;
    color: #475569;
}

.status-open {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-resolved {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Tables styling */
.custom-table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.custom-table tbody tr {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border-radius: 10px;
    transition: transform 0.15s ease;
}

.custom-table tbody tr:hover {
    transform: translateY(-1px);
    background-color: #fdfdfd;
}

.custom-table tbody td {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.custom-table tbody td:first-child {
    border-left: 1px solid var(--border-color);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.custom-table tbody td:last-child {
    border-right: 1px solid var(--border-color);
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Premium Animated Mesh Gradient for Login background */
.login-bg {
    background: linear-gradient(-45deg, #0b0f19, #111827, #1e1b4b, #0f172a, #030712);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Floating dynamic glowing bubbles inside login background */
.login-bg::before, .login-bg::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(14, 165, 233, 0.0) 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}
.login-bg::before {
    top: 15%;
    left: 10%;
    animation: floatBubbleA 12s ease-in-out infinite alternate;
}
.login-bg::after {
    bottom: 15%;
    right: 10%;
    animation: floatBubbleB 16s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatBubbleA {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(40px, 40px) scale(1.2); }
}

@keyframes floatBubbleB {
    from { transform: translate(0, 0) scale(1.1); }
    to { transform: translate(-50px, -30px) scale(0.9); }
}

.login-card {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45) !important;
    color: #ffffff;
    width: 100%;
    max-width: 440px;
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card:hover {
    transform: scale(1.01) translateY(-2px);
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 10px !important;
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2) !important;
    color: #ffffff !important;
}

/* Timeline workflow */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary-color);
}

.timeline-marker.success { border-color: var(--success-color); }
.timeline-marker.warning { border-color: var(--warning-color); }
.timeline-marker.danger { border-color: var(--danger-color); }

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 1050;
        margin-left: -260px;
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    #sidebar.active {
        margin-left: 0;
    }
    .wrapper {
        position: relative;
        overflow-x: hidden;
    }
    #sidebar.active ~ #content {
        filter: blur(2px);
        pointer-events: none;
    }
    .top-navbar {
        padding: 15px 15px;
    }

    /* Sleek Translucent Mobile Overlay Backdrop */
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1040;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ============================================================================
   CLEAN UI/UX COMPONENT EXTENSIONS
   ============================================================================ */

/* Sleek Inputs Overrides */
.form-control, .form-select {
    border-radius: 10px !important;
    border: 1px solid var(--border-color) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
    transition: all 0.2s ease !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color) !important;
    background-color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 4px var(--primary-focus-shadow) !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
}

/* Modern Nav Pills for Tabs */
.nav-pills {
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
}

.nav-pills .nav-link {
    border-radius: 10px !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 10px 20px !important;
}

.nav-pills .nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.nav-pills .nav-link.active {
    background: #ffffff !important;
    color: var(--primary-color) !important;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05) !important;
    border-color: transparent !important;
}

/* Modern Card Styling Overrides */
.card {
    border-radius: 16px !important;
    border: 1px solid var(--border-color) !important;
    background-color: var(--card-bg) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.01) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card:hover {
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.03) !important;
}

/* Premium Soft Alerts */
.alert {
    border-radius: 14px !important;
    border: none !important;
    font-size: 14px !important;
    padding: 16px 20px !important;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.02) !important;
}

.alert-success {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.alert-danger {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.alert-warning {
    background-color: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fef3c7 !important;
}

.alert-indigo-subtle {
    background-color: rgba(79, 70, 229, 0.03) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(79, 70, 229, 0.08) !important;
}

/* Timeline visual updates */
.timeline-item {
    border-bottom: 1px solid rgba(0,0,0,0.02);
    padding-bottom: 15px;
}
.timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ============================================================================
   THEME STYLESHEET OVERRIDES
   ============================================================================ */

/* Theme 2: Dark Aurora */
body.theme-dark-aurora {
    --body-bg: #070a13;
    --card-bg: #0d1222;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #1e293b;
    
    --glass-bg: rgba(13, 18, 34, 0.85);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --secondary-color: #38bdf8;
    --primary-focus-shadow: rgba(129, 140, 248, 0.25);
    
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
}

body.theme-dark-aurora .card,
body.theme-dark-aurora .top-navbar,
body.theme-dark-aurora .login-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

body.theme-dark-aurora .form-control,
body.theme-dark-aurora .form-select,
body.theme-dark-aurora .table {
    background-color: #090c15 !important;
    color: #f1f5f9 !important;
    border-color: var(--border-color) !important;
}

body.theme-dark-aurora .text-dark,
body.theme-dark-aurora h1,
body.theme-dark-aurora h2,
body.theme-dark-aurora h3,
body.theme-dark-aurora h4,
body.theme-dark-aurora h5,
body.theme-dark-aurora h6,
body.theme-dark-aurora strong {
    color: #ffffff !important;
}

body.theme-dark-aurora .custom-table tbody tr {
    background-color: #0d1222 !important;
}

body.theme-dark-aurora .custom-table tbody tr:hover {
    background-color: #12182c !important;
}

body.theme-dark-aurora .btn-light {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-color: #334155 !important;
}

body.theme-dark-aurora .alert-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

body.theme-dark-aurora .alert-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}


/* Theme 3: Cyberpunk Neon */
body.theme-cyberpunk-neon {
    --body-bg: #030305;
    --card-bg: #06060c;
    --text-primary: #00ffff;
    --text-secondary: #ff007f;
    --border-color: #ff007f;
    
    --glass-bg: rgba(6, 6, 12, 0.95);
    --glass-border: rgba(0, 255, 255, 0.25);
    --glass-shadow: 0 0 15px rgba(0, 255, 255, 0.15);
    
    --primary-color: #ff007f;
    --primary-hover: #e00070;
    --secondary-color: #00ffff;
    --success-color: #39ff14;
    --primary-focus-shadow: rgba(255, 0, 127, 0.35);
    
    color: #ffffff;
    background-image: linear-gradient(rgba(255, 0, 127, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 0, 127, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    background-attachment: fixed;
}

body.theme-cyberpunk-neon .card,
body.theme-cyberpunk-neon .top-navbar {
    background-color: #06060c !important;
    border: 1px solid #ff007f !important;
    box-shadow: 0 0 8px rgba(255, 0, 127, 0.15) !important;
}

body.theme-cyberpunk-neon .form-control,
body.theme-cyberpunk-neon .form-select,
body.theme-cyberpunk-neon .table {
    background-color: #020204 !important;
    color: #00ffff !important;
    border: 1px solid #00ffff !important;
    font-family: 'Courier New', Courier, monospace !important;
}

body.theme-cyberpunk-neon .form-control:focus,
body.theme-cyberpunk-neon .form-select:focus {
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5) !important;
}

body.theme-cyberpunk-neon .text-dark,
body.theme-cyberpunk-neon h1,
body.theme-cyberpunk-neon h2,
body.theme-cyberpunk-neon h3,
body.theme-cyberpunk-neon h4,
body.theme-cyberpunk-neon h5,
body.theme-cyberpunk-neon h6,
body.theme-cyberpunk-neon strong,
body.theme-cyberpunk-neon .sidebar-header h4 {
    color: #00ffff !important;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3) !important;
}

body.theme-cyberpunk-neon .text-secondary {
    color: #ff007f !important;
}

body.theme-cyberpunk-neon .custom-table tbody tr {
    background-color: #06060c !important;
    border: 1px solid #ff007f !important;
}

body.theme-cyberpunk-neon .custom-table tbody tr:hover {
    background-color: #0d0d18 !important;
    transform: scale(1.01) !important;
}

body.theme-cyberpunk-neon .btn-primary {
    background-color: #ff007f !important;
    border-color: #ff007f !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(255, 0, 127, 0.4) !important;
}

body.theme-cyberpunk-neon .btn-primary:hover {
    background-color: #e00070 !important;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.7) !important;
}

body.theme-cyberpunk-neon .btn-light {
    background-color: #020204 !important;
    color: #00ffff !important;
    border: 1px solid #00ffff !important;
}

body.theme-cyberpunk-neon .btn-outline-secondary {
    color: #00ffff !important;
    border-color: #00ffff !important;
}

body.theme-cyberpunk-neon .btn-outline-secondary:hover {
    background-color: #00ffff !important;
    color: #020204 !important;
}

body.theme-cyberpunk-neon .status-approved {
    background-color: rgba(57, 255, 20, 0.1) !important;
    color: #39ff14 !important;
    border: 1px solid #39ff14 !important;
}

body.theme-cyberpunk-neon .status-pending {
    background-color: rgba(255, 255, 0, 0.1) !important;
    color: #ffff00 !important;
    border: 1px solid #ffff00 !important;
}

body.theme-cyberpunk-neon .status-rejected {
    background-color: rgba(255, 0, 0, 0.1) !important;
    color: #ff0000 !important;
    border: 1px solid #ff0000 !important;
}

body.theme-cyberpunk-neon .badge {
    border: 1px solid currentColor !important;
    background: transparent !important;
}

/* Custom Responsive Table & Utility Overrides */
.table-responsive {
    max-width: 100%;
}

.custom-table {
    min-width: 980px;
}

.document-archive-toolbar {
    width: 100%;
}

.document-archive-toolbar .form-select,
.document-archive-toolbar .btn {
    min-height: 46px;
}

/* Document Archive Module */
.archive-filter-panel,
.archive-list-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.archive-filter-panel {
    padding: 22px 26px;
}

.archive-list-panel {
    padding: 26px;
}

.archive-filter-panel .form-label {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.archive-filter-panel .form-control,
.archive-filter-panel .form-select,
.archive-bulkbar .form-select {
    min-height: 44px;
    border-color: #dbe3ed;
    border-radius: 8px;
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: none;
}

.archive-filter-panel .form-control:focus,
.archive-filter-panel .form-select:focus,
.archive-bulkbar .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-focus-shadow);
}

.archive-search .input-group-text {
    border-color: #dbe3ed;
    border-radius: 8px 0 0 8px;
    background: #f8fafc;
    color: #64748b;
}

.archive-search .form-control {
    border-left: 0;
    border-radius: 0 8px 8px 0;
}

.archive-icon-btn {
    width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.archive-kicker {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.archive-primary-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.18);
}

.archive-bulkbar {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 14px 16px;
}

.archive-bulkbar .form-select {
    width: 190px;
}

.archive-bulkbar .form-select[name="bulk_category_id"] {
    width: 220px;
}

.archive-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1060px;
}

.archive-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 12px 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.archive-table tbody td {
    border-bottom: 1px solid #eef2f7;
    color: #0f172a;
    padding: 14px;
    vertical-align: middle;
}

.archive-table tbody tr:hover td {
    background: #fbfdff;
}

.archive-file-cell {
    max-width: 320px;
}

.archive-file-icon {
    align-items: center;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    color: var(--primary-color);
    display: flex;
    flex: 0 0 auto;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.archive-file-icon i {
    font-size: 1.25rem;
}

.archive-doc-number,
.archive-file-meta {
    font-size: 0.68rem;
}

.archive-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    white-space: nowrap;
}

.archive-action-btn {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbe3ed;
    border-radius: 8px;
    color: #334155;
    display: inline-flex;
    font-size: 0.82rem;
    gap: 6px;
    height: 38px;
    justify-content: center;
    min-width: 38px;
    padding: 0 10px;
}

.archive-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.archive-details-btn {
    color: #0f172a;
    font-weight: 700;
    min-width: 86px;
}

/* Document Workspace Module */
.document-workspace {
    --doc-panel-border: #dbe3ed;
}

.document-panel,
.document-side-panel {
    background: #ffffff;
    border: 1px solid var(--doc-panel-border);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
    margin-bottom: 18px;
    padding: 24px;
}

.document-side-panel {
    padding: 22px;
}

.document-hero-panel {
    border-left: 4px solid var(--primary-color);
}

.document-hero-panel h3 {
    line-height: 1.2;
}

.document-action-row .btn {
    min-height: 40px;
    border-radius: 8px;
}

.document-file-panel > .border {
    border-color: #e2e8f0 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
}

.document-panel h5,
.document-side-panel h5 {
    letter-spacing: 0;
}

.document-panel .table {
    margin-bottom: 0;
}

.document-panel .table th {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.document-panel .table td {
    vertical-align: middle;
}

.document-side-panel .form-control,
.document-side-panel .form-select,
.document-panel .form-control,
.document-panel .form-select {
    border-color: #dbe3ed;
    border-radius: 8px;
    box-shadow: none;
}

.document-side-panel .form-control:focus,
.document-side-panel .form-select:focus,
.document-panel .form-control:focus,
.document-panel .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-focus-shadow);
}

.document-side-panel .timeline-item {
    padding-bottom: 16px;
}

.document-side-panel .timeline-item:last-child {
    padding-bottom: 0;
}

.document-side-panel .timeline-marker {
    box-shadow: 0 0 0 4px #ffffff;
}

.document-side-panel #doc_qrcode_element {
    min-height: 190px;
}

@media (max-width: 576px) {
    .d-none-xs {
        display: none !important;
    }
}
@media (max-width: 768px) {
    .d-none-sm {
        display: none !important;
    }

    .container-fluid.p-4 {
        padding: 1rem !important;
    }

    .top-navbar .container-fluid {
        gap: 0.5rem;
    }

    .top-navbar .dropdown {
        margin-right: 0.5rem !important;
    }

    .card.p-4 {
        padding: 1rem !important;
    }

    .document-archive-toolbar {
        align-items: stretch !important;
    }

    .document-archive-toolbar > div {
        width: 100%;
    }

    .document-archive-toolbar .form-select,
    .document-archive-toolbar .btn {
        width: 100% !important;
    }

    .document-archive-header {
        align-items: stretch !important;
    }

    .document-archive-header > div,
    .document-archive-header .btn {
        width: 100%;
    }

    .document-archive-header h5 {
        font-size: 1rem;
    }

    .archive-filter-panel,
    .archive-list-panel {
        padding: 16px;
    }

    .archive-bulkbar {
        align-items: stretch;
    }

    .archive-bulkbar > div,
    .archive-bulkbar .form-select,
    .archive-bulkbar .btn {
        width: 100% !important;
    }

    .archive-actions {
        justify-content: flex-start;
    }
}

/* Micro-interaction Hover & Lift Transitions */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.hover-lift:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

/* Slide up entrance animations */
.animate-fade-in {
    animation: fadeInUp 0.4s ease-out forwards;
}

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

/* Pulsing Badge & Icon Glows */
.pulse-glow {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.98);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.98);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ============================================================================
   Theme 4: Premium Glassmorphism
   ============================================================================ */
body.theme-glassmorphism {
    --body-bg: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
    
    --primary-color: #38bdf8;
    --primary-hover: #0ea5e9;
    --secondary-color: #818cf8;
    --primary-focus-shadow: rgba(56, 189, 248, 0.25);
    
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 40%),
                linear-gradient(135deg, #0b0f19 0%, #030712 100%);
    background-attachment: fixed;
    color: var(--text-primary);
}

body.theme-glassmorphism .card,
body.theme-glassmorphism .top-navbar,
body.theme-glassmorphism #sidebar {
    background: rgba(13, 18, 34, 0.45) !important;
    backdrop-filter: blur(20px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(120%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25) !important;
}

body.theme-glassmorphism #sidebar .sidebar-header {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body.theme-glassmorphism .form-control,
body.theme-glassmorphism .form-select,
body.theme-glassmorphism .table {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

body.theme-glassmorphism .form-control:focus,
body.theme-glassmorphism .form-select:focus {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

body.theme-glassmorphism .custom-table tbody tr {
    background-color: rgba(255, 255, 255, 0.01) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body.theme-glassmorphism .custom-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    transform: translateY(-2px) !important;
}

body.theme-glassmorphism .text-dark,
body.theme-glassmorphism h1,
body.theme-glassmorphism h2,
body.theme-glassmorphism h3,
body.theme-glassmorphism h4,
body.theme-glassmorphism h5,
body.theme-glassmorphism h6,
body.theme-glassmorphism strong,
body.theme-glassmorphism .sidebar-header h4 {
    color: #ffffff !important;
}

body.theme-glassmorphism .btn-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.theme-glassmorphism .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

body.theme-glassmorphism .alert-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

body.theme-glassmorphism .alert-danger {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

/* ============================================================================
   Enterprise UI Refinement Layer
   ============================================================================ */
.container-fluid.p-4 {
    padding: 1.75rem !important;
}

.card {
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04) !important;
}

.card:hover {
    transform: none;
}

.rounded-4 {
    border-radius: 8px !important;
}

.rounded-3 {
    border-radius: 8px !important;
}

.shadow,
.shadow-sm,
.shadow-lg {
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05) !important;
}

.btn {
    border-radius: 8px;
    min-height: 40px;
}

.btn-sm {
    min-height: 34px;
    padding: 0.35rem 0.7rem;
}

.btn-primary {
    box-shadow: none;
}

.form-control,
.form-select,
.input-group-text {
    border-color: #dbe3ed;
    border-radius: 8px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-focus-shadow);
}

.form-label {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge {
    border-radius: 6px;
    font-weight: 700;
}

.table thead th {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table tbody td {
    vertical-align: middle;
}

.alert {
    border-radius: 8px !important;
}

.hover-lift:hover {
    transform: none !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06) !important;
}

.file-drop-area {
    border-radius: 8px !important;
}

.kanban-column,
.kanban-card,
.feed-content,
.timeline-item .border,
.modal-content,
.dropdown-menu {
    border-radius: 8px !important;
}

.kanban-column {
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04) !important;
}

.kanban-card:hover {
    transform: none !important;
}

/* Premium Login Redesign */
.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark-sidebar) 0%, #1e1b4b 100%);
    position: relative;
    overflow: hidden;
}

.login-bg::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, rgba(0,0,0,0) 70%);
    top: -300px;
    left: -200px;
    border-radius: 50%;
    z-index: 1;
}

.login-bg::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, rgba(0,0,0,0) 70%);
    bottom: -200px;
    right: -100px;
    border-radius: 50%;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 440px;
    z-index: 10;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: white;
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    backdrop-filter: blur(10px);
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15) !important;
}

.login-card .input-group-text {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--secondary-color) !important;
}

.login-card .form-label {
    color: rgba(255, 255, 255, 0.7) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.login-card hr.border-white-50 {
    border-color: rgba(255,255,255,0.15) !important;
    opacity: 1;
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Dashboard Micro-animations */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08) !important;
}

.hover-lift:hover i.fs-4 {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03) !important;
}
