/* ============================================================
   STYLE.CSS — Network Dashboard Premium
   Design: Industrial-Utilitarian, Clean & Professional
   ============================================================ */

*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

:root {
    --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Menlo', 'Cascadia Code', monospace;
}

/* ============================================================
   DARK THEME
   ============================================================ */
body.dark {
    --bg-base: #0c0e12;
    --bg-surface: #13161c;
    --bg-raised: #1a1d24;
    --bg-hover: #1f232c;
    --border: #252830;
    --border-muted: #1c1f26;
    --text-1: #e8eaf0;
    --text-2: #7c8494;
    --text-3: #4a5060;
    --accent: #3b82f6;
    --accent-dim: rgba(59, 130, 246, 0.12);
    --accent-glow: rgba(59, 130, 246, 0.25);
    --green: #22c55e;
    --green-dim: rgba(34, 197, 94, 0.1);
    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.1);
    --amber: #f59e0b;
    --amber-dim: rgba(245, 158, 11, 0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
    --sidebar-w: 220px;
}

body.light {
    --bg-base: #f0f2f5;
    --bg-surface: #ffffff;
    --bg-raised: #f8f9fb;
    --bg-hover: #f0f2f5;
    --border: #e2e5eb;
    --border-muted: #edf0f4;
    --text-1: #111318;
    --text-2: #5a6072;
    --text-3: #9399a8;
    --accent: #2563eb;
    --accent-dim: rgba(37, 99, 235, 0.08);
    --accent-glow: rgba(37, 99, 235, 0.2);
    --green: #16a34a;
    --green-dim: rgba(22, 163, 74, 0.08);
    --red: #dc2626;
    --red-dim: rgba(220, 38, 38, 0.08);
    --amber: #d97706;
    --amber-dim: rgba(217, 119, 6, 0.08);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --sidebar-w: 220px;
}

html { font-size: 14px; }

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-1);
    min-height: 100vh;
    transition: background 0.25s, color 0.25s;
    line-height: 1.5;
    font-weight: 400;
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-container {
    position: fixed; inset: 0;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-noise {
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none; opacity: 0.4;
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 20px;
}

.logo-bracket {
    color: var(--text-3);
    font-size: 22px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-1);
    margin-bottom: 6px;
}

.login-sub {
    font-size: 12px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.login-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-3);
    font-family: var(--font-mono);
}

.login-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-1);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.login-input::placeholder { color: var(--text-3); }

.login-btn {
    width: 100%;
    padding: 13px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.login-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); opacity: 1; }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.login-error {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--red-dim);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: var(--red);
    font-size: 12px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 10px;
    color: var(--text-3);
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard {
    display: none;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-mark {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -2px;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: 0.12em;
}

.sidebar-nav {
    padding: 20px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-3);
    padding: 0 8px 8px;
    font-family: var(--font-mono);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    transition: all 0.15s;
}

.nav-item i { font-size: 14px; width: 16px; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-1); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }

.sidebar-user {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px; height: 32px;
    background: var(--accent-dim);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 13px;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-db {
    font-size: 10px;
    color: var(--text-3);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-logout {
    background: none;
    border: 1px solid var(--border);
    border-radius: 7px;
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.user-logout:hover { color: var(--red); border-color: var(--red); background: var(--red-dim); }

/* MAIN */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* TOPBAR */
.topbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.01em;
}

.topbar-sub {
    font-size: 11px;
    color: var(--text-3);
    font-family: var(--font-mono);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--green-dim);
    border: 1px solid rgba(34, 197, 94, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    font-family: var(--font-mono);
}

.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.status-dot.pulse {
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.timestamp-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-2);
    font-family: var(--font-mono);
}

.icon-btn {
    width: 32px; height: 32px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.15s;
}

.icon-btn:hover { color: var(--text-1); border-color: var(--accent); background: var(--accent-dim); }

/* CONTENT */
.content {
    padding: 28px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================================
   INFO CARDS
   ============================================================ */
.section-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-3);
    margin-bottom: 12px;
    font-family: var(--font-mono);
}

.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: border-color 0.2s;
}

.info-card:hover { border-color: var(--accent); }

.info-card-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.info-card-icon.accent { background: var(--accent-dim); color: var(--accent); }
.info-card-icon.success { background: var(--green-dim); color: var(--green); }
.info-card-icon.warning { background: var(--amber-dim); color: var(--amber); }
.info-card-icon.danger  { background: var(--red-dim); color: var(--red); }

.info-card-title {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
    font-weight: 600;
    font-family: var(--font-mono);
    margin-bottom: 3px;
}

.info-card-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    line-height: 1.4;
}

/* ============================================================
   STATS ROW
   ============================================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover { border-color: var(--border); box-shadow: var(--shadow); }

.stat-card.accent-card::before { opacity: 1; }

.stat-card.expandable { cursor: pointer; }

.stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-3);
    font-family: var(--font-mono);
}

.stat-icon {
    font-size: 14px;
    color: var(--text-3);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 12px;
}

.stat-value.mono { font-family: var(--font-mono); font-size: 22px; }

.stat-bar {
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.expand-toggle {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 10px;
    color: var(--text-3);
}

/* Expand lists */
.expand-list {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-muted);
}

.expand-list.open { display: block; }

.expand-empty {
    font-size: 11px;
    color: var(--text-3);
    font-family: var(--font-mono);
    text-align: center;
    padding: 8px 0;
}

/* Bandwidth rows */
.bandwidth-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-muted);
}

.bandwidth-detail:last-of-type { border-bottom: none; }

.bandwidth-ip {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
}

.bandwidth-value {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
}

.bandwidth-total {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-2);
    font-family: var(--font-mono);
}

/* OLT items */
.olt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.1s;
}

.olt-item:hover { background: var(--bg-hover); }

.olt-ip {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-3);
}

/* ============================================================
   CONTROLS BAR
   ============================================================ */
.controls-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-3);
}

.search-wrap input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-1);
    font-size: 13px;
    font-family: var(--font-sans);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-wrap input::placeholder { color: var(--text-3); }

.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-sel {
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-1);
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    min-width: 140px;
    transition: border-color 0.2s;
}

.filter-sel:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-refresh:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-refresh:active { transform: translateY(0); }

.btn-refresh.spinning i { animation: spin 0.7s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

thead tr {
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-muted);
    font-size: 13px;
    color: var(--text-1);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-raised); }

.row-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
    width: 40px;
}

.cluster-tag {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.vlan-tag {
    display: inline-block;
    background: var(--bg-raised);
    color: var(--text-2);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    border: 1px solid var(--border);
}

.ip-btn {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    padding: 3px 0;
    border-bottom: 1px dashed transparent;
    transition: all 0.15s;
}

.ip-btn.public { color: var(--accent); }
.ip-btn.local  { color: var(--green); }
.ip-btn.public:hover { border-bottom-color: var(--accent); }
.ip-btn.local:hover  { border-bottom-color: var(--green); }

.dash { color: var(--text-3); font-family: var(--font-mono); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.badge-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
}

.status-badge.is-active  { background: var(--green-dim); color: var(--green); }
.status-badge.is-active  .badge-dot { background: var(--green); }
.status-badge.is-inactive { background: var(--red-dim); color: var(--red); }
.status-badge.is-inactive .badge-dot { background: var(--red); }

.table-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-3);
    font-family: var(--font-mono);
}

/* States */
.state-box {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.state-box p { font-size: 13px; color: var(--text-2); }

.state-box i { font-size: 28px; }

.spinner {
    width: 28px; height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Footer */
.page-footer {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    color: var(--text-3);
    font-size: 11px;
    font-family: var(--font-mono);
    padding-bottom: 8px;
}

.page-footer span { display: flex; align-items: center; gap: 6px; }
.page-footer i { color: var(--accent); font-size: 10px; }

/* ============================================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    :root { --sidebar-w: 64px; }

    .sidebar-logo { padding: 20px 0; justify-content: center; }
    .logo-text { display: none; }
    .logo-mark { font-size: 18px; letter-spacing: 0; }

    .sidebar-nav { padding: 12px 8px; }
    .nav-section-label { display: none; }
    .nav-item { justify-content: center; padding: 10px; }
    .nav-item span { display: none; }
    .nav-item i { width: auto; }

    .sidebar-user { justify-content: center; padding: 12px 8px; }
    .user-info { display: none; }
    .user-avatar { width: 36px; height: 36px; }
    .user-logout { display: none; }

    .stats-row { grid-template-columns: repeat(2, 1fr); }

    .topbar { padding: 14px 20px; }
    .content { padding: 20px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }

    .sidebar {
        transform: translateX(-100%);
        width: 200px;
    }

    .main { margin-left: 0; }

    .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .topbar-right { flex-wrap: wrap; }

    .timestamp-chip { display: none; }

    .content { padding: 16px; gap: 16px; }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card { padding: 16px; }
    .stat-value { font-size: 28px; }
    .stat-value.mono { font-size: 18px; }

    .controls-bar { flex-direction: column; }
    .search-wrap { width: 100%; min-width: auto; }
    .filter-group { width: 100%; }
    .filter-sel { flex: 1; min-width: auto; }
    .btn-refresh { width: 100%; justify-content: center; }

    .info-cards-grid { grid-template-columns: 1fr; }

    th, td { padding: 10px 12px; }
    th { font-size: 9px; }
    td { font-size: 12px; }

    .page-footer { gap: 14px; font-size: 10px; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================================ */
@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }

    .topbar-title { font-size: 14px; }
    .topbar-sub { display: none; }

    .status-pill span { display: none; }
    .status-pill { padding: 5px 8px; }

    .login-card { padding: 32px 24px; }
}

/* iPhone safe area */
@supports (padding: max(0px)) {
    .content {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
    .topbar {
        padding-top: max(14px, env(safe-area-inset-top));
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
