@font-face {
    font-family: 'Vazirmatn';
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'Vazirmatn';
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
}
@font-face {
    font-family: 'Vazirmatn';
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
}

:root {
    --bg: #060810;
    --surface: rgba(255,255,255,0.045);
    --surface-2: rgba(255,255,255,0.03);
    --border: rgba(255,255,255,0.09);
    --accent: #3b82f6; --accent-2: #8b5cf6; --accent-glow: rgba(59,130,246,0.35);
    --text: #e9ebf1; --text-dim: #8b93a5;
    --success: #22c55e; --danger: #ef4444; --warn: #f59e0b; --info: #06b6d4;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html { scroll-behavior: smooth; }
body { overscroll-behavior-y: contain; }
button, .btn, .btn.ghost, .btn.danger, .btn.success, .icon-btn, .inbound-tab, .pager button {
    -webkit-user-select: none; user-select: none;
}
button:active, .icon-btn:active, .inbound-tab:active { transform: scale(0.96); }
body {
    margin: 0; min-height: 100vh; position: relative; overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', Tahoma, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---- animated network-mesh background ---- */
#bg-canvas {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
}
body::before {
    content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(circle at 15% -10%, rgba(59,130,246,0.16), transparent 40%),
                radial-gradient(circle at 85% 100%, rgba(139,92,246,0.14), transparent 40%);
}
.topbar, main, .center-screen { position: relative; z-index: 1; }

/* ---- full-screen loader shown until the page has painted ---- */
#page-loader {
    position: fixed; inset: 0; z-index: 999; background: var(--bg);
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
    transition: opacity .4s ease, visibility .4s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring {
    width: 46px; height: 46px; border-radius: 50%;
    border: 3px solid rgba(59,130,246,0.18); border-top-color: var(--accent);
    animation: spin .8s linear infinite;
}
.loader-brand { font-weight: 800; font-size: 15px; color: #93c5fd; letter-spacing: .5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- entrance animation for main content ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp .45s ease both; }
.animate-in.d1 { animation-delay: .05s; }
.animate-in.d2 { animation-delay: .1s; }
.animate-in.d3 { animation-delay: .15s; }

.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.wrap-sm { width: 100%; max-width: 440px; }
.wrap-md { width: 100%; max-width: 620px; }
.wrap-lg { width: 100%; max-width: 720px; }
.brand { text-align: center; margin-bottom: 22px; }
.brand .name {
    font-size: 24px; font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .tag { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.steps { display: flex; gap: 8px; margin-bottom: 26px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background .3s ease, box-shadow .3s ease; }
.steps span.active { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.steps span.done { background: var(--success); }

h1 { font-size: 20px; margin: 0 0 8px; }
p.subtitle { color: var(--text-dim); margin: 0 0 24px; font-size: 13.5px; line-height: 1.9; }

label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
input, textarea {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
    background: rgba(255,255,255,0.03); color: var(--text); font-family: inherit; font-size: 14px;
    margin-bottom: 15px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: rgba(59,130,246,0.05); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes neonPulse {
    0%, 100% { box-shadow: 0 8px 22px rgba(236,72,153,0.35), 0 0 18px rgba(168,85,247,0.22); }
    50% { box-shadow: 0 10px 30px rgba(236,72,153,0.55), 0 0 30px rgba(168,85,247,0.4); }
}

.btn {
    display: inline-block; padding: 12px 18px; border-radius: 12px; border: none;
    background: linear-gradient(270deg, #ec4899, #a855f7, #6366f1, #a855f7, #ec4899);
    background-size: 300% 300%;
    color: #fff; font-family: inherit;
    font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
    animation: gradientShift 6s ease infinite, neonPulse 2.8s ease-in-out infinite;
    transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.015); filter: brightness(1.12); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn.block { display: block; width: 100%; }
.btn.ghost { background: rgba(255,255,255,0.07); box-shadow: none; animation: none; }
.btn.ghost:hover { background: rgba(255,255,255,0.12); }
.btn.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 8px 22px rgba(239,68,68,0.25); animation: none; }
.btn.success { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 8px 22px rgba(34,197,94,0.3); animation: none; }
@media (prefers-reduced-motion: reduce) {
    .btn { animation: none; }
}

.check-list { list-style: none; padding: 0; margin: 0 0 22px; }
.check-list li {
    display: flex; align-items: center; justify-content: space-between; padding: 10px 14px;
    border-radius: 10px; margin-bottom: 6px; background: rgba(255,255,255,0.03); font-size: 13.5px;
    animation: fadeInUp .3s ease both;
}
.badge { font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.badge.ok, .badge.online { background: rgba(34,197,94,0.15); color: var(--success); }
.badge.fail, .badge.error { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge.pending, .badge.offline { background: rgba(148,163,184,0.15); color: var(--text-dim); }

.errors {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5;
    padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 13px;
    animation: fadeInUp .3s ease both;
}
.errors ul { margin: 0; padding-right: 18px; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; animation: fadeInUp .3s ease both; }
.flash.success { background: rgba(34,197,94,0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.flash.warning { background: rgba(245,158,11,0.12); color: var(--warn); border: 1px solid rgba(245,158,11,0.3); }
code { direction: ltr; display: inline-block; }

/* ---- App shell: icon top bar like the reference design ---- */
.topbar {
    display: flex; align-items: center; justify-content: space-between; padding: 14px 26px;
    border-bottom: 1px solid var(--border); background: rgba(8,10,18,0.7);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 50;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar .brand-inline { font-weight: 800; font-size: 16px; color: #93c5fd; margin-inline-end: 8px; }

.icon-btn {
    width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border);
    background: rgba(255,255,255,0.04); color: var(--text); display: flex; align-items: center;
    justify-content: center; cursor: pointer; text-decoration: none; font-size: 15px;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.icon-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,0.09); }
.icon-btn.red { color: #fca5a5; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.icon-btn.green { color: #86efac; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }
.icon-btn.purple { color: #d8b4fe; border-color: rgba(168,85,247,0.3); background: rgba(168,85,247,0.08); }

/* Desktop nav links (hidden on mobile, replaced by drawer) */
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    color: var(--text-dim); text-decoration: none; padding: 8px 14px; border-radius: 10px;
    font-size: 13.5px; transition: color .15s ease, background .15s ease;
}
.nav-links a.active { color: #fff; background: rgba(59,130,246,0.18); animation: navGlow 2.5s ease-in-out infinite; }
@keyframes navGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(236,72,153,0); }
    50% { box-shadow: 0 0 14px rgba(236,72,153,0.35); }
}
.nav-links a:hover { color: var(--text); }

.hamburger { display: none; }

/* Slide-in mobile drawer */
#mobile-drawer {
    position: fixed; inset: 0; z-index: 100; visibility: hidden;
}
#mobile-drawer .drawer-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; transition: opacity .25s ease;
}
#mobile-drawer .drawer-panel {
    position: absolute; top: 0; bottom: 0; right: 0; width: 78%; max-width: 300px;
    background: #0b0e17; border-left: 1px solid var(--border); padding: 22px;
    transform: translateX(100%); transition: transform .28s ease;
    display: flex; flex-direction: column; gap: 6px;
}
#mobile-drawer.open { visibility: visible; }
#mobile-drawer.open .drawer-backdrop { opacity: 1; }
#mobile-drawer.open .drawer-panel { transform: translateX(0); }
#mobile-drawer a, #mobile-drawer button {
    display: block; width: 100%; text-align: right; color: var(--text); text-decoration: none;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px;
    padding: 13px 16px; font-family: inherit; font-size: 14px; cursor: pointer;
}
#mobile-drawer a.active { background: rgba(59,130,246,0.18); border-color: rgba(59,130,246,0.3); }

main { padding: 26px; max-width: 1160px; margin: 0 auto; }

.grid-3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
    display: flex; align-items: center; gap: 12px; padding: 20px;
}
.stat .icon {
    width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.stat .icon.blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.stat .icon.green { background: rgba(34,197,94,0.15); color: #4ade80; }
.stat .icon.purple { background: rgba(168,85,247,0.15); color: #c084fc; }
.stat .icon.orange { background: rgba(245,158,11,0.15); color: #fbbf24; }
.stat .num { font-size: 24px; font-weight: 800; line-height: 1; }
.stat .label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: right; color: var(--text-dim); font-weight: 600; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
td { padding: 12px; border-top: 1px solid var(--border); }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.empty { text-align: center; color: var(--text-dim); padding: 40px 0; }

/* ---- Mobile responsiveness ---- */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .card { padding: 22px 18px; border-radius: 16px; }
    .wrap-md, .wrap-lg { max-width: 100%; }
    .row { grid-template-columns: 1fr; gap: 0; }
    h1 { font-size: 17px; }
    .brand .name { font-size: 19px; }

    .nav-links { display: none; }
    .hamburger { display: flex; }
    main { padding: 16px; }
    .grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat { padding: 14px; }
    .stat .num { font-size: 19px; }

    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    table tr {
        background: rgba(255,255,255,0.03); border: 1px solid var(--border);
        border-radius: 14px; margin-bottom: 10px; padding: 10px 14px;
    }
    table td { border-top: none; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: left; }
    table td:empty { display: none; }
    table td::before { content: attr(data-label); color: var(--text-dim); font-size: 11px; flex-shrink: 0; }

    /* Action/link cells hold buttons and forms, not plain text — stack
       them instead of forcing space-between, or the toolbar squishes
       into an unreadable single line. */
    table td[data-label="عملیات"], table td[data-label="ساب"] {
        display: block; text-align: right;
    }
    table td[data-label="عملیات"]::before, table td[data-label="ساب"]::before {
        display: block; margin-bottom: 8px;
    }
    .toolbar { justify-content: flex-start; }

    .btn, .btn.ghost, .btn.danger, .btn.success { padding: 11px 14px; font-size: 13.5px; }
    input, textarea { font-size: 16px; } /* prevents iOS auto-zoom on focus */

    /* Inbound picker + tabs */
    .inbound-tabs { -webkit-overflow-scrolling: touch; margin-inline: -16px; padding-inline: 16px; }
    #quick-inbound-checks { -webkit-overflow-scrolling: touch; max-height: 220px; }
    .inbound-check { padding: 10px 12px; gap: 9px; }
    .inbound-check .check-visual { width: 20px; height: 20px; }

    /* Modal shouldn't ever exceed the viewport on a short phone screen */
    .modal-overlay { padding: 12px; align-items: flex-end; }
    .modal-box { max-height: 85vh; overflow-y: auto; width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; }
}

@media (max-width: 420px) {
    .center-screen { padding: 12px; }
    .card { padding: 18px 14px; }
    .grid-3 { grid-template-columns: 1fr; }
}

/* ---- light theme: white surfaces, black text, pink neon accents ---- */
html[data-theme="light"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #fafafa;
    --border: rgba(15,23,42,0.08);
    --text: #0a0a0a;
    --text-dim: #6b7280;
    --accent: #ec4899;
    --accent-glow: rgba(236,72,153,0.35);
    --success: #16a34a; --danger: #dc2626; --warn: #d97706;
}
html[data-theme="light"] body::before {
    background: radial-gradient(circle at 15% -10%, rgba(236,72,153,0.07), transparent 40%),
                radial-gradient(circle at 85% 100%, rgba(244,114,182,0.06), transparent 40%);
}
html[data-theme="light"] #bg-canvas { opacity: 0.25; }
html[data-theme="light"] .topbar {
    background: rgba(255,255,255,0.85);
    box-shadow: 0 2px 20px rgba(236,72,153,0.06);
}
html[data-theme="light"] #mobile-drawer .drawer-panel { background: #ffffff; }
html[data-theme="light"] .loader-ring { border-color: rgba(236,72,153,0.15); border-top-color: #ec4899; }
html[data-theme="light"] .loader-brand { color: #db2777; }
html[data-theme="light"] input, html[data-theme="light"] textarea {
    background: #fafafa; border-color: rgba(15,23,42,0.1); color: #0a0a0a;
}
html[data-theme="light"] input:focus, html[data-theme="light"] textarea:focus {
    background: #fff; box-shadow: 0 0 0 3px rgba(236,72,153,0.18);
}
html[data-theme="light"] .card {
    box-shadow: 0 8px 30px rgba(236,72,153,0.08), 0 2px 8px rgba(0,0,0,0.04);
    border-color: rgba(236,72,153,0.12);
}
@keyframes neonPulseLight {
    0%, 100% { box-shadow: 0 6px 20px rgba(236,72,153,0.35), 0 0 0 1px rgba(236,72,153,0.15), 0 0 22px rgba(255,255,255,0.6), 0 0 24px rgba(244,114,182,0.25); }
    50% { box-shadow: 0 10px 28px rgba(236,72,153,0.5), 0 0 0 1px rgba(236,72,153,0.25), 0 0 34px rgba(255,255,255,0.85), 0 0 36px rgba(244,114,182,0.4); }
}
/* Neon pink/purple primary buttons — animated gradient + soft white glow layered underneath the pink glow */
html[data-theme="light"] .btn {
    background: linear-gradient(270deg, #ec4899, #c084fc, #a855f7, #f472b6, #ec4899);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite, neonPulseLight 2.8s ease-in-out infinite;
    color: #fff;
}
html[data-theme="light"] .btn:hover { filter: brightness(1.05); }
html[data-theme="light"] .btn.ghost {
    background: #fff; color: #db2777; border: 1px solid rgba(236,72,153,0.3);
    box-shadow: 0 2px 10px rgba(236,72,153,0.1); animation: none;
}
html[data-theme="light"] .btn.ghost:hover { background: rgba(236,72,153,0.06); }
html[data-theme="light"] .btn.success { background: linear-gradient(135deg, #22c55e, #16a34a); animation: none; }
html[data-theme="light"] .btn.danger { background: linear-gradient(135deg, #f43f5e, #dc2626); animation: none; }
html[data-theme="light"] .icon-btn { background: #fff; border-color: rgba(15,23,42,0.08); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
html[data-theme="light"] .icon-btn.red { background: #fff1f2; border-color: rgba(244,63,94,0.25); color: #e11d48; }
html[data-theme="light"] .icon-btn.purple { background: #fdf2f8; border-color: rgba(236,72,153,0.3); color: #db2777; }
html[data-theme="light"] .toolbar { background: #fafafa; border-color: rgba(15,23,42,0.08); }
html[data-theme="light"] .inbound-tab { background: #fafafa; color: #52525b; border-color: rgba(15,23,42,0.08); }
html[data-theme="light"] .inbound-tab:hover { background: #f5f5f5; color: #0a0a0a; }
html[data-theme="light"] .link-row input { background: #fafafa; color: #0a0a0a; border-color: rgba(15,23,42,0.1); }
html[data-theme="light"] .modal-box { background: #ffffff; box-shadow: 0 30px 80px rgba(0,0,0,0.15); }
html[data-theme="light"] .pager button { background: #fafafa; border-color: rgba(15,23,42,0.08); color: #0a0a0a; }
html[data-theme="light"] .pager button:hover:not(:disabled) { background: rgba(236,72,153,0.08); border-color: rgba(236,72,153,0.3); }
html[data-theme="light"] .badge.ok, html[data-theme="light"] .badge.online { background: rgba(22,163,74,0.1); }
html[data-theme="light"] .badge.fail, html[data-theme="light"] .badge.error { background: rgba(220,38,38,0.1); }
html[data-theme="light"] .inbound-tab.active {
    background: linear-gradient(135deg, rgba(236,72,153,0.12), rgba(244,114,182,0.1));
    border-color: rgba(236,72,153,0.35); color: #db2777;
    box-shadow: 0 4px 16px rgba(236,72,153,0.15);
}
html[data-theme="light"] .steps span.active { background: #ec4899; box-shadow: 0 0 12px rgba(236,72,153,0.4); }
html[data-theme="light"] table tr:hover { background: rgba(236,72,153,0.03); }
html[data-theme="light"] .brand .name {    background: linear-gradient(135deg, #db2777, #ec4899, #f472b6);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Extra depth pass: borders/shadows everywhere on the light theme so
   nothing reads as flat white-on-white. */
.badge { border: 1px solid transparent; }
.badge.ok, .badge.online { border-color: rgba(34,197,94,0.28); }
.badge.fail, .badge.error { border-color: rgba(239,68,68,0.28); }
.badge.pending, .badge.offline { border-color: rgba(148,163,184,0.22); }
.stat .icon { box-shadow: 0 4px 14px rgba(0,0,0,0.12) inset, 0 2px 6px rgba(0,0,0,0.06); }
@media (max-width: 720px) {
    html[data-theme="light"] table tr { background: #ffffff; box-shadow: 0 3px 14px rgba(0,0,0,0.06); border-color: rgba(15,23,42,0.06); }
}
html[data-theme="light"] .link-row input { box-shadow: 0 1px 4px rgba(0,0,0,0.03); }
html[data-theme="light"] .inbound-check { box-shadow: 0 1px 6px rgba(0,0,0,0.03); }
html[data-theme="light"] .inbound-check.selected { box-shadow: 0 4px 18px rgba(236,72,153,0.14); }
html[data-theme="light"] .empty { color: #94a3b8; }

/* ---- page transition fade (triggered on internal link clicks) ---- */
body.leaving main, body.leaving .center-screen > * { opacity: 0; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease; }

/* ---- inbound tabs ---- */
.inbound-tabs {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.inbound-tab {
    flex-shrink: 0; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
    background: rgba(255,255,255,0.03); color: var(--text-dim); font-family: inherit; font-size: 13px;
    cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.inbound-tab:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.inbound-tab.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.22), rgba(139,92,246,0.18));
    border-color: rgba(59,130,246,0.4); color: #fff;
    animation: tabGlow 2.5s ease-in-out infinite;
}
@keyframes tabGlow {
    0%, 100% { box-shadow: 0 4px 16px rgba(59,130,246,0.2); }
    50% { box-shadow: 0 4px 22px rgba(139,92,246,0.4); }
}
.inbound-tab .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 6px; }
.inbound-tab .dot.on { background: var(--success); box-shadow: 0 0 6px rgba(34,197,94,0.7); }
.inbound-tab .dot.off { background: var(--danger); box-shadow: 0 0 6px rgba(239,68,68,0.5); }

/* Enabled/disabled Inbound state — subtle green/red edge, brighter when the tab is also the active one */
.inbound-tab.state-on { border-color: rgba(34,197,94,0.25); }
.inbound-tab.state-off { border-color: rgba(239,68,68,0.25); opacity: 0.75; }
.inbound-tab.state-on.active {
    background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(59,130,246,0.16));
    border-color: rgba(34,197,94,0.45);
    animation: tabGlowGreen 2.5s ease-in-out infinite;
}
.inbound-tab.state-off.active {
    background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(139,92,246,0.14));
    border-color: rgba(239,68,68,0.4);
    animation: tabGlowRed 2.5s ease-in-out infinite;
}
@keyframes tabGlowGreen {
    0%, 100% { box-shadow: 0 4px 16px rgba(34,197,94,0.2); }
    50% { box-shadow: 0 4px 24px rgba(34,197,94,0.4); }
}
@keyframes tabGlowRed {
    0%, 100% { box-shadow: 0 4px 16px rgba(239,68,68,0.2); }
    50% { box-shadow: 0 4px 24px rgba(239,68,68,0.4); }
}

/* ---- animated inbound checkbox selector (config-creation card) ---- */
@keyframes checkPop { 0% { transform: scale(0.55); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.inbound-check {
    display: flex; align-items: center; gap: 13px; cursor: pointer; margin: 0;
    background: rgba(255,255,255,0.035);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border); border-inline-start: 3px solid var(--border);
    border-radius: 14px;
    padding: 13px 15px;
    transition: transform .3s cubic-bezier(.34,1.3,.4,1), border-color .25s ease, background .25s ease, box-shadow .3s ease;
}
.inbound-check.state-on { border-inline-start-color: var(--success); }
.inbound-check.state-off { border-inline-start-color: var(--danger); opacity: 0.75; }
.inbound-check:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
.inbound-check input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.inbound-check .check-visual {
    width: 23px; height: 23px; border-radius: 8px; border: 1.5px solid var(--border); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all .3s cubic-bezier(.34,1.3,.4,1);
    background: rgba(255,255,255,0.03); color: transparent; font-size: 13px; font-weight: 800;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}
.inbound-check input:checked ~ .check-visual {
    background: linear-gradient(150deg, #ec4899, #a855f7); border-color: transparent; color: #fff;
    box-shadow: 0 0 0 4px rgba(236,72,153,0.15), 0 2px 8px rgba(236,72,153,0.4);
    animation: checkPop .35s cubic-bezier(.34,1.4,.4,1);
}
.inbound-check.selected {
    border-color: rgba(236,72,153,0.3);
    background: rgba(236,72,153,0.055);
    box-shadow: 0 0 0 1px rgba(236,72,153,0.15) inset, 0 6px 20px rgba(236,72,153,0.1);
}
html[data-theme="light"] .inbound-check { background: rgba(255,255,255,0.7); }
html[data-theme="light"] .inbound-check:hover { background: #ffffff; box-shadow: 0 8px 22px rgba(0,0,0,0.08); }
html[data-theme="light"] .inbound-check.selected { background: rgba(236,72,153,0.05); box-shadow: 0 0 0 1px rgba(236,72,153,0.2) inset, 0 6px 20px rgba(236,72,153,0.12); }

/* ---- toolbar: action buttons grouped in one contained, wrapping row ---- */
.toolbar {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 14px; padding: 10px; margin-top: 8px;
}
.toolbar .btn, .toolbar .btn.ghost, .toolbar .btn.danger { padding: 8px 14px; font-size: 12.5px; }

/* ---- pagination ---- */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.pager button {
    padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border);
    background: rgba(255,255,255,0.04); color: var(--text); font-family: inherit; font-size: 13px; cursor: pointer;
    transition: all .15s ease;
}
.pager button:hover:not(:disabled) { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.3); }
.pager button:disabled { opacity: 0.35; cursor: not-allowed; }
.pager .page-info { font-size: 12.5px; color: var(--text-dim); min-width: 90px; text-align: center; }

/* ---- server resource gauges: glassy 3D card treatment ---- */
.resource-card { position: relative; overflow: hidden; }
.resource-card::before {
    content: ''; position: absolute; top: -60%; left: -20%; width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(59,130,246,0.10), transparent 70%);
    pointer-events: none; animation: driftGlow 12s ease-in-out infinite;
}
@keyframes driftGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40%, 20%); }
}
.live-dot {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
    color: var(--success); margin-inline-start: auto; padding: 3px 10px; border-radius: 999px;
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25);
    transition: color .3s ease, background .3s ease, border-color .3s ease;
}
.live-dot .pulse {
    width: 6px; height: 6px; border-radius: 50%; background: var(--success);
    box-shadow: 0 0 6px var(--success); animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.live-dot.stale { color: var(--text-dim); background: rgba(148,163,184,0.1); border-color: rgba(148,163,184,0.2); }
.live-dot.stale .pulse { background: var(--text-dim); box-shadow: none; animation: none; }

.resource-gauges {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; position: relative; z-index: 1;
}
.gauge-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
    border: 1px solid var(--border); border-radius: 20px;
    padding: 20px 10px 16px; transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}
.gauge-item:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 16px 40px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08); }
.gauge-canvas { width: 110px; height: 110px; }
.gauge-label { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .02em; }
.gauge-sub { font-size: 11px; color: var(--text-dim); direction: ltr; }
html[data-theme="light"] .gauge-item {
    background: linear-gradient(160deg, #ffffff, #fafafa);
    box-shadow: 0 10px 28px rgba(236,72,153,0.08), 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
}
html[data-theme="light"] .gauge-item:hover { box-shadow: 0 16px 36px rgba(236,72,153,0.14), 0 2px 8px rgba(0,0,0,0.05); }
@media (max-width: 720px) {
    .resource-gauges { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
    .gauge-canvas { width: 78px; height: 78px; }
    .gauge-item { padding: 14px 6px 12px; border-radius: 16px; }
}
@media (max-width: 420px) {
    .resource-gauges { grid-template-columns: 1fr; }
    .gauge-canvas { width: 130px; height: 130px; }
}

/* ---- modal (client edit dialog) ---- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; animation: fadeInUp .2s ease both; }
.modal-box {
    width: 100%; max-width: 440px; background: #0e1220; border: 1px solid var(--border);
    border-radius: 18px; padding: 26px; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    animation: popIn .25s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes popIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-box h3 { margin: 0 0 16px; font-size: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .btn { flex: 1; }

/* ---- small copy-link row used for config/sub links ---- */
.link-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.link-row input {
    margin: 0; font-size: 11px; padding: 8px 10px; direction: ltr; text-align: left;
    background: rgba(255,255,255,0.03);
}
.link-row .btn { white-space: nowrap; flex-shrink: 0; padding: 8px 12px; font-size: 12px; }

/* ========================================================================
   PREMIUM VISUAL OVERRIDE — VISUAL ONLY
   No application logic, PHP, JS, routes, queries or data behavior changed.
   ======================================================================== */
:root {
    --bg: #070a0f;
    --surface: rgba(15, 20, 29, .88);
    --surface-2: rgba(12, 17, 25, .72);
    --border: rgba(148, 163, 184, .105);
    --border-strong: rgba(148, 163, 184, .18);
    --accent: #5b8cff;
    --accent-2: #7c6cff;
    --accent-glow: rgba(91, 140, 255, .20);
    --text: #f3f6fb;
    --text-dim: #8792a5;
}

html, body { background: var(--bg) !important; }
html[data-theme="light"] {
    --bg: #070a0f !important;
    --surface: rgba(15,20,29,.88) !important;
    --surface-2: rgba(12,17,25,.72) !important;
    --border: rgba(148,163,184,.105) !important;
    --text: #f3f6fb !important;
    --text-dim: #8792a5 !important;
    --accent: #5b8cff !important;
}
html[data-theme="light"] body,
html[data-theme="light"] .topbar,
html[data-theme="light"] #mobile-drawer .drawer-panel,
html[data-theme="light"] .modal-box,
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] .toolbar,
html[data-theme="light"] .inbound-tab,
html[data-theme="light"] .pager button,
html[data-theme="light"] .inbound-check,
html[data-theme="light"] .gauge-item { color: var(--text) !important; background-color: transparent !important; }

/* Permanent dark visual identity; the original toggle remains functionally
   present in JS but is visually removed from the interface. */
.topbar-right .icon-btn.purple { display: none !important; }

body {
    min-height: 100vh;
    background:
        radial-gradient(900px 520px at 8% -8%, rgba(61, 104, 214, .12), transparent 62%),
        radial-gradient(850px 520px at 100% 105%, rgba(104, 74, 210, .10), transparent 60%),
        #070a0f !important;
    letter-spacing: -.01em;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .24;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 88%);
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 88%);
}
#bg-canvas { opacity: .14 !important; }
body::before { opacity: .55; }

/* Premium page loader — static composition + transform/opacity only. */
#page-loader {
    background:
        radial-gradient(circle at 50% 44%, rgba(91,140,255,.075), transparent 28%),
        #070a0f !important;
    gap: 16px;
}
#page-loader::before {
    content: "";
    width: 82px;
    height: 82px;
    position: absolute;
    border-radius: 26px;
    border: 1px solid rgba(148,163,184,.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
#page-loader::after {
    content: "";
    width: 120px;
    height: 120px;
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(91,140,255,.10);
    opacity: .7;
}
.loader-ring {
    position: relative;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(255,255,255,.075) !important;
    border-top-color: #6d9bff !important;
    border-right-color: rgba(124,108,255,.65) !important;
    box-shadow: 0 0 28px rgba(91,140,255,.12);
    animation: premiumSpin .8s linear infinite !important;
}
.loader-brand {
    position: relative;
    z-index: 2;
    color: #e7ecf5 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.loader-brand::after {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    margin: 8px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #5b8cff, transparent);
    opacity: .8;
}
@keyframes premiumSpin { to { transform: rotate(360deg); } }

/* App chrome */
.topbar {
    min-height: 68px;
    padding: 12px 28px !important;
    background: rgba(7,10,15,.82) !important;
    border-bottom: 1px solid rgba(148,163,184,.09) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,.14);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
}
.topbar .brand-inline {
    color: #f4f7fb !important;
    font-size: 15px !important;
    letter-spacing: -.01em;
}
.topbar .brand-inline::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-inline-end: 9px;
    border-radius: 50%;
    vertical-align: 1px;
    background: #6d9bff;
    box-shadow: 0 0 14px rgba(91,140,255,.65);
}
.nav-links { gap: 3px !important; }
.nav-links a {
    position: relative;
    color: #7f8a9c !important;
    padding: 9px 13px !important;
    border-radius: 9px !important;
    transition: color .16s ease, background .16s ease, transform .16s ease !important;
}
.nav-links a:hover {
    color: #e9eef7 !important;
    background: rgba(255,255,255,.035) !important;
    transform: translateY(-1px);
}
.nav-links a.active {
    color: #f5f8ff !important;
    background: rgba(91,140,255,.095) !important;
    box-shadow: inset 0 0 0 1px rgba(91,140,255,.12) !important;
    animation: none !important;
}
.nav-links a.active::after {
    content: "";
    position: absolute;
    right: 13px;
    left: 13px;
    bottom: 3px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #6d9bff, transparent);
    opacity: .65;
}
.icon-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.025) !important;
    border-color: rgba(148,163,184,.11) !important;
    color: #aeb8c8 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
    transition: transform .16s ease, background .16s ease, border-color .16s ease !important;
}
.icon-btn:hover {
    transform: translateY(-1px) !important;
    background: rgba(255,255,255,.055) !important;
    border-color: rgba(148,163,184,.20) !important;
}
.icon-btn.red { color: #ff9caa !important; background: rgba(239,68,68,.055) !important; }
.icon-btn.green { color: #79dfa0 !important; background: rgba(34,197,94,.055) !important; }

/* Main rhythm */
main { max-width: 1240px !important; padding: 30px 28px 48px !important; }
.card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(17,23,33,.92), rgba(11,15,22,.88)) !important;
    border: 1px solid rgba(148,163,184,.095) !important;
    border-radius: 18px !important;
    padding: 26px !important;
    box-shadow:
        0 18px 55px rgba(0,0,0,.20),
        inset 0 1px 0 rgba(255,255,255,.028) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease !important;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255,255,255,.035), transparent 22%, transparent 78%, rgba(91,140,255,.025));
}
.card:hover {
    border-color: rgba(148,163,184,.14) !important;
    box-shadow: 0 22px 65px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.035) !important;
}
h1 { font-size: 21px !important; font-weight: 750 !important; letter-spacing: -.035em; }
p.subtitle { color: #7f8a9c !important; font-size: 13px !important; line-height: 1.95 !important; }
.brand { margin-bottom: 26px !important; }
.brand .name {
    font-size: 25px !important;
    background: linear-gradient(100deg, #f4f7fb 0%, #b7c8ff 52%, #8fa8ff 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}
.brand .tag { color: #687487 !important; }

/* Forms */
label { color: #8b96a8 !important; font-size: 12px !important; font-weight: 550; }
input, textarea {
    background: rgba(5,8,13,.56) !important;
    border: 1px solid rgba(148,163,184,.11) !important;
    color: #edf2f9 !important;
    border-radius: 11px !important;
    padding: 12px 14px !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.12);
}
input::placeholder, textarea::placeholder { color: #566174 !important; }
input:focus, textarea:focus {
    border-color: rgba(91,140,255,.55) !important;
    background: rgba(8,13,22,.82) !important;
    box-shadow: 0 0 0 3px rgba(91,140,255,.09), 0 8px 26px rgba(0,0,0,.12) !important;
}

/* Buttons: crisp corporate controls, no expensive perpetual shadow animation. */
.btn {
    position: relative;
    overflow: hidden;
    border-radius: 10px !important;
    padding: 11px 17px !important;
    background: linear-gradient(135deg, #5f8fff, #536fe0) !important;
    box-shadow: 0 8px 22px rgba(48,78,170,.20), inset 0 1px 0 rgba(255,255,255,.14) !important;
    animation: none !important;
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease !important;
}
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    right: -45%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    transform: skewX(-18deg);
    transition: right .45s ease;
}
.btn:hover { transform: translateY(-2px) !important; filter: brightness(1.07); box-shadow: 0 12px 28px rgba(48,78,170,.25), inset 0 1px 0 rgba(255,255,255,.16) !important; }
.btn:hover::after { right: 115%; }
.btn:active { transform: translateY(0) scale(.985) !important; }
.btn.ghost {
    background: rgba(255,255,255,.035) !important;
    border: 1px solid rgba(148,163,184,.12) !important;
    color: #c3ccd9 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03) !important;
}
.btn.ghost:hover { background: rgba(255,255,255,.065) !important; border-color: rgba(148,163,184,.19) !important; }
.btn.danger { background: linear-gradient(135deg,#e05260,#bd3d4b) !important; box-shadow: 0 8px 22px rgba(189,61,75,.18) !important; }
.btn.success { background: linear-gradient(135deg,#36b875,#23915c) !important; box-shadow: 0 8px 22px rgba(35,145,92,.18) !important; }

/* Dashboard stats */
.grid-3 { gap: 15px !important; margin-bottom: 18px !important; }
.stat {
    min-height: 96px;
    padding: 19px !important;
    background: linear-gradient(145deg, rgba(17,23,33,.94), rgba(11,15,22,.88)) !important;
}
.stat .icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 11px !important;
    background: rgba(91,140,255,.08) !important;
    color: #8aaeff !important;
    border: 1px solid rgba(91,140,255,.10);
}
.stat .icon.green { background: rgba(34,197,94,.075) !important; color: #68d99a !important; border-color: rgba(34,197,94,.10); }
.stat .icon.purple { background: rgba(124,108,255,.075) !important; color: #a69aff !important; border-color: rgba(124,108,255,.10); }
.stat .icon.orange { background: rgba(245,158,11,.075) !important; color: #f4b95f !important; border-color: rgba(245,158,11,.10); }
.stat .num { font-size: 23px !important; color: #f2f5fa; }
.stat .label { color: #788497 !important; }

/* Tables / toolbars */
.toolbar {
    background: rgba(255,255,255,.018) !important;
    border: 1px solid rgba(148,163,184,.085) !important;
    border-radius: 12px !important;
    padding: 9px !important;
}
table { font-size: 13px !important; }
th { color: #6f7b8e !important; padding: 11px 12px !important; }
td { border-top-color: rgba(148,163,184,.075) !important; padding: 13px 12px !important; }
tbody tr { transition: background .14s ease !important; }
tbody tr:hover { background: rgba(91,140,255,.028) !important; }
.empty { color: #667286 !important; }

/* Status pills */
.badge {
    padding: 4px 9px !important;
    border-radius: 7px !important;
    border: 1px solid transparent;
    letter-spacing: .01em;
}
.badge.ok, .badge.online { background: rgba(34,197,94,.075) !important; color: #72dda0 !important; border-color: rgba(34,197,94,.12); }
.badge.fail, .badge.error { background: rgba(239,68,68,.075) !important; color: #ff8993 !important; border-color: rgba(239,68,68,.12); }
.badge.pending, .badge.offline { background: rgba(148,163,184,.065) !important; color: #8994a6 !important; border-color: rgba(148,163,184,.09); }
.flash, .errors { border-radius: 11px !important; }
.errors { background: rgba(239,68,68,.055) !important; border-color: rgba(239,68,68,.16) !important; }
.flash.success { background: rgba(34,197,94,.055) !important; border-color: rgba(34,197,94,.14) !important; }
.flash.warning { background: rgba(245,158,11,.055) !important; border-color: rgba(245,158,11,.14) !important; }

/* Installer stepper */
.steps { gap: 7px !important; margin-bottom: 25px !important; }
.steps span {
    height: 3px !important;
    background: rgba(148,163,184,.09) !important;
    transition: background .22s ease, box-shadow .22s ease !important;
}
.steps span.active { background: #638fff !important; box-shadow: 0 0 12px rgba(91,140,255,.26) !important; }
.steps span.done { background: #45bd7d !important; box-shadow: none !important; }
.check-list li {
    background: rgba(255,255,255,.022) !important;
    border: 1px solid rgba(148,163,184,.065);
    padding: 11px 13px !important;
    border-radius: 10px !important;
}

/* Inbounds / selectors */
.inbound-tabs { gap: 7px !important; }
.inbound-tab {
    background: rgba(255,255,255,.022) !important;
    border-color: rgba(148,163,184,.10) !important;
    border-radius: 10px !important;
    transition: transform .16s ease, background .16s ease, border-color .16s ease !important;
}
.inbound-tab:hover { background: rgba(255,255,255,.05) !important; transform: translateY(-1px); }
.inbound-tab.active, .inbound-tab.state-on.active, .inbound-tab.state-off.active {
    background: rgba(91,140,255,.09) !important;
    border-color: rgba(91,140,255,.22) !important;
    box-shadow: inset 0 0 0 1px rgba(91,140,255,.035), 0 7px 20px rgba(0,0,0,.14) !important;
    animation: none !important;
}
.inbound-check {
    background: rgba(255,255,255,.022) !important;
    border-color: rgba(148,163,184,.085) !important;
    border-inline-start-color: rgba(148,163,184,.15) !important;
    border-radius: 12px !important;
    transition: transform .16s ease, background .16s ease, border-color .16s ease !important;
}
.inbound-check.state-on { border-inline-start-color: rgba(34,197,94,.65) !important; }
.inbound-check.state-off { border-inline-start-color: rgba(239,68,68,.55) !important; }
.inbound-check:hover { background: rgba(255,255,255,.045) !important; box-shadow: none !important; }
.inbound-check.selected { background: rgba(91,140,255,.055) !important; border-color: rgba(91,140,255,.20) !important; box-shadow: inset 0 0 0 1px rgba(91,140,255,.04) !important; }
.inbound-check input:checked ~ .check-visual {
    background: linear-gradient(145deg,#668fff,#536fdc) !important;
    box-shadow: 0 0 0 3px rgba(91,140,255,.08), 0 5px 14px rgba(48,78,170,.20) !important;
}

/* Resource monitor */
.resource-card::before { opacity: .45; animation: none !important; }
.resource-gauges { gap: 14px !important; }
.gauge-item {
    background: linear-gradient(145deg, rgba(18,24,35,.88), rgba(11,15,22,.76)) !important;
    border-color: rgba(148,163,184,.085) !important;
    border-radius: 16px !important;
    padding: 18px 10px 15px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.028), 0 12px 32px rgba(0,0,0,.16) !important;
    transition: transform .18s ease, border-color .18s ease !important;
}
.gauge-item:hover { transform: translateY(-3px) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 16px 38px rgba(0,0,0,.20) !important; }
.gauge-label { color: #dce3ed !important; }
.gauge-sub { color: #697587 !important; }
.live-dot { background: rgba(34,197,94,.055) !important; border-color: rgba(34,197,94,.13) !important; }

/* Modal */
.modal-overlay { background: rgba(2,4,8,.72) !important; backdrop-filter: blur(8px) saturate(120%) !important; }
.modal-box {
    background: linear-gradient(145deg,#121923,#0c1119) !important;
    border-color: rgba(148,163,184,.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 35px 100px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.03) !important;
}

/* Pagination */
.pager button {
    background: rgba(255,255,255,.025) !important;
    border-color: rgba(148,163,184,.10) !important;
    border-radius: 9px !important;
    color: #bac4d3 !important;
}
.pager button:hover:not(:disabled) { background: rgba(91,140,255,.08) !important; border-color: rgba(91,140,255,.18) !important; }

/* Mobile shell */
#mobile-drawer .drawer-panel {
    background: #0b1018 !important;
    border-left-color: rgba(148,163,184,.10) !important;
    box-shadow: -25px 0 70px rgba(0,0,0,.35);
}
#mobile-drawer a, #mobile-drawer button {
    background: rgba(255,255,255,.025) !important;
    border-color: rgba(148,163,184,.09) !important;
    border-radius: 10px !important;
}
#mobile-drawer a.active { background: rgba(91,140,255,.09) !important; border-color: rgba(91,140,255,.18) !important; }

/* Keep transitions and animations compositor-friendly. */
.animate-in { animation: premiumEnter .34s cubic-bezier(.2,.75,.25,1) both !important; }
.animate-in.d1 { animation-delay: .035s !important; }
.animate-in.d2 { animation-delay: .07s !important; }
.animate-in.d3 { animation-delay: .105s !important; }
@keyframes premiumEnter { from { opacity: 0; transform: translate3d(0,7px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
body.leaving main, body.leaving .center-screen > * { transition: opacity .13s ease, transform .13s ease !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 720px) {
    .topbar { padding: 11px 15px !important; min-height: 62px; }
    main { padding: 20px 14px 34px !important; }
    .card { border-radius: 15px !important; padding: 20px 17px !important; }
    .stat { min-height: 82px; }
}


/* ================================================================
   NEON SIGNATURE PASS — visual only
   No layout logic, state handling, requests or application behavior.
   ================================================================ */
:root {
    --neon-blue: #6ea8ff;
    --neon-cyan: #48e7ff;
    --neon-violet: #9b7bff;
    --neon-pink: #ff66c4;
    --panel-bg: #080c13;
}

body {
    background:
        radial-gradient(900px 500px at 12% -8%, rgba(72,231,255,.075), transparent 60%),
        radial-gradient(850px 500px at 95% 105%, rgba(155,123,255,.075), transparent 62%),
        #070a10 !important;
}
body::before {
    background:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
        radial-gradient(circle at 50% 0%, rgba(110,168,255,.07), transparent 38%) !important;
    background-size: 42px 42px, 42px 42px, auto !important;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 78%);
}

/* Small, elegant loader: simple geometry, no expensive glow animation. */
#page-loader {
    background: #070a10 !important;
    gap: 11px !important;
}
.loader-ring {
    width: 30px !important;
    height: 30px !important;
    border-width: 2px !important;
    border-color: rgba(110,168,255,.16) !important;
    border-top-color: var(--neon-cyan) !important;
    box-shadow: 0 0 18px rgba(72,231,255,.14);
    animation: spin .72s linear infinite !important;
}
.loader-brand {
    font-size: 11px !important;
    color: #8e9bb0 !important;
    letter-spacing: .9px !important;
    font-weight: 600 !important;
}

/* Premium topbar and brand */
.topbar {
    background: rgba(7,10,16,.78) !important;
    border-bottom-color: rgba(110,168,255,.09) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.018), 0 12px 36px rgba(0,0,0,.12);
}
.topbar::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(72,231,255,.35), rgba(155,123,255,.3), transparent);
    opacity: .55;
    pointer-events: none;
}
.topbar .brand-inline {
    color: #dce7f7 !important;
    text-shadow: 0 0 22px rgba(72,231,255,.18);
}

/* Cards: subtle neon edge, with transforms reserved for interaction. */
.card, .stat, .resource-card, .gauge-item, .toolbar, .modal-box {
    border-color: rgba(130,153,190,.105) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.028), 0 18px 50px rgba(0,0,0,.17) !important;
}
.card::before, .stat::before, .resource-card::after {
    content: '';
    position: absolute;
    pointer-events: none;
}
.card {
    position: relative;
    overflow: hidden;
}
.card::before {
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(72,231,255,.13), transparent 28%, transparent 72%, rgba(155,123,255,.11));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: .7;
}

/* Inputs */
input, textarea {
    background: rgba(8,13,21,.72) !important;
    border-color: rgba(130,153,190,.12) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.018) !important;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease !important;
}
input:hover, textarea:hover {
    border-color: rgba(110,168,255,.18) !important;
}
input:focus, textarea:focus {
    border-color: rgba(72,231,255,.5) !important;
    background: rgba(10,17,28,.9) !important;
    box-shadow: 0 0 0 3px rgba(72,231,255,.07), 0 0 24px rgba(72,231,255,.07) !important;
}

/* Buttons: animated light sweep uses only transform/opacity. */
.btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #4f8cff 0%, #756cff 52%, #a35dff 100%) !important;
    border: 1px solid rgba(154,190,255,.22) !important;
    box-shadow: 0 8px 26px rgba(79,140,255,.18), inset 0 1px 0 rgba(255,255,255,.18) !important;
    animation: none !important;
    transition: transform .18s cubic-bezier(.2,.8,.2,1), filter .18s ease, box-shadow .18s ease !important;
}
.btn::after {
    content: '';
    position: absolute;
    top: -60%; bottom: -60%; left: -35%; width: 24%;
    transform: skewX(-18deg) translateX(-180%);
    background: rgba(255,255,255,.28);
    opacity: 0;
    transition: transform .48s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
    pointer-events: none;
    z-index: -1;
}
.btn:hover {
    filter: brightness(1.08) !important;
    box-shadow: 0 12px 32px rgba(79,140,255,.24), 0 0 24px rgba(72,231,255,.08), inset 0 1px 0 rgba(255,255,255,.2) !important;
}
.btn:hover::after { transform: skewX(-18deg) translateX(650%); opacity: 1; }
.btn.ghost {
    background: rgba(255,255,255,.028) !important;
    border-color: rgba(130,153,190,.13) !important;
}
.btn.ghost:hover { background: rgba(72,231,255,.045) !important; border-color: rgba(72,231,255,.2) !important; }
.btn.success { background: linear-gradient(135deg,#2ebf83,#228d69) !important; }
.btn.danger { background: linear-gradient(135deg,#e25769,#ad3d51) !important; }

/* Icon buttons */
.icon-btn {
    background: rgba(255,255,255,.026) !important;
    border-color: rgba(130,153,190,.12) !important;
    transition: transform .18s cubic-bezier(.2,.8,.2,1), background .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}
.icon-btn:hover {
    background: rgba(72,231,255,.055) !important;
    border-color: rgba(72,231,255,.22) !important;
    box-shadow: 0 0 20px rgba(72,231,255,.08) !important;
}

/* Navigation */
.nav-links a {
    position: relative;
    transition: color .18s ease, background .18s ease, transform .18s ease !important;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 18%; right: 18%; bottom: 2px; height: 1px;
    transform: scaleX(0); transform-origin: center;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    transition: transform .2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active {
    background: rgba(72,231,255,.055) !important;
    color: #eef7ff !important;
    animation: none !important;
    box-shadow: inset 0 0 0 1px rgba(72,231,255,.08), 0 6px 22px rgba(72,231,255,.045) !important;
}

/* Inbound tabs / selectable items */
.inbound-tab.active, .inbound-tab.state-on.active, .inbound-tab.state-off.active {
    background: linear-gradient(135deg, rgba(72,231,255,.09), rgba(155,123,255,.08)) !important;
    border-color: rgba(72,231,255,.23) !important;
    box-shadow: inset 0 0 0 1px rgba(72,231,255,.035), 0 8px 26px rgba(72,231,255,.07) !important;
    animation: none !important;
}
.inbound-check:hover {
    transform: translate3d(0,-2px,0) !important;
    border-color: rgba(72,231,255,.18) !important;
    box-shadow: 0 10px 26px rgba(0,0,0,.16) !important;
}
.inbound-check.selected {
    background: rgba(72,231,255,.045) !important;
    border-color: rgba(72,231,255,.18) !important;
}
.inbound-check input:checked ~ .check-visual {
    background: linear-gradient(145deg,#58e5ff,#687cff) !important;
    box-shadow: 0 0 0 3px rgba(72,231,255,.07), 0 6px 18px rgba(72,231,255,.16) !important;
}

/* Resource gauges */
.gauge-item {
    position: relative;
    overflow: hidden;
}
.gauge-item::after {
    content: '';
    position: absolute;
    inset: auto 12% 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(72,231,255,.32), transparent);
    opacity: .6;
}
.gauge-item:hover { transform: translate3d(0,-3px,0) !important; border-color: rgba(72,231,255,.18) !important; }
.live-dot { box-shadow: 0 0 14px rgba(34,197,94,.08); }

/* Drawer: polished glass sheet + staggered opening feel through CSS only. */
#mobile-drawer .drawer-backdrop {
    background: rgba(1,4,9,.7) !important;
    backdrop-filter: blur(4px);
}
#mobile-drawer .drawer-panel {
    width: min(86%, 340px) !important;
    background:
        radial-gradient(420px 220px at 20% 0%, rgba(72,231,255,.075), transparent 65%),
        linear-gradient(160deg, #0c121c, #070b12 72%) !important;
    border-left-color: rgba(72,231,255,.12) !important;
    box-shadow: -35px 0 90px rgba(0,0,0,.42), inset 1px 0 0 rgba(255,255,255,.025) !important;
    padding: 18px !important;
}
#mobile-drawer .drawer-panel > div:first-child {
    border-bottom: 1px solid rgba(130,153,190,.08);
    padding-bottom: 16px !important;
}
#mobile-drawer a, #mobile-drawer button {
    position: relative;
    background: rgba(255,255,255,.022) !important;
    border-color: rgba(130,153,190,.09) !important;
    transition: transform .18s cubic-bezier(.2,.8,.2,1), background .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}
#mobile-drawer a:hover, #mobile-drawer button:hover {
    transform: translate3d(-3px,0,0);
    background: rgba(72,231,255,.045) !important;
    border-color: rgba(72,231,255,.18) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
}
#mobile-drawer a.active {
    background: linear-gradient(90deg, rgba(72,231,255,.075), rgba(155,123,255,.045)) !important;
    border-color: rgba(72,231,255,.2) !important;
    box-shadow: inset 2px 0 0 rgba(72,231,255,.65), 0 8px 24px rgba(72,231,255,.045) !important;
}

/* Info accordion inside hamburger menu */
.drawer-info {
    margin-top: 2px;
    border: 1px solid rgba(130,153,190,.09);
    border-radius: 12px;
    background: rgba(255,255,255,.018);
    overflow: hidden;
}
.drawer-info summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    color: #d9e5f4;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}
.drawer-info summary::-webkit-details-marker { display: none; }
.drawer-info-icon {
    width: 25px; height: 25px;
    display: grid; place-items: center;
    border-radius: 8px;
    color: var(--neon-cyan);
    background: rgba(72,231,255,.07);
    border: 1px solid rgba(72,231,255,.13);
}
.drawer-chevron {
    margin-inline-start: auto;
    color: #728097;
    transition: transform .2s ease;
}
.drawer-info[open] .drawer-chevron { transform: rotate(180deg); }
.drawer-info-panel {
    margin: 0 10px 10px;
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(72,231,255,.035), rgba(155,123,255,.035));
    border: 1px solid rgba(130,153,190,.07);
    animation: infoReveal .2s ease both;
}
@keyframes infoReveal {
    from { opacity: 0; transform: translate3d(0,-5px,0); }
    to { opacity: 1; transform: translate3d(0,0,0); }
}
.drawer-info-kicker {
    color: var(--neon-cyan);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.drawer-info-title {
    color: #f0f5fc;
    font-size: 14px;
    font-weight: 800;
    margin-top: 4px;
}
.drawer-info-panel p {
    margin: 8px 0 13px;
    color: #78869a;
    font-size: 11.5px;
    line-height: 1.8;
}
.drawer-info-author {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 0;
    border-top: 1px solid rgba(130,153,190,.07);
    border-bottom: 1px solid rgba(130,153,190,.07);
}
.drawer-info-author span { color: #657286; font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.drawer-info-author strong { color: #e7eef8; font-size: 12px; }
.drawer-info-links { display: grid; gap: 7px; margin-top: 10px; }
.drawer-info-links a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 9px 10px !important;
    font-size: 11px !important;
    background: rgba(255,255,255,.018) !important;
}
.drawer-info-links a:hover { transform: none !important; }
.drawer-info-links span { color: #6e7b8f; }
.drawer-info-links b { color: #b7d9ff; font-weight: 700; direction: ltr; }

/* Subtle page motion. Transform/opacity stay compositor friendly. */
.animate-in { animation: premiumEnter .32s cubic-bezier(.2,.75,.25,1) both !important; }
@keyframes premiumEnter {
    from { opacity: 0; transform: translate3d(0,6px,0); }
    to { opacity: 1; transform: translate3d(0,0,0); }
}

@media (max-width: 720px) {
    .drawer-info-panel { padding: 14px; }
    .btn:hover, .icon-btn:hover { transform: none !important; }
}

.reseller-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px;background:linear-gradient(135deg,rgba(99,102,241,.14),rgba(236,72,153,.08));}
.eyebrow{font-size:11px;color:#a5b4fc;font-weight:800;letter-spacing:.08em}.reseller-status{padding:9px 14px;border-radius:999px;font-weight:800;font-size:12px;white-space:nowrap}.reseller-status.good{background:rgba(34,197,94,.13);color:#4ade80}.reseller-status.bad{background:rgba(239,68,68,.13);color:#f87171}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.section-head h2{font-size:15px;margin:0 0 4px}.section-head strong{font-size:18px}.progress{height:10px;border-radius:999px;background:rgba(255,255,255,.07);overflow:hidden}.progress span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#6366f1,#ec4899);box-shadow:0 0 18px rgba(168,85,247,.35)}.meter-row{display:flex;justify-content:space-between;gap:12px;color:var(--text-dim);font-size:12px;margin-top:10px}.meter-row b{color:var(--text)}.limits-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.limits-grid>div{padding:13px;border:1px solid var(--border);border-radius:13px;background:rgba(255,255,255,.025)}.limits-grid span{display:block;color:var(--text-dim);font-size:11px;margin-bottom:6px}.limits-grid b{font-size:13px}.inbound-summary{display:flex;justify-content:space-between;margin-top:12px;padding:13px;border-radius:13px;background:rgba(99,102,241,.07);font-size:12px}.notice-list{display:grid;gap:9px}.notice{display:flex;gap:11px;padding:12px;border-radius:13px;background:rgba(255,255,255,.025);border:1px solid var(--border)}.notice-dot{width:8px;height:8px;border-radius:50%;background:#ec4899;margin-top:6px;flex:none;box-shadow:0 0 12px rgba(236,72,153,.6)}.notice strong{font-size:13px}.notice p{margin:4px 0;color:var(--text-dim);font-size:12px;line-height:1.8}.notice small{color:var(--text-dim);font-size:10px}
@media(max-width:720px){.reseller-hero{align-items:flex-start;flex-direction:column}.grid-2{grid-template-columns:1fr}.limits-grid{grid-template-columns:1fr 1fr}.section-head{align-items:flex-start}.section-head .btn{padding:9px 11px}}
@media(max-width:420px){.limits-grid{grid-template-columns:1fr}.meter-row{flex-direction:column;gap:4px}}
