/* ═══════════════════════════════════════════════════════════════════════════
   YoroSMS Panel — Main Stylesheet
   Dark telecom-grade UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-base:      #0d1117;
    --bg-sidebar:   #161b22;
    --bg-card:      #21262d;
    --bg-card2:     #2d333b;
    --bg-input:     #161b22;

    --accent:       #00d9aa;
    --accent-dim:   rgba(0, 217, 170, 0.12);
    --accent-hover: #00ffcc;

    --text:         #e6edf3;
    --text-muted:   #8b949e;
    --text-dim:     #484f58;

    --border:       #30363d;
    --border-light: #21262d;

    --green:        #3fb950;
    --yellow:       #d29922;
    --red:          #f85149;
    --blue:         #58a6ff;
    --purple:       #bc8cff;
    --teal:         #00d9aa;
    --orange:       #f0a500;

    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    14px;

    --sidebar-w:    240px;
    --topbar-h:     56px;

    --font-mono:    'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
    --font-ui:      'Inter', system-ui, -apple-system, sans-serif;

    --shadow-sm:    0 1px 4px 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);
    --transition:   150ms ease;
}

html { font-size: 14px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-ui);
    background: var(--bg-base);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

svg { vertical-align: middle; flex-shrink: 0; }

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

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    overflow-y: auto;
    transition: transform var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--border);
}
.brand-icon { width: 36px; height: 36px; }
.brand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-name  { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-balance { font-size: 11px; color: var(--accent); font-weight: 500; }

/* ── Nav items ────────────────────────────────────────────────────────────── */
.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
}
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-dim);
}

.sidebar-footer {
    padding: 8px 0 16px;
    border-top: 1px solid var(--border);
}
.nav-logout { color: var(--text-dim); }
.nav-logout:hover { color: var(--red); background: rgba(248, 81, 73, 0.08); }

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

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky; top: 0; z-index: 100;
}
.sidebar-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 4px;
}
.sidebar-toggle svg { width: 20px; height: 20px; }
.page-title {
    font-size: 16px; font-weight: 600;
    color: var(--text); flex: 1;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.credit-chip {
    display: flex; align-items: center; gap: 5px;
    background: var(--accent-dim);
    border: 1px solid rgba(0,217,170,0.25);
    color: var(--accent);
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
}
.credit-chip svg { width: 14px; height: 14px; }

/* ── Content ──────────────────────────────────────────────────────────────── */
.content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-size: 14px; font-weight: 600; color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.card-count {
    font-size: 12px; font-weight: 400; color: var(--text-muted);
    background: var(--bg-base); border: 1px solid var(--border);
    padding: 2px 8px; border-radius: 999px;
}
.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }
.card-body-list { padding: 8px 0; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-sidebar);
}

/* ── Stats Grid ───────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 6px; }
.stat-sub   { font-size: 12px; color: var(--text-muted); }

.stat-teal   { color: var(--teal) !important; }
.stat-green  { color: var(--green) !important; }
.stat-yellow { color: var(--yellow) !important; }
.stat-red    { color: var(--red) !important; }

/* ── Two-column row ───────────────────────────────────────────────────────── */
.row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th {
    background: var(--bg-base);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255,255,255,0.02); }

.table-sm th, .table-sm td { padding: 8px 12px; font-size: 12px; }

.td-mono    { font-family: var(--font-mono); font-size: 12px; }
.td-muted   { color: var(--text-muted) !important; }
.td-nowrap  { white-space: nowrap; }
.td-green   { color: var(--green) !important; }
.td-red     { color: var(--red) !important; }
.empty-row  { text-align: center; color: var(--text-muted); padding: 32px 16px !important; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600;
    line-height: 1.5; white-space: nowrap;
}
.badge-success  { background: rgba(63,185,80,0.15);  color: var(--green);  border: 1px solid rgba(63,185,80,0.3); }
.badge-danger   { background: rgba(248,81,73,0.15);  color: var(--red);    border: 1px solid rgba(248,81,73,0.3); }
.badge-warning  { background: rgba(210,153,34,0.15); color: var(--yellow); border: 1px solid rgba(210,153,34,0.3); }
.badge-info     { background: rgba(88,166,255,0.15); color: var(--blue);   border: 1px solid rgba(88,166,255,0.3); }
.badge-muted    { background: rgba(139,148,158,0.15); color: var(--text-muted); border: 1px solid var(--border); }
.badge-teal     { background: var(--accent-dim);      color: var(--teal);  border: 1px solid rgba(0,217,170,0.25); }
.badge-purple   { background: rgba(188,140,255,0.15); color: var(--purple); border: 1px solid rgba(188,140,255,0.3); }
.badge-network  { background: rgba(88,166,255,0.1);  color: var(--blue);   border: 1px solid rgba(88,166,255,0.25); font-family: var(--font-mono); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    font-family: var(--font-ui);
}
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--accent); color: #0d1117;
    border-color: var(--accent);
    font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #0d1117; }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: #8b949e; background: rgba(255,255,255,0.04); }

.btn-danger {
    background: rgba(248,81,73,0.12);
    color: var(--red);
    border-color: rgba(248,81,73,0.3);
}
.btn-danger:hover { background: rgba(248,81,73,0.25); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-xs { padding: 3px 7px; font-size: 11px; }
.btn-xs svg { width: 13px; height: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.req { color: var(--red); }
.form-hint { font-size: 11px; color: var(--text-dim); margin-top: 3px; }

.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    font-family: var(--font-ui);
    padding: 8px 12px;
    width: 100%;
    transition: border-color var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-control::placeholder { color: var(--text-dim); }
.form-control-sm { padding: 5px 9px; font-size: 12px; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b949e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

textarea.form-control { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.form-group-wide { grid-column: span 2; }
.form-group-narrow { min-width: 100px; max-width: 140px; }
.form-group-btn { flex-direction: row; align-items: flex-end; gap: 6px; }

.input-with-action {
    position: relative;
    display: flex;
}
.input-with-action .form-control { padding-right: 40px; }
.input-action-btn {
    position: absolute; right: 0; top: 0; bottom: 0;
    width: 38px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted);
}
.input-action-btn svg { width: 16px; height: 16px; }
.input-action-btn:hover { color: var(--text); }

.input-prefix-wrap { display: flex; }
.input-prefix {
    background: var(--bg-card2); border: 1px solid var(--border);
    border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 8px 10px; color: var(--text-muted); font-size: 13px;
    display: flex; align-items: center;
}
.input-with-prefix { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px;
    border: 1px solid; margin-bottom: 4px;
    display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: rgba(63,185,80,0.1);   color: var(--green);  border-color: rgba(63,185,80,0.3); }
.alert-danger  { background: rgba(248,81,73,0.1);   color: var(--red);    border-color: rgba(248,81,73,0.3); }
.alert-warning { background: rgba(210,153,34,0.1);  color: var(--yellow); border-color: rgba(210,153,34,0.3); }
.alert-info    { background: rgba(88,166,255,0.1);  color: var(--blue);   border-color: rgba(88,166,255,0.3); }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(13,17,23,0.85);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay[hidden] { display: none !important; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 680px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-sm { max-width: 420px; }

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-close {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 4px;
    border-radius: var(--radius-sm);
}
.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover { color: var(--text); background: var(--bg-card2); }

.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 16px 20px; border-top: 1px solid var(--border);
    background: var(--bg-sidebar);
}

/* ── Filter Bar ───────────────────────────────────────────────────────────── */
.filter-bar { overflow: visible; }
.filter-form { padding: 14px 16px; }
.filter-row {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
}
.filter-row .form-group { min-width: 120px; flex: 1; }

/* ── Page Actions ─────────────────────────────────────────────────────────── */
.page-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ── SMPP rows (sidebar list) ─────────────────────────────────────────────── */
.smpp-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
}
.smpp-row:last-child { border-bottom: none; }
.smpp-info { display: flex; flex-direction: column; gap: 2px; }
.smpp-label { font-size: 13px; font-weight: 500; }
.smpp-host  { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.action-btns { display: flex; gap: 6px; }

/* ── Period Tabs ──────────────────────────────────────────────────────────── */
.period-tabs {
    display: flex; gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    width: fit-content;
}
.period-tab {
    padding: 6px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; color: var(--text-muted);
    transition: all var(--transition);
}
.period-tab:hover  { color: var(--text); background: var(--bg-card2); }
.period-tab.active { color: var(--text); background: var(--bg-card2); border: 1px solid var(--border); }

/* ── Pager ────────────────────────────────────────────────────────────────── */
.pager { display: flex; align-items: center; gap: 10px; }
.pager-info { font-size: 12px; color: var(--text-muted); flex: 1; text-align: center; }

/* ── Empty State ──────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center; color: var(--text-muted);
    padding: 32px 16px; font-size: 13px;
}
.empty-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center; display: flex; flex-direction: column;
    align-items: center; gap: 16px;
}
.empty-card svg { width: 48px; height: 48px; opacity: 0.4; }
.empty-card p { color: var(--text-muted); font-size: 14px; }

/* ── Info Box ─────────────────────────────────────────────────────────────── */
.info-box {
    background: var(--accent-dim);
    border: 1px solid rgba(0,217,170,0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px; color: var(--accent);
    margin-top: 16px;
}

/* ── Billing / How-to ─────────────────────────────────────────────────────── */
.howto-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.howto-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; }
.howto-num {
    min-width: 26px; height: 26px;
    background: var(--accent-dim); border: 1px solid rgba(0,217,170,0.3);
    color: var(--accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}

.deposit-pending-row {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 16px 0; border-bottom: 1px solid var(--border);
}
.deposit-pending-row:last-of-type { border-bottom: none; }
.deposit-network-badge {
    padding: 6px 10px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 700; font-family: var(--font-mono);
    min-width: 70px; text-align: center;
}
.deposit-trc20 { background: rgba(255,68,68,0.1); color: #ff4444; border: 1px solid rgba(255,68,68,0.3); }
.deposit-erc20 { background: rgba(88,166,255,0.1); color: var(--blue); border: 1px solid rgba(88,166,255,0.3); }
.deposit-bep20 { background: rgba(240,165,0,0.1);  color: var(--yellow); border: 1px solid rgba(240,165,0,0.3); }

.deposit-details { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.deposit-amount { font-size: 15px; font-weight: 600; color: var(--text); }
.deposit-address-row { display: flex; align-items: center; gap: 8px; }
.deposit-addr {
    font-family: var(--font-mono); font-size: 12px;
    background: var(--bg-base); border: 1px solid var(--border);
    padding: 4px 8px; border-radius: var(--radius-sm); word-break: break-all;
}
.deposit-meta { font-size: 11px; color: var(--text-muted); }
.deposit-warning {
    display: flex; gap: 8px; align-items: flex-start;
    background: rgba(210,153,34,0.08); border: 1px solid rgba(210,153,34,0.25);
    border-radius: var(--radius-sm); padding: 10px 12px;
    color: var(--yellow); font-size: 12px; margin-top: 12px;
}
.deposit-warning svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.deposit-preview {
    background: var(--accent-dim); border: 1px solid rgba(0,217,170,0.25);
    border-radius: var(--radius-sm); padding: 10px 12px;
    font-size: 13px; color: var(--accent); margin: 4px 0;
}

.pending-deposits .card-body { display: flex; flex-direction: column; }

/* ── USDT Address Box ─────────────────────────────────────────────────────── */
.usdt-address-box {
    background: var(--bg-base); border: 1px solid rgba(0,217,170,0.3);
    border-radius: var(--radius); padding: 16px; margin-bottom: 4px;
}
.usdt-main-addr {
    font-size: 14px; letter-spacing: 0.5px; padding: 8px 12px;
    background: var(--bg-card2); user-select: all;
}
.separator {
    border: none; border-top: 1px solid var(--border); margin: 16px 0;
}

/* ── Network Selector ─────────────────────────────────────────────────────── */
.network-selector { display: flex; flex-direction: column; gap: 8px; }
.network-option {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-base); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px;
    cursor: pointer; transition: border-color var(--transition);
}
.network-option:hover { border-color: var(--accent); }
.network-option-disabled { opacity: 0.5; cursor: not-allowed; }
.network-radio { accent-color: var(--accent); }
.network-option input:checked + .network-info { color: var(--text); }
.network-option:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.network-info { display: flex; flex-direction: column; gap: 2px; }
.network-info strong { font-size: 13px; color: var(--text); }
.network-info small { font-size: 11px; color: var(--text-muted); }
.text-danger { color: var(--red) !important; }

/* ── Login Page ───────────────────────────────────────────────────────────── */
.login-body {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 100vh;
    background: var(--bg-base);
    background-image: radial-gradient(ellipse at 50% 0%, rgba(0,217,170,0.06) 0%, transparent 70%);
    padding: 16px;
}
.login-wrap {
    width: 100%; max-width: 420px;
    display: flex; flex-direction: column; gap: 16px;
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
}
.login-brand {
    text-align: center; margin-bottom: 28px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.login-brand .brand-icon { width: 52px; height: 52px; }
.brand-title { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.brand-subtitle { font-size: 13px; color: var(--text-muted); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-footer { text-align: center; font-size: 12px; color: var(--text-dim); }
.login-footer a { color: var(--text-muted); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .row-2col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0,0,0,0.6);
    }
    .main-wrap { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .content { padding: 16px; gap: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .form-group-wide { grid-column: span 1; }
    .filter-row .form-group { min-width: 140px; }
    .modal { max-width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 20px; }
    .login-card { padding: 24px 20px; }
}

/* ── SMPP Credentials Grid ───────────────────────────────────────────────── */
.smpp-creds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 24px;
}
.cred-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cred-label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; width: 100%; margin-bottom: 2px; }
.cred-value { font-size: 0.9rem; color: var(--text-primary); }
.btn-copy, .btn-reveal {
    background: none; border: none; cursor: pointer;
    color: var(--text-dim); padding: 2px 4px; display: inline-flex;
    transition: color 0.15s;
}
.btn-copy:hover, .btn-reveal:hover { color: var(--teal); }
.btn-copy svg, .btn-reveal svg { width: 14px; height: 14px; }

/* ── Admin nav section label ─────────────────────────────────────────────── */
.nav-section-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-dim);
    padding: 16px 16px 4px; margin-top: 4px;
}

/* ── Route admin form divider ────────────────────────────────────────────── */
.form-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.form-section-label { font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 12px; }

/* ── Wide modal ──────────────────────────────────────────────────────────── */
.modal-lg { max-width: 780px; }

/* ── Card subtitle ───────────────────────────────────────────────────────── */
.card-subtitle { font-size: 0.85rem; color: var(--text-dim); margin-top: 2px; }

