:root {
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-glow: rgba(37,99,235,.12);
    --accent-surface: #eff6ff;
    --accent-border: #dbeafe;
    --green: #10b981;
    --green-bg: rgba(16,185,129,.06);
    --red: #ef4444;
    --red-bg: rgba(239,68,68,.06);
    --sidebar-bg: #fff;
    --sidebar-border: #e2e8f0;
    --body-bg: #f8fafc;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --card-shadow: 0 4px 20px -2px rgba(0,0,0,.04), 0 0 3px rgba(0,0,0,.02);
    --card-shadow-hover: 0 12px 30px -5px rgba(0,0,0,.08), 0 0 5px rgba(0,0,0,.03);
    --card-radius: 16px;
    --card-border: 1px solid rgba(226,232,240,.8);
    --shadow-primary: 0 4px 14px 0 rgba(37,99,235,.3);
    --transition: all .3s cubic-bezier(.4,0,.2,1);
    --radius-sm: 10px;
    --radius-icon: 14px;
}
body { background: var(--body-bg); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Login ── */
.login-wrapper {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f0f4f8 100%);
    position: relative; overflow: hidden;
}
.login-wrapper::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(37,99,235,.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(16,185,129,.05) 0%, transparent 50%);
}
.login-card {
    width: 420px; background: #fff; border-radius: 20px;
    border: var(--card-border); padding: 44px 36px; position: relative; z-index: 1;
    box-shadow: var(--card-shadow);
}
.login-logo { font-size: 28px; font-weight: 800; color: var(--gray-900); letter-spacing: -1px; margin-bottom: 4px; }
.login-logo i { color: var(--green); margin-right: 6px; }
.login-sub { color: var(--gray-500); font-size: 13px; margin-bottom: 28px; }
.login-label { color: var(--gray-600); font-size: 12px; font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; text-align: left; }
.login-card .form-control {
    background: var(--gray-50); border: 1px solid var(--gray-200); color: var(--gray-700);
    border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; transition: var(--transition);
}
.login-card .form-control:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); background: #fff;
}
.login-card .form-control::placeholder { color: var(--gray-500); }
.login-btn {
    width: 100%; padding: 13px; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, var(--accent)); color: #fff;
    cursor: pointer; transition: var(--transition); box-shadow: 0 4px 12px rgba(37,99,235,.25);
}
.login-btn:hover { box-shadow: 0 6px 16px rgba(37,99,235,.35); transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(37,99,235,.2); }
cap-widget {
    --cap-widget-max-width: 100% !important;
    --cap-widget-width: 100% !important;
    width: 100% !important; display: block !important;
    max-width: 100% !important;
}
cap-widget::part(widget), cap-widget::part(container) {
    width: 100% !important; max-width: 100% !important;
}

/* ── Sidebar ── */
.navbar.navbar-vertical {
    background: var(--sidebar-bg) !important; border-right: 1px solid var(--sidebar-border) !important;
    width: 260px !important; box-shadow: none !important;
    overflow: hidden !important;
}
.navbar.navbar-vertical .container-fluid {
    display: flex !important; flex-direction: column !important; height: 100vh !important;
    overflow: hidden !important; padding: 0 !important;
}
.navbar.navbar-vertical .navbar-brand {
    padding: 22px 24px 14px !important; margin: 0 !important; flex-shrink: 0 !important;
}
.sidebar-logo { font-size: 20px; font-weight: 800; color: #0f172a; letter-spacing: -0.5px; }
.sidebar-logo i { color: var(--green); font-size: 22px; vertical-align: -2px; }
.navbar.navbar-vertical .navbar-collapse {
    flex: 1 !important; display: flex !important; flex-direction: column !important;
    overflow: hidden !important;
}
.navbar.navbar-vertical .navbar-nav {
    flex: 1 !important; overflow-y: auto !important; padding: 0 8px !important;
}
.navbar.navbar-vertical .navbar-nav::-webkit-scrollbar { display: none; }
.navbar.navbar-vertical .nav-link {
    padding: 11px 16px !important; margin: 2px 4px !important; border-radius: 12px !important;
    font-size: 14px !important; font-weight: 500 !important; color: var(--gray-500) !important;
    transition: var(--transition) !important;
}
.navbar.navbar-vertical .nav-link:hover {
    background: var(--accent-surface) !important; color: var(--accent) !important;
}
.navbar.navbar-vertical .nav-link.active {
    background: var(--accent-glow) !important; color: var(--accent) !important; font-weight: 600 !important;
}
.navbar.navbar-vertical .nav-link.active .nav-link-icon { color: var(--accent) !important; }
.navbar.navbar-vertical .nav-link-icon {
    font-size: 18px !important; width: 24px !important; margin-right: 10px !important;
    color: #94a3b8 !important; transition: var(--transition) !important;
}
.sidebar-footer {
    flex-shrink: 0 !important; padding: 16px; margin: 8px 12px 14px;
    border-radius: 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
}
.sidebar-footer .sync-label { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.sidebar-footer .sync-label i { font-size: 6px; vertical-align: 1px; margin-right: 4px; }
.sidebar-sync-btn {
    width: 100%; padding: 8px 12px; border: 1px solid var(--accent-border); border-radius: var(--card-radius);
    background: transparent; color: var(--accent); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: var(--transition); display: flex; align-items: center;
    justify-content: center; gap: 6px;
}
.sidebar-sync-btn:hover { background: var(--accent-surface); border-color: var(--accent); }
.sidebar-sync-btn.syncing .ti-refresh { animation: spin 1s linear infinite; }
.sidebar-sync-btn:disabled { opacity: .5; cursor: not-allowed; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ── Page Header ── */
.page-header-dark {
    background: linear-gradient(135deg, #1e40af 0%, var(--accent) 100%); padding: 28px 0 80px; position: relative;
}
.page-header-dark .pretitle {
    font-size: 11px; color: rgba(255,255,255,.6); text-transform: uppercase;
    letter-spacing: 1.5px; font-weight: 600; margin-bottom: 2px;
}
.page-header-dark .title { font-size: 20px; font-weight: 700; color: #fff; }
.page-body-overlap { margin-top: -55px; position: relative; z-index: 5; }

/* ── Hero Card ── */
.hero-card {
    background: #fff; border-radius: 20px; padding: 32px 0 32px 32px; color: var(--gray-900);
    border: var(--card-border); box-shadow: var(--card-shadow);
    transition: var(--transition); position: relative; overflow: hidden;
    display: flex; align-items: stretch; gap: 24px;
}
.hero-card::before {
    content: ''; position: absolute; top: -80px; right: -80px;
    width: 240px; height: 240px; border-radius: 50%;
    background: rgba(37,99,235,.06); filter: blur(50px); pointer-events: none; z-index: 0;
}
.hero-card::after {
    content: ''; position: absolute; bottom: -40px; left: -40px;
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(16,185,129,.04); filter: blur(30px); pointer-events: none; z-index: 0;
}
.hero-card:hover { box-shadow: var(--card-shadow-hover); }
.hero-left { flex: 1; min-width: 0; position: relative; z-index: 1; }
.hero-right {
    width: 340px; flex-shrink: 0; position: relative; z-index: 1;
    display: flex; flex-direction: column; justify-content: center;
    margin: -32px 0; padding: 24px 0;
    background: linear-gradient(135deg, rgba(248,250,252,.4) 0%, rgba(241,245,249,.6) 100%);
    border-left: 1px solid rgba(226,232,240,.4);
}
.hero-right-fade {
    position: absolute; top: 0; bottom: 0; left: -1px; width: 20px; z-index: 2;
    background: linear-gradient(to right, #fff 0%, transparent 100%); pointer-events: none;
}
.hero-right-label {
    text-align: right; margin-top: 8px; padding-right: 20px; font-size: 10px; color: var(--gray-400);
    font-weight: 500; font-family: 'JetBrains Mono', monospace;
}
.hero-top-row {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid rgba(226,232,240,.6);
}
.hero-pretitle {
    font-size: 13px; color: var(--gray-500); font-weight: 700;
    text-transform: uppercase; letter-spacing: .8px;
    display: flex; align-items: center; gap: 8px;
}
.hero-pretitle i { color: var(--accent); font-size: 18px; }
.hero-data-time { font-size: 11px; color: var(--gray-500); margin-top: 3px; font-family: 'JetBrains Mono', monospace; }
.hero-amount { font-size: 42px; font-weight: 900; letter-spacing: -2px; line-height: 1; color: var(--gray-900); }
.hero-currency-prefix { font-size: 26px; font-weight: 700; color: var(--gray-500); margin-right: 4px; }
.hero-unit {
    font-size: 15px; font-weight: 700; color: var(--gray-500); margin-left: 8px;
}
/* Bento-style wallet cards */
.hero-wallets-grid { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.wallet-bento {
    flex: 1; min-width: 200px; padding: 18px 20px; border-radius: 16px;
    background: var(--gray-50); border: 1px solid var(--gray-100);
    transition: var(--transition); cursor: pointer;
}
.wallet-bento:hover { background: #fff; border-color: var(--accent-border); box-shadow: 0 4px 16px rgba(37,99,235,.08); }
.wallet-bento-head {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.wallet-bento-alias {
    font-size: 11px; font-weight: 700; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 1px;
    display: flex; align-items: center; gap: 6px;
}
.wallet-bento-alias i { font-size: 14px; }
.wallet-bento-pct {
    font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px;
}
.wallet-bento-bal {
    font-size: 22px; font-weight: 900; color: var(--gray-800); letter-spacing: -0.5px; margin-bottom: 10px;
}
.wallet-bento-bal span { font-size: 12px; font-weight: 600; color: var(--gray-400); margin-left: 4px; }
.wallet-bento-bar {
    height: 5px; width: 100%; background: rgba(226,232,240,.6); border-radius: 5px; overflow: hidden;
}
.wallet-bento-bar-fill {
    height: 100%; border-radius: 5px; transition: width .8s ease;
}
.hero-change-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 14px; padding: 12px 16px; border-radius: 12px;
    background: rgba(248,250,252,.7); border: 1px solid rgba(226,232,240,.6);
    width: fit-content; max-width: 100%;
}
.hero-change-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.hero-change-badge.up { background: rgba(16,185,129,.08); color: var(--green); border: 1px solid rgba(16,185,129,.15); }
.hero-change-badge.down { background: rgba(239,68,68,.06); color: var(--red); border: 1px solid rgba(239,68,68,.12); }
.hero-change-badge.flat { background: var(--gray-100); color: var(--gray-500); border: 1px solid var(--gray-200); }

/* ── Stat Cards ── */
.stat-card {
    background: #fff; border-radius: var(--card-radius); padding: 22px; height: auto;
    box-shadow: var(--card-shadow); border: var(--card-border);
    transition: var(--transition); position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; cursor: pointer;
}
.stat-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.stat-card .wm-icon {
    position: absolute; right: -10px; bottom: -10px; font-size: 80px; line-height: 1;
    opacity: 0.04; transform: rotate(-12deg); pointer-events: none;
}
.stat-card.green .wm-icon { color: var(--green); }
.stat-card.red .wm-icon { color: var(--red); }
.stat-card.blue .wm-icon { color: var(--accent); }
.stat-card.neutral .wm-icon { color: var(--gray-500); }
.stat-icon {
    width: 46px; height: 46px; border-radius: var(--radius-icon); display: flex;
    align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
    transition: transform .2s ease;
}
.stat-card:hover .stat-icon { transform: scale(1.1); }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.red { background: var(--red-bg); color: var(--red); }
.stat-icon.blue { background: var(--accent-glow); color: var(--accent); }
.stat-icon.neutral { background: var(--gray-100); color: var(--gray-500); }
.stat-label { font-size: 11px; color: var(--gray-500); font-weight: 700; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--gray-900); letter-spacing: -0.5px; }
.stat-value.green { color: var(--green); }
.stat-value.red { color: var(--red); }
.stat-value.blue { color: var(--accent); }
.stat-unit { font-size: 12px; color: var(--gray-500); font-weight: 500; margin-left: 4px; }
.stat-range { font-size: 10px; color: var(--gray-500); font-weight: 400; margin-left: 2px; }
.data-range-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 20px; background: var(--accent-surface); border: 1px solid var(--accent-border);
    border-radius: 12px; font-size: 12px; color: var(--gray-600);
}
.data-range-bar i { color: var(--accent); font-size: 15px; }
.section-divider {
    font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase;
    letter-spacing: 1.5px; display: flex; align-items: center; gap: 6px; padding: 4px 4px 2px;
}
.section-divider i { font-size: 14px; color: var(--gray-300); }

/* ── Currency Dropdown ── */
.currency-select {
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
    color: #fff; font-size: 12px; font-weight: 600;
    padding: 5px 28px 5px 10px; border-radius: 4px; cursor: pointer;
    transition: var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,.7)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
}
.currency-select:hover { background-color: rgba(255,255,255,.25); }
.currency-select:focus { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.currency-select option { background: #1e293b; color: #e2e8f0; }

/* ── Wallet Switcher ── */
.wallet-switcher {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.wallet-sw-select {
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
    color: #fff; font-size: 13px; font-weight: 500;
    padding: 7px 32px 7px 12px; border-radius: 4px; cursor: pointer;
    transition: var(--transition); min-width: 160px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,.7)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.wallet-sw-select:hover { background-color: rgba(255,255,255,.25); }
.wallet-sw-select:focus { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.wallet-sw-select option { background: #1e293b; color: #e2e8f0; }
.wallet-sw-label { font-size: 12px; color: rgba(255,255,255,.7); font-weight: 500; }
.wallet-sw-indicator {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 12px; font-size: 12px; font-weight: 600;
    background: var(--gray-50); color: var(--gray-600);
    border: 1px solid var(--gray-200); cursor: pointer; transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.wallet-sw-indicator:hover { border-color: var(--accent-border); background: #fff; }
.wallet-sw-indicator.all { background: var(--accent-surface); color: var(--accent); border-color: var(--accent-border); }
.wallet-badge-addr {
    font-size: 11px; opacity: .6; margin-left: 4px; font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.wallet-badge-net {
    font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 4px;
    background: rgba(16,185,129,.08); color: var(--green); font-weight: 800;
    letter-spacing: .5px; border: 1px solid rgba(16,185,129,.15);
}

/* ── Premium Card ── */
.premium-card {
    background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow);
    border: var(--card-border); overflow: hidden; transition: var(--transition);
}
.premium-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-1px); }
.premium-card-header {
    padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
}
.premium-card-title {
    font-size: 15px; font-weight: 700; color: var(--gray-900);
    display: flex; align-items: center; gap: 10px;
}
.premium-card-title i { color: var(--accent); font-size: 20px; }
.premium-card-body { padding: 22px 24px; }
.premium-card-actions { display: flex; gap: 4px; }
.act-btn {
    padding: 6px 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
    background: transparent; color: var(--gray-500); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
}
.act-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-surface); }
.act-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-primary); }

/* ── Tables ── */
.premium-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.premium-table thead th {
    padding: 14px 24px; font-size: 11px; font-weight: 700; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--gray-100); background: var(--gray-50);
}
.premium-table tbody td {
    padding: 16px 24px; font-size: 14px; color: var(--gray-700); border-bottom: 1px solid var(--gray-50);
}
.premium-table tbody tr { transition: background .2s; }
.premium-table tbody tr:hover { background: var(--gray-50); }
.premium-table .text-end { text-align: right; }
.premium-table .text-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 12px; color: var(--gray-500); }
.premium-table .col-source { white-space: nowrap; min-width: 80px; }
.premium-table .col-actions { white-space: nowrap; min-width: 70px; }
.source-badge {
    display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px;
    border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.source-badge.config { background: var(--accent-surface); color: var(--accent); }
.source-badge.ui { background: var(--green-bg); color: var(--green); }
.action-btn {
    background: none; border: none; cursor: pointer; padding: 4px 6px;
    border-radius: 6px; font-size: 16px; transition: var(--transition); line-height: 1;
}
.action-btn:hover { background: #f1f5f9; }
.action-btn.edit { color: var(--accent); }
.action-btn.delete { color: var(--red); }

/* ── Badges ── */
.dir-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
    border-radius: 6px; font-size: 12px; font-weight: 600;
}
.dir-badge.in { background: var(--green-bg); color: var(--green); }
.dir-badge.out { background: var(--red-bg); color: var(--red); }

/* ── Filter Bar ── */
.filter-bar {
    background: #fff; border-radius: var(--card-radius); padding: 16px 22px;
    box-shadow: var(--card-shadow); border: var(--card-border);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.filter-bar select, .filter-bar input[type="date"] {
    border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 9px 14px;
    font-size: 13px; color: var(--gray-700); background: #fff; transition: var(--transition);
}
.filter-bar select:focus, .filter-bar input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); outline: none;
}
.filter-sep { color: var(--gray-300); font-size: 13px; }
.filter-btn {
    padding: 8px 20px; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 6px;
}
.filter-btn.primary { background: linear-gradient(135deg, #3b82f6, var(--accent)); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.2); }
.filter-btn.primary:hover { box-shadow: 0 6px 16px rgba(37,99,235,.35); transform: translateY(-1px); }
.filter-btn.secondary { background: #fff; color: var(--gray-600); border: 1px solid var(--gray-200); box-shadow: var(--card-shadow); }
.filter-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── Month Pills ── */
.month-pill {
    padding: 7px 18px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
    background: #fff; color: var(--gray-500); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.month-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-surface); }
.month-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-primary); }

/* ── Pagination ── */
.pg-btn {
    padding: 7px 16px; border: 1px solid var(--gray-200); background: #fff;
    color: var(--gray-600); font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition);
}
.pg-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.pg-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.pg-btn:only-child { border-radius: var(--radius-sm); }
.pg-btn:hover { background: var(--accent-surface); border-color: var(--accent); color: var(--accent); }
.tx-pager-bar {
    padding: 12px 22px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--gray-100); border-top: 1px solid var(--gray-100);
}
.tx-pager-bar:first-child { border-top: none; }
.tx-pager-bar:last-child { border-bottom: none; }

/* ── Terminal & Cron ── */
.sync-terminal {
    background: var(--gray-900); border-radius: 12px; padding: 20px; color: var(--gray-500);
    font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 12px;
    line-height: 1.7; max-height: 320px; overflow: auto; white-space: pre-wrap;
}
.sync-terminal::-webkit-scrollbar { width: 6px; }
.sync-terminal::-webkit-scrollbar-thumb { background: var(--gray-700); border-radius: 3px; }
.cron-block {
    background: var(--gray-50); border-radius: 12px; padding: 14px 18px;
    border: 1px solid var(--gray-100); font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px; color: var(--gray-600); user-select: all;
}

/* ── Config Info ── */
.config-tip {
    background: #fff; border: var(--card-border);
    border-radius: 14px; padding: 22px 26px; color: var(--gray-700); font-size: 14px; line-height: 1.8;
    box-shadow: var(--card-shadow); border-left: 3px solid var(--accent);
}
.config-tip code {
    background: var(--gray-100); padding: 2px 8px; border-radius: 3px;
    font-size: 13px; color: var(--red); font-family: 'JetBrains Mono', 'Fira Code', monospace;
    border: 1px solid var(--gray-200);
}
.config-tip .tip-title { font-weight: 700; color: var(--gray-900); margin-bottom: 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }

/* ── Form Controls (unified) ── */
.form-input {
    background: var(--gray-50); border: 1px solid var(--gray-200); color: var(--gray-700);
    border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px;
    transition: var(--transition); width: 100%; box-sizing: border-box;
    font-family: inherit;
}
.form-input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
    background: #fff; outline: none;
}
.form-input::placeholder { color: var(--gray-500); }
.form-input.mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.form-input.compact { padding: 6px 12px; font-size: 13px; }
.form-label {
    font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; display: block;
}
.form-label .hint { color: var(--gray-500); font-weight: 400; }

/* ── Dialog ── */
.dialog-close {
    background: none; border: none; cursor: pointer; color: var(--gray-500);
    font-size: 20px; padding: 4px; border-radius: 6px; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.dialog-close:hover { background: var(--gray-100); color: var(--gray-700); }

/* ── Header Dark Controls ── */
.hd-actions {
    background: rgba(255,255,255,.12); border-radius: 8px; padding: 2px;
    display: flex; gap: 0;
}
.hd-actions .act-btn {
    color: rgba(255,255,255,.7); border-color: transparent;
}
.hd-actions .act-btn:hover {
    color: #fff; background: rgba(255,255,255,.1); border-color: transparent;
}
.hd-actions .act-btn.active {
    color: #fff; background: var(--accent); border-color: var(--accent);
    box-shadow: var(--shadow-primary);
}

/* ── Muted text utility ── */
.text-muted { color: var(--gray-500); }
.text-secondary { color: var(--gray-600); }

/* ── Page Wrapper fix ── */
.page-wrapper { margin-left: 0; }
.page-body-overlap { padding-bottom: 40px; }
.tab-pane-custom:last-child .page-body-overlap { padding-bottom: 60px; }

/* ── ApexCharts ── */
.apexcharts-tooltip { border-radius: 8px !important; box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; font-size: 13px !important; }
.apexcharts-tooltip-title { background: #f8fafc !important; font-weight: 600 !important; }
.apexcharts-xaxis-label, .apexcharts-yaxis-label { fill: #94a3b8 !important; font-size: 11px !important; }
.apexcharts-gridline { stroke: #f1f5f9 !important; }
.apexcharts-legend-text { font-size: 12px !important; color: #64748b !important; }

/* ── Responsive ── */
@media (max-width: 991px) {
    .navbar.navbar-vertical { width: 220px !important; }
    .hero-amount { font-size: 30px; }
    .hero-card { padding: 22px 20px; flex-direction: column; gap: 0; }
    .hero-right { width: 100%; height: 110px; margin: 0; padding: 16px 0 0; border-left: none; border-top: 1px solid rgba(226,232,240,.4); background: transparent; }
    .hero-right-fade { display: none; }
    .hero-wallets-grid { flex-direction: column; }
    .wallet-bento { min-width: unset; }
    .page-header-dark { padding: 24px 0 80px; }
    .stat-card { height: auto; min-height: 100px; padding: 18px 16px; }
    .stat-value { font-size: 18px; }
    .premium-table thead th { padding: 10px 12px; font-size: 10px; }
    .premium-table tbody td { padding: 10px 12px; font-size: 13px; }
    .filter-bar { padding: 12px 16px; gap: 8px; }
    .filter-bar select, .filter-bar input[type="date"] { padding: 6px 10px; font-size: 12px; min-width: 0; }
    .data-range-bar { font-size: 11px; padding: 8px 14px; flex-wrap: wrap; }
}
.mobile-header {
    display: none; background: var(--sidebar-bg); border-bottom: 1px solid var(--sidebar-border);
    padding: 10px 16px; align-items: center; justify-content: space-between; z-index: 100;
    position: sticky; top: 0;
}
.mobile-header .sidebar-logo { font-size: 16px; }
.mobile-menu-btn {
    background: none; border: 1px solid var(--gray-200); border-radius: var(--card-radius);
    padding: 6px 10px; font-size: 18px; color: var(--gray-600); cursor: pointer;
}
.mobile-menu-btn:hover { background: var(--gray-100); }
.mobile-nav {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000;
    background: rgba(0,0,0,.4); backdrop-filter: blur(4px);
}
.mobile-nav.open { display: block; }
.mobile-nav-panel {
    width: 260px; height: 100%; background: #fff; padding: 20px 16px;
    box-shadow: 4px 0 20px rgba(0,0,0,.1); overflow-y: auto;
}
.mobile-nav-panel .nav-link {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border-radius: var(--card-radius); color: var(--gray-600); font-size: 14px; font-weight: 500;
    text-decoration: none; transition: var(--transition); margin-bottom: 2px;
}
.mobile-nav-panel .nav-link:hover, .mobile-nav-panel .nav-link.active {
    background: var(--accent-surface); color: var(--accent);
}
.mobile-nav-panel .nav-link i { font-size: 18px; width: 24px; text-align: center; }
@media (max-width: 767px) {
    .mobile-header { display: flex; }
    .navbar.navbar-vertical { display: none !important; }
    .page-wrapper { margin-left: 0 !important; }
    .hero-amount { font-size: 26px; letter-spacing: -1px; }
    .hero-card { padding: 18px 16px; border-radius: 12px; flex-direction: column; gap: 0; }
    .hero-unit { font-size: 11px; margin-left: 4px; }
    .hero-right { width: 100%; height: 90px; margin: 0; padding: 12px 0 0; border-left: none; border-top: 1px solid rgba(226,232,240,.4); background: transparent; }
    .hero-right-fade { display: none; }
    .wallet-bento { min-width: 160px; padding: 14px 16px; }
    .wallet-bento-bal { font-size: 18px; }
    .page-header-dark { padding: 18px 0 70px; }
    .page-header-dark .title { font-size: 18px; }
    .page-body-overlap { margin-top: -50px; }
    .stat-card { height: auto; min-height: 85px; padding: 14px 14px; border-radius: 12px; }
    .stat-card .wm-icon { font-size: 70px; right: -10px; bottom: -10px; }
    .stat-icon { width: 34px !important; height: 34px !important; font-size: 16px !important; }
    .stat-label { font-size: 11px; }
    .stat-value { font-size: 16px; }
    .premium-card-header { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
    .premium-card-title { font-size: 13px; gap: 5px; }
    .premium-card-body { padding: 14px 16px; }
    .premium-table { font-size: 12px; }
    .premium-table thead th { padding: 8px 10px; font-size: 10px; }
    .premium-table tbody td { padding: 10px; font-size: 12px; }
    .filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    .filter-bar select, .filter-bar input[type="date"] { width: 100%; }
    .filter-btn { width: 100%; justify-content: center; }
    .month-pill { padding: 5px 12px; font-size: 12px; }
    .tx-pager-bar { padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
    .data-range-bar { font-size: 10px; padding: 8px 12px; }
    .wallet-sw-indicator { font-size: 11px; padding: 3px 8px; }
    .wallet-badge-addr { display: none; }
    .hero-change-badge { font-size: 11px; padding: 3px 8px; }
    .container-xl { padding-left: 12px !important; padding-right: 12px !important; }
    .section-divider { font-size: 10px; }
}
@media (max-width: 480px) {
    .hero-amount { font-size: 22px; }
    .stat-card { min-height: 75px; padding: 12px; }
    .stat-value { font-size: 15px; }
    .premium-table thead th:nth-child(4),
    .premium-table thead th:nth-child(5),
    .premium-table tbody td:nth-child(4),
    .premium-table tbody td:nth-child(5) { display: none; }
    .login-card { width: 100%; margin: 0 12px; padding: 30px 20px; border-radius: 16px; }
}