/* ===================================================================
   Rbs Dağıtım Bilgi Sistemi — Operasyon Merkezi Tasarım Sistemi
   Palet: derin rota-lacivert + kargo-amber | Veri yazı tipi: JetBrains Mono
   İmza öğe: "yolda" rota çizgisi (dashed line + hareketli nokta) — yükleme
   durumlarında ve bölüm ayraçlarında kullanılır.
=================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --ink: #0B1120;
    --ink-2: #111A2E;
    --route: #16357A;
    --route-hover: #0F2657;
    --route-light: #E7ECFA;
    --sky: #0EA5E9;
    --amber: #F5A623;
    --amber-light: #FEF3DE;
    --success: #16A34A;
    --success-light: #EAFBF1;
    --danger: #DC2626;
    --danger-light: #FDECEC;
    --canvas: #F4F6FB;
    --surface: #FFFFFF;
    --line: #E4E9F4;
    --line-soft: #EEF1F9;
    --text: #0F172A;
    --text-muted: #64748B;
    --text-faint: #99A3B7;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px -8px rgba(11, 17, 32, 0.14);
    --shadow-lg: 0 20px 48px -16px rgba(11, 17, 32, 0.22);
    --font-ui: 'Inter', sans-serif;
    --font-data: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-ui);
    background: var(--canvas);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}
.tabular, .num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------- Route-line signature element ---------- */
.route-divider {
    position: relative;
    height: 1px;
    background-image: linear-gradient(90deg, var(--line) 60%, transparent 0%);
    background-size: 10px 1px;
    background-repeat: repeat-x;
    margin: 20px 0;
}
.route-loading {
    position: relative;
    height: 3px;
    width: 100%;
    background-image: linear-gradient(90deg, var(--line) 55%, transparent 0%);
    background-size: 12px 3px;
    background-repeat: repeat-x;
    border-radius: 3px;
    overflow: visible;
}
.route-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 9px;
    height: 9px;
    margin-top: -4.5px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 4px var(--amber-light);
    animation: route-travel 1.35s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes route-travel {
    0% { left: 0%; opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
.route-loading-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 0; }
.route-loading-wrap span { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.route-loading-wrap .route-loading { max-width: 220px; }

/* ---------- App shell ---------- */
#app { min-height: 100vh; }

.topbar {
    height: 64px;
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 55;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 17px; flex-shrink: 0; }
.topbar .brand .cube { width: 28px; height: 28px; }
.topbar .status-pill {
    display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
    padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #CBD5E1;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); position: relative; }
.status-pill .dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--success); animation: pulse 2s linear infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.status-pill.offline .dot { background: var(--danger); }
.status-pill.offline .dot::after { border-color: var(--danger); }

.topbar-spacer { flex: 1; min-width: 12px; }
.topbar-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-user .info { text-align: right; line-height: 1.25; }
.topbar-user .name { font-weight: 700; font-size: 13px; }
.topbar-user .role { font-size: 11px; color: #94A3B8; font-weight: 600; }
.avatar {
    width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, var(--amber), #E08E00); color: var(--ink); font-weight: 800; font-size: 13px;
    flex-shrink: 0;
}
.icon-btn { background: transparent; border: none; color: #CBD5E1; padding: 8px; border-radius: 8px; cursor: pointer; display: flex; flex-shrink: 0; }
.icon-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ---------- Üst menü: logo ile aynı barda, ortada yatay menü ---------- */
.navbar {
    display: flex; align-items: center; gap: 2px; height: 100%;
    flex: 0 1 auto; min-width: 0; overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
}
.navbar::-webkit-scrollbar { display: none; }
.navbar a.nav-item, .navbar button.nav-item {
    display: flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 9px;
    color: #B7C0D6; font-weight: 700; font-size: 12.5px; text-decoration: none; cursor: pointer;
    border: none; background: transparent; white-space: nowrap; flex-shrink: 0;
}
.navbar .nav-item svg { flex-shrink: 0; width: 15px; height: 15px; }
.navbar .nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.navbar .nav-item.active { color: var(--amber); background: rgba(245,166,35,.14); }

/* ---------- Menü grupları: masaüstünde açılır popover, mobilde accordion alt menü ---------- */
.nav-group-wrap { position: relative; flex-shrink: 0; }
.nav-group-toggle .chev { flex-shrink: 0; width: 13px; height: 13px; margin-left: -2px; transition: transform .15s; }
.nav-group-toggle.open .chev { transform: rotate(180deg); }
.nav-group-toggle.is-active-parent { color: var(--amber); }

.nav-submenu {
    display: none; position: fixed; min-width: 210px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); padding: 6px; flex-direction: column; gap: 1px; z-index: 60;
}
.nav-submenu.open { display: flex; }
.nav-submenu .nav-item {
    color: var(--text); font-size: 13px; padding: 10px 12px; border-radius: 8px; justify-content: flex-start; width: 100%;
}
.nav-submenu .nav-item:hover { background: var(--canvas); color: var(--text); }
.nav-submenu .nav-item.active { background: var(--route-light); color: var(--route-hover); }

/* ---------- Navbar: sığmadığında / mobilde hamburger dropdown moduna döner ---------- */
.nav-overlay { display: none; position: fixed; inset: 64px 0 0 0; background: rgba(11,17,32,.45); z-index: 45; }
.nav-overlay.open { display: block; }
.navbar.as-dropdown {
    display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 50;
    flex-direction: column; align-items: stretch; gap: 2px; overflow-y: auto; overflow-x: hidden;
    max-height: calc(100vh - 64px); padding: 10px; box-shadow: var(--shadow-lg);
    background: var(--surface); border-bottom: 1px solid var(--line); height: auto;
}
.navbar.as-dropdown.open { display: flex; }
.navbar.as-dropdown .nav-item {
    border-radius: 10px; padding: 12px 14px; width: 100%; justify-content: flex-start;
    color: var(--text-muted);
}
.navbar.as-dropdown .nav-item svg { width: 17px; height: 17px; }
.navbar.as-dropdown .nav-item:hover { color: var(--text); background: var(--canvas); }
.navbar.as-dropdown .nav-item.active { background: var(--route-light); color: var(--route-hover); }

/* Mobilde grup alt menüsü, tam genişlikte katlanır-panel (accordion) olarak davranır */
.navbar.as-dropdown .nav-group-wrap { width: 100%; position: static; }
.navbar.as-dropdown .nav-group-toggle { width: 100%; justify-content: space-between; }
.navbar.as-dropdown .nav-group-toggle .chev { margin-left: auto; }
.navbar.as-dropdown .nav-submenu {
    position: static; display: none; box-shadow: none; border: none; background: transparent;
    padding: 2px 0 2px 14px; margin-left: 12px; border-left: 2px solid var(--line); min-width: 0;
}
.navbar.as-dropdown .nav-submenu.open { display: flex; }

main.content { min-width: 0; padding: 28px 32px 60px; max-width: 1320px; margin: 0 auto; width: 100%; }

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-top: 3px; }

/* ---------- Cards / stats ---------- */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 24px; overflow-x: auto;
}
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-head { padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--canvas); }
.card-flush .card-body { padding: 22px 24px; overflow-x: auto; }
.card-head h3 { font-size: 15px; font-weight: 800; }
.card-head p { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }


.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-box {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 20px; position: relative; overflow: hidden;
}
.stat-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.stat-box.route::before { background: var(--route); }
.stat-box.amber::before { background: var(--amber); }
.stat-box.success::before { background: var(--success); }
.stat-box.sky::before { background: var(--sky); }
.stat-box .label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.stat-box .value { font-family: var(--font-data); font-size: 30px; font-weight: 700; margin-top: 8px; letter-spacing: -.01em; }
.stat-box .unit { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-left: 4px; }

.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr !important; } }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--canvas); }
.text-right { text-align: right; }
.text-center { text-align: center; }

.rank {
    width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px; color: var(--text-muted); background: var(--canvas); border: 1px solid var(--line);
}
.rank.r1 { background: linear-gradient(145deg,#F5A623,#D97E00); color: #fff; border: none; }
.rank.r2 { background: linear-gradient(145deg,#94A3B8,#64748B); color: #fff; border: none; }
.rank.r3 { background: linear-gradient(145deg,#C2731C,#9A5111); color: #fff; border: none; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; border: 1px solid; }
.badge.success { background: var(--success-light); color: #0F7A38; border-color: #C6EFD6; }
.badge.amber { background: var(--amber-light); color: #A6650A; border-color: #F5DCA6; }
.badge.route { background: var(--route-light); color: var(--route-hover); border-color: #C9D5F2; }
.badge.danger { background: var(--danger-light); color: #B91C1C; border-color: #F5C6C6; }

/* ---------- Forms / buttons ---------- */
input[type=text], input[type=password], input[type=number], input[type=date], input[type=month], select, textarea {
    width: 100%; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--route); box-shadow: 0 0 0 3px var(--route-light); outline: none; }
label.field-label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); display: block; margin-bottom: 7px; }
.field { margin-bottom: 16px; }
.code-textarea {
    font-family: var(--font-code) !important; font-size: 12.5px !important; line-height: 1.6;
    background: var(--ink) !important; color: #E2E8F0 !important; border-color: #1E293B !important;
    tab-size: 2; white-space: pre;
}
.code-textarea:focus { border-color: var(--amber) !important; box-shadow: 0 0 0 3px rgba(245,166,35,.2) !important; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-weight: 700; font-size: 13.5px; padding: 12px 20px; border-radius: var(--radius-sm);
    border: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; text-decoration: none;
}
.btn-primary { background: var(--route); color: #fff; box-shadow: 0 6px 16px -4px rgba(22,53,122,.45); }
.btn-primary:hover { background: var(--route-hover); transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: var(--ink); box-shadow: 0 6px 16px -4px rgba(245,166,35,.4); }
.btn-amber:hover { transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: var(--canvas); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--line-soft); }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Drop zone (Excel yükleme) ---------- */
.drop-zone {
    background: var(--canvas); border: 2px dashed var(--line); border-radius: var(--radius-md);
    padding: 28px 18px; text-align: center; cursor: pointer; transition: .2s;
    display: flex; flex-direction: column; align-items: center; gap: 10px; justify-content: center;
    color: var(--text-muted);
}
.drop-zone:hover, .drop-zone.dragover { background: var(--route-light); border-color: var(--route); color: var(--route-hover); }
.drop-zone p { font-size: 13.5px; font-weight: 700; }
.drop-zone .file-name { font-size: 12.5px; font-weight: 800; color: var(--route); word-break: break-all; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr !important; } }

/* ---------- Arşiv / geçmiş rapor kartları ---------- */
.history-card { border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 14px; background: var(--surface); overflow: hidden; }
.history-card.is-live { border-color: #BEE3CE; box-shadow: 0 6px 20px -10px rgba(22,163,74,.25); }
.history-header { padding: 18px 22px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.history-header:hover { background: var(--canvas); }
.history-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.history-body { display: none; padding: 0 22px 22px; border-top: 1px solid var(--line); }
.history-body.open { display: block; padding-top: 20px; }
.chev { transition: transform .2s; color: var(--text-muted); }
.chev.open { transform: rotate(180deg); }

.status-dot { padding: 5px 12px; border-radius: 999px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border: 1px solid; }
.status-dot.live { background: var(--success-light); color: #0F7A38; border-color: #C6EFD6; }
.status-dot.draft { background: var(--amber-light); color: #A6650A; border-color: #F5DCA6; }

.recalc-box { background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }

/* ---------- Personel chip seçici ---------- */
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; max-height: 160px; overflow-y: auto; padding: 2px; }
.personel-chip {
    display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 13px;
    color: var(--text); transition: .15s; user-select: none;
}
.personel-chip:hover { background: var(--canvas); border-color: #cbd5e1; }
.personel-chip.active { background: var(--route); color: #fff; border-color: transparent; box-shadow: 0 4px 12px -3px rgba(22,53,122,.4); }
.personel-chip .chip-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--canvas); color: var(--route); display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; }
.personel-chip.active .chip-avatar { background: #fff; }

/* ---------- Filtre bar ---------- */
.filter-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filter-bar .grow { flex: 1; min-width: 200px; }
.filter-bar label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; display: block; }

/* ---------- Modal ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(11,17,32,.5); z-index: 300; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-box .modal-head { padding: 18px 22px; background: var(--canvas); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-box .modal-head h3 { font-size: 15.5px; font-weight: 800; color: var(--route); }
.modal-box .modal-body { padding: 22px; }
.modal-close-btn { background: none; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; line-height: 1; }

/* ---------- Rol rozetleri ---------- */
.role-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border: 1px solid; }
.role-admin { background: var(--route-light); color: var(--route-hover); border-color: #C9D5F2; }
.role-izleyici { background: var(--amber-light); color: #A6650A; border-color: #F5DCA6; }
.role-dagitici { background: #E0F2FE; color: #0369A1; border-color: #BAE6FD; }
.role-yardimci { background: #F3E8FF; color: #7E22CE; border-color: #E9D5FF; }

.check-row { display: flex; align-items: center; gap: 10px; background: var(--surface); padding: 12px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 14px; }
.check-row input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--route); }
.check-row label { font-weight: 800; color: var(--text); cursor: pointer; font-size: 13.5px; }

/* ---------- Login screen ---------- */
.login-screen {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(22,53,122,.10), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(245,166,35,.12), transparent 45%),
        var(--ink);
    padding: 20px;
}
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: var(--radius-lg); padding: 40px 34px; box-shadow: var(--shadow-lg); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-brand .cube { width: 38px; height: 38px; }
.login-brand .name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login-card .tag { font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 30px; letter-spacing: .03em; text-transform: uppercase; }
.login-error { background: var(--danger-light); border: 1px solid #F5C6C6; color: #B91C1C; padding: 11px 14px; border-radius: var(--radius-sm); font-weight: 700; font-size: 13px; margin-bottom: 18px; }

/* ---------- Toasts ---------- */
#toast-stack { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast {
    background: var(--ink); color: #fff; padding: 13px 16px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
    animation: toast-in .25s ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state h3 { color: var(--text); font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; font-weight: 600; max-width: 380px; margin: 0 auto; }

.coming-soon { text-align: center; padding: 70px 20px; }
.coming-soon .tag { display: inline-block; background: var(--amber-light); color: #A6650A; font-weight: 800; font-size: 11px; padding: 5px 12px; border-radius: 999px; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 14px; }
.coming-soon h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.coming-soon p { color: var(--text-muted); font-size: 13.5px; font-weight: 600; max-width: 420px; margin: 0 auto; }

.progress-track { width: 100%; height: 7px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--success), #0F7A38); transition: width 1s cubic-bezier(.16,1,.3,1); width: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    main.content { padding: 20px 16px 50px; }
    .topbar-user .info { display: none; }
}
@media (max-width: 760px) {
    .navbar.as-dropdown { padding: 8px; }
    .topbar { gap: 10px; padding: 0 14px; }
    .topbar .status-pill { display: none; }
}
@media (max-width: 700px) {
    main.content { padding: 16px 12px 40px; }
    .page-head h1 { font-size: 19px; }
    .card { padding: 16px; border-radius: var(--radius-md); }
    .card-flush .card-head { padding: 14px 16px; }
    .card-flush .card-body { padding: 16px; }
    th, td { padding: 10px 10px; font-size: 12.5px; }
    table { font-size: 12.5px; }
    .stat-box { padding: 16px; }
    .stat-box .value { font-size: 24px; }
    .btn { padding: 11px 16px; font-size: 13px; }
    .modal-box { max-width: 100%; }
    .modal-box .modal-body { padding: 16px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar > div, .filter-bar .grow { min-width: 0; width: 100%; }
}
@media (max-width: 420px) {
    .topbar .brand span { display: none; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}
