:root,
[data-theme="light"] {
    --brand-blue: #5676ee;
    --brand-indigo: #6366f1;
    --brand-violet: #9b7ce6;
    --brand-gradient: linear-gradient(135deg, #5676ee 0%, #6f68eb 52%, #9b7ce6 100%);
    --brand-soft: rgba(86, 118, 238, 0.1);
    --brand-soft-border: rgba(86, 118, 238, 0.24);

    --bg-canvas: #f3f5fb;
    --bg-surface: #ffffff;
    --bg-subtle: #f7f9fe;
    --bg-hover: #eef2ff;
    --bg-active: linear-gradient(90deg, rgba(86, 118, 238, 0.12) 0%, rgba(155, 124, 230, 0.08) 100%);
    --border-color: #e4e9f5;
    --border-light: #eef2fa;
    --text-primary: #1e293b;
    --text-secondary: #5a677d;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-xs: 0 2px 6px rgba(86, 118, 238, 0.04);
    --shadow-sm: 0 6px 18px rgba(86, 118, 238, 0.06);
    --shadow-md: 0 14px 32px rgba(86, 118, 238, 0.14);
    --sidebar-width: 64px;
    --sidebar-expanded: 236px;
    --header-height: 56px;
}

[data-theme="dark"] {
    --brand-blue: #6b88ff;
    --brand-indigo: #7c83ff;
    --brand-violet: #a88bfa;
    --brand-gradient: linear-gradient(135deg, #4b68dc 0%, #5e54d6 52%, #8665d8 100%);
    --brand-soft: rgba(107, 136, 255, 0.15);
    --brand-soft-border: rgba(107, 136, 255, 0.3);

    --bg-canvas: #0b0f1d;
    --bg-surface: #12182b;
    --bg-subtle: #182038;
    --bg-hover: #1e2845;
    --bg-active: linear-gradient(90deg, rgba(107, 136, 255, 0.2) 0%, rgba(168, 139, 250, 0.12) 100%);
    --border-color: #202a44;
    --border-light: #192238;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #f87171;
    --shadow-xs: 0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
    min-height: 100vh;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.num-tabular {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}

/* ================= SINGLE EXACT-CENTER RADIAL LOADER ================= */
.nxv-radial-spin {
    display: inline-block;
    flex-shrink: 0;
    color: var(--brand-blue);
}

.nxv-radial-spin.is-white {
    color: #ffffff;
}

.nxv-radial-spin rect {
    fill: currentColor;
    animation: spokeFade 0.65s linear infinite;
}

.nxv-radial-spin rect:nth-child(1)  { animation-delay: -0.60s; }
.nxv-radial-spin rect:nth-child(2)  { animation-delay: -0.55s; }
.nxv-radial-spin rect:nth-child(3)  { animation-delay: -0.50s; }
.nxv-radial-spin rect:nth-child(4)  { animation-delay: -0.45s; }
.nxv-radial-spin rect:nth-child(5)  { animation-delay: -0.40s; }
.nxv-radial-spin rect:nth-child(6)  { animation-delay: -0.35s; }
.nxv-radial-spin rect:nth-child(7)  { animation-delay: -0.30s; }
.nxv-radial-spin rect:nth-child(8)  { animation-delay: -0.25s; }
.nxv-radial-spin rect:nth-child(9)  { animation-delay: -0.20s; }
.nxv-radial-spin rect:nth-child(10) { animation-delay: -0.15s; }
.nxv-radial-spin rect:nth-child(11) { animation-delay: -0.10s; }
.nxv-radial-spin rect:nth-child(12) { animation-delay: -0.05s; }

@keyframes spokeFade {
    0%   { opacity: 1; }
    100% { opacity: 0.14; }
}

.nxv-center-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.nxv-center-loader.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.nxv-center-pill {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--brand-soft-border);
    box-shadow: 0 10px 28px rgba(86, 118, 238, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================= LOGIN & CLOUDFLARE VERIFICATION ================= */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #5676ee 0%, #6f8af2 42%, #aa93dc 78%, #cca5cf 100%);
    padding: 20px;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 374px;
    border-radius: 24px;
    padding: 36px 28px 32px;
    box-shadow: 0 16px 40px rgba(32, 45, 110, 0.16);
    text-align: center;
    color: #1e293b;
}

.brand-header { margin-bottom: 24px; }
.brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    min-height: 42px;
}
.brand-logo { max-height: 42px; max-width: 185px; object-fit: contain; }
.brand-title { font-size: 14.5px; font-weight: 600; color: #556274; }

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #dbe2ea;
    border-radius: 11px;
    margin-bottom: 14px;
    background: #ffffff;
    height: 46px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group:focus-within {
    border-color: #5676ee;
    box-shadow: 0 0 0 3px rgba(86, 118, 238, 0.14);
}

.input-icon {
    width: 46px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border-right: 1px solid #edf2f7;
    flex-shrink: 0;
}

.input-field {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 14px;
    font-size: 14px;
    color: #1e293b;
    background: transparent;
}

.toggle-pass-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
}

.toggle-pass-btn:hover { color: #5676ee; }

.cf-verify-slot {
    margin-bottom: 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-shield-widget {
    width: 100%;
    height: 60px;
    background: #22252e;
    border: 1px solid #353a47;
    border-radius: 10px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #f3f4f6;
    user-select: none;
}

.cf-shield-left {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 13px;
    font-weight: 500;
}

.cf-status-pill {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(86, 118, 238, 0.22);
    color: #8ba3ff;
}

.cf-status-pill.verified {
    background: #10b981;
    color: #ffffff;
}

.cf-shield-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.cf-brand-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.cf-links-row { font-size: 9px; color: #9ca3af; }

.submit-btn {
    width: 100%;
    height: 46px;
    background: var(--brand-gradient);
    color: #ffffff;
    border: none;
    border-radius: 11px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(86, 118, 238, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.submit-btn:hover:not(:disabled) {
    box-shadow: 0 8px 22px rgba(86, 118, 238, 0.45);
    transform: translateY(-1px);
}

.submit-btn:disabled { opacity: 0.72; cursor: not-allowed; }

.alert-msg {
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: left;
    line-height: 1.4;
}
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* 2FA Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 16px;
}
.modal-box {
    background: #ffffff;
    color: #1e293b;
    border-radius: 20px;
    max-width: 360px;
    width: 100%;
    padding: 26px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}
.modal-qr img { width: 150px; height: 150px; margin: 14px 0; border-radius: 10px; border: 1px solid #e2e8f0; padding: 4px; }
.secret-key-box {
    background: #f8fafc;
    padding: 8px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}
.btn-bind { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35); }
.modal-cancel-link { margin-top: 12px; font-size: 12.5px; color: #64748b; background: none; border: none; cursor: pointer; text-decoration: underline; }

/* ================= UNIFIED BRAND APP SHELL ================= */
.nxv-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--bg-canvas);
}

/* Desktop Sidebar = Slim Icon Rail (64px) */
.nxv-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nxv-rail-favicon {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    text-decoration: none;
}

.nxv-rail-favicon img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
}

.nxv-nav-list {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nxv-nav-group {
    display: flex;
    flex-direction: column;
}

.nxv-nav-item {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 12px;
    border-radius: 11px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.nxv-nav-item:hover {
    background: var(--bg-hover);
    color: var(--brand-blue);
}

.nxv-nav-item.active {
    background: var(--bg-active);
    color: var(--brand-blue);
    font-weight: 600;
}

.nxv-nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3.5px;
    border-radius: 0 4px 4px 0;
    background: var(--brand-gradient);
}

.nxv-nav-icon {
    width: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.nxv-nav-label {
    opacity: 0;
    pointer-events: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nxv-nav-arrow {
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}

.nxv-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 3px 0 4px 32px;
}

/* Desktop Floating Submenu Popover (Clean option names only, no title) */
.nxv-rail-popover {
    position: fixed;
    left: 70px;
    top: 64px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 11px;
    box-shadow: var(--shadow-md);
    min-width: 165px;
    padding: 6px;
    z-index: 1150;
    display: none;
}

.nxv-rail-popover.open {
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: popSlide 0.13s ease-out;
}

@keyframes popSlide {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.nxv-popover-link {
    display: block;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.14s ease, color 0.14s ease;
}

.nxv-popover-link:hover {
    background: var(--bg-hover);
    color: var(--brand-blue);
}

.nxv-popover-link.active {
    background: var(--brand-soft);
    color: var(--brand-blue);
    font-weight: 600;
}

/* Workspace */
.nxv-workspace {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
}

/* Top Header Bar */
.nxv-topbar {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
    gap: 10px;
}

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

.nxv-icon-btn {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
}

.nxv-icon-btn:hover {
    background: var(--bg-hover);
    color: var(--brand-blue);
    border-color: var(--brand-blue);
    transform: translateY(-1px);
}

/* Strictly hidden on Desktop (>768px) — overrides .nxv-icon-btn */
.nxv-mobile-hamburger {
    display: none !important;
}

.nxv-topbar-right {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
}

.nxv-lang-switch, .nxv-profile-wrap { position: relative; }

.nxv-lang-trigger {
    height: 35px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
}

.nxv-lang-trigger:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.nxv-docs-pill {
    height: 35px;
    padding: 0 13px;
    border-radius: 10px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-soft-border);
    color: var(--brand-blue);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
}

.nxv-docs-pill:hover {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-1px);
}

.nxv-profile-btn {
    height: 35px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 170px;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
}

.nxv-profile-btn:hover {
    border-color: var(--brand-blue);
}

.nxv-avatar-dot {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--brand-gradient);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nxv-profile-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nxv-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 7px);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-width: 190px;
    padding: 6px;
    z-index: 1100;
    display: none;
}

.nxv-dropdown-menu.open {
    display: block;
    animation: dropFade 0.14s ease-out;
}

@keyframes dropFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.nxv-dropdown-item {
    width: 100%;
    padding: 9px 11px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    text-align: left;
    transition: background 0.14s ease;
}

.nxv-dropdown-item:hover { background: var(--bg-hover); }
.nxv-dropdown-item.active { color: var(--brand-blue); background: var(--brand-soft); font-weight: 600; }
.nxv-dropdown-item.danger { color: var(--danger); }
.nxv-dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.08); }

/* ================= OVERVIEW DASHBOARD ================= */
.nxv-content {
    padding: 20px 24px 40px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

.ov-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ov-page-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 19px;
    font-weight: 800;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.ov-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ov-refresh-btn {
    height: 33px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--brand-soft-border);
    background: var(--bg-surface);
    color: var(--brand-blue);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: var(--shadow-xs);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.ov-refresh-btn:hover {
    background: var(--brand-blue);
    color: #ffffff;
}

.ov-date-input {
    height: 33px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    outline: none;
    box-shadow: var(--shadow-xs);
}

.ov-balance-hero {
    background: var(--brand-gradient);
    border-radius: 18px;
    padding: 22px 26px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    box-shadow: 0 12px 28px rgba(86, 118, 238, 0.24);
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.ov-balance-hero::before {
    content: "";
    position: absolute;
    right: -30px;
    top: -50px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.ov-bal-col {
    display: flex;
    flex-direction: column;
    gap: 7px;
    position: relative;
    z-index: 1;
}

.ov-bal-col:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.ov-bal-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
}

.ov-bal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.ov-bal-value {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.ov-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.ov-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ov-kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-md);
}

.ov-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ov-kpi-title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.ov-kpi-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-blue);
}

.ov-kpi-badge.violet {
    background: rgba(155, 124, 230, 0.14);
    color: #8b5cf6;
}

.ov-kpi-main {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.ov-kpi-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-secondary);
}

.ov-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ov-meta-row strong {
    color: var(--text-primary);
    font-weight: 700;
}

.ov-progress-track {
    width: 100%;
    height: 10px;
    background: var(--brand-soft);
    border-radius: 999px;
    overflow: hidden;
    margin: 2px 0 14px;
    position: relative;
}

.ov-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-gradient);
    border-radius: 999px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.ov-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.ov-chart-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px 20px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.ov-chart-card.is-full {
    grid-column: 1 / -1;
}

.ov-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    margin-bottom: 16px;
    gap: 8px;
    flex-wrap: wrap;
}

.ov-flow-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ov-flow-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ov-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ov-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ov-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-subtle);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    max-width: 100%;
}

.ov-tab-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.ov-tab-btn.active {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(86, 118, 238, 0.25);
}

.ov-canvas-wrap {
    position: relative;
    width: 100%;
    height: 245px;
}

.ov-canvas-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.ov-chart-tooltip {
    position: absolute;
    display: none;
    background: #1e253d;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(86, 118, 238, 0.28);
    border: 1px solid rgba(155, 124, 230, 0.35);
    z-index: 20;
    white-space: nowrap;
}

.nxv-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 990;
    display: none;
}

.nxv-backdrop.open { display: block; }

/* ================= RESPONSIVE BREAKPOINTS ================= */
@media (max-width: 1060px) {
    .ov-charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .ov-kpi-grid { grid-template-columns: 1fr; }
}

/* Mobile Phone Mode (<= 768px): Show 3-bar hamburger & full slide-over accordion drawer */
@media (max-width: 768px) {
    .nxv-mobile-hamburger {
        display: inline-flex !important;
    }

    .nxv-rail-popover {
        display: none !important;
    }

    .nxv-sidebar {
        width: var(--sidebar-expanded);
        transform: translateX(-105%);
    }

    .nxv-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: var(--shadow-md);
    }

    .nxv-sidebar.mobile-open .nxv-rail-favicon {
        display: none;
    }

    .nxv-sidebar.mobile-open .nxv-nav-label,
    .nxv-sidebar.mobile-open .nxv-nav-arrow {
        opacity: 1;
        pointer-events: auto;
    }

    .nxv-sidebar.mobile-open .nxv-nav-group.open .nxv-submenu {
        display: flex;
    }

    .nxv-sub-item {
        height: 36px;
        padding: 0 12px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        font-size: 13px;
        font-weight: 500;
        color: var(--text-secondary);
        text-decoration: none;
    }

    .nxv-sub-item:hover,
    .nxv-sub-item.active {
        color: var(--brand-blue);
        background: var(--bg-active);
        font-weight: 600;
    }

    .nxv-workspace {
        margin-left: 0;
        width: 100%;
    }

    .nxv-desktop-only { display: none !important; }
    .nxv-topbar { padding: 0 12px; gap: 6px; }
    .nxv-topbar-right { gap: 6px; }
    .nxv-docs-pill { padding: 0 10px; }
    .nxv-docs-pill span { display: none; }
    .nxv-profile-btn { max-width: 118px; padding: 0 8px; }

    .nxv-content { padding: 14px 12px 32px; }
    .ov-balance-hero {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 14px;
    }
    .ov-bal-col:not(:last-child)::after {
        right: 0;
        left: 0;
        top: auto;
        bottom: -7px;
        width: auto;
        height: 1px;
    }
    .ov-bal-value { font-size: 20px; }
    .ov-chart-card { padding: 14px 14px 16px; }
    .ov-tab-btn { padding: 5px 8px; font-size: 11px; }
    .ov-chart-head .ov-refresh-btn { padding: 0 9px; font-size: 11px; height: 30px; }
}