:root {
    --bg: #eef1f8;
    --bg-mesh: radial-gradient(ellipse 80% 60% at 10% -10%, rgba(99,102,241,.18), transparent 50%),
               radial-gradient(ellipse 60% 50% at 90% 0%, rgba(168,85,247,.12), transparent 50%),
               radial-gradient(ellipse 50% 40% at 50% 100%, rgba(14,165,233,.08), transparent 50%),
               #eef1f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --sidebar-bg: linear-gradient(165deg, #0c1222 0%, #151d32 45%, #1a1040 100%);
    --sidebar-text: #94a3b8;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99,102,241,.35);
    --accent: #a855f7;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --border: rgba(148,163,184,.22);
    --text: #0f172a;
    --muted: #64748b;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
    --shadow-lg: 0 4px 6px rgba(15,23,42,.04), 0 20px 50px rgba(15,23,42,.12);
    --shadow-card: 0 0 0 1px rgba(148,163,184,.12), 0 10px 30px rgba(15,23,42,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    background: var(--bg-mesh);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
    width: 272px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.25rem 1rem;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 4px 0 40px rgba(0,0,0,.15);
}
.sidebar-brand {
    display: flex;
    gap: .85rem;
    align-items: center;
    margin-bottom: 1.75rem;
    padding: .85rem;
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
}
.brand-badge, .brand-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800; font-size: .95rem;
    box-shadow: 0 8px 20px var(--primary-glow);
    flex-shrink: 0;
}
.sidebar-brand strong { display: block; color: #fff; font-size: .95rem; letter-spacing: -.02em; }
.sidebar-brand small { display: block; color: #64748b; font-size: .72rem; margin-top: 2px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-section-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #475569;
    padding: .5rem .85rem .35rem;
    margin-top: .5rem;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem .85rem;
    border-radius: 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: all .2s ease;
    position: relative;
    border: 1px solid transparent;
}
.nav-item .nav-icon { width: 18px; height: 18px; opacity: .7; flex-shrink: 0; stroke-width: 2; }
.nav-item:hover {
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
    border-color: rgba(255,255,255,.06);
}
.nav-item:hover .nav-icon { opacity: 1; color: #c7d2fe; }
.nav-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(168,85,247,.15));
    color: #fff;
    border-color: rgba(129,140,248,.3);
    box-shadow: 0 4px 16px rgba(99,102,241,.2), inset 0 1px 0 rgba(255,255,255,.08);
}
.nav-item.active .nav-icon { opacity: 1; color: #c7d2fe; }
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 55%;
    background: linear-gradient(180deg, #818cf8, #c084fc);
    border-radius: 0 4px 4px 0;
}

/* ── Main ── */
.app-main { flex: 1; margin-left: 272px; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    display: flex; align-items: center; gap: 1rem;
    padding: .85rem 1.75rem;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.topbar-title {
    font-weight: 700; flex: 1;
    font-size: 1.15rem;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, #0f172a, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.topbar-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.menu-toggle {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .45rem .65rem;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.user-chip {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .4rem .85rem .4rem .45rem;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
}
.user-chip::before {
    content: '';
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: block;
}
.app-content { padding: 1.5rem 1.75rem 2.5rem; flex: 1; }

/* ── App footer ── */
.app-footer {
    padding: .85rem 1.75rem;
    text-align: center;
    font-size: .78rem;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: .02em;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.app-footer--auth {
    border-top: none;
    background: transparent;
    padding: 1rem 2rem 1.25rem;
}
.app-footer--pos {
    padding: .4rem .75rem;
    font-size: .68rem;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* ── Dashboard hero ── */
.page-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 100%);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(49,46,129,.35);
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(168,85,247,.4), transparent 70%);
    pointer-events: none;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: 20%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(99,102,241,.3), transparent 70%);
    pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.25rem; }
.page-hero h2 { font-size: 1.65rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .35rem; }
.page-hero p { color: rgba(255,255,255,.75); font-size: .95rem; }
.hero-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.hero-actions .btn { backdrop-filter: blur(8px); }
.btn-hero {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    padding: .6rem 1.1rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    font-size: .875rem;
    transition: .2s;
    display: inline-flex; align-items: center; gap: .4rem;
}
.btn-hero:hover { background: rgba(255,255,255,.25); transform: translateY(-1px); }
.btn-hero-primary {
    background: #fff;
    color: #4c1d95;
    border-color: #fff;
}
.btn-hero-primary:hover { background: #f5f3ff; }

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--stat-color, #6366f1), transparent);
}
.stat-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .65rem; }
.stat-card-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--stat-bg, rgba(99,102,241,.1));
    color: var(--stat-color, #6366f1);
}
.stat-card-icon svg { width: 20px; height: 20px; }
.stat-card span { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.stat-card.primary { --stat-color: #6366f1; --stat-bg: rgba(99,102,241,.12); }
.stat-card.success { --stat-color: #10b981; --stat-bg: rgba(16,185,129,.12); }
.stat-card.warning { --stat-color: #f59e0b; --stat-bg: rgba(245,158,11,.12); }
.stat-card.danger  { --stat-color: #ef4444; --stat-bg: rgba(239,68,68,.12); }
.stat-card.info    { --stat-color: #0ea5e9; --stat-bg: rgba(14,165,233,.12); }
.stat-card.neutral { --stat-color: #64748b; --stat-bg: rgba(100,116,139,.1); }

/* ── Cards ── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(180deg, #fafbff, #fff);
}
.card-header h3 { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: .5rem; }
.card-header h3 svg { width: 18px; height: 18px; color: var(--primary); }
.card-body { padding: 1.25rem 1.35rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-bottom: 1.25rem; }
.grid-2-compact { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th, .table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    font-weight: 700; color: var(--muted);
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
}
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: rgba(99,102,241,.04); }
.table tbody tr:last-child td { border-bottom: none; }
.table a { color: var(--primary); font-weight: 600; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table a.btn { text-decoration: none; }
.table a.btn:hover { text-decoration: none; }
.table a.btn-primary,
.table a.btn-success { color: #fff; }
.table a.btn-secondary { color: var(--primary-dark); }
.table a.btn-ghost { color: var(--muted); }
.table a.btn-ghost:hover { color: var(--text); }
.text-muted { color: var(--muted); }
.text-right { text-align: right; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .6rem 1.15rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: .875rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: all .2s ease;
    font-family: inherit;
    letter-spacing: -.01em;
}
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--primary-glow); filter: brightness(1.05); }
.btn-secondary { background: #eef2ff; color: var(--primary-dark); border-color: #c7d2fe; }
.btn-secondary:hover { background: #e0e7ff; }
.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, .25);
}
.btn-success:hover { transform: translateY(-1px); filter: brightness(1.05); color: #fff; }
.table a.btn-success { color: #fff; }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-ghost { background: rgba(255,255,255,.8); color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: #fff; color: var(--text); border-color: #cbd5e1; }
.btn-sm { padding: .4rem .75rem; font-size: .8rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { padding: .9rem 1.35rem; font-size: 1rem; border-radius: 14px; }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block; margin-bottom: .4rem;
    font-size: .82rem; font-weight: 700;
    color: var(--text); letter-spacing: -.01em;
}
.form-control, input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=file], select, textarea {
    width: 100%;
    padding: .7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font: inherit;
    background: var(--surface);
    transition: border-color .2s, box-shadow .2s;
    color: var(--text);
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.form-check { display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; }
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ── Alerts ── */
.alert {
    padding: .9rem 1.15rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: .875rem;
    font-weight: 500;
    display: flex; align-items: center; gap: .65rem;
    animation: slideDown .3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.alert-success { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #991b1b; border: 1px solid #fca5a5; }

/* ── Page header ── */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.page-header h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }

.statement-mode-tabs {
    display: inline-flex;
    gap: .35rem;
    padding: .35rem;
    background: var(--surface-2, #f1f5f9);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 1.25rem;
}
.statement-mode-tabs a {
    padding: .55rem 1rem;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--muted);
    transition: background .15s, color .15s, box-shadow .15s;
}
.statement-mode-tabs a:hover { color: var(--text); background: rgba(255,255,255,.7); }
.statement-mode-tabs a.active {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.statement-opening-row td { background: rgba(99,102,241,.04); }

/* ── Ayrıntılı Cari Hareket Raporu ── */
.cari-report { margin-top: .5rem; }
.cari-report-title {
    background: #d9d9d9;
    border: 1px solid #999;
    border-bottom: none;
    text-align: center;
    font-weight: 700;
    font-size: .95rem;
    padding: .55rem 1rem;
}
.cari-report-info {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    padding: .65rem .85rem;
    border: 1px solid #999;
    border-bottom: none;
    background: #fff;
    font-size: .82rem;
}
.cari-report-table-wrap { overflow-x: auto; border: 1px solid #999; }
.cari-report-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: .82rem;
}
.cari-report-table th,
.cari-report-table td {
    border: 1px solid #999;
    padding: .45rem .55rem;
    vertical-align: top;
}
.cari-report-table thead th {
    background: #f4a460;
    color: #111;
    font-weight: 700;
    text-align: left;
}
.cari-master-row td { background: #d4edbc; }
.cari-detail-row > td {
    padding: 0;
    background: #fff;
    border-top: none;
}
.cari-lines-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .76rem;
}
.cari-lines-table th,
.cari-lines-table td {
    border: 1px solid #bbb;
    padding: .35rem .5rem;
}
.cari-lines-table thead th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
}
.cari-line-notes {
    padding: .35rem .55rem .5rem;
    font-size: .72rem;
    color: var(--muted);
    border-top: 1px dashed #bbb;
}
.cari-lines-summary td,
.cari-lines-discount td,
.cari-lines-net td {
    background: #fafafa;
    font-size: .74rem;
}
.cari-lines-discount td { color: #b45309; }
.cari-lines-net td { background: #eef2ff; }
.cari-report-table tfoot td {
    background: #f5c6cb;
    font-weight: 700;
}

.balance-actions { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: wrap; min-width: 260px; }
.balance-actions .btn { white-space: nowrap; }

.purchase-vat-toggle {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.purchase-vat-option {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2, #f8fafc);
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
}
.purchase-vat-option input { accent-color: var(--primary); }


/* ── Badges ── */
.badge {
    display: inline-flex; align-items: center;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .02em;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: #f1f5f9; border: 2px solid #fff; box-shadow: var(--shadow); }
.filter-bar { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; align-items: end; padding: 1rem 1.25rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.filter-bar .form-group { margin: 0; flex: 1; min-width: 140px; }

/* ── Auth ── */
.auth-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #0c1222;
}
.auth-panel-left {
    display: flex; flex-direction: column; justify-content: center;
    padding: 3rem;
    background: linear-gradient(160deg, #0c1222 0%, #1a1040 50%, #312e81 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.auth-panel-left::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(168,85,247,.3), transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(99,102,241,.25), transparent 50%);
}
.auth-panel-left-inner { position: relative; z-index: 1; max-width: 420px; }
.auth-panel-left h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.15; margin-bottom: 1rem; }
.auth-panel-left p { color: rgba(255,255,255,.7); font-size: 1.05rem; line-height: 1.6; margin-bottom: 2rem; }
.auth-features { list-style: none; display: flex; flex-direction: column; gap: .85rem; }
.auth-features li { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: rgba(255,255,255,.85); }
.auth-features li svg { width: 20px; height: 20px; color: #a5b4fc; flex-shrink: 0; }
.auth-panel-right {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 2rem;
    background: var(--bg-mesh);
}
.auth-panel-right .auth-wrapper { width: min(420px, 100%); }
.auth-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.auth-brand { text-align: center; margin-bottom: 1.75rem; }
.auth-brand .brand-icon { margin: 0 auto 1rem; width: 56px; height: 56px; font-size: 1.1rem; border-radius: 16px; }
.auth-brand h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .25rem; }
.auth-brand p { color: var(--muted); font-size: .9rem; }
.auth-form .btn-primary { width: 100%; padding: .85rem; font-size: .95rem; margin-top: .5rem; border-radius: 14px; }
.auth-hint { text-align: center; margin-top: 1.25rem; color: var(--muted); font-size: .82rem; padding: .65rem; background: #f8fafc; border-radius: 10px; }

/* ── Modal ── */
.modal {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.6);
    backdrop-filter: blur(4px);
    display: grid; place-items: center;
    z-index: 200; padding: 1rem;
    animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal.hidden { display: none; }
.modal-content {
    background: #fff;
    border-radius: 20px;
    width: min(560px, 96vw);
    max-height: 90vh; overflow: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: scaleIn .25s cubic-bezier(.4,0,.2,1);
}
@keyframes scaleIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
.modal-sm { width: min(400px, 96vw); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.15rem 1.35rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-weight: 700; }
.modal-body { padding: 1.35rem; }
.modal-close { background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 8px; font-size: 1.25rem; cursor: pointer; color: var(--muted); transition: .15s; }
.modal-close:hover { background: #e2e8f0; color: var(--text); }
.modal-actions { display: flex; gap: .75rem; justify-content: center; }
.hidden { display: none !important; }

/* ── Report grid ── */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.report-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    transition: all .2s;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: .5rem;
}
.report-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.report-card-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(99,102,241,.1); color: var(--primary); display: grid; place-items: center; }
.report-card-icon svg { width: 22px; height: 22px; }
.report-card strong { font-size: .95rem; font-weight: 700; }
.report-card span { font-size: .8rem; color: var(--muted); }

@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
    .auth-body { grid-template-columns: 1fr; }
    .auth-panel-left { display: none; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); box-shadow: none; }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 40px rgba(0,0,0,.3); }
    .app-main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .app-content { padding: 1rem; }
    .page-hero { padding: 1.25rem; }
    .page-hero h2 { font-size: 1.3rem; }
}
