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

/* ============================================================
   EDMS CLOUD BLUE & CRISP WHITE DESIGN SYSTEM
   نظام ألوان هادئ: أبيض ناصع + أزرق سحابي + سماوي راقي
   ============================================================ */

:root {
    /* Cloud Blue & Soft White Palette */
    --bg-main: #f4f8fc;
    --bg-mesh: radial-gradient(circle at 10% 10%, #e0f2fe 0%, transparent 50%),
               radial-gradient(circle at 90% 90%, #bae6fd 0%, transparent 45%),
               radial-gradient(circle at 50% 50%, #f0f9ff 0%, transparent 70%);
    
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-subtle: #f8fafc;
    
    --border-light: #e2e8f0;
    --border-hover: #0284c7;
    
    /* Cloud Blue Gradients & Accents */
    --primary-color: #0284c7;        /* Sky Blue Deep */
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;        /* Soft Cloud Tint */
    --primary-glow: rgba(2, 132, 199, 0.18);
    --primary-gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%);
    --cloud-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    
    --accent-teal: #0d9488;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    /* Typography Colors */
    --text-dark: #0f172a;            /* Deep Slate */
    --text-muted: #475569;           /* Slate */
    --text-dim: #94a3b8;             /* Light Slate */
    
    /* Rounded Shapes & Soft Shadows */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --shadow-soft: 0 10px 30px -5px rgba(2, 132, 199, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 12px 35px -8px rgba(15, 23, 42, 0.06), 0 0 1px rgba(15, 23, 42, 0.08);
    --shadow-cloud: 0 15px 30px rgba(14, 165, 233, 0.25);
    
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg-main: #0b1329;
    --bg-mesh: radial-gradient(circle at 10% 10%, #0f2b48 0%, transparent 50%),
               radial-gradient(circle at 90% 90%, #1e3a5f 0%, transparent 50%);
    --bg-card: #132238;
    --bg-glass: rgba(19, 34, 56, 0.85);
    --bg-subtle: #1a2c47;
    --border-light: #23395b;
    --border-hover: #38bdf8;
    --text-dark: #f8fafc;
    --text-muted: #cbd5e1;
    --text-dim: #64748b;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 12px 35px rgba(0, 0, 0, 0.4);
}

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

body {
    background-color: var(--bg-main);
    background-image: var(--bg-mesh);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
    transition: var(--transition);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ============================================================
   1. AUTH / LOGIN SCREEN (طراز النور الساطع الرفيع)
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: #f1f4f9;
    background-image: radial-gradient(circle at 10% 20%, rgba(224, 242, 254, 0.6) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(186, 230, 253, 0.5) 0%, transparent 40%);
    position: relative;
}

.auth-card-split {
    display: flex;
    width: 100%;
    max-width: 920px;
    min-height: 520px;
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.12), 0 8px 20px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: authCardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Left Form Side */
.auth-form-side {
    flex: 1.1;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-form-header {
    margin-bottom: 28px;
}

.auth-form-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-form-header p {
    font-size: 13.5px;
    color: #64748b;
    font-weight: 500;
}

/* Input Fields */
.auth-input {
    width: 100%;
    height: 48px;
    background: #edf2f7 !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    padding: 0 44px 0 44px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    transition: all 0.2s ease !important;
}

.auth-input:focus {
    background: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12) !important;
}

.input-icon-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
}

.input-icon-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.input-icon-left:hover {
    color: #0284c7;
}

/* Submit Button */
.btn-auth-submit {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.3);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 8px;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.4);
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.auth-form-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Right Banner Side */
.auth-banner-side {
    flex: 0.9;
    background: linear-gradient(135deg, #f8f6f0 0%, #f0ebdf 100%);
    background-image: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.85) 0%, transparent 60%),
                      linear-gradient(135deg, #f8f6f0 0%, #ede6d6 100%);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    border-right: 1px solid rgba(226, 232, 240, 0.5);
}

.banner-badge-box {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    padding: 12px;
}

.banner-badge-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.banner-title {
    font-size: 24px;
    font-weight: 800;
    color: #2a2015;
    margin-bottom: 12px;
    line-height: 1.3;
}

.banner-subtitle {
    font-size: 13.5px;
    color: #635745;
    line-height: 1.7;
    max-width: 310px;
    font-weight: 500;
}

/* Outer Footer */
.auth-outer-footer {
    margin-top: 24px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-card-split {
        flex-direction: column;
        max-width: 440px;
    }
    .auth-banner-side {
        order: -1;
        padding: 36px 24px;
    }
    .auth-form-side {
        padding: 36px 24px;
    }
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.input-glow-wrapper {
    position: relative;
}

.input-glow-wrapper i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 16px;
    transition: var(--transition);
}

.form-control {
    width: 100%;
    padding: 13px 46px 13px 16px;
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-control:focus + i {
    color: var(--primary-color);
}

.btn-gradient {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-cloud);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(2, 132, 199, 0.35);
}

.demo-box {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px dashed var(--border-light);
}

.demo-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.demo-card {
    padding: 10px 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-card:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* ============================================================
   2. DASHBOARD APP & SIDEBAR (الأبيض الناصع والسحابي)
   ============================================================ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR DESIGN */
.sidebar {
    width: 270px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.sidebar-brand {
    padding: 26px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-light);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: var(--shadow-cloud);
}

.brand-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}

.sidebar-menu {
    padding: 24px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.nav-link i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateX(-4px);
}

.nav-link.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: var(--shadow-cloud);
}

.nav-link.active i {
    transform: scale(1.1);
}

.sidebar-user {
    padding: 18px 16px;
    border-top: 1px solid var(--border-light);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.user-avatar-glow {
    width: 38px;
    height: 38px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

/* MAIN LAYOUT & HEADER */
.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-bar {
    height: 70px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: var(--shadow-soft);
}

.header-title-box h2 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-dark);
}

.action-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon-blur {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-blur:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* CONTENT CANVAS */
.main-canvas {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

/* STAT CARDS GRID */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card-glass::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.stat-card-glass:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft), var(--shadow-card);
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

/* PANELS & TABLES */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 28px;
    margin-bottom: 28px;
}

.panel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* SAAS TABLE DESIGN */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    text-align: right;
}

.modern-table th {
    padding: 12px 18px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-light);
}

.modern-table tbody tr {
    background: var(--bg-subtle);
    transition: var(--transition);
}

.modern-table tbody tr td {
    padding: 15px 18px;
    font-size: 13.5px;
    color: var(--text-dark);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.modern-table tbody tr td:first-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    border-right: 1px solid var(--border-light);
}

.modern-table tbody tr td:last-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
    border-left: 1px solid var(--border-light);
}

.modern-table tbody tr:hover {
    background: var(--primary-light);
}

/* MODERN BADGES */
.badge-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-glow-emerald {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-glow-rose {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

.badge-glow-indigo {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

/* HIGH-END PERMISSIONS MATRIX TOGGLE SWITCHES */
.role-segmented-control {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    overflow-x: auto;
}

.role-pill-btn {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-pill-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-cloud);
}

/* CUSTOM IOS / SAAS STYLE TOGGLE SWITCH FOR PERMISSIONS */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-knob {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    border: 1px solid var(--border-light);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
}

.slider-knob:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider-knob {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

input:checked + .slider-knob:before {
    transform: translateX(20px);
}

input:disabled + .slider-knob {
    opacity: 0.5;
    cursor: not-allowed;
}

/* BUTTONS & MODALS */
.btn-glass-primary {
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-cloud);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-glass-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.35);
}

.btn-glass-secondary {
    padding: 12px 20px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-glass-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

/* MODAL CONTAINER */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    padding: 36px;
    box-shadow: var(--shadow-card);
    animation: cardAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* TOAST NOTIFICATION */
.toast-container {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 9999;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-dark);
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 12px;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   DIGITAL ARCHIVE & DOCUMENT MANAGEMENT STYLES
   ============================================================ */
.view-mode-toggle {
    display: flex;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 3px;
}

.btn-view-toggle {
    background: transparent;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-view-toggle.active, .btn-view-toggle:hover {
    background: var(--bg-card);
    color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.archive-main-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 900px) {
    .archive-main-layout {
        grid-template-columns: 1fr;
    }
}

/* FOLDERS SIDEBAR */
.archive-folders-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.folders-header h4 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
}

.folders-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.folder-tree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.folder-tree-item:hover {
    background: var(--bg-subtle);
    color: var(--primary-color);
}

.folder-tree-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.2);
    font-weight: 700;
}

.folder-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.folder-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-docs-badge {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    color: var(--text-dim);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* DOCS GRID CARDS */
.docs-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.doc-card-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.doc-card-glass:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 14px 30px rgba(0,0,0,0.1);
}

.doc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.file-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
}

.format-pdf { background: rgba(225, 29, 72, 0.12); color: #e11d48; }
.format-docx { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.format-xlsx { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.format-png { background: rgba(217, 119, 6, 0.12); color: #d97706; }

.doc-card-number {
    font-size: 11px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--text-dim);
    background: var(--bg-subtle);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.doc-card-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 8px;
}

.doc-card-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-security-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-sec-top-secret { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.badge-sec-confidential { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-sec-restricted { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd; }
.badge-sec-general { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

.doc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    font-size: 11.5px;
    color: var(--text-muted);
}

.doc-actions-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-doc-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--bg-subtle);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.btn-doc-action:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-card);
}

.btn-doc-action.danger:hover {
    border-color: var(--accent-rose);
    color: var(--accent-rose);
}


/* ============================================================
   EXECUTIVE DASHBOARD & SUMMARY STYLES
   ============================================================ */
.executive-welcome-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.04) 100%), var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
}

.welcome-main-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome-avatar-wrapper {
    position: relative;
}

.welcome-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

.welcome-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.badge-role {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.dash-date-tag {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
}

.welcome-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.welcome-desc {
    font-size: 12.5px;
    color: var(--text-dim);
    margin-top: 4px;
}

.executive-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 11.5px;
    color: var(--text-dim);
    font-weight: 700;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-subtext {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dashboard-grid-container {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-grid-container {
        grid-template-columns: 1fr;
    }
}

.panel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-card-header h3 {
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.panel-card-header .subtext {
    font-size: 11.5px;
    color: var(--text-dim);
}

.badge-neutral {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

/* WORKFLOW MULTI PROGRESS BAR */
.workflow-progress-wrapper {
    padding: 10px 0;
}

.workflow-multi-progress {
    height: 16px;
    width: 100%;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
    display: flex;
    gap: 3px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.progress-segment {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.seg-approved { background: linear-gradient(90deg, #10b981, #059669); }
.seg-pending { background: linear-gradient(90deg, #f59e0b, #d97706); }
.seg-rejected { background: linear-gradient(90deg, #f43f5e, #e11d48); }

.workflow-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-dark);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-approved { background: #10b981; }
.dot-pending { background: #f59e0b; }
.dot-rejected { background: #f43f5e; }

/* DEPARTMENT DISTRIBUTION GRID LIST */
.depts-grid-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dept-stat-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.dept-stat-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.dept-name-tag {
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dept-code-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--primary-color);
}

.dept-metrics-box {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}

.dept-metric-pill {
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    color: var(--text-dim);
    font-weight: 600;
}

.dept-metric-pill strong {
    color: var(--text-dark);
}

/* QUICK ACTION GRID */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.quick-action-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: var(--bg-card);
}

.qa-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.quick-action-btn span {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ACTIVITY FEED TIMELINE */
.activity-feed-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    padding-right: 12px;
}

.activity-feed-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 5px;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary-color);
    margin-top: 4px;
    flex-shrink: 0;
}

.timeline-content {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    flex: 1;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.timeline-user {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
}

.timeline-time {
    font-size: 10.5px;
    color: var(--text-muted);
}

.timeline-action {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 700;
}

.timeline-details {
    font-size: 11.5px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* ============================================================
   ENTERPRISE WORKFLOW & APPROVALS STYLES
   ============================================================ */
.wf-card-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.wf-card-glass:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.wf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.wf-number-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.wf-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.wf-card-meta {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

/* VISUAL STEPPER TRACKER */
.wf-stepper-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 10px 0;
    margin: 18px 0;
}

.wf-stepper-container::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--border-light);
    z-index: 1;
}

.wf-step-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
}

.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-dim);
    transition: var(--transition);
}

.step-completed .step-circle {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.step-current .step-circle {
    background: var(--primary-color);
    border-color: #93c5fd;
    color: #fff;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
    animation: stepPulse 1.8s infinite;
}

@keyframes stepPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.step-title {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-dark);
    max-width: 110px;
    line-height: 1.3;
}

.step-completed .step-title {
    color: #059669;
}

.step-current .step-title {
    color: var(--primary-color);
}

/* PRIORITY & STATUS BADGES */
.badge-prio-normal { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-prio-urgent { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-prio-high { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }

.badge-wf-in-progress { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-wf-approved { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.badge-wf-rejected { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }


