/* ================================================================
   عَدْل تك — the Youne product shell (same system as Qawam / Mizan:
   raised sidebar cards, collapsible rail, static 3D cards, accent stats)
   in navy + gold. Loads after style.css and mobile.css; the legacy tokens
   are remapped at the bottom of :root so older pages follow the palette.
   ================================================================ */
:root {
    --brand:        #C9A55A;
    --brand-light:  #E6CD92;
    --brand-dark:   #9C7A36;
    --brand-glow:   rgba(201, 165, 90, 0.45);
    --brand-subtle: rgba(201, 165, 90, 0.12);
    --brand-grad:   linear-gradient(135deg, #E6CD92 0%, #C9A55A 55%, #9C7A36 100%);
    --navy: #0B1530; --navy-2: #121E3D; --navy-3: #1A2A52; --ink: #060A14;

    --bg-1:          #F1F4F9;
    --surface-card:  #FFFFFF;
    --surface-input: #F8FAFC;
    --surface-inset: #F1F5F9;
    --sidebar-bg:    linear-gradient(180deg, #0B1530 0%, #08102A 60%, #060A14 100%);
    --topbar-bg:     rgba(255, 255, 255, 0.9);

    --t-1: #0F172A; --t-2: #334155; --t-3: #64748B;
    --line: rgba(15, 23, 42, 0.08); --line-strong: rgba(15, 23, 42, 0.16);

    --c-success: #16A34A; --c-info: #3B82F6; --c-warn: #D97706; --c-danger: #DC2626; --c-purple: #7C3AED;

    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow:    0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-3d: inset 0 1px 0 #fff, 0 1px 0 rgba(15, 23, 42, 0.06), 0 14px 32px -18px rgba(15, 23, 42, 0.28);

    --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px;
    --sidebar-w: 268px; --topbar-h: 60px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1); --t-fast: 0.18s var(--ease); --t-base: 0.28s var(--ease);

    /* legacy tokens (inline styles in older pages) */
    --olive: var(--navy); --olive2: var(--navy-2); --olive3: var(--navy-3); --olive4: #fff;
    --olive-accent: var(--brand-dark); --olive-light: rgba(201, 165, 90, 0.14); --olive-muted: var(--brand);
    --olive-bg: rgba(201, 165, 90, 0.10); --olive-bdr: rgba(156, 122, 54, 0.28);
    --gold: var(--brand); --gold-l: var(--brand-light); --gold-d: var(--brand-dark);
    --gold-bg: rgba(201, 165, 90, 0.12); --gold-bdr: rgba(156, 122, 54, 0.24);
    --heading: var(--t-1); --text: var(--t-2); --text2: #475569; --text3: var(--t-3);
    --bg-main: var(--bg-1); --bg: #fff; --sf: #fff; --sf1: #fff; --sf2: #F8FAFC; --sf3: #F1F5F9;
    --line2: rgba(15, 23, 42, 0.16); --bdr: rgba(15, 23, 42, 0.08);
    --ok: var(--c-success); --err: var(--c-danger); --warn: var(--c-warn); --info: var(--c-info);
    --r1: 8px; --r2: 12px; --r3: 14px; --r4: 18px;
    --sh: var(--shadow-sm); --sh-md: var(--shadow); --sh-lg: var(--shadow-lg); --glow: 0 8px 18px -10px var(--brand-glow);
}

body { font-family: 'Cairo', system-ui, sans-serif; color: var(--t-1); line-height: 1.55; }
.app-body {
    font-size: 14px;
    background: var(--bg-1);
    background-image:
        radial-gradient(circle at 12% 8%, rgba(201, 165, 90, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 88% 92%, rgba(11, 21, 48, 0.04) 0%, transparent 50%);
}
::selection { background: rgba(201, 165, 90, 0.28); color: var(--navy); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }
.ic { display: block; flex-shrink: 0; }

/* =================================================================
   SHELL
================================================================= */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.app-sidebar {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; padding: 0; overflow: hidden;
    background: var(--sidebar-bg); color: #F8FAFC; border: 0;
    box-shadow: -1px 0 0 rgba(255, 255, 255, 0.05), -18px 0 40px -24px rgba(0, 0, 0, 0.7);
}

.sidebar-brand {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 16px;
    border-bottom: 1px solid rgba(248, 250, 252, 0.08);
    background: linear-gradient(135deg, transparent, rgba(201, 165, 90, 0.06));
}
.sidebar-brand::after {
    content: ''; position: absolute; bottom: -1px; right: 22px; left: 22px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: 0.5;
}
.sidebar-brand-logo {
    width: 46px; height: 46px; flex-shrink: 0; overflow: hidden; border-radius: 12px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(201, 165, 90, 0.25);
    box-shadow: 0 6px 18px var(--brand-glow);
}
.sidebar-brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-brand-text { line-height: 1.25; min-width: 0; }
.sidebar-brand-text .name { font-weight: 800; font-size: 1.05rem; color: var(--brand); }
.sidebar-brand-text .tagline { font-size: 0.72rem; color: rgba(248, 250, 252, 0.55); white-space: nowrap; }
.sb-toggle {
    margin-inline-start: auto; width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: rgba(248, 250, 252, 0.7);
    transition: var(--t-fast);
}
.sb-toggle:hover { color: #fff; border-color: rgba(201, 165, 90, 0.5); background: rgba(201, 165, 90, 0.15); }
.sb-toggle .ic { transition: transform var(--t-base); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px 18px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(248, 250, 252, 0.16); border-radius: 4px; }
.nav-section { padding: 16px 12px 8px; color: rgba(248, 250, 252, 0.4); font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; }
.nav-link {
    position: relative; display: flex; align-items: center; gap: 12px; margin: 4px 0; padding: 10px 14px;
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 6px 14px -10px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(0, 0, 0, 0.35);
    color: rgba(248, 250, 252, 0.82); font-size: 0.9rem; font-weight: 600; transition: var(--t-fast);
}
.nav-link .ic { color: rgba(248, 250, 252, 0.45); transition: color var(--t-fast); }
.nav-link:hover { background: linear-gradient(180deg, rgba(201, 165, 90, 0.14), rgba(201, 165, 90, 0.05)); border-color: rgba(201, 165, 90, 0.35); color: #fff; }
.nav-link:hover .ic { color: var(--brand); }
.nav-link.active {
    background: linear-gradient(180deg, rgba(201, 165, 90, 0.30), rgba(201, 165, 90, 0.10));
    border-color: rgba(201, 165, 90, 0.55); color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px -12px rgba(201, 165, 90, 0.7), 0 1px 0 rgba(0, 0, 0, 0.4);
}
.nav-link.active .ic { color: var(--brand-light); }
.nav-link .nt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link.nav-install { border-style: dashed; border-color: rgba(201, 165, 90, 0.3); color: var(--brand-light); }
.nav-badge { margin-inline-start: auto; min-width: 18px; padding: 2px 7px; border-radius: 10px; background: var(--c-danger); color: #fff; font-size: 0.65rem; font-weight: 700; text-align: center; }

.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(248, 250, 252, 0.08); }
.user-avatar { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--brand-grad); color: var(--navy); font-weight: 800; }
.user-meta { flex: 1; min-width: 0; line-height: 1.3; }
.user-meta .name { font-weight: 700; font-size: 0.86rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta .role { font-size: 0.7rem; color: rgba(248, 250, 252, 0.5); }
.sidebar-foot form { margin: 0; }
.foot-btn {
    width: 34px; height: 34px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: rgba(248, 250, 252, 0.7); transition: var(--t-fast);
}
.foot-btn:hover { color: #fff; border-color: rgba(201, 165, 90, 0.5); background: rgba(201, 165, 90, 0.15); }

/* rail (desktop) — state kept in localStorage 'adl.sidebar' */
@media (min-width: 1101px) {
    .app-shell { transition: grid-template-columns var(--t-base); }
    html.sb-collapsed { --sidebar-w: 84px; }
    html.sb-collapsed .sidebar-brand { flex-direction: column; gap: 10px; padding: 16px 12px; }
    html.sb-collapsed .sidebar-brand-text,
    html.sb-collapsed .nav-section,
    html.sb-collapsed .nav-link .nt,
    html.sb-collapsed .nav-badge,
    html.sb-collapsed .user-meta { display: none; }
    html.sb-collapsed .sb-toggle { margin-inline-start: 0; }
    html.sb-collapsed .sb-toggle .ic { transform: rotate(180deg); }
    html.sb-collapsed .nav-link { justify-content: center; padding: 12px 0; gap: 0; }
    html.sb-collapsed .sidebar-foot { flex-direction: column; padding: 12px 8px; }
}

/* topbar */
.app-content { padding: 0; min-width: 0; }
.app-topbar {
    position: sticky; top: 0; z-index: 100; height: var(--topbar-h); margin: 0; padding: 0 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap;
    background: var(--topbar-bg); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none;
}
.app-topbar::after { content: ''; position: absolute; bottom: -1px; left: 5%; right: 5%; height: 1px; background: linear-gradient(90deg, transparent, var(--brand-subtle), transparent); }
.topbar-search { position: relative; flex: 1; max-width: 420px; margin: 0; }
.topbar-search input {
    width: 100%; height: 38px; padding: 0 16px 0 40px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface-input); color: var(--t-1); font: inherit; font-size: 0.9rem; outline: none; transition: var(--t-fast);
}
.topbar-search input::placeholder { color: var(--t-3); }
.topbar-search input:focus { border-color: var(--brand); background: #fff; }
.topbar-search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--t-3); pointer-events: none; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
    position: relative; width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface-input); border: 1px solid var(--line); color: var(--t-2); transition: var(--t-fast);
}
.icon-btn:hover { background: var(--brand-subtle); border-color: var(--brand); color: var(--brand-dark); }
.icon-btn .dot { position: absolute; top: -3px; right: -3px; min-width: 16px; padding: 1px 5px; border-radius: 10px; background: var(--c-danger); color: #fff; font-size: 0.62rem; font-weight: 700; line-height: 1.4; text-align: center; }
.menu-toggle { display: none !important; }
.app-main { padding: 22px 22px 60px; }

/* =================================================================
   PAGE PARTS
================================================================= */
.page-title h1, .page-head h1 { font-size: 1.5rem; font-weight: 800; color: var(--t-1); line-height: 1.25; }
.page-title p, .page-head .sub { color: var(--t-3); font-size: 0.86rem; margin-top: 4px; }

.hero-greet {
    position: relative; overflow: hidden; padding: 26px 28px; margin-bottom: 22px;
    border: 1px solid var(--line); border-radius: var(--r-xl);
    background: linear-gradient(135deg, rgba(201, 165, 90, 0.13) 0%, rgba(201, 165, 90, 0.03) 50%, transparent 100%), var(--surface-card);
    box-shadow: var(--shadow-3d);
}
.hero-greet::before {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 5px;
    background: linear-gradient(180deg, var(--brand-light), var(--brand), var(--brand-dark)); box-shadow: 0 0 24px var(--brand-glow);
}
.hero-greet::after {
    content: ''; position: absolute; inset: -50% -20% auto auto; width: 280px; height: 280px; pointer-events: none;
    background: radial-gradient(circle, rgba(201, 165, 90, 0.18) 0%, transparent 60%); animation: floatGlow 8s ease-in-out infinite;
}
@keyframes floatGlow { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 20px); } }
.hero-row { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-eyebrow { margin-bottom: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 1px; color: var(--brand-dark); }
.hero-greet h1 {
    margin-bottom: 4px; font-size: 1.85rem; font-weight: 800; line-height: 1.3;
    background: linear-gradient(135deg, var(--navy) 0%, var(--brand-dark) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-greet h1 .wave { -webkit-text-fill-color: initial; font-size: 1.5rem; }
.hero-greet .ornament { display: block; width: 60px; height: 1px; margin: 8px 0; background: linear-gradient(to left, var(--brand), transparent); }
.hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--t-3); font-size: 0.86rem; }
.hero-sub > span { display: inline-flex; align-items: center; gap: 6px; }
.hero-sub .ic { color: var(--brand-dark); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-luxe { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--brand); background: var(--surface-card); color: var(--brand-dark); font-size: 0.76rem; font-weight: 700; }

.demo-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 16px; border-radius: var(--r-md); background: linear-gradient(90deg, rgba(201, 165, 90, 0.2), rgba(201, 165, 90, 0.06)); border: 1px solid rgba(201, 165, 90, 0.4); color: var(--t-1); font-size: 0.86rem; }
.demo-banner .ic { color: var(--brand-dark); }
.demo-banner .demo-cta { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; font-size: 0.8rem; white-space: nowrap; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px 20px;
    border: 1px solid var(--line); border-radius: var(--r-lg); color: inherit; text-decoration: none;
    background: #fff linear-gradient(180deg, #fff, #FCFBF8); box-shadow: var(--shadow-3d); transition: border-color var(--t-fast);
}
.stat:hover { border-color: var(--line-strong); }
.stat::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent, var(--brand)); opacity: 0.85; }
.stat .stat-icon {
    width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
    background: var(--accent-bg, var(--brand-subtle)); color: var(--accent, var(--brand-dark)); font-size: 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px -10px var(--accent, var(--brand));
}
.stat-body { flex: 1; min-width: 0; line-height: 1.2; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--t-1); letter-spacing: -0.5px; white-space: nowrap; }
.stat-value small { margin-inline-start: 4px; font-size: 0.78rem; font-weight: 600; color: var(--t-3); letter-spacing: 0; }
.stat-label { margin-top: 2px; color: var(--t-3); font-size: 0.84rem; font-weight: 500; }
.stat-trend { margin-top: 4px; font-size: 0.76rem; color: var(--t-3); }
.stat-trend.up { color: var(--c-success); }
.stat-trend.down { color: var(--c-danger); }

/* cards */
.card, .content-card {
    padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg);
    background: #fff linear-gradient(180deg, #fff, #FCFBF8); box-shadow: var(--shadow-3d);
}
.card:hover, .content-card:hover { border-color: var(--line-strong); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.card-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; font-size: 1rem; font-weight: 700; color: var(--t-1); }
.card-head h3 .ic { color: var(--brand-dark); }
.card-head a { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8rem; font-weight: 700; color: var(--brand-dark); }
.card-head a:hover { color: var(--navy); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { margin: 0; padding: 14px 18px; }
.content-card h3 { font-size: 1rem; font-weight: 700; color: var(--t-1); border-bottom-color: var(--line); }
.stat-card { background: #fff; border-color: var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3d); }

/* buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
    border: 1px solid transparent; border-radius: 11px; cursor: pointer; white-space: nowrap;
    background: var(--navy); color: #fff; font-weight: 600; font-size: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px -12px rgba(11, 21, 48, 0.8); transition: var(--t-fast);
}
.btn:hover { background: var(--navy-3); transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px -12px rgba(11, 21, 48, 0.9); }
.btn-primary, .btn--gold, .btn--primary { background: var(--brand-grad); color: var(--navy); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -10px var(--brand-glow); }
.btn-primary:hover, .btn--gold:hover, .btn--primary:hover { background: linear-gradient(135deg, #F0DCAA 0%, #D4B26A 55%, #A9853D 100%); }
.btn-ghost, .btn--ghost { background: var(--surface-card); color: var(--t-1); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover, .btn--ghost:hover { background: var(--surface-card); color: var(--brand-dark); border-color: var(--brand); }
.btn--sm { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 0.84rem; }
.btn--danger { background: var(--c-danger); color: #fff; box-shadow: none; }
.btn--full { width: 100%; }

/* badges, forms, flash, tables */
.badge, .eyebrow, .topbar-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0; background: var(--brand-subtle); border: 1px solid rgba(201, 165, 90, 0.3); color: var(--brand-dark); }
.badge-ok { background: rgba(22, 163, 74, 0.1); border-color: rgba(22, 163, 74, 0.25); color: var(--c-success); }
.badge-err { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.24); color: var(--c-danger); }
.badge-warn { background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.26); color: var(--c-warn); }
.badge-info { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.24); color: var(--c-info); }
.field label { font-weight: 600; color: var(--t-2); }
.field input, .field select, .field textarea { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-input); box-shadow: none; color: var(--t-1); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-subtle); }
.flash { margin-bottom: 16px; border-radius: var(--r-md); font-weight: 600; }
.flash--success { background: rgba(22, 163, 74, 0.08); border-color: rgba(22, 163, 74, 0.25); color: var(--c-success); }
.flash--error { background: rgba(220, 38, 38, 0.07); border-color: rgba(220, 38, 38, 0.24); color: var(--c-danger); }
.table-row { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 4px; }
.table-row:last-child { border-bottom: 0; }
.table-row:hover { background: var(--brand-subtle); box-shadow: none; }
.app-main table { border-collapse: collapse; }
.app-main table th { background: var(--surface-inset) !important; color: var(--t-3) !important; font-weight: 700; border-bottom: 1px solid var(--line); }
.app-main table td { border-bottom: 1px solid var(--line); }
.app-main table tbody tr:hover { background: rgba(201, 165, 90, 0.05); }
.pwa-install-banner { background: var(--navy); border: 1px solid rgba(201, 165, 90, 0.3); }
.brand__mark { background: var(--navy); box-shadow: 0 0 0 1px rgba(201, 165, 90, 0.4); overflow: hidden; }
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }

/* =================================================================
   DASHBOARD
================================================================= */
.ad-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ad-col { display: grid; gap: 18px; min-width: 0; }
.ad-list { list-style: none; margin: 0; padding: 0; }
.ad-empty { padding: 26px 18px; text-align: center; color: var(--t-3); font-size: 0.88rem; }
.ad-note { padding: 8px 18px; font-size: 0.76rem; color: var(--t-3); background: var(--surface-inset); border-bottom: 1px solid var(--line); }

.ad-session { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; }
.ad-session + .ad-session { border-top: 1px dashed var(--line); }
.ad-date { display: grid; justify-items: center; padding: 6px 0; border-radius: 12px; background: var(--surface-inset); border: 1px solid var(--line); }
.ad-date b { font-size: 1.35rem; font-weight: 800; line-height: 1.05; color: var(--navy); }
.ad-date span { font-size: 0.68rem; color: var(--t-3); }
.ad-session.is-soon .ad-date { background: var(--navy); border-color: var(--navy); box-shadow: 0 8px 18px -10px rgba(11, 21, 48, 0.8); }
.ad-session.is-soon .ad-date b { color: var(--brand-light); }
.ad-session.is-soon .ad-date span { color: rgba(248, 250, 252, 0.7); }
.ad-session h4 { font-size: 0.92rem; font-weight: 700; color: var(--t-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.78rem; color: var(--t-3); }
.ad-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ad-meta .ic { color: var(--brand-dark); }
.ad-time { padding: 4px 10px; border-radius: 8px; background: var(--brand-subtle); color: var(--navy); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }

.ad-table-wrap { overflow-x: auto; }
.ad-table { width: 100%; font-size: 0.86rem; }
.app-main .ad-table th { padding: 9px 18px; text-align: start; font-size: 0.74rem; white-space: nowrap; }
.app-main .ad-table td { padding: 11px 18px; vertical-align: middle; }
.app-main .ad-table tr:last-child td { border-bottom: 0; }
.ad-case b { display: block; font-weight: 700; color: var(--t-1); }
.ad-case span { font-size: 0.74rem; color: var(--t-3); }
.ad-money { font-weight: 700; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }

.ad-alert { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.ad-alert + .ad-alert { border-top: 1px solid var(--line); }
.ad-alert-ic { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: rgba(220, 38, 38, 0.08); color: var(--c-danger); }
.ad-alert > div { flex: 1; min-width: 0; }
.ad-alert strong { display: block; font-size: 0.86rem; font-weight: 700; color: var(--t-1); }
.ad-alert small { font-size: 0.74rem; color: var(--t-3); }
.ad-days { font-size: 0.76rem; font-weight: 700; color: var(--c-danger); white-space: nowrap; }
.ad-clear { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-size: 0.86rem; color: var(--t-2); }
.ad-clear i { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: rgba(22, 163, 74, 0.1); color: var(--c-success); }

.ad-task { display: flex; align-items: flex-start; gap: 12px; padding: 11px 18px; }
.ad-task + .ad-task { border-top: 1px solid var(--line); }
.ad-prio { width: 8px; height: 8px; flex-shrink: 0; margin-top: 8px; border-radius: 50%; background: var(--line-strong); }
.ad-prio.p-high { background: var(--c-danger); } .ad-prio.p-medium { background: var(--c-warn); } .ad-prio.p-low { background: var(--c-success); }
.ad-task > div { flex: 1; min-width: 0; }
.ad-task strong { display: block; font-size: 0.86rem; font-weight: 600; color: var(--t-1); }
.ad-task small { font-size: 0.74rem; color: var(--t-3); }
.ad-task small.is-late { color: var(--c-danger); font-weight: 700; }

.ad-dist { display: grid; gap: 12px; padding: 16px 18px; }
.ad-bar { display: flex; height: 10px; overflow: hidden; border-radius: 99px; background: var(--surface-inset); }
.ad-bar i { display: block; height: 100%; }
.ad-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.78rem; color: var(--t-2); }
.ad-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ad-legend i { width: 9px; height: 9px; border-radius: 3px; }
.ad-legend b { font-weight: 800; color: var(--navy); }
.t-ok { background: var(--c-success); } .t-warn { background: var(--c-warn); } .t-err { background: var(--c-danger); } .t-gold { background: var(--brand); }

.stagger > * { animation: fadeRise 0.5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.18s; }
.stagger > *:nth-child(5) { animation-delay: 0.24s; }
@keyframes fadeRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .stagger > *, .hero-greet::after, .stat-card { animation: none; } }

/* =================================================================
   RESPONSIVE (mobile.css turns the sidebar off-canvas at 1100px)
================================================================= */
@media (max-width: 1100px) {
    .app-shell { display: block; }
    .app-sidebar { width: 280px; right: -300px; }
    .menu-toggle { display: inline-flex !important; margin: 0; }
    .app-topbar { padding: 0 14px; }
    .app-main { padding: 16px 14px 48px; }
    .ad-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 780px) {
    .app-content { padding: 0; }
    .topbar-search { max-width: none; }
    .hero-greet { padding: 20px 18px; border-radius: var(--r-lg); }
    .hero-greet h1 { font-size: 1.45rem; }
    .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .stat { padding: 14px; gap: 10px; }
    .stat .stat-icon { width: 38px; height: 38px; }
    .stat-value { font-size: 1.25rem; }
    .stat-label { font-size: 0.78rem; }
    .card, .content-card { padding: 14px; border-radius: 14px; }
    .card.flush { padding: 0; }
    .ad-session { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
    .ad-time { grid-column: 2; justify-self: start; }
    .card.flush .card-head, .ad-alert, .ad-task, .ad-dist { padding-inline: 14px; }
}
