/* ============================================================
   ClientSpace v2  –  style.css
   ============================================================ */

:root {
    --primary:        #2563eb;
    --primary-dark:   #1d4ed8;
    --primary-light:  #dbeafe;
    --primary-50:     #eff6ff;
    --secondary:      #7c3aed;
    --success:        #16a34a;
    --success-light:  #dcfce7;
    --danger:         #dc2626;
    --danger-light:   #fee2e2;
    --warning:        #d97706;
    --warning-light:  #fef3c7;
    --info:           #0891b2;
    --info-light:     #cffafe;

    --sidebar-bg:     #0f172a;
    --sidebar-hover:  #1e293b;
    --sidebar-text:   #94a3b8;
    --sidebar-title:  #f1f5f9;
    --sidebar-width:  260px;

    --bg:             #f1f5f9;
    --surface:        #ffffff;
    --surface-2:      #f8fafc;
    --border:         #e2e8f0;
    --border-2:       #cbd5e1;
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;

    --radius:    10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
    --shadow:    0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.10);
    --t: .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text-primary); line-height: 1.6; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ─── Auth ───────────────────────────────────────────────── */
.auth-body { background: linear-gradient(135deg,#0f172a 0%,#1e3a5f 50%,#0f172a 100%); min-height:100vh; display:flex; align-items:center; justify-content:center; padding:1.5rem; }
.auth-card { background:var(--surface); border-radius:var(--radius-xl); box-shadow:var(--shadow-lg); width:100%; max-width:440px; overflow:hidden; }
.auth-header { background:linear-gradient(135deg,var(--primary),var(--secondary)); padding:2.5rem 2rem 2rem; text-align:center; color:white; }
.auth-logo { width:56px; height:56px; background:rgba(255,255,255,.2); border-radius:14px; display:flex; align-items:center; justify-content:center; margin:0 auto 1rem; font-size:1.5rem; }
.auth-header h1 { font-size:1.5rem; font-weight:700; }
.auth-header p { opacity:.8; font-size:.9rem; margin-top:.25rem; }
.auth-body-content { padding:2rem; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom:1.1rem; }
.form-label { display:block; font-size:.825rem; font-weight:600; color:var(--text-secondary); margin-bottom:.4rem; }
.form-control { width:100%; padding:.65rem .9rem; border:1.5px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text-primary); font-size:.9rem; transition:border-color var(--t),box-shadow var(--t); outline:none; }
.form-control:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.form-control:disabled { opacity:.6; background:var(--surface-2); }
.input-group { position:relative; }
.input-icon { position:absolute; left:.85rem; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:.9rem; pointer-events:none; }
.input-group .form-control { padding-left:2.5rem; }
.input-toggle { position:absolute; right:.85rem; top:50%; transform:translateY(-50%); color:var(--text-muted); background:none; border:none; padding:.2rem; cursor:pointer; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; gap:.45rem; padding:.62rem 1.25rem; border-radius:var(--radius); font-size:.875rem; font-weight:600; border:none; cursor:pointer; transition:all var(--t); text-decoration:none; white-space:nowrap; }
.btn-primary { background:var(--primary); color:white; }
.btn-primary:hover { background:var(--primary-dark); transform:translateY(-1px); box-shadow:0 4px 12px rgba(37,99,235,.3); color:white; text-decoration:none; }
.btn-secondary { background:var(--surface-2); color:var(--text-secondary); border:1.5px solid var(--border); }
.btn-secondary:hover { background:var(--border); color:var(--text-primary); text-decoration:none; }
.btn-success { background:var(--success); color:white; }
.btn-success:hover { background:#15803d; color:white; text-decoration:none; }
.btn-danger { background:var(--danger); color:white; }
.btn-danger:hover { background:#b91c1c; color:white; text-decoration:none; }
.btn-warning { background:var(--warning); color:white; }
.btn-warning:hover { background:#b45309; color:white; text-decoration:none; }
.btn-ghost { background:transparent; color:var(--text-secondary); }
.btn-ghost:hover { background:var(--surface-2); color:var(--text-primary); text-decoration:none; }
.btn-sm { padding:.38rem .8rem; font-size:.8rem; }
.btn-lg { padding:.85rem 1.75rem; font-size:1rem; }
.btn-block { width:100%; justify-content:center; }
.btn:disabled { opacity:.55; cursor:not-allowed; transform:none !important; }

/* ─── Alert ──────────────────────────────────────────────── */
.alert { display:flex; align-items:flex-start; gap:.75rem; padding:.85rem 1rem; border-radius:var(--radius); font-size:.875rem; margin-bottom:1.25rem; border-left:3px solid transparent; }
.alert-success { background:var(--success-light); color:#15803d; border-color:var(--success); }
.alert-danger  { background:var(--danger-light);  color:#b91c1c;  border-color:var(--danger); }
.alert-warning { background:var(--warning-light); color:#92400e;  border-color:var(--warning); }
.alert-info    { background:var(--info-light);    color:#155e75;  border-color:var(--info); }
.alert-icon { font-size:1rem; flex-shrink:0; margin-top:.05rem; }

/* ─── Layout ─────────────────────────────────────────────── */
.app-layout { display:flex; min-height:100vh; }

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar { width:var(--sidebar-width); background:var(--sidebar-bg); display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0; z-index:100; overflow-y:auto; transition:transform var(--t); }
.sidebar::-webkit-scrollbar { width:4px; }
.sidebar::-webkit-scrollbar-thumb { background:#334155; border-radius:4px; }
.sidebar-brand { display:flex; align-items:center; gap:.75rem; padding:1.5rem 1.25rem; border-bottom:1px solid rgba(255,255,255,.06); }
.sidebar-brand-icon { width:38px; height:38px; background:var(--primary); border-radius:10px; display:flex; align-items:center; justify-content:center; color:white; font-size:1rem; flex-shrink:0; }
.brand-name { font-weight:700; font-size:1rem; color:var(--sidebar-title); }
.brand-sub  { font-size:.68rem; color:var(--sidebar-text); margin-top:.05rem; }
.sidebar-user { display:flex; align-items:center; gap:.75rem; padding:1rem 1.25rem; margin:.75rem .75rem 0; background:rgba(255,255,255,.04); border-radius:var(--radius); border:1px solid rgba(255,255,255,.06); }
.user-avatar { width:36px; height:36px; border-radius:10px; background:linear-gradient(135deg,var(--primary),var(--secondary)); display:flex; align-items:center; justify-content:center; color:white; font-weight:700; font-size:.85rem; flex-shrink:0; }
.user-name { font-size:.825rem; font-weight:600; color:var(--sidebar-title); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }
.user-role { font-size:.7rem; color:var(--sidebar-text); }
.sidebar-nav { padding:.75rem; flex:1; }
.nav-section-title { font-size:.65rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:#334155; padding:.5rem .5rem .25rem; margin-top:.5rem; }
.nav-item { display:flex; align-items:center; gap:.65rem; padding:.6rem .75rem; border-radius:8px; color:var(--sidebar-text); font-size:.85rem; font-weight:500; cursor:pointer; transition:all var(--t); margin-bottom:.15rem; text-decoration:none; }
.nav-item:hover { background:var(--sidebar-hover); color:var(--sidebar-title); text-decoration:none; }
.nav-item.active { background:rgba(37,99,235,.2); color:#93c5fd; }
.nav-icon { font-size:.9rem; width:18px; flex-shrink:0; }
.logout-link { color:#f87171 !important; }
.sidebar-footer { padding:.75rem; border-top:1px solid rgba(255,255,255,.06); }

/* ─── Main ───────────────────────────────────────────────── */
.main-content { margin-left:var(--sidebar-width); flex:1; display:flex; flex-direction:column; min-height:100vh; }
.topbar { background:var(--surface); border-bottom:1px solid var(--border); padding:.9rem 1.75rem; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:50; box-shadow:var(--shadow-sm); }
.topbar-left { display:flex; align-items:center; gap:1rem; }
.topbar-right { display:flex; align-items:center; gap:.75rem; }
.page-title { font-size:1.1rem; font-weight:700; }
.page-subtitle { font-size:.8rem; color:var(--text-muted); margin-top:.05rem; }
.content { padding:1.75rem; flex:1; }

.sidebar-toggle { display:none; width:36px; height:36px; border-radius:8px; background:var(--surface-2); border:1px solid var(--border); align-items:center; justify-content:center; font-size:.9rem; color:var(--text-secondary); }

/* ─── Cards ──────────────────────────────────────────────── */
.card { background:var(--surface); border-radius:var(--radius-lg); border:1px solid var(--border); box-shadow:var(--shadow-sm); overflow:hidden; }
.card-header { padding:1.1rem 1.4rem; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.card-title { font-size:.95rem; font-weight:700; display:flex; align-items:center; gap:.5rem; }
.card-body { padding:1.4rem; }
.card-footer { padding:1rem 1.4rem; border-top:1px solid var(--border); background:var(--surface-2); }

/* ─── Stats ──────────────────────────────────────────────── */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1.1rem; margin-bottom:1.75rem; }
.stat-card { background:var(--surface); border-radius:var(--radius-lg); padding:1.25rem 1.4rem; border:1px solid var(--border); box-shadow:var(--shadow-sm); display:flex; align-items:flex-start; gap:1rem; transition:var(--t); }
.stat-card:hover { box-shadow:var(--shadow); transform:translateY(-2px); }
.stat-icon { width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.1rem; flex-shrink:0; }
.stat-icon.blue   { background:var(--primary-light); color:var(--primary); }
.stat-icon.green  { background:var(--success-light); color:var(--success); }
.stat-icon.purple { background:#ede9fe; color:var(--secondary); }
.stat-icon.orange { background:var(--warning-light); color:var(--warning); }
.stat-icon.cyan   { background:var(--info-light); color:var(--info); }
.stat-label { font-size:.775rem; color:var(--text-muted); font-weight:500; text-transform:uppercase; letter-spacing:.06em; }
.stat-value { font-size:1.6rem; font-weight:800; line-height:1.2; margin-top:.1rem; }
.stat-sub { font-size:.75rem; color:var(--text-muted); margin-top:.15rem; }

/* ─── Company Cards (collaborateur) ─────────────────────── */
.companies-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1.25rem; }
.company-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.5rem; display:flex; flex-direction:column; gap:1rem; transition:all var(--t); cursor:pointer; text-decoration:none; }
.company-card:hover { box-shadow:var(--shadow); border-color:var(--primary); transform:translateY(-3px); text-decoration:none; }
.company-icon { width:52px; height:52px; border-radius:14px; background:linear-gradient(135deg,var(--primary),var(--secondary)); display:flex; align-items:center; justify-content:center; color:white; font-size:1.3rem; }
.company-name { font-size:1.05rem; font-weight:700; color:var(--text-primary); }
.company-code { font-size:.75rem; color:var(--text-muted); background:var(--surface-2); border:1px solid var(--border); padding:.15rem .5rem; border-radius:20px; display:inline-block; margin-top:.2rem; }
.company-meta { font-size:.8rem; color:var(--text-muted); display:flex; gap:1rem; }
.company-meta span { display:flex; align-items:center; gap:.3rem; }

/* ─── Month Nav ──────────────────────────────────────────── */
.month-nav-wrap { display:flex; align-items:center; justify-content:space-between; margin-bottom:1.25rem; flex-wrap:wrap; gap:.75rem; }
.month-pills { display:flex; flex-wrap:wrap; gap:.4rem; }
.month-pill { padding:.38rem .8rem; border-radius:30px; font-size:.8rem; font-weight:600; border:1.5px solid var(--border); background:var(--surface); color:var(--text-secondary); cursor:pointer; transition:var(--t); text-decoration:none; }
.month-pill:hover { border-color:var(--primary); color:var(--primary); text-decoration:none; }
.month-pill.active { background:var(--primary); color:white; border-color:var(--primary); }
.month-pill.has-files { border-color:var(--primary); }
.month-pill.locked { border-color:var(--danger); color:var(--danger); }
.month-pill.locked.active { background:var(--danger); color:white; }

/* ─── Lock Banner ────────────────────────────────────────── */
.lock-banner { display:flex; align-items:center; gap:.75rem; padding:.9rem 1.25rem; background:var(--danger-light); border:1.5px solid var(--danger); border-radius:var(--radius); margin-bottom:1.25rem; font-size:.875rem; color:#b91c1c; }
.lock-banner i { font-size:1.1rem; flex-shrink:0; }

/* ─── Category Tabs ──────────────────────────────────────── */
.cat-tabs { display:flex; flex-wrap:wrap; gap:.35rem; margin-bottom:1.25rem; }
.cat-tab { display:flex; align-items:center; gap:.45rem; padding:.5rem 1rem; border-radius:var(--radius); font-size:.825rem; font-weight:600; border:1.5px solid var(--border); background:var(--surface); color:var(--text-secondary); cursor:pointer; transition:all var(--t); text-decoration:none; }
.cat-tab:hover { border-color:var(--primary); color:var(--primary); text-decoration:none; }
.cat-tab.active { color:white; border-color:transparent; }
.cat-tab .cat-count { background:rgba(255,255,255,.25); border-radius:20px; padding:.05rem .4rem; font-size:.7rem; margin-left:.2rem; }
.cat-tab:not(.active) .cat-count { background:var(--surface-2); border:1px solid var(--border); color:var(--text-muted); }

/* ─── Upload Zone ────────────────────────────────────────── */
.upload-zone { border:2px dashed var(--border-2); border-radius:var(--radius-lg); padding:2.5rem 2rem; text-align:center; background:var(--surface-2); transition:all var(--t); cursor:pointer; }
.upload-zone:hover, .upload-zone.drag-over { border-color:var(--primary); background:var(--primary-50); }
.upload-icon { font-size:2.5rem; color:var(--text-muted); margin-bottom:.75rem; }
.upload-zone.drag-over .upload-icon { color:var(--primary); }
.upload-title { font-weight:700; font-size:1rem; margin-bottom:.25rem; }
.upload-sub { font-size:.825rem; color:var(--text-muted); }
.upload-meta { font-size:.75rem; color:var(--text-muted); margin-top:.5rem; }
#fileInput { display:none; }

.cat-select-wrap { display:flex; align-items:center; gap:.75rem; margin-top:1rem; flex-wrap:wrap; }
.cat-select-wrap label { font-size:.85rem; font-weight:600; color:var(--text-secondary); flex-shrink:0; }
.cat-select-wrap select { flex:1; min-width:200px; }

/* ─── Upload list ────────────────────────────────────────── */
.upload-list { margin-top:1rem; display:flex; flex-direction:column; gap:.5rem; }
.upload-item { background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius); padding:.75rem 1rem; display:flex; align-items:center; gap:.75rem; font-size:.825rem; }
.upload-item-name { flex:1; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.upload-item-size { color:var(--text-muted); font-size:.75rem; }
.upload-status-ok  { color:var(--success); }
.upload-status-err { color:var(--danger); }

/* ─── Files Grid ─────────────────────────────────────────── */
.files-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:1rem; }
.file-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.1rem 1rem; transition:all var(--t); }
.file-card:hover { box-shadow:var(--shadow); border-color:var(--primary); transform:translateY(-2px); }
.file-icon-wrap { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.4rem; margin-bottom:.75rem; background:var(--surface-2); }
.file-name { font-size:.825rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:.25rem; }
.file-meta { font-size:.72rem; color:var(--text-muted); margin-bottom:.75rem; }
.file-actions { display:flex; gap:.4rem; }
.file-action-btn { flex:1; padding:.35rem; border-radius:7px; border:none; background:var(--surface-2); color:var(--text-secondary); font-size:.75rem; cursor:pointer; transition:var(--t); text-align:center; text-decoration:none; display:flex; align-items:center; justify-content:center; }
.file-action-btn.download:hover { background:var(--primary-light); color:var(--primary); }
.file-action-btn.delete:hover   { background:var(--danger-light);  color:var(--danger); }
.file-action-btn:hover { text-decoration:none; }

/* ─── Table ──────────────────────────────────────────────── */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:.875rem; }
thead th { padding:.75rem 1rem; text-align:left; font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); background:var(--surface-2); border-bottom:1px solid var(--border); }
tbody td { padding:.85rem 1rem; border-bottom:1px solid var(--border); color:var(--text-secondary); vertical-align:middle; }
tbody tr:last-child td { border-bottom:none; }
tbody tr:hover { background:var(--surface-2); }
tbody tr:hover td { color:var(--text-primary); }

/* ─── Badge ──────────────────────────────────────────────── */
.badge { display:inline-flex; align-items:center; gap:.3rem; padding:.2rem .65rem; border-radius:30px; font-size:.72rem; font-weight:700; }
.badge-primary { background:var(--primary-light); color:var(--primary); }
.badge-success { background:var(--success-light); color:var(--success); }
.badge-danger  { background:var(--danger-light);  color:var(--danger); }
.badge-warning { background:var(--warning-light); color:var(--warning); }
.badge-purple  { background:#ede9fe; color:var(--secondary); }
.badge-muted   { background:var(--surface-2); color:var(--text-muted); border:1px solid var(--border); }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay { position:fixed; inset:0; background:rgba(15,23,42,.5); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; z-index:1000; opacity:0; pointer-events:none; transition:opacity var(--t); padding:1rem; }
.modal-overlay.open { opacity:1; pointer-events:all; }
.modal { background:var(--surface); border-radius:var(--radius-xl); box-shadow:var(--shadow-lg); width:100%; max-width:520px; overflow:hidden; transform:translateY(10px) scale(.98); transition:transform var(--t); }
.modal-overlay.open .modal { transform:translateY(0) scale(1); }
.modal-header { padding:1.25rem 1.5rem; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.modal-title { font-weight:700; font-size:1rem; }
.modal-close { background:none; border:none; font-size:1.1rem; color:var(--text-muted); cursor:pointer; padding:.25rem; }
.modal-close:hover { color:var(--text-primary); }
.modal-body   { padding:1.5rem; }
.modal-footer { padding:1rem 1.5rem; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:.75rem; }
.modal-body .grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:.85rem; }

/* ─── Month Lock Grid (admin) ───────────────────────────── */
.months-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:.75rem; }
.month-lock-card { border-radius:var(--radius); border:1.5px solid var(--border); padding:1rem; text-align:center; transition:all var(--t); }
.month-lock-card.locked { border-color:var(--danger); background:var(--danger-light); }
.month-lock-card:not(.locked) { background:var(--surface); }
.month-lock-card .month-label { font-weight:700; font-size:.875rem; margin-bottom:.5rem; }
.month-lock-card .lock-icon { font-size:1.25rem; margin-bottom:.5rem; }
.month-lock-card.locked .lock-icon { color:var(--danger); }
.month-lock-card:not(.locked) .lock-icon { color:var(--text-muted); }

/* ─── Empty state ────────────────────────────────────────── */
.empty-state { text-align:center; padding:3.5rem 2rem; color:var(--text-muted); }
.empty-icon  { font-size:3rem; opacity:.4; margin-bottom:1rem; }
.empty-title { font-weight:700; font-size:1rem; color:var(--text-secondary); margin-bottom:.4rem; }
.empty-sub   { font-size:.85rem; }

/* ─── Toast ──────────────────────────────────────────────── */
.toast-container { position:fixed; bottom:1.5rem; right:1.5rem; display:flex; flex-direction:column; gap:.5rem; z-index:9999; }
.toast { background:#0f172a; color:white; padding:.85rem 1.25rem; border-radius:var(--radius); font-size:.85rem; box-shadow:var(--shadow-lg); display:flex; align-items:center; gap:.6rem; animation:slideIn .3s ease; max-width:340px; }
.toast.success { border-left:3px solid var(--success); }
.toast.error   { border-left:3px solid var(--danger); }

/* ─── Search ─────────────────────────────────────────────── */
.search-bar { display:flex; align-items:center; gap:.5rem; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius); padding:.4rem .75rem; font-size:.85rem; }
.search-bar input { border:none; background:transparent; outline:none; flex:1; color:var(--text-primary); }

/* ─── Checkbox list ──────────────────────────────────────── */
.check-list { display:flex; flex-direction:column; gap:.5rem; max-height:200px; overflow-y:auto; border:1px solid var(--border); border-radius:var(--radius); padding:.75rem; }
.check-list label { display:flex; align-items:center; gap:.6rem; font-size:.85rem; cursor:pointer; padding:.25rem; border-radius:6px; }
.check-list label:hover { background:var(--surface-2); }
.check-list input[type=checkbox] { accent-color:var(--primary); width:15px; height:15px; flex-shrink:0; }

/* ─── Misc ───────────────────────────────────────────────── */
.divider { display:flex; align-items:center; gap:.75rem; color:var(--text-muted); font-size:.8rem; margin:1.1rem 0; }
.divider::before, .divider::after { content:''; flex:1; height:1px; background:var(--border); }
.progress { height:8px; background:var(--border); border-radius:30px; overflow:hidden; }
.progress-bar { height:100%; background:linear-gradient(90deg,var(--primary),var(--secondary)); border-radius:30px; transition:width .4s ease; }
.sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:99; }
.sidebar-overlay.open { display:block; }

/* ─── Grid utils ─────────────────────────────────────────── */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:1.25rem; }
.mb-2 { margin-bottom:1rem; }
.mb-3 { margin-bottom:1.5rem; }
.d-flex { display:flex; }
.align-center { align-items:center; }
.gap-1 { gap:.5rem; }
.gap-2 { gap:1rem; }
.ml-auto { margin-left:auto; }
.text-muted { color:var(--text-muted); }
.text-primary-color { color:var(--primary); }
.fw-bold { font-weight:700; }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes spin    { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
.fade-in { animation:fadeIn .3s ease; }
.spin    { animation:spin 1s linear infinite; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .grid-2 { grid-template-columns:1fr; }
    .grid-3 { grid-template-columns:1fr 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform:translateX(-100%); }
    .sidebar.open { transform:translateX(0); }
    .main-content { margin-left:0; }
    .sidebar-toggle { display:flex; }
    .files-grid { grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); }
    .stats-grid { grid-template-columns:1fr 1fr; }
    .content { padding:1rem; }
    .topbar { padding:.75rem 1rem; }
    .cat-tabs { gap:.25rem; }
    .cat-tab { font-size:.75rem; padding:.4rem .7rem; }
}
@media (max-width: 500px) {
    .grid-3 { grid-template-columns:1fr; }
    .months-grid { grid-template-columns:repeat(3,1fr); }
}
