/* High Tech Wealth Solutions — member & admin panel theme (deep teal · mint · gold) */
:root {
  --hw-bg: #0d0b1e;
  --hw-bg-2: #13102a;
  --hw-surface: #191538;
  --hw-surface-2: #1f1a44;
  --hw-raised: #262050;
  --hw-border: #3a3170;
  --hw-border-soft: rgba(180, 156, 255, .14);
  --hw-glow: rgba(139, 92, 246, .35);
  --hw-text: #f1eeff;
  --hw-muted: #b3aad6;
  --hw-faint: #7f76a8;
  --hw-mint: #b49cff;
  --hw-aqua: #8b5cf6;
  --hw-teal: #6d39e4;
  --hw-gold: #f4c24f;
  --hw-gold-2: #e0a526;
  --hw-success: #3ee08f;
  --hw-warning: #ffb547;
  --hw-danger: #ff6b6b;
  --hw-info: #5ec8ff;
  --hw-radius: 16px;
  --hw-radius-sm: 10px;
  --hw-font: 'Montserrat', 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hw-display: 'Montserrat', 'Inter Tight', system-ui, sans-serif;
  --hw-sidebar: 270px;
  --hw-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--hw-font); font-size: 14.5px; line-height: 1.55; color: var(--hw-text);
  background: radial-gradient(1200px 600px at 85% -10%, rgba(139, 92, 246, .10), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(244, 194, 79, .06), transparent 60%), var(--hw-bg);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--hw-mint); text-decoration: none; }
a:hover { color: #d6c9ff; }
h1, h2, h3, h4, h5 { font-family: var(--hw-display); color: var(--hw-text); letter-spacing: -.01em; }
.material-icons-outlined { font-size: 20px; line-height: 1; vertical-align: middle; }
::selection { background: rgba(180, 156, 255, .3); }
.text-secondary, .small.text-secondary { color: var(--hw-muted) !important; }
.text-mint { color: var(--hw-mint) !important; }
.text-gold { color: var(--hw-gold) !important; }
.text-success { color: var(--hw-success) !important; }
.text-danger { color: var(--hw-danger) !important; }
code, .hw-mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; color: #d6c9ff; font-size: .92em; word-break: break-all; }
hr { border-color: var(--hw-border-soft); opacity: 1; }

/* ---------- Layout ---------- */
.hw-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--hw-sidebar); z-index: 1040; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #16122f 0%, #0f0c24 100%); border-right: 1px solid var(--hw-border-soft);
  transition: transform .25s ease;
}
.hw-brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid var(--hw-border-soft); position: relative; }
.hw-brand img { border-radius: 12px; box-shadow: 0 0 0 1px rgba(244, 194, 79, .35), 0 6px 18px rgba(0, 0, 0, .4); }
.hw-brand span { display: flex; flex-direction: column; line-height: 1.1; }
.hw-brand b { font-family: var(--hw-display); font-size: 16px; letter-spacing: .06em; color: var(--hw-gold); }
.hw-brand small { font-size: 10.5px; letter-spacing: .16em; color: var(--hw-mint); font-weight: 600; }
.hw-brand-tag { position: absolute; right: 14px; top: 12px; font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .1em;
  padding: 2px 7px; border-radius: 6px; background: rgba(244, 194, 79, .15); color: var(--hw-gold); border: 1px solid rgba(244, 194, 79, .35); }
.hw-nav { flex: 1; overflow-y: auto; padding: 10px 12px 18px; scrollbar-width: thin; scrollbar-color: var(--hw-border) transparent; }
.hw-nav-label { margin: 16px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--hw-faint); }
.hw-nav a, .hw-nav-group {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; margin: 2px 0; border-radius: 11px; border: 0;
  background: transparent; color: #d4ccf5; font: 500 14px var(--hw-font); text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.hw-nav a:hover, .hw-nav-group:hover { background: rgba(180, 156, 255, .07); color: #fff; }
.hw-nav a.active { background: linear-gradient(90deg, rgba(139, 92, 246, .22), rgba(139, 92, 246, .05)); color: var(--hw-mint); box-shadow: inset 3px 0 0 var(--hw-mint); }
.hw-nav a .material-icons-outlined, .hw-nav-group > .material-icons-outlined:first-child { color: var(--hw-aqua); font-size: 20px; }
.hw-nav-group span:not(.material-icons-outlined) { flex: 1; }
.hw-caret { margin-left: auto; transition: transform .2s; color: var(--hw-faint) !important; }
.hw-nav-group[aria-expanded="true"] .hw-caret { transform: rotate(180deg); }
.hw-sub { display: none; padding-left: 20px; margin-left: 10px; border-left: 1px dashed var(--hw-border); }
.hw-sub.open { display: block; }
.hw-sub a { font-size: 13.5px; padding: 7px 12px; }
.hw-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 700; background: var(--hw-gold); color: #2a1d00; }
.hw-sidebar-foot { padding: 12px; border-top: 1px solid var(--hw-border-soft); }
.hw-sidebar-foot a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; color: #ffb3b3; }
.hw-sidebar-foot a:hover { background: rgba(255, 107, 107, .1); }

.hw-main { margin-left: var(--hw-sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.hw-topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 14px; padding: 14px 28px;
  background: rgba(13, 11, 30, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hw-border-soft);
}
.hw-page-head { flex: 1; min-width: 0; }
.hw-crumbs { display: none; margin: 0; font-size: 12px; color: var(--hw-faint); letter-spacing: .02em; }
.hw-page-title { margin: 0; font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(90deg, #e9fffb, var(--hw-mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hw-top-right { display: flex; align-items: center; gap: 10px; }
.hw-icon-btn { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px;
  background: var(--hw-surface); border: 1px solid var(--hw-border-soft); color: var(--hw-mint); cursor: pointer; }
.hw-icon-btn:hover { border-color: var(--hw-glow); color: #fff; }
.hw-dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hw-gold); color: #2a1d00; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }
.hw-burger { display: none; }
.hw-user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 14px; background: var(--hw-surface);
  border: 1px solid var(--hw-border-soft); color: var(--hw-text); cursor: pointer; }
.hw-user-chip:hover { border-color: var(--hw-glow); }
.hw-avatar { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--hw-gold), var(--hw-gold-2)); color: #2a1d00; font-weight: 800; font-size: 13px; }
.hw-user-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.hw-user-meta b { font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-user-meta small { font-size: 11.5px; color: var(--hw-muted); }
.hw-content { flex: 1; padding: 26px 28px 40px; width: 100%; max-width: 1480px; }
.hw-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px 28px; font-size: 12px; color: var(--hw-faint); border-top: 1px solid var(--hw-border-soft); }
.hw-scrim { display: none; }
.hw-bottom-nav { display: none; }

/* "Logged in by admin" alert bar: pinned above everything; sidebar, top bar and content start below it. */
:root { --hw-imp-h: 0px; }
.hw-impersonating { --hw-imp-h: 48px; }
.hw-impersonate { position: fixed; top: 0; left: 0; right: 0; z-index: 1060; height: var(--hw-imp-h); display: flex; align-items: center; gap: 10px; padding: 0 18px;
  background: linear-gradient(90deg, #b42318, #e0532f 55%, #f08c2a); color: #fff; font-size: 13.5px; box-shadow: 0 4px 16px rgba(180, 35, 24, .35); }
.hw-impersonate > .material-icons-outlined { font-size: 22px; animation: hwPulse 1.6s ease-in-out infinite; }
.hw-impersonate > span:not(.material-icons-outlined) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-impersonate a { flex: 0 0 auto; display: inline-flex; gap: 6px; align-items: center; color: #b42318; font-weight: 700; padding: 6px 14px; border-radius: 9px; background: #fff; }
.hw-impersonate a:hover { color: #7a1c1c; background: #fff3ef; }
@keyframes hwPulse { 50% { transform: scale(1.15); } }
.hw-impersonating .hw-sidebar { top: var(--hw-imp-h); }
.hw-impersonating .hw-main { padding-top: var(--hw-imp-h); }
.hw-impersonating .hw-topbar { top: var(--hw-imp-h); }
@media (max-width: 767px) {
  .hw-impersonating { --hw-imp-h: 56px; }
  .hw-impersonate { font-size: 12px; padding: 0 10px; gap: 8px; }
  .hw-impersonate > span:not(.material-icons-outlined) { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .hw-impersonate a { padding: 6px 10px; font-size: 12px; }
}

/* ---------- Cards ---------- */
.hw-card {
  position: relative; margin-bottom: 22px; border-radius: var(--hw-radius);
  background: linear-gradient(160deg, rgba(38, 32, 80, .85), rgba(22, 18, 48, .92));
  border: 1px solid var(--hw-border-soft); box-shadow: var(--hw-shadow);
}
.hw-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(135deg, rgba(180, 156, 255, .45), transparent 35%, transparent 70%, rgba(244, 194, 79, .3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.hw-card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hw-border-soft); }
.hw-card-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px;
  background: rgba(139, 92, 246, .14); color: var(--hw-mint); border: 1px solid rgba(180, 156, 255, .25); }
.hw-card-title { flex: 1; min-width: 0; }
.hw-card-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--hw-mint); }
.hw-card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--hw-muted); }
.hw-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hw-card-body { padding: 20px; }
.hw-card-body.flush { padding: 0; }
.hw-card-body.flush .table-responsive { padding: 6px 12px 12px; }

/* ---------- Stats ---------- */
.hw-stat { position: relative; display: block; height: 100%; padding: 18px 18px 16px; border-radius: var(--hw-radius); overflow: hidden; color: var(--hw-text);
  background: linear-gradient(150deg, rgba(38, 32, 80, .95), rgba(20, 16, 44, .95)); border: 1px solid var(--hw-border-soft); box-shadow: var(--hw-shadow); }
a.hw-stat:hover { border-color: var(--hw-glow); color: var(--hw-text); transform: translateY(-1px); }
.hw-stat::after { content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: var(--tone, var(--hw-mint)); opacity: .08; }
.hw-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hw-stat-label { font-size: 12.5px; color: var(--hw-muted); font-weight: 600; letter-spacing: .02em; }
.hw-stat-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--tone, var(--hw-mint));
  background: color-mix(in srgb, var(--tone, #b49cff) 14%, transparent); }
.hw-stat-value { margin-top: 10px; font-family: var(--hw-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.hw-stat-hint { margin-top: 4px; font-size: 12px; color: var(--hw-faint); }
.tone-mint { --tone: #b49cff; } .tone-gold { --tone: #f4c24f; } .tone-aqua { --tone: #5ec8ff; }
.tone-green { --tone: #3ee08f; } .tone-red { --tone: #ff6b6b; } .tone-violet { --tone: #b49cff; } .tone-amber { --tone: #ffb547; }

.hw-hero { position: relative; overflow: hidden; margin-bottom: 22px; padding: 24px 26px; border-radius: 20px;
  background: radial-gradient(500px 220px at 90% 0%, rgba(244, 194, 79, .18), transparent 70%), linear-gradient(120deg, #2b1f72, #1a1442 60%, #120e2c);
  border: 1px solid rgba(180, 156, 255, .25); box-shadow: var(--hw-shadow); }
.hw-hero h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.hw-hero h2 em { font-style: normal; color: var(--hw-gold); }
.hw-hero p { margin: 0; color: #c7bdf0; }
.hw-hero .hw-ref { margin-top: 16px; max-width: 560px; }

/* ---------- Progress / chips ---------- */
.hw-progress { margin-bottom: 14px; }
.hw-progress-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--hw-muted); margin-bottom: 6px; }
.hw-progress-top b { color: var(--hw-text); font-weight: 600; }
.hw-bar { height: 9px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.hw-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hw-teal), var(--tone, var(--hw-mint))); }
.hw-gens { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hw-gen { padding: 10px 6px; border-radius: 12px; text-align: center; border: 1px solid var(--hw-border-soft); background: rgba(0, 0, 0, .18); color: var(--hw-faint); }
.hw-gen b { display: block; font-family: var(--hw-display); font-size: 15px; }
.hw-gen small { font-size: 11px; }
.hw-gen.open { color: #ffffff; background: linear-gradient(135deg, var(--hw-mint), var(--hw-aqua)); border-color: transparent; box-shadow: 0 6px 16px rgba(139, 92, 246, .25); }
.hw-gen.open small { color: #ede6ff; }

/* ---------- Badges & alerts ---------- */
.hw-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid transparent; white-space: nowrap; }
.hw-badge.success { background: rgba(62, 224, 143, .14); color: #6ff0ad; border-color: rgba(62, 224, 143, .3); }
.hw-badge.warning { background: rgba(255, 181, 71, .14); color: #ffc874; border-color: rgba(255, 181, 71, .3); }
.hw-badge.danger { background: rgba(255, 107, 107, .14); color: #ff9d9d; border-color: rgba(255, 107, 107, .3); }
.hw-badge.info { background: rgba(94, 200, 255, .14); color: #8fd8ff; border-color: rgba(94, 200, 255, .3); }
.hw-badge.mint { background: rgba(180, 156, 255, .14); color: var(--hw-mint); border-color: rgba(180, 156, 255, .3); }
.hw-badge.gold { background: rgba(244, 194, 79, .14); color: var(--hw-gold); border-color: rgba(244, 194, 79, .35); }
.hw-badge.muted { background: rgba(255, 255, 255, .06); color: var(--hw-muted); border-color: var(--hw-border-soft); }
.hw-alert { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; margin-bottom: 18px; border-radius: 13px; font-size: 14px;
  border: 1px solid; background: rgba(255, 255, 255, .03); }
.hw-alert > .material-icons-outlined { margin-top: 1px; }
.hw-alert > div { flex: 1; }
.hw-alert.success { border-color: rgba(62, 224, 143, .35); background: rgba(62, 224, 143, .08); } .hw-alert.success > .material-icons-outlined { color: var(--hw-success); }
.hw-alert.warning { border-color: rgba(255, 181, 71, .35); background: rgba(255, 181, 71, .08); } .hw-alert.warning > .material-icons-outlined { color: var(--hw-warning); }
.hw-alert.danger { border-color: rgba(255, 107, 107, .38); background: rgba(255, 107, 107, .08); } .hw-alert.danger > .material-icons-outlined { color: var(--hw-danger); }
.hw-alert.info { border-color: rgba(94, 200, 255, .32); background: rgba(94, 200, 255, .07); } .hw-alert.info > .material-icons-outlined { color: var(--hw-info); }
.hw-x { border: 0; background: none; color: var(--hw-muted); padding: 0; cursor: pointer; }
.hw-empty { padding: 34px 16px; text-align: center; color: var(--hw-muted); }
.hw-empty .material-icons-outlined { font-size: 42px; color: var(--hw-border); display: block; margin: 0 auto 8px; }
.hw-empty p { margin: 0 auto; max-width: 440px; }

/* ---------- Forms & buttons ---------- */
.form-label { font-size: 13px; font-weight: 600; color: #d4ccf5; margin-bottom: 6px; }
.form-control, .form-select {
  min-height: 44px; border-radius: var(--hw-radius-sm); border: 1px solid var(--hw-border); background-color: #120f2b; color: var(--hw-text); font-size: 14.5px;
}
.form-control::placeholder { color: #6f6898; }
.form-control:focus, .form-select:focus { background-color: #041f25; color: #fff; border-color: var(--hw-aqua); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.form-control:disabled, .form-control[readonly] { background-color: #17132f; color: #d4ccf5; }
.form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b49cff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-select option { background: #1b1740; }
.form-control[type=file]::file-selector-button { background: var(--hw-raised); color: var(--hw-mint); border-right-color: var(--hw-border); }
.form-check-input { background-color: #120f2b; border-color: var(--hw-border); }
.form-check-input:checked { background-color: var(--hw-aqua); border-color: var(--hw-aqua); }
.form-check-label { color: #d4ccf5; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) hue-rotate(120deg); }
.hw-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-bottom: 18px; }
.hw-form-grid .span-2 { grid-column: span 2; }
.hw-field { min-width: 0; }
.hw-help { margin-top: 5px; font-size: 12px; color: var(--hw-faint); }
.hw-req { color: var(--hw-gold); }
.hw-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hw-lookup { min-height: 18px; margin-top: 5px; font-size: 12.5px; color: var(--hw-muted); }
.hw-lookup.ok { color: var(--hw-success); } .hw-lookup.bad { color: var(--hw-danger); }
.hw-pw { position: relative; }
.hw-pw .form-control { padding-right: 46px; }
.hw-pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--hw-muted); padding: 6px; }
.hw-ref { display: flex; gap: 8px; }
.hw-ref .form-control { flex: 1; min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 8px 18px; border-radius: 11px; font-weight: 600; font-size: 14px; }
.btn-sm { min-height: 32px; padding: 4px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-sm .material-icons-outlined { font-size: 17px; }
.btn-primary { background: linear-gradient(135deg, var(--hw-mint), var(--hw-aqua)); border: 0; color: #ffffff; box-shadow: 0 8px 20px rgba(139, 92, 246, .22); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: linear-gradient(135deg, #9a6bff, #5b2fd0) !important; color: #ffffff !important; }
.btn-gold { background: linear-gradient(135deg, #ffd978, var(--hw-gold-2)); border: 0; color: #2a1d00; box-shadow: 0 8px 20px rgba(224, 165, 38, .22); }
.btn-gold:hover { background: linear-gradient(135deg, #ffe39a, #f0b333); color: #1d1400; }
.btn-ghost, .btn-light, .btn-outline-secondary { background: rgba(180, 156, 255, .06); border: 1px solid var(--hw-border); color: var(--hw-mint); }
.btn-ghost:hover, .btn-light:hover, .btn-outline-secondary:hover { background: rgba(180, 156, 255, .14); color: #fff; border-color: var(--hw-aqua); }
.btn-danger { background: rgba(255, 107, 107, .14); border: 1px solid rgba(255, 107, 107, .45); color: #ffb0b0; }
.btn-danger:hover { background: rgba(255, 107, 107, .28); color: #fff; border-color: var(--hw-danger); }
.btn-success { background: rgba(62, 224, 143, .16); border: 1px solid rgba(62, 224, 143, .45); color: #8ff3bf; }
.btn-success:hover { background: rgba(62, 224, 143, .3); color: #fff; border-color: var(--hw-success); }
.btn:disabled { opacity: .55; }
.btn-close { filter: invert(1); }

/* ---------- Tables ---------- */
.hw-table { --bs-table-bg: transparent; --bs-table-color: var(--hw-text); --bs-table-hover-bg: rgba(180, 156, 255, .05); margin: 0; font-size: 13.5px; }
.hw-table thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hw-mint) !important;
  background: rgba(139, 92, 246, .08) !important; border-bottom: 1px solid var(--hw-border) !important; white-space: nowrap; padding: 11px 12px; }
.hw-table td { border-color: var(--hw-border-soft) !important; padding: 11px 12px; vertical-align: middle; color: var(--hw-text); }
.hw-table tbody tr:hover td { background: rgba(180, 156, 255, .04); }
.hw-table tfoot th { border-top: 1px solid var(--hw-border) !important; color: var(--hw-gold); background: rgba(244, 194, 79, .05); padding: 11px 12px; }
.hw-table .num, .hw-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hw-table td.pos { color: var(--hw-success); } .hw-table td.neg { color: var(--hw-danger); }
.hw-user-cell { display: flex; align-items: center; gap: 10px; }
.hw-user-cell .hw-avatar { width: 30px; height: 30px; font-size: 11.5px; border-radius: 9px; }
.hw-user-cell b { display: block; font-size: 13.5px; }
.hw-user-cell small { display: block; color: var(--hw-muted); font-size: 12px; }
div.dt-container { color: var(--hw-muted); font-size: 13px; }
div.dt-container .dt-search input, div.dt-container .dt-length select { background: #120f2b; border: 1px solid var(--hw-border); color: var(--hw-text); border-radius: 9px; min-height: 34px; }
div.dt-container .dt-paging .page-link { background: transparent; border-color: var(--hw-border); color: var(--hw-mint); }
div.dt-container .dt-paging .page-item.active .page-link { background: var(--hw-aqua); border-color: var(--hw-aqua); color: #ffffff; }
div.dt-container .dt-paging .page-item.disabled .page-link { color: var(--hw-faint); }
div.dt-container .dt-buttons .btn { min-height: 32px; padding: 4px 12px; font-size: 12px; background: rgba(180, 156, 255, .06); border: 1px solid var(--hw-border); color: var(--hw-mint); }
div.dt-container .dt-layout-row { margin: 8px 0 !important; }
.table-responsive { scrollbar-width: thin; scrollbar-color: var(--hw-border) transparent; }

/* ---------- Key-value lists ---------- */
.hw-kv { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 10px 14px; margin: 0; font-size: 14px; }
.hw-kv dt { color: var(--hw-muted); font-weight: 500; }
.hw-kv dd { margin: 0; color: var(--hw-text); font-weight: 600; word-break: break-word; }
.hw-list { list-style: none; padding: 0; margin: 0; }
.hw-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--hw-border-soft); }
.hw-list li:last-child { border-bottom: 0; }
.hw-list li span { color: var(--hw-muted); }
.hw-list li b { font-weight: 600; }

/* ---------- Plan / rule tables ---------- */
.hw-rule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .18); border: 1px solid var(--hw-border-soft); margin-bottom: 10px; }
.hw-rule .material-icons-outlined { color: var(--hw-gold); }
.hw-rule b { color: var(--hw-mint); }
.hw-method { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hw-qr { display: inline-block; padding: 10px; background: #fff; border-radius: 14px; }
.hw-chart { position: relative; }

/* ---------- Dropdown ---------- */
.dropdown-menu { background: #1b1740; border: 1px solid var(--hw-border); border-radius: 13px; padding: 6px; box-shadow: var(--hw-shadow); }
.dropdown-item { display: flex; align-items: center; gap: 10px; border-radius: 9px; padding: 8px 12px; color: var(--hw-text); font-size: 14px; }
.dropdown-item:hover, .dropdown-item:focus { background: rgba(180, 156, 255, .1); color: #fff; }
.dropdown-divider { border-color: var(--hw-border-soft); }
.nav-tabs, .hw-tabs { display: flex; flex-wrap: wrap; gap: 6px; border: 0; margin-bottom: 18px; }
.hw-tabs a { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--hw-border-soft); color: var(--hw-muted); font-weight: 600; font-size: 13.5px; background: rgba(0, 0, 0, .15); }
.hw-tabs a.active { background: linear-gradient(135deg, var(--hw-mint), var(--hw-aqua)); color: #ffffff; border-color: transparent; }
.hw-tabs a:hover:not(.active) { color: var(--hw-mint); border-color: var(--hw-border); }

/* ---------- Auth pages ---------- */
.hw-auth { display: grid; place-items: center; padding: 24px 16px; }
.hw-auth-card { width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr 1.05fr; border-radius: 24px; overflow: hidden;
  border: 1px solid rgba(180, 156, 255, .22); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); background: #151132; }
.hw-auth-side { position: relative; padding: 40px; display: flex; flex-direction: column; gap: 28px; justify-content: space-between;
  background: radial-gradient(420px 260px at 100% 0%, rgba(244, 194, 79, .2), transparent 70%), linear-gradient(160deg, #2a1d6e, #1b1544 55%, #110d29); }
.hw-auth-logo { display: flex; align-items: center; gap: 14px; }
.hw-auth-logo img { border-radius: 16px; box-shadow: 0 0 0 1px rgba(244, 194, 79, .4); }
.hw-auth-logo span { display: flex; flex-direction: column; line-height: 1.1; }
.hw-auth-logo b { font-family: var(--hw-display); color: var(--hw-gold); font-size: 20px; letter-spacing: .06em; }
.hw-auth-logo small { color: var(--hw-mint); letter-spacing: .18em; font-size: 11px; font-weight: 600; }
.hw-auth-side h2 { font-size: 30px; font-weight: 800; line-height: 1.2; margin: 0; }
.hw-auth-side h2 em { font-style: normal; color: var(--hw-mint); }
.hw-auth-side p { color: #c7bdf0; margin: 0; }
.hw-auth-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hw-auth-list li { display: flex; gap: 10px; align-items: center; color: #e3ddff; }
.hw-auth-list .material-icons-outlined { color: var(--hw-gold); }
.hw-auth-form { padding: 44px 44px 36px; }
.hw-auth-form h1 { font-size: 26px; font-weight: 800; margin: 0 0 4px; color: #fff; }
.hw-auth-form .sub { color: var(--hw-muted); margin-bottom: 24px; }
.hw-auth-form .btn-primary { width: 100%; min-height: 48px; font-size: 15px; }
.hw-auth-foot { margin-top: 22px; font-size: 13.5px; color: var(--hw-muted); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .hw-content { padding: 22px 20px 36px; }
  .hw-topbar { padding: 12px 20px; }
}
@media (max-width: 991px) {
  .hw-sidebar { transform: translateX(-100%); box-shadow: none; }
  .hw-nav-open .hw-sidebar { transform: none; box-shadow: 20px 0 50px rgba(0, 0, 0, .5); }
  .hw-nav-open .hw-scrim { display: block; position: fixed; inset: 0; z-index: 1030; background: rgba(0, 0, 0, .55); }
  .hw-main { margin-left: 0; }
  .hw-burger { display: inline-grid; }
  .hw-user-meta { display: none; }
  .hw-user-chip > .material-icons-outlined { display: none; }
  .hw-user-chip { padding: 4px; }
  .hw-auth-card { grid-template-columns: 1fr; }
  .hw-auth-side { padding: 28px; }
  .hw-auth-side .hw-auth-list, .hw-auth-side h2 + p { display: none; }
  .hw-auth-side h2 { font-size: 22px; }
}
@media (max-width: 767px) {
  body.hw-panel.hw-user { padding-bottom: 68px; }
  .hw-content { padding: 16px 14px 30px; }
  .hw-topbar { padding: 10px 14px; gap: 10px; }
  .hw-page-title { font-size: 17px; }
  .hw-crumbs { display: none; }
  .hw-form-grid { grid-template-columns: 1fr; }
  .hw-form-grid .span-2 { grid-column: auto; }
  .hw-method { grid-template-columns: 1fr; }
  .hw-gens { grid-template-columns: repeat(4, 1fr); }
  .hw-card-head { padding: 14px 16px; flex-wrap: wrap; }
  .hw-card-body { padding: 16px; }
  .hw-stat-value { font-size: 20px; }
  .hw-kv { grid-template-columns: 1fr; gap: 2px; }
  .hw-kv dd { margin-bottom: 10px; }
  .hw-auth { padding: 12px; }
  .hw-auth-form { padding: 28px 20px; }
  .hw-footer { padding: 14px; }
  .hw-bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
    background: rgba(17, 14, 38, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--hw-border-soft); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .hw-bottom-nav a, .hw-bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border: 0; background: none;
    font-size: 10.5px; font-weight: 600; color: var(--hw-muted); }
  .hw-bottom-nav a.active { color: var(--hw-mint); }
  .hw-bottom-nav .material-icons-outlined { font-size: 22px; }
  div.dt-container .dt-layout-row { flex-direction: column; align-items: stretch !important; gap: 8px; }
  div.dt-container .dt-layout-cell { text-align: left !important; }
}
@media print {
  .hw-sidebar, .hw-topbar, .hw-bottom-nav, .hw-footer, .dt-buttons, .dt-search, .dt-paging, .no-print { display: none !important; }
  .hw-main { margin: 0; }
  body { background: #fff; color: #000; }
}

/* =====================================================================
   Light theme (default). Dark stays available through the theme toggle.
   ===================================================================== */
:root[data-theme="light"] {
  --hw-bg: #f6f5fb;
  --hw-bg-2: #efedf7;
  --hw-surface: #ffffff;
  --hw-surface-2: #f8f7fd;
  --hw-raised: #efeaff;
  --hw-border: #e1dbf3;
  --hw-border-soft: rgba(76, 40, 170, .13);
  --hw-glow: rgba(109, 57, 228, .4);
  --hw-text: #151515;
  --hw-muted: #5f5a73;
  --hw-faint: #8d88a3;
  --hw-mint: #6d39e4;
  --hw-aqua: #8b5cf6;
  --hw-teal: #5126c4;
  --hw-gold: #a8740a;
  --hw-gold-2: #d4961c;
  --hw-success: #13864d;
  --hw-warning: #a96400;
  --hw-danger: #cc3535;
  --hw-info: #1b76b6;
  --hw-shadow: 0 10px 30px rgba(40, 24, 90, .08);
  color-scheme: light;
}
[data-theme="light"] body {
  background: radial-gradient(1200px 600px at 85% -10%, rgba(109, 57, 228, .08), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(212, 150, 28, .06), transparent 60%), var(--hw-bg);
}
[data-theme="light"] a:hover { color: #4b2a99; }
[data-theme="light"] code, [data-theme="light"] .hw-mono { color: #5126c4; }
[data-theme="light"] ::selection { background: rgba(109, 57, 228, .2); }

/* Shell */
[data-theme="light"] .hw-sidebar { background: #ffffff; border-right-color: var(--hw-border); }
[data-theme="light"] .hw-brand img { box-shadow: 0 0 0 1px rgba(168, 116, 10, .35), 0 4px 12px rgba(40, 24, 90, .15); }
[data-theme="light"] .hw-nav a, [data-theme="light"] .hw-nav-group { color: #2b2740; }
[data-theme="light"] .hw-nav a:hover, [data-theme="light"] .hw-nav-group:hover { background: rgba(109, 57, 228, .07); color: var(--hw-text); }
[data-theme="light"] .hw-nav a.active { background: linear-gradient(90deg, rgba(109, 57, 228, .14), rgba(109, 57, 228, .03)); color: var(--hw-teal); }
[data-theme="light"] .hw-count, [data-theme="light"] .hw-dot { background: #f2b52e; color: #2a1d00; }
[data-theme="light"] .hw-sidebar-foot a { color: var(--hw-danger); }
[data-theme="light"] .hw-sidebar-foot a:hover { background: rgba(204, 53, 53, .07); }
[data-theme="light"] .hw-topbar { background: rgba(255, 255, 255, .88); border-bottom-color: var(--hw-border); }
[data-theme="light"] .hw-page-title { background: linear-gradient(90deg, #151515, var(--hw-mint)); -webkit-background-clip: text; background-clip: text; }
[data-theme="light"] .hw-icon-btn:hover { color: var(--hw-teal); }
[data-theme="light"] .hw-avatar { background: linear-gradient(135deg, #f6cd62, #e0a526); }
[data-theme="light"] .hw-bottom-nav { background: rgba(255, 255, 255, .97); border-top-color: var(--hw-border); }

/* Cards, stats, hero */
[data-theme="light"] .hw-card { background: var(--hw-surface); border-color: var(--hw-border-soft); }
[data-theme="light"] .hw-card::before { background: linear-gradient(135deg, rgba(109, 57, 228, .35), transparent 35%, transparent 70%, rgba(212, 150, 28, .28)); }
[data-theme="light"] .hw-card-icon { background: rgba(109, 57, 228, .1); border-color: rgba(109, 57, 228, .22); }
[data-theme="light"] .hw-stat { background: var(--hw-surface); color: var(--hw-text); }
[data-theme="light"] a.hw-stat:hover { color: var(--hw-text); }
[data-theme="light"] .hw-stat-value { color: var(--hw-text); }
[data-theme="light"] .tone-mint { --tone: #6d39e4; } [data-theme="light"] .tone-gold { --tone: #b8800c; } [data-theme="light"] .tone-aqua { --tone: #1b76b6; }
[data-theme="light"] .tone-green { --tone: #13864d; } [data-theme="light"] .tone-red { --tone: #cc3535; } [data-theme="light"] .tone-violet { --tone: #6d4fd1; } [data-theme="light"] .tone-amber { --tone: #b36a00; }
[data-theme="light"] .hw-hero { background: radial-gradient(500px 220px at 90% 0%, rgba(242, 181, 46, .22), transparent 70%), linear-gradient(120deg, #ece6ff, #f7f5ff 60%, #ffffff);
  border-color: rgba(109, 57, 228, .25); }
[data-theme="light"] .hw-hero p { color: var(--hw-muted); }
[data-theme="light"] .hw-bar { background: rgba(40, 24, 90, .08); }
[data-theme="light"] .hw-gen { background: var(--hw-surface-2); }
[data-theme="light"] .hw-gen.open { color: #fff; background: linear-gradient(135deg, #7a45f0, #5126c4); }
[data-theme="light"] .hw-gen.open small { color: #ede6ff; }
[data-theme="light"] .hw-rule { background: var(--hw-surface-2); }
[data-theme="light"] .hw-empty .material-icons-outlined { color: #cfc6ee; }

/* Badges and alerts */
[data-theme="light"] .hw-badge.success { background: rgba(19, 134, 77, .1); color: #0f6e3f; border-color: rgba(19, 134, 77, .28); }
[data-theme="light"] .hw-badge.warning { background: rgba(169, 100, 0, .1); color: #8a5200; border-color: rgba(169, 100, 0, .28); }
[data-theme="light"] .hw-badge.danger { background: rgba(204, 53, 53, .09); color: #b02c2c; border-color: rgba(204, 53, 53, .28); }
[data-theme="light"] .hw-badge.info { background: rgba(27, 118, 182, .09); color: #175f93; border-color: rgba(27, 118, 182, .26); }
[data-theme="light"] .hw-badge.mint { background: rgba(109, 57, 228, .1); color: #5126c4; border-color: rgba(109, 57, 228, .28); }
[data-theme="light"] .hw-badge.gold { background: rgba(212, 150, 28, .12); color: #7f5806; border-color: rgba(212, 150, 28, .35); }
[data-theme="light"] .hw-badge.muted { background: rgba(40, 24, 90, .05); color: var(--hw-muted); }
[data-theme="light"] .hw-alert.success { background: #effaf4; } [data-theme="light"] .hw-alert.warning { background: #fff8ec; }
[data-theme="light"] .hw-alert.danger { background: #fff3f3; } [data-theme="light"] .hw-alert.info { background: #eff7fd; }

/* Forms and buttons */
[data-theme="light"] .form-label, [data-theme="light"] .form-check-label { color: #2b2740; }
[data-theme="light"] .form-control, [data-theme="light"] .form-select { background-color: #ffffff; color: var(--hw-text); border-color: var(--hw-border); }
[data-theme="light"] .form-control::placeholder { color: #a29cb8; }
[data-theme="light"] .form-control:focus, [data-theme="light"] .form-select:focus { background-color: #fff; color: var(--hw-text); box-shadow: 0 0 0 3px rgba(109, 57, 228, .15); }
[data-theme="light"] .form-control:disabled, [data-theme="light"] .form-control[readonly] { background-color: #f6f4fc; color: #2b2740; }
[data-theme="light"] .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236d39e4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
[data-theme="light"] .form-select option { background: #fff; color: var(--hw-text); }
[data-theme="light"] .form-control[type=file]::file-selector-button { background: var(--hw-raised); color: var(--hw-teal); }
[data-theme="light"] .form-check-input { background-color: #fff; }
[data-theme="light"] input[type=date]::-webkit-calendar-picker-indicator { filter: none; }
[data-theme="light"] .btn-primary { background: linear-gradient(135deg, #7a45f0, #4b2a99); color: #fff; box-shadow: 0 8px 20px rgba(91, 47, 208, .22); }
[data-theme="light"] .btn-primary:hover, [data-theme="light"] .btn-primary:focus, [data-theme="light"] .btn-primary:active { background: linear-gradient(135deg, #6a35e0, #3f2287) !important; color: #fff !important; }
[data-theme="light"] .btn-gold { background: linear-gradient(135deg, #f7cf63, #e0a526); color: #2a1d00; }
[data-theme="light"] .btn-ghost, [data-theme="light"] .btn-light, [data-theme="light"] .btn-outline-secondary { background: #fff; border-color: var(--hw-border); color: var(--hw-teal); }
[data-theme="light"] .btn-ghost:hover, [data-theme="light"] .btn-light:hover, [data-theme="light"] .btn-outline-secondary:hover { background: #f1ecff; color: var(--hw-text); }
[data-theme="light"] .btn-danger { background: #fff4f4; border-color: rgba(204, 53, 53, .45); color: #b02c2c; }
[data-theme="light"] .btn-danger:hover { background: #cc3535; border-color: #cc3535; color: #fff; }
[data-theme="light"] .btn-success { background: #eefaf3; border-color: rgba(19, 134, 77, .45); color: #0f6e3f; }
[data-theme="light"] .btn-success:hover { background: #13864d; border-color: #13864d; color: #fff; }
[data-theme="light"] .btn-close { filter: none; }

/* Tables, dropdowns, tabs */
[data-theme="light"] .hw-table thead th { background: #f3f0ff !important; color: var(--hw-teal) !important; }
[data-theme="light"] .hw-table tbody tr:hover td { background: rgba(109, 57, 228, .04); }
[data-theme="light"] .hw-table tfoot th { background: #fdf7ea; color: #7f5806; }
[data-theme="light"] div.dt-container .dt-search input, [data-theme="light"] div.dt-container .dt-length select { background: #fff; color: var(--hw-text); }
[data-theme="light"] div.dt-container .dt-paging .page-item.active .page-link { color: #fff; background: var(--hw-teal); border-color: var(--hw-teal); }
[data-theme="light"] div.dt-container .dt-buttons .btn { background: #fff; color: var(--hw-teal); }
[data-theme="light"] .dropdown-menu { background: #fff; }
[data-theme="light"] .dropdown-item:hover, [data-theme="light"] .dropdown-item:focus { background: #f1ecff; color: var(--hw-text); }
[data-theme="light"] .hw-tabs a { background: #fff; }
[data-theme="light"] .hw-tabs a.active { background: linear-gradient(135deg, #7a45f0, #4b2a99); color: #fff; }

/* Auth pages */
[data-theme="light"] .hw-auth-card { background: #fff; border-color: var(--hw-border); box-shadow: 0 30px 70px rgba(40, 24, 90, .14); }
[data-theme="light"] .hw-auth-side { background: radial-gradient(420px 260px at 100% 0%, rgba(242, 181, 46, .25), transparent 70%), linear-gradient(160deg, #ede8ff, #f8f6ff 60%, #ffffff); }
[data-theme="light"] .hw-auth-side p { color: var(--hw-muted); }
[data-theme="light"] .hw-auth-list li { color: #2b2740; }
[data-theme="light"] .hw-auth-form h1 { color: var(--hw-text); }

/* Theme toggle: shows the icon of the theme you would switch to */
.hw-theme-toggle .hw-ic-light { display: none; }
[data-theme="dark"] .hw-theme-toggle .hw-ic-light { display: inline; }
[data-theme="dark"] .hw-theme-toggle .hw-ic-dark { display: none; }
.hw-auth-theme { position: fixed; top: 16px; right: 16px; z-index: 10; }

/* =====================================================================
   Broker-style layout (white panels, purple accents, gradient actions)
   ===================================================================== */
:root { --hw-grad: linear-gradient(110deg, #7a45f0 0%, #6d39e4 45%, #4b2a99 100%); --hw-brand-grad: linear-gradient(29deg, #1a239a 19%, #6d39e4 55%, #a557d1 100%); }
body { letter-spacing: -.005em; }

/* Stat tiles: icon tile on the left, value above the label */
.hw-stat { display: grid; grid-template-columns: 56px 1fr; grid-template-areas: "icon value" "icon label" "icon hint"; column-gap: 14px; align-items: center; padding: 18px; }
.hw-stat-top { display: contents; }
.hw-stat-icon { grid-area: icon; width: 56px; height: 56px; border-radius: 14px; align-self: center; }
.hw-stat-icon .material-icons-outlined { font-size: 28px; }
.hw-stat-value { grid-area: value; margin: 0; font-size: 22px; font-weight: 600; line-height: 1.2; }
.hw-stat-label { grid-area: label; font-size: 13.5px; font-weight: 500; }
.hw-stat-hint { grid-area: hint; margin-top: 2px; }
.hw-stat::after { display: none; }
.tone-mint { --tone: #6d39e4; } .tone-aqua { --tone: #0ea5c6; } .tone-gold { --tone: #e0901c; }
.tone-green { --tone: #16a34a; } .tone-red { --tone: #e2486b; } .tone-violet { --tone: #8b5cf6; } .tone-amber { --tone: #d97706; }

/* Breadcrumb under the top bar */
.hw-breadcrumb { display: flex; align-items: center; gap: 8px; margin: -6px 0 20px; font-size: 14px; color: var(--hw-muted); }
.hw-breadcrumb a { display: inline-flex; color: var(--hw-mint); }
.hw-breadcrumb .material-icons-outlined { font-size: 20px; }
.hw-breadcrumb .sep { font-size: 18px; color: var(--hw-faint); }
.hw-breadcrumb b { color: var(--hw-text); font-weight: 500; }

/* Buttons: purple gradient, softer corners */
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--hw-grad) !important; border: 0; color: #fff !important; box-shadow: 0 8px 20px rgba(109, 57, 228, .25); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: linear-gradient(110deg, #6a35e0, #5126c4 50%, #3f2287) !important; color: #fff !important; box-shadow: 0 10px 24px rgba(109, 57, 228, .35); }
.hw-tabs a.active { background: var(--hw-grad); color: #fff; border-color: transparent; }
.hw-gen.open { background: var(--hw-grad); color: #fff; }
.hw-gen.open small { color: #e9e0ff; }
.hw-bar span { background: var(--hw-grad); }

/* ---------- Light theme specifics ---------- */
[data-theme="light"] body { background: #f7f7fb; }
[data-theme="light"] .hw-sidebar { background: #fff; border-right: 1px solid #ecebf3; }
[data-theme="light"] .hw-brand { border-bottom-color: #ecebf3; padding: 16px 18px; }
[data-theme="light"] .hw-brand b { color: #151515; }
[data-theme="light"] .hw-brand small { color: #6d39e4; }
[data-theme="light"] .hw-nav { padding: 12px 14px 18px; }
[data-theme="light"] .hw-nav-label { color: #a09bb5; }
[data-theme="light"] .hw-nav a, [data-theme="light"] .hw-nav-group { font-size: 15.5px; font-weight: 500; color: #151515; padding: 11px 12px; border-radius: 12px; }
[data-theme="light"] .hw-nav a .material-icons-outlined, [data-theme="light"] .hw-nav-group > .material-icons-outlined:first-child { color: #151515; font-size: 23px; }
[data-theme="light"] .hw-nav a:hover, [data-theme="light"] .hw-nav-group:hover { background: #f4f1fe; color: #6d39e4; }
[data-theme="light"] .hw-nav a:hover .material-icons-outlined { color: #6d39e4; }
[data-theme="light"] .hw-nav a.active { background: linear-gradient(90deg, rgba(109, 57, 228, .12), rgba(165, 87, 209, .04)); color: #6d39e4; box-shadow: inset 3px 0 0 #6d39e4; }
[data-theme="light"] .hw-nav a.active .material-icons-outlined { color: #6d39e4; }
[data-theme="light"] .hw-sub { border-left: 0; padding-left: 14px; }
[data-theme="light"] .hw-sub a::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #8d88a3; flex: 0 0 auto; }
[data-theme="light"] .hw-sub a.active::before { border-color: #6d39e4; background: #6d39e4; box-shadow: 0 0 0 3px rgba(109, 57, 228, .18); }
[data-theme="light"] .hw-count, [data-theme="light"] .hw-dot { background: var(--hw-grad); color: #fff; }
[data-theme="light"] .hw-sidebar-foot { border-top-color: #ecebf3; }
[data-theme="light"] .hw-topbar { background: #fff; border-bottom: 1px solid #ecebf3; padding: 16px 28px; }
[data-theme="light"] .hw-page-title { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #151515; text-transform: uppercase; font-size: 22px; font-weight: 700; letter-spacing: .01em; }
[data-theme="light"] .hw-crumbs { display: none; }
[data-theme="light"] .hw-icon-btn { background: #fff; border-color: #ecebf3; color: #151515; }
[data-theme="light"] .hw-icon-btn:hover { color: #6d39e4; border-color: #cbc2f1; }
[data-theme="light"] .hw-user-chip { background: #f4f1fe; border-color: transparent; }
[data-theme="light"] .hw-avatar { background: var(--hw-brand-grad); color: #fff; }
[data-theme="light"] .hw-card { background: #fff; border: 1px solid #ecebf3; border-radius: 14px; box-shadow: 0 2px 10px rgba(40, 24, 90, .04); }
[data-theme="light"] .hw-card::before { display: none; }
[data-theme="light"] .hw-card-head { border-bottom-color: #f0eef6; }
[data-theme="light"] .hw-card-head h2 { color: #151515; font-size: 17px; }
[data-theme="light"] .hw-card-icon { background: #f1ecff; color: #6d39e4; border: 0; }
[data-theme="light"] .hw-stat { background: #fff; border: 1px solid #ecebf3; border-radius: 14px; box-shadow: 0 2px 10px rgba(40, 24, 90, .04); }
[data-theme="light"] a.hw-stat:hover { border-color: #cbc2f1; box-shadow: 0 8px 22px rgba(109, 57, 228, .1); }
[data-theme="light"] .hw-stat-value { color: #151515; }
[data-theme="light"] .hw-stat-label { color: #5f5a73; }
[data-theme="light"] .hw-stat-icon { background: color-mix(in srgb, var(--tone) 13%, #fff); }
[data-theme="light"] .hw-hero { background: var(--hw-brand-grad); border: 0; color: #fff; box-shadow: 0 16px 36px rgba(76, 40, 170, .25); }
[data-theme="light"] .hw-hero h2 { color: #fff; }
[data-theme="light"] .hw-hero h2 em { color: #ffd978; }
[data-theme="light"] .hw-hero p, [data-theme="light"] .hw-hero .form-label { color: rgba(255, 255, 255, .88); }
[data-theme="light"] .hw-hero a:not(.btn) { color: #fff; text-decoration: underline; }
[data-theme="light"] .hw-hero .hw-badge { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); }
[data-theme="light"] .hw-hero .form-control { background: rgba(255, 255, 255, .95); border-color: transparent; }
[data-theme="light"] .hw-hero .btn-primary { background: #fff !important; color: #4b2a99 !important; }
[data-theme="light"] .form-control, [data-theme="light"] .form-select { border-color: #e1dcef; }
[data-theme="light"] .form-control:focus, [data-theme="light"] .form-select:focus { border-color: #6d39e4; box-shadow: 0 0 0 3px rgba(109, 57, 228, .14); }
[data-theme="light"] .btn-ghost, [data-theme="light"] .btn-light, [data-theme="light"] .btn-outline-secondary { color: #6d39e4; border-color: #d9d1f5; }
[data-theme="light"] .btn-ghost:hover, [data-theme="light"] .btn-light:hover { background: #f4f1fe; color: #4b2a99; border-color: #b9a8ef; }
[data-theme="light"] .btn-gold { background: linear-gradient(110deg, #f7cf63, #e0a526); }
[data-theme="light"] .hw-table thead th { background: #f4f1fe !important; color: #4b2a99 !important; }
[data-theme="light"] .hw-tabs a { border-color: #e6e1f5; color: #5f5a73; }
[data-theme="light"] .hw-tabs a.active { background: var(--hw-grad); color: #fff; }
[data-theme="light"] .hw-gen { background: #f8f7fd; border-color: #ecebf3; }
[data-theme="light"] .hw-gen.open { background: var(--hw-grad); color: #fff; }

/* ---------- Login / register: centred card ---------- */
.hw-auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.hw-auth-box { width: 100%; max-width: 560px; padding: 44px 48px 36px; border-radius: 18px; background: #191538; border: 1px solid var(--hw-border-soft); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.hw-auth-box.wide { max-width: 680px; }
.hw-auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 30px; }
.hw-auth-brand img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 16px rgba(76, 40, 170, .25); }
.hw-auth-brand span { display: flex; flex-direction: column; line-height: 1.05; }
.hw-auth-brand b { font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: var(--hw-text); }
.hw-auth-brand b i { font-style: normal; font-weight: 500; color: var(--hw-mint); }
.hw-auth-brand small { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--hw-text); }
.hw-auth-box h1 { font-size: 22px; font-weight: 700; text-align: center; margin: 0 0 4px; color: var(--hw-text); }
.hw-auth-box .sub { text-align: center; color: var(--hw-muted); margin-bottom: 24px; }
.hw-auth-box .form-label { font-weight: 600; font-size: 15px; color: var(--hw-text); }
.hw-iconed { position: relative; }
.hw-iconed > .material-icons-outlined { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--hw-mint); pointer-events: none; z-index: 2; }
.hw-iconed > .form-control, .hw-iconed > .form-select, .hw-iconed > .hw-pw .form-control { padding-left: 46px; }
.hw-iconed .hw-pw > .material-icons-outlined { display: none; }
.hw-auth-box .form-control, .hw-auth-box .form-select { min-height: 50px; font-size: 15px; border-radius: 10px; }
.hw-auth-box .btn-primary { width: 100%; min-height: 54px; font-size: 18px; font-weight: 700; border-radius: 10px; }
.hw-forgot { display: block; text-align: right; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--hw-mint); }
.hw-auth-foot { margin-top: 20px; font-size: 15px; color: var(--hw-text); text-align: center; }
.hw-auth-foot a { color: var(--hw-mint); text-decoration: underline; }
[data-theme="light"] .hw-auth { background: #fff; }
[data-theme="light"] .hw-auth-box { background: #f4f4f6; border: 0; box-shadow: 0 18px 44px rgba(20, 16, 44, .14); }
[data-theme="light"] .hw-auth-box .form-control, [data-theme="light"] .hw-auth-box .form-select { background-color: #fff; border-color: #e0dde8; }
[data-theme="light"] .hw-auth-box .form-control:focus { border-color: #6d39e4; }
[data-theme="light"] .hw-auth-brand b, [data-theme="light"] .hw-auth-brand small { color: #151515; }
[data-theme="light"] .hw-auth-brand b i { color: #6d39e4; }
@media (max-width: 575px) {
  .hw-auth-box { padding: 30px 20px 26px; }
  .hw-auth-brand b { font-size: 21px; }
  .hw-auth-brand img { width: 52px; height: 52px; }
  .hw-stat { grid-template-columns: 46px 1fr; padding: 14px; column-gap: 10px; }
  .hw-stat-icon { width: 46px; height: 46px; }
  .hw-stat-value { font-size: 18px; }
}

/* Invest page: "follow a trader" / "monthly return" choice cards */
.hw-plan-opt { position: relative; display: block; cursor: pointer; }
.hw-plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.hw-plan-opt > span { display: grid; grid-template-columns: 44px 1fr; grid-template-areas: "icon title" "icon text"; column-gap: 12px; height: 100%; padding: 16px;
  border-radius: 14px; border: 2px solid var(--hw-border); background: var(--hw-surface); transition: border-color .2s, box-shadow .2s, background .2s; }
.hw-plan-opt .material-icons-outlined { grid-area: icon; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-size: 24px;
  color: var(--hw-mint); background: rgba(109, 57, 228, .1); }
.hw-plan-opt b { grid-area: title; font-size: 15.5px; }
.hw-plan-opt small { grid-area: text; font-size: 12.5px; color: var(--hw-muted); line-height: 1.45; }
.hw-plan-opt:hover > span { border-color: #b9a8ef; }
.hw-plan-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(109, 57, 228, .25); }
.hw-plan-opt input:checked + span, .hw-plan-opt.selected > span { border-color: #6d39e4; background: linear-gradient(135deg, rgba(122, 69, 240, .09), rgba(165, 87, 209, .04)); box-shadow: 0 8px 22px rgba(109, 57, 228, .14); }
.hw-plan-opt input:checked + span .material-icons-outlined { color: #fff; background: var(--hw-grad); }
.hw-plan-opt.disabled { cursor: not-allowed; opacity: .55; }
