/* ============================================================
   Fortress Fiduciary (NGF) — Global Stylesheet v2
   Gold professional theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ── CSS Variables ── */
:root {
  --gold:        #c9a84c;
  --gold-dark:   #a07830;
  --gold-light:  #e4c87a;
  --bg-dark:     #1a1a1e;
  --bg-card:     #242428;
  --bg-sidebar:  #1f1f23;
  --text-muted:  #8a8a92;
  --text-light:  #f2f2f5;
  --border:      #3a3a42;
  --green:       #22c55e;
  --red:         #ef4444;
  --yellow:      #eab308;
  --completed-bg: rgba(201,168,76,0.1);
  --sidebar-w:   230px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   14px;
  --radius-xl:   18px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Sora', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: #4a4a52; border-radius: 4px; }
#sidebar::-webkit-scrollbar-thumb:hover { background: #6a6a72; }

@media (max-width: 991.98px) {
  #sidebar { transform: translateX(-100%); box-shadow: 4px 0 24px rgba(0,0,0,0.5); }
  #sidebar.open { transform: translateX(0); }
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 199;
}
.sidebar-overlay.show { display: block; }

.sidebar-logo-img {
  display: block;
  max-height: 36px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.sidebar-logo .logo-box {
  width: auto;
  height: 36px;         
  display: flex;
  align-items: center;
}

.logo-icon {
  width: 36px; height: 36px;
  background: var(--gold); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: #fff;
  flex-shrink: 0; letter-spacing: 0.5px;
}
.logo-text { font-size: 13px; font-weight: 700; line-height: 1.2; }
.logo-text span { color: var(--gold); }

.sidebar-close {
  display: none; background: none; border: none;
  color: #888; cursor: pointer; padding: 4px;
}
@media (max-width: 991.98px) { .sidebar-close { display: flex; } }

.sidebar-nav { padding: 10px 0; flex: 1; }

.nav-item-custom {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  font-size: 13px; font-weight: 400;
  color: #aaa; cursor: pointer;
  transition: all 0.15s; text-decoration: none;
  white-space: nowrap;
}
.nav-item-custom:hover { color: var(--text-light); background: rgba(255,255,255,0.03); }
.nav-item-custom.active {
  color: var(--gold);
  background: rgba(201,168,76,0.08);
  font-weight: 600;
  border-right: 3px solid var(--gold);
}
.nav-item-custom svg { flex-shrink: 0; width: 16px; height: 16px; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky; bottom: 0;
  background: var(--bg-sidebar);
}
.sign-out-btn {
  display: flex; align-items: center; gap: 10px;
  color: #888; font-size: 13px; cursor: pointer;
  background: none; border: none; padding: 0;
  transition: color 0.15s;
}
.sign-out-btn:hover { color: var(--text-light); }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
#main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(160deg, #1a1a1e 0%, #242428 40%, #1f1f23 100%);
}
@media (max-width: 991.98px) { #main { margin-left: 0; } }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  display: flex; align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  position: sticky; top: 0;
  background: rgba(26,26,30,0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.topbar-left { margin-right: auto; display: flex; align-items: center; gap: 10px; }
.topbar-page-title { font-size: 15px; font-weight: 700; color: var(--text-light); }

.hamburger {
  display: none; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  cursor: pointer; color: #aaa;
}
@media (max-width: 991.98px) { .hamburger { display: flex; } }

.time-text {
  font-size: 13px; color: #aaa;
  font-family: 'Space Mono', monospace;
}

.topbar-icon-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #aaa; transition: all 0.15s;
}
.topbar-icon-btn:hover { color: var(--text-light); border-color: #555; }

/* ── Notification Bell ── */
.notif-wrap { position: relative; }
.notif-dot {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px;
  background: var(--gold); border-radius: 50%;
  border: 2px solid var(--bg-dark);
}
.notif-dropdown {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 500;
  overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-dropdown::before {
  content: '';
  position: absolute; top: -6px; right: 12px;
  width: 10px; height: 10px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.notif-header-title { font-size: 13px; font-weight: 700; }
.notif-badge {
  background: var(--gold); color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 2px 7px;
}
.notif-mark-all {
  font-size: 11px; color: var(--gold); cursor: pointer;
  background: none; border: none; padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list { max-height: 280px; overflow-y: auto; }
.notif-list::-webkit-scrollbar { width: 3px; }
.notif-list::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s; cursor: pointer;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(201,168,76,0.05); }

.notif-icon-wrap {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-icon-wrap.credit  { background: rgba(34,197,94,0.15);  color: var(--green); }
.notif-icon-wrap.debit   { background: rgba(239,68,68,0.15);  color: var(--red); }
.notif-icon-wrap.info    { background: rgba(201,168,76,0.15); color: var(--gold); }
.notif-icon-wrap.warning { background: rgba(234,179,8,0.15);  color: var(--yellow); }

.notif-text { flex: 1; min-width: 0; }
.notif-title { font-size: 12px; font-weight: 600; }
.notif-desc  { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.notif-time  { font-size: 10px; color: #666; margin-top: 4px; }
.notif-unread-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0; margin-top: 5px;
}
.notif-footer {
  padding: 10px 16px; text-align: center;
  border-top: 1px solid var(--border);
}
.notif-footer a { font-size: 12px; color: var(--gold); text-decoration: none; }
.notif-footer a:hover { text-decoration: underline; }

@media (max-width: 400px) {
  .notif-dropdown { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; }
}

/* ── Avatar & Dropdown ── */
.avatar-wrap { position: relative; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar:hover { border-color: var(--gold); }

.avatar-dropdown {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 500;
  overflow: hidden;
}
.avatar-dropdown.open { display: block; }
.avatar-dropdown::before {
  content: '';
  position: absolute; top: -6px; right: 12px;
  width: 10px; height: 10px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.avatar-dd-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.avatar-dd-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.avatar-dd-name  { font-size: 13px; font-weight: 600; color: var(--text-light); }
.avatar-dd-email { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.avatar-dd-menu  { padding: 6px 0; }

.avatar-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 12px; color: #aaa;
  cursor: pointer; transition: all 0.12s;
  text-decoration: none;
}
.avatar-dd-item:hover { color: var(--text-light); background: rgba(255,255,255,0.04); }
.avatar-dd-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.avatar-dd-divider { height: 1px; background: var(--border); margin: 4px 0; }
.avatar-dd-item.danger { color: var(--red); }
.avatar-dd-item.danger:hover { background: rgba(239,68,68,0.07); }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content-area { padding: 20px 24px 48px; }
@media (max-width: 575.98px) { .content-area { padding: 16px 16px 40px; } }

/* Django messages */
.alert-banner {
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-banner.alert-info    { background: rgba(59,130,246,0.1);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.alert-banner.alert-success { background: rgba(34,197,94,0.1);   color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.alert-banner.alert-warning { background: rgba(234,179,8,0.1);   color: #fbbf24; border: 1px solid rgba(234,179,8,0.2); }
.alert-banner.alert-danger  { background: rgba(239,68,68,0.1);   color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

/* ============================================================
   DASHBOARD — OVERVIEW
   ============================================================ */
.greeting {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700; margin-bottom: 22px; letter-spacing: -0.5px;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
  position: relative;
}
@media (max-width: 479.98px) { .summary-cards { grid-template-columns: 1fr; } }

.sum-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.sum-card-savings {
  background: linear-gradient(135deg, #242428 0%, #1f1f23 100%);
  border: 1px solid var(--border);
  z-index: 1;
}
.sum-card-transactions {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border: 1px solid rgba(201,168,76,0.3);
  z-index: 10;
  margin-top: -50px;
  box-shadow: 0 12px 32px rgba(201,168,76,0.25);
}
@media (max-width: 768px) {
  .sum-card-transactions { margin-top: 0; z-index: 1; }
}

.sum-card-label    { font-size: 13px; font-weight: 600; color: #fff; }
.sum-card-sublabel { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 3px; }
.sum-card-amount   {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700; font-family: 'Space Mono', monospace;
  color: #fff; margin-top: 12px; margin-bottom: 6px;
}

/* Eye toggle */
.card-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.eye-btn {
  background: none; border: none; padding: 2px;
  cursor: pointer; color: rgba(255,255,255,0.7);
  display: flex; align-items: center; transition: color 0.15s;
}
.eye-btn:hover { color: #fff; }
.eye-btn svg { width: 16px; height: 16px; }

.balance-hidden .sum-card-amount,
.balance-hidden .acct-routing-row {
  filter: blur(6px);
  user-select: none;
}

/* Account / routing inline row */
.acct-routing-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 560px) { .acct-routing-row { grid-template-columns: 1fr; } }

.acct-routing-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.25);
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.06);
}
.acct-routing-text {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  font-family: 'Space Mono', monospace;
  flex: 1;
}
.copy-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.copy-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.copy-btn svg { width: 13px; height: 13px; }

.copy-feedback {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(34,197,94,0.9);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.copy-feedback.show { opacity: 1; }

/* Action Buttons */
.action-btns {
  display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap;
}
.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  cursor: pointer; transition: all 0.15s; color: var(--text-light);
  font-size: 12px; font-weight: 500;
  flex: 1; min-width: 80px;
  text-decoration: none;
}
.action-btn:hover {
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.35);
  color: var(--gold);
}
.action-btn svg { width: 18px; height: 18px; }

/* Lower grid */
.lower-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1099.98px) { .lower-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
}
@media (max-width: 575.98px) { .panel { padding: 16px 14px; } }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.panel-title { font-size: 15px; font-weight: 600; }
.view-all-link {
  font-size: 12px; color: var(--gold); text-decoration: none;
  font-weight: 500; cursor: pointer; background: none; border: none; padding: 0;
}
.view-all-link:hover { text-decoration: underline; }

/* Transaction items */
.tx-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  text-decoration: none;
}
.tx-item:last-child { border-bottom: none; padding-bottom: 0; }
.tx-item:hover { opacity: 0.85; }
.tx-left { min-width: 0; flex: 1; }
.tx-title { font-size: 12px; font-weight: 700; letter-spacing: 0.3px; color: var(--text-light); }
.tx-id {
  font-size: 10px; color: var(--text-muted);
  margin-top: 3px; font-family: 'Space Mono', monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tx-date { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.tx-right { text-align: right; flex-shrink: 0; }

.tx-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--completed-bg); color: var(--gold);
  border-radius: 20px; padding: 3px 9px;
  font-size: 10px; font-weight: 600;
}
.tx-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.tx-badge.pending { background: rgba(234,179,8,0.15); color: var(--yellow); }
.tx-badge.pending::before { background: var(--yellow); }
.tx-badge.failed  { background: rgba(239,68,68,0.15);  color: var(--red); }
.tx-badge.failed::before  { background: var(--red); }

.tx-amount { font-size: 13px; font-weight: 700; font-family: 'Space Mono', monospace; margin-top: 5px; }
.tx-amount.positive { color: var(--green); }
.tx-amount.negative { color: var(--red); }
.tx-amount.neutral  { color: var(--text-muted); }

@media (max-width: 400px) {
  .tx-item { flex-direction: column; gap: 8px; }
  .tx-right { text-align: left; }
}

/* Quick actions */
.quick-actions {
  display: flex; justify-content: space-around;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  flex-wrap: wrap; gap: 10px;
}
.qa-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  cursor: pointer; color: #aaa; transition: color 0.15s;
  font-size: 11px; text-decoration: none;
}
.qa-item:hover { color: var(--gold); }
.qa-icon {
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}
.qa-item:hover .qa-icon { border-color: rgba(201,168,76,0.4); }
.qa-icon svg { width: 18px; height: 18px; }

/* Bar chart */
.chart-bars { display: flex; align-items: flex-end; gap: 14px; height: 130px; }
.bar-group  { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.bar { width: 100%; border-radius: 5px 5px 0 0; background: var(--gold); transition: opacity 0.2s; }
.bar:hover { opacity: 0.72; }
.bar-label { font-size: 10px; color: var(--text-muted); }
.bar-h-110 { height: 110px; }
.bar-h-60  { height: 60px; }
.bar-h-48  { height: 48px; }
.bar-h-90  { height: 90px; }

/* ============================================================
   TRANSACTIONS PAGE
   ============================================================ */
.tx-page-header { margin-bottom: 24px; }
.tx-page-title  { font-size: clamp(20px, 3.5vw, 28px); font-weight: 700; }
.tx-page-sub    { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.activity-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 767.98px) { .activity-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479.98px) { .activity-cards { grid-template-columns: 1fr; } }

.act-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.act-card-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.act-card-label .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-red   { background: var(--red); }
.dot-blue  { background: #3b82f6; }
.act-card-amount {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700; font-family: 'Space Mono', monospace;
  color: var(--text-light);
}
.act-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; flex-wrap: wrap; gap: 6px;
}
.act-card-meta       { font-size: 11px; color: var(--text-muted); }
.act-card-meta-right { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.act-card-meta-right svg { width: 12px; height: 12px; }

/* History panel */
.history-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.history-panel-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.history-label { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); }
.history-count { font-size: 14px; font-weight: 600; margin-top: 2px; }
.history-view-all { font-size: 12px; color: var(--gold); text-decoration: none; font-weight: 500; align-self: center; }
.history-view-all:hover { text-decoration: underline; }

.tx-search-wrap { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.tx-search {
  width: 100%; max-width: 360px;
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 14px;
  font-size: 12px; color: var(--text-light);
  font-family: 'Sora', sans-serif; outline: none;
  transition: border-color 0.15s;
}
.tx-search::placeholder { color: #555; }
.tx-search:focus { border-color: var(--gold); }

.tx-table-wrap { overflow-x: auto; }
.tx-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.tx-table thead tr { border-bottom: 1px solid var(--border); }
.tx-table th {
  padding: 12px 20px;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-align: left; white-space: nowrap;
}
.tx-table th.sortable { cursor: pointer; user-select: none; }
.tx-table th.sortable:hover { color: var(--text-light); }
.sort-icon { display: inline-flex; flex-direction: column; gap: 1px; vertical-align: middle; margin-left: 4px; }
.sort-icon span { display: block; width: 0; height: 0; }
.sort-icon .up   { border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-bottom: 4px solid #555; }
.sort-icon .down { border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 4px solid #555; }
.tx-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s; }
.tx-table tbody tr:last-child { border-bottom: none; }
.tx-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.tx-table td { padding: 14px 20px; font-size: 12px; vertical-align: middle; }
.tx-ref-id   { font-size: 12px; font-weight: 600; color: var(--text-light); font-family: 'Space Mono', monospace; }
.tx-ref-date { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.tx-type-label { font-size: 12px; color: var(--text-light); }

.tx-amount-cell {
  font-size: 13px; font-weight: 700;
  font-family: 'Space Mono', monospace;
  white-space: nowrap; display: flex; align-items: center; gap: 4px;
}
.tx-amount-cell.pos { color: var(--green); }
.tx-amount-cell.neg { color: var(--red); }
.tx-amount-cell.neu { color: var(--text-muted); }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 20px; padding: 4px 10px;
  font-size: 10px; font-weight: 700;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-pill.completed { background: var(--completed-bg); color: var(--gold); }
.status-pill.completed::before { background: var(--gold); }
.status-pill.pending   { background: rgba(234,179,8,0.15);  color: var(--yellow); }
.status-pill.pending::before   { background: var(--yellow); }
.status-pill.failed    { background: rgba(239,68,68,0.15);   color: var(--red); }
.status-pill.failed::before    { background: var(--red); }
.status-pill.reversed  { background: rgba(139,92,246,0.15);  color: #a855f7; }
.status-pill.reversed::before  { background: #a855f7; }

.view-btn {
  background: none; border: none;
  color: var(--text-muted); font-size: 12px;
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  padding: 0; transition: color 0.15s;
  font-family: 'Sora', sans-serif;
}
.view-btn:hover { color: var(--gold); }
.view-btn svg { width: 14px; height: 14px; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg-dark);
  background-image: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(201,168,76,0.06) 0%, transparent 70%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  animation: authFadeUp 0.35s ease both;
}
@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 460px) { .auth-card { padding: 28px 20px; } }

.auth-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px; font-size: 15px; font-weight: 700;
}
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.3px; }
.auth-sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 26px; line-height: 1.55; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  margin-bottom: 7px; color: #ccc;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px; color: var(--text-light);
  font-family: 'Sora', sans-serif;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.form-group input::placeholder { color: #555; }

/* ── Exclude checkboxes from full‑width form styling ── */
.form-group input[type="checkbox"] {
  width: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.input-wrap { position: relative; }
.input-wrap input { padding-right: 44px; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center; padding: 0;
  transition: color 0.15s;
}
.toggle-pw:hover { color: var(--text-light); }
.toggle-pw svg { width: 16px; height: 16px; }

.field-error {
  font-size: 11px; color: var(--red);
  margin-top: 5px; display: block;
}
.form-error-banner {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px; color: var(--red);
  margin-bottom: 16px;
}

.auth-alert {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 8px; line-height: 1.5;
}
.auth-alert.error   { background: rgba(239,68,68,0.1);  color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.auth-alert.success { background: rgba(34,197,94,0.1);  color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.auth-alert.warning { background: rgba(234,179,8,0.1);  color: #fbbf24; border: 1px solid rgba(234,179,8,0.2); }
.auth-alert.info    { background: rgba(201,168,76,0.1); color: var(--gold-light); border: 1px solid rgba(201,168,76,0.2); }

.auth-btn {
  width: 100%;
  background: var(--gold);
  border: none; border-radius: 10px;
  padding: 13px;
  font-size: 14px; font-weight: 600; color: #fff;
  cursor: pointer; margin-top: 4px;
  font-family: 'Sora', sans-serif;
  transition: background 0.15s, transform 0.1s;
}
.auth-btn:hover   { background: var(--gold-dark); }
.auth-btn:active  { transform: scale(0.98); }

.auth-footer {
  margin-top: 22px; text-align: center;
  font-size: 12px; color: var(--text-muted);
}
.auth-footer a {
  color: var(--gold); text-decoration: none; font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

.label-opt {
  font-size: 10px; font-weight: 400;
  background: rgba(255,255,255,0.07);
  border-radius: 4px; padding: 2px 7px;
  color: var(--text-muted); margin-left: 7px;
}

/* Optional tag (alias for label-opt) */
.optional-tag {
  font-size: 10px;
  font-weight: 400;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--text-muted);
  margin-left: 7px;
}

.resend-btn {
  background: none; border: none;
  color: var(--gold); font-size: 12px;
  cursor: pointer; font-family: 'Sora', sans-serif;
  padding: 0; transition: opacity 0.15s;
}
.resend-btn:hover { text-decoration: underline; }
.resend-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.otp-input {
  letter-spacing: 0.55em !important;
  text-align: center !important;
  font-size: 26px !important;
  font-family: 'Space Mono', monospace !important;
}
.pin-input {
  letter-spacing: 0.7em !important;
  text-align: center !important;
  font-size: 28px !important;
  font-family: 'Space Mono', monospace !important;
}
.masked-email {
  display: inline-block;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 12px; font-weight: 600;
  color: var(--gold-light);
  margin: 0 2px;
}
.pw-strength-bar {
  height: 3px; border-radius: 2px;
  background: var(--border); margin-top: 7px; overflow: hidden;
}
.pw-strength-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.3s, background 0.3s; width: 0%;
}
.pw-strength-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   TRANSACTION FORM SHARED STYLES
   ============================================================ */
.tx-input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px; color: var(--text-light);
  font-family: 'Sora', sans-serif;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tx-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.tx-input::placeholder { color: #555; }
textarea.tx-input { resize: vertical; }

.detail-rows { display: flex; flex-direction: column; }
.detail-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--border); gap: 16px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 12px; color: #666; font-weight: 500; flex-shrink: 0; }
.detail-value { font-size: 13px; color: var(--text-light); text-align: right; word-break: break-all; }

.info-box {
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; color: #aaa; line-height: 1.6;
}
.warn-box {
  background: rgba(234,179,8,0.06);
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
}

/* Quick action pills */
.ov-action-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 16px; font-size: 12px;
  font-weight: 500; color: #aaa; text-decoration: none;
  transition: all .15s;
}
.ov-action-pill:hover {
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.4);
  color: var(--gold);
}

/* KYC / Loan shared */
.req { color: var(--gold); }
.upload-zone {
  background: rgba(0,0,0,0.25);
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px; text-align: center;
  cursor: pointer; transition: border-color .2s;
}
.upload-zone:hover { border-color: var(--gold); }
.upload-zone.has-file { border-color: var(--green); background: rgba(34,197,94,0.04); }
.uz-icon  { font-size: 28px; margin-bottom: 8px; }
.uz-label { font-size: 13px; font-weight: 500; color: #aaa; margin-bottom: 4px; }
.uz-hint  { font-size: 11px; color: #555; }

/* ============================================================
   MISC / TERMS & PRIVACY
   ============================================================ */
.terms-line {
  text-align: center;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--text-muted);
}
.terms-line a {
  color: var(--gold);
  text-decoration: none;
}
.terms-line a:hover {
  text-decoration: underline;
}

/* ── Terms checkbox ── */
.terms-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}

.terms-checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

.terms-checkbox-label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}

.terms-checkbox-label a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.terms-checkbox-label a:hover {
  text-decoration: underline;
}