/* Kang1 dark theme: restrained slate surfaces and a single blue accent. */
[data-theme="dark"] {
    --primary: #76a9ff;
    --primary-hover: #a2c5ff;
    --primary-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
    --primary-soft: #172c49;
    --primary-soft-border: #2b4970;
    --primary-text-on-soft: #a9ccff;
    --accent: #76a9ff;
    --accent-soft: #172c49;
    --accent-border: #2b4970;
    --theme-bg-page: #0c1422;
    --theme-bg-sidebar: #101b2c;
    --theme-bg-topbar: #101b2c;
    --theme-bg-primary: #142033;
    --theme-bg-secondary: #111c2d;
    --theme-bg-tertiary: #1b2a40;
    --theme-input-bg: #101b2c;
    --theme-accent-soft: #172c49;
    --theme-accent-text: #a9ccff;
    --theme-text-primary: #edf3fc;
    --theme-text-secondary: #bac9de;
    --theme-text-muted: #95a8c1;
    --theme-border-color: #29384d;
    --theme-border-light: #243348;
    --welcome-bg: #142033;
    --welcome-text: #edf3fc;
    --welcome-muted: #95a8c1;
    --welcome-border: #29384d;
}
[data-theme="dark"] body { background: #0c1422 !important; -webkit-font-smoothing: antialiased; }
[data-theme="dark"] .brand-name,
[data-theme="dark"] .page-head-title,
[data-theme="dark"] .section-header-text h2,
[data-theme="dark"] .welcome-banner h2,
[data-theme="dark"] .profile-menu .user-name,
[data-theme="dark"] .profile-menu .user-avatar { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; letter-spacing: -.035em; }
[data-theme="dark"] .sidebar { background: #101b2c !important; border-right: 1px solid #243348 !important; box-shadow: none; }
[data-theme="dark"] .sidebar .brand-wrapper { padding: 12px 10px; margin-bottom: 22px; background: transparent; border: 1px solid transparent; box-shadow: none; }
[data-theme="dark"] .brand-logo { background: linear-gradient(145deg, #3b82f6, #2563eb); border-radius: 12px; box-shadow: 0 4px 14px rgba(37, 99, 235, .2); }
[data-theme="dark"] .brand-name { font-size: 17px; font-weight: 800; color: #edf3fc; }
[data-theme="dark"] .brand-sub { color: #95a8c1; font-size: 9px; letter-spacing: .08em; }
[data-theme="dark"] .sidebar .sidebar-nav-label { color: #95a8c1; font-size: 10px; letter-spacing: .12em; }
[data-theme="dark"] .sidebar .nav-link { color: #bac9de !important; border-radius: 12px; font-size: 13px; min-height: 48px; }
[data-theme="dark"] .sidebar .nav-link i { color: #95a8c1; background: #1a293d; }
[data-theme="dark"] .sidebar .nav-link:hover { background: #17263b; color: #edf3fc !important; }
[data-theme="dark"] .sidebar .nav-link.active { background: #172f50 !important; color: #a9ccff !important; border-color: #28476c; box-shadow: inset 3px 0 0 #76a9ff; }
[data-theme="dark"] .sidebar .nav-link.active i { background: #213f65; color: #a9ccff !important; }
[data-theme="dark"] .sidebar-hamburger,
[data-theme="dark"] .menu-toggle,
[data-theme="dark"] .theme-toggle { background: #142033; color: #bac9de; border: 1px solid #29384d; border-radius: 12px; box-shadow: none; }
[data-theme="dark"] .topbar { background: #101b2c !important; border-bottom: 1px solid #243348 !important; box-shadow: none; }
[data-theme="dark"] .topbar-pill,
[data-theme="dark"] .hero-pill,
[data-theme="dark"] .user-chip { background: #142033; color: #bac9de; border-color: #29384d; }
[data-theme="dark"] .profile-menu-trigger { background: #142033; border-color: #29384d; border-radius: 12px; box-shadow: none; }
[data-theme="dark"] .profile-menu .user-avatar { background: #172f50; color: #a9ccff; border: 1px solid #28476c; box-shadow: none; }
[data-theme="dark"] .profile-menu-panel { background: #142033; border-color: #29384d; box-shadow: 0 18px 36px rgba(0,0,0,.25); }
[data-theme="dark"] .profile-menu-caret { background: #1b2a40; color: #bac9de; }
[data-theme="dark"] .page-head { margin-bottom: 24px; align-items: center; }
[data-theme="dark"] .page-head-title { font-size: clamp(23px,2vw,28px); font-weight: 800; line-height: 1.3; }
[data-theme="dark"] .page-head-sub { color: #95a8c1; font-size: 13px; margin-top: 7px; }
[data-theme="dark"] .page-head-stat { background: #142033; padding: 13px 18px; border-radius: 14px; border-color: #29384d !important; box-shadow: none; }
[data-theme="dark"] .page-head-stat-value { color: #a9ccff; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .page-head-stat-label { color: #95a8c1; font-size: 10px; letter-spacing: .07em; }
[data-theme="dark"] .toolbar { padding: 12px; gap: 12px; border-radius: 16px; border-color: #29384d !important; background: #142033; box-shadow: none; margin-bottom: 24px; }
[data-theme="dark"] .toolbar .search-wrap .form-input { min-height: 42px; background: #101b2c !important; border: 1px solid #243348 !important; border-radius: 10px; }
[data-theme="dark"] .form-input::placeholder { color: #95a8c1; opacity: 1; }
[data-theme="dark"] .form-input:focus-visible,
[data-theme="dark"] .btn:focus-visible,
[data-theme="dark"] .nav-link:focus-visible { outline: 3px solid #76a9ff; outline-offset: 3px; }
[data-theme="dark"] .btn-primary { background: #2563eb !important; color: #fff !important; box-shadow: 0 3px 8px rgba(0,0,0,.14); }
[data-theme="dark"] .btn-primary:hover { background: #1d4ed8 !important; filter: none; box-shadow: none; }
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-ghost { background: #142033 !important; color: #bac9de !important; border-color: #34465f !important; box-shadow: none !important; }
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-ghost:hover { background: #1b2a40 !important; color: #edf3fc !important; border-color: #526b8e !important; }
[data-theme="dark"] .page-dashboard .accounts-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,310px),1fr)); gap: 22px; align-items: stretch; }
[data-theme="dark"] .account-card { background: #142033 !important; border: 1px solid #29384d !important; border-radius: 18px; box-shadow: 0 8px 24px -16px rgba(0,0,0,.5); transition: border-color .18s ease,box-shadow .18s ease; }
[data-theme="dark"] .account-card:hover { border-color: #456284 !important; box-shadow: 0 12px 28px -14px rgba(0,0,0,.5); transform: none; }
[data-theme="dark"] .account-card::before { height: 0; }
[data-theme="dark"] .account-card-body { padding: 24px 24px 20px; }
[data-theme="dark"] .account-card-header { margin-bottom: 26px; gap: 12px; }
[data-theme="dark"] .account-avatar { width: 46px; height: 46px; border-radius: 14px; color: #a9ccff; background: #172f50; border: 1px solid #28476c; font-size: 17px; }
[data-theme="dark"] .account-name { font-size: 13px; font-weight: 800; line-height: 1.5; }
[data-theme="dark"] .account-phone { color: #95a8c1; font-size: 11px; margin-top: 4px; }
[data-theme="dark"] .account-balance { font-size: 32px; font-weight: 800; margin-bottom: 20px; color: #f1f5fd; line-height: 1.25; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .account-balance-currency { font-size: 15px; color: #95a8c1; font-weight: 600; margin-right: 6px; }
[data-theme="dark"] .account-meta { gap: 10px; margin-bottom: 0; padding-top: 16px; border-top: 1px solid #29384d; }
[data-theme="dark"] .account-meta-row { font-size: 12px; color: #95a8c1; }
[data-theme="dark"] .account-meta-row strong { color: #d0ddef; }
[data-theme="dark"] .account-meta-row i { color: #95a8c1; }
[data-theme="dark"] .account-actions { padding: 16px 20px 20px; gap: 8px; background: #111c2d; border-top: 1px solid #29384d; }
[data-theme="dark"] .account-actions .btn { border-radius: 10px !important; min-height: 38px; font-size: 11px !important; font-weight: 600; box-shadow: none; }
[data-theme="dark"] .account-actions .btn-account-robot { background: #2563eb !important; color: #fff !important; }
[data-theme="dark"] .account-actions .btn-account-notification { background: #172f50 !important; color: #a9ccff !important; border: 1px solid #28476c !important; box-shadow: none; }
[data-theme="dark"] .account-actions .btn-account-notification:hover { background: #213f65 !important; }
[data-theme="dark"] .account-actions .btn-danger { background: transparent !important; color: #f7a3ae !important; border-color: #573543 !important; }
[data-theme="dark"] .account-actions .btn-danger:hover { background: #392331 !important; }
[data-theme="dark"] .account-card.has-error { border-color: #744554 !important; }
[data-theme="dark"] .account-card.has-error .account-avatar { background: #392331; color: #f7a3ae; border-color: #744554; }
@media (min-width: 992px) {
    [data-theme="dark"] .page-dashboard .main-content-area { padding-top: 32px; }
    [data-theme="dark"] .sidebar.collapsed .brand-wrapper { padding: 6px 0; background: transparent; border-color: transparent; }
    [data-theme="dark"] .sidebar.collapsed .nav-link.active i { color: #a9ccff !important; filter: none; }
    [data-theme="dark"] .sidebar.collapsed .nav-link.active::after { background: #76a9ff; }
}
@media (max-width: 640px) {
    [data-theme="dark"] .page-dashboard .accounts-grid { grid-template-columns: 1fr; gap: 16px; }
    [data-theme="dark"] .account-card-body { padding: 20px; }
    [data-theme="dark"] .account-actions { padding: 16px; }
    [data-theme="dark"] .page-head { gap: 12px; margin-bottom: 18px; }
    [data-theme="dark"] .page-head-title { font-size: 23px; }
    [data-theme="dark"] .toolbar .search-wrap { flex-basis: 100%; min-width: 0; }
    [data-theme="dark"] .toolbar-actions { width: 100%; }
    [data-theme="dark"] .toolbar-actions .btn { flex: 1; }
}

@media (max-width: 640px) {
    [data-theme="dark"] .page-head { flex-direction: row; flex-wrap: nowrap; align-items: center; }
    [data-theme="dark"] .page-head-text { flex: 1; min-width: 0; text-align: left; }
    [data-theme="dark"] .page-head-stat { width: auto; flex: 0 0 90px; padding: 12px 10px; text-align: center; }
    [data-theme="dark"] .page-head-stat-label { font-size: 8px; letter-spacing: .03em; }
    [data-theme="dark"] .page-head-sub { font-size: 12px; line-height: 1.6; }
}

/* Match the account summary layout across themes. */
html[data-theme="dark"] #dashboard-account-count{position:relative;min-width:178px;padding:16px 18px 16px 70px;text-align:left;border:1px solid #334b70;border-radius:16px;background:linear-gradient(125deg,#19283e 20%,#142238);box-shadow:0 5px 18px -10px #0006,inset 0 1px 0 #9bc5ff0a}
html[data-theme="dark"] #dashboard-account-count .page-head-stat-icon{display:grid;place-items:center;position:absolute;left:15px;top:50%;transform:translateY(-50%);width:40px;height:40px;border:1px solid #365782;border-radius:12px;background:#213c60;color:#8ebdff;font-size:18px}
html[data-theme="dark"] #dashboard-account-count .page-head-stat-value{color:#d9e9ff;font-size:27px;font-weight:800;line-height:1.05;font-variant-numeric:tabular-nums}
html[data-theme="dark"] #dashboard-account-count .page-head-stat-label{margin-top:6px;color:#9bb0cd;font-size:9px;font-weight:700;letter-spacing:.045em}
@media(max-width:640px){
html[data-theme="dark"] #dashboard-account-count{min-width:82px;flex:0 0 82px;padding:12px 10px;text-align:center;border-radius:13px}
html[data-theme="dark"] #dashboard-account-count .page-head-stat-icon{display:none}
html[data-theme="dark"] #dashboard-account-count .page-head-stat-value{font-size:24px}
html[data-theme="dark"] #dashboard-account-count .page-head-stat-label{margin-top:4px;font-size:9px}
}
