﻿/* ═══════════════════════════════════════════════════════════════
  FIBO v2 — Design System
  FiboTrading v3 · Full light/dark · App-like mobile
═══════════════════════════════════════════════════════════════ */

/* ══ DESIGN TOKENS ══════════════════════════════════════════════ */
:root {
  /* Accent — FiboTrading v3 */
  --amber:  #F5A623;
  --amber-dim:  rgba(245,166,35,.15);
  --amber-border: rgba(245,166,35,.35);
  --admin-accent: #A855F7;
  --admin-dim:  rgba(168,85,247,.15);

  /* Semantic */
  --green:  #22C55E;
  --green-dim:  rgba(34,197,94,.14);
  --red:  #EF4444;
  --red-dim:  rgba(239,68,68,.14);
  --blue:  #3B82F6;
  --blue-dim:  rgba(59,130,246,.14);
  --purple:  #A855F7;

  /* Layout */
  --sidebar-w:  252px;
  --topbar-h:  62px;
  --radius:  10px;
  --radius-lg:  14px;
  --radius-full:  9999px;
  --transition:  0.28s cubic-bezier(0.4,0,0.2,1);

  /* Fonts */
  --font-body:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ══ DARK THEME (default) ═══════════════════════════════════════ */
:root,
[data-theme="dark"] {
  --bg:  #0E0E10;
  --surface-1:  #161618;
  --surface-2:  #1C1C1F;
  --surface-3:  #242428;
  --surface-4:  #2E2E33;
  --border:  rgba(255,255,255,.07);
  --border-2:  rgba(255,255,255,.11);
  --txt:  #F0F0F2;
  --txt-muted:  #6B7280;
  --txt-dim:  #3F4046;
  --bg-input:  #131315;
  --bg-hover:  rgba(255,255,255,.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.35);
  --shadow-md:  0 4px 16px rgba(0,0,0,.40);

  /* Sidebar stays dark in both themes */
  --sb-bg:  #161618;
  --sb-border:  rgba(255,255,255,.07);
  --sb-txt:  rgba(255,255,255,.55);
  --sb-txt-dim:  rgba(255,255,255,.28);
  --sb-hover:  rgba(255,255,255,.05);
  --sb-hover-txt: rgba(255,255,255,.9);
}

/* ══ LIGHT THEME ════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:  #F1F4F8;
  --surface-1:  #FFFFFF;
  --surface-2:  #F7F9FC;
  --surface-3:  #EEF2F7;
  --surface-4:  #E4EAF2;
  --border:  rgba(0,0,0,.07);
  --border-2:  rgba(0,0,0,.12);
  --txt:  #0F1923;
  --txt-muted:  #4A6078;
  --txt-dim:  #8CA0B3;
  --bg-input:  #FFFFFF;
  --bg-hover:  rgba(0,0,0,.03);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);

  /* Sidebar stays dark */
  --sb-bg:  #1C2026;
  --sb-border:  rgba(255,255,255,.06);
  --sb-txt:  rgba(255,255,255,.55);
  --sb-txt-dim:  rgba(255,255,255,.28);
  --sb-hover:  rgba(255,255,255,.06);
  --sb-hover-txt: rgba(255,255,255,.92);
}

/* ══ RESET ══════════════════════════════════════════════════════ */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:14px; -webkit-font-smoothing:antialiased; scroll-behavior:smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--txt);
  padding-left: var(--sidebar-w);
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
  overflow-x: clip; /* clip instead of hidden: allows table-wrap scroll to work on mobile */
  min-height: 100vh;
}
body.sidebar-hidden { padding-left: 0; }
a { color: inherit; text-decoration: none; }
img { max-width:100%; }
button { font-family: inherit; cursor:pointer; }
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--surface-4); border-radius:3px; }

/* ══ SIDEBAR ════════════════════════════════════════════════════ */
.sidebar {
  position: fixed; left:0; top:0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  z-index: 2000;
  display: flex; flex-direction:column;
  transition: transform var(--transition), background var(--transition);
  overflow: hidden;
}

.sidebar-header {
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex; align-items:center; justify-content:space-between;
  border-bottom: 1px solid var(--sb-border);
  flex-shrink: 0;
}
.sidebar-logo-wrap { display:flex; align-items:center; gap:10px; text-decoration:none; }
.db-wordmark { display:flex; align-items:center; gap:10px; }
.db-logo-img { height:28px; width:auto; object-fit:contain; display:block; border-radius:6px; }
.db-wordmark-sep { width:1px; height:20px; background:var(--sb-border); }
.db-wordmark-label { font-family:var(--font-display); font-size:9px; font-weight:700; letter-spacing:3px; text-transform:uppercase; color:var(--sb-txt-dim); }
.sidebar-brand-fallback {
  width:28px; height:28px; border-radius:6px;
  background:linear-gradient(135deg,#F5A623,#E8920A);
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:.9rem; color:#000;
}
.sidebar-brand-name { font-family:var(--font-display); font-weight:800; font-size:.95rem; color:rgba(255,255,255,.9); }
.btn-close-mobile { display:none; background:none; border:1px solid var(--sb-border); border-radius:8px; color:var(--sb-txt); padding:6px 10px; font-size:.8rem; }

.sidebar-user-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--sb-border);
  display: flex; align-items:center; gap:10px;
  flex-shrink: 0;
}
.avatar {
  width:36px; height:36px; border-radius:50%;
  background:var(--amber-dim); border:1.5px solid var(--amber-border);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:.85rem; color:var(--amber); flex-shrink:0;
}
.avatar.admin-av { background:var(--admin-dim); border-color:rgba(168,85,247,.4); color:var(--admin-accent); }
.user-info strong { font-size:.82rem; display:block; color:rgba(255,255,255,.9); }
.user-info small  { font-size:.7rem; color:var(--sb-txt); }
.role-badge {
  display:inline-block; padding:1px 8px; border-radius:var(--radius-full);
  font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; margin-top:2px;
}
.role-investor { background:var(--amber-dim); color:var(--amber); }
.role-admin  { background:var(--admin-dim); color:var(--admin-accent); }
.role-staff { background:var(--blue-dim); color:var(--blue); }

.menu-nav { flex:1; padding:8px 0; overflow-y:auto; overflow-x:hidden; }
.menu-nav::-webkit-scrollbar { width:3px; }
.menu-nav::-webkit-scrollbar-thumb { background:rgba(255,255,255,.1); }

.nav-header-text {
  padding: 14px 16px 4px;
  font-size:9px; font-weight:700; letter-spacing:.10em; text-transform:uppercase;
  color:var(--sb-txt-dim);
}

.menu-item {
  display:flex; align-items:center; gap:10px;
  padding: 9px 16px; margin:1px 8px; border-radius:var(--radius);
  color:var(--sb-txt); text-decoration:none; font-size:13px; font-weight:500;
  transition: background var(--transition), color var(--transition);
  white-space:nowrap; overflow:hidden; position:relative;
}
.menu-item svg { width:17px; height:17px; flex-shrink:0; }
.menu-item:hover { background:var(--sb-hover); color:var(--sb-hover-txt); }
.menu-item.active { background:rgba(245,166,35,.15); color:#F5A623; font-weight:600; }
.menu-item.active svg { color:#F5A623; }
.menu-item.active-admin { background:rgba(168,85,247,.15); color:var(--admin-accent); font-weight:600; }
.menu-item.active-admin svg { color:var(--admin-accent); }

.nav-badge {
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  background:var(--red); color:#fff;
  font-size:.6rem; font-weight:800; border-radius:20px;
  padding:1px 5px; min-width:17px; text-align:center; line-height:1.4;
}

.sidebar-footer { padding:12px 8px; border-top:1px solid var(--sb-border); flex-shrink:0; }

/* Tema — sidebar (mobile only), estilo menu-item sutil */
.sb-theme-btn {
  display: none;
  align-items: center; gap:10px;
  width: 100%;
  padding: 9px 16px; margin: 1px 0;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--sb-txt);
  text-align: left;
  transition: background var(--transition), color var(--transition);
  border-top: 1px solid var(--sb-border);
}
.sb-theme-btn svg { width:17px; height:17px; flex-shrink:0; }
.sb-theme-btn:hover { background: var(--sb-hover); color: var(--sb-hover-txt); }
@media(max-width:768px) { .sb-theme-btn { display:flex; } .sidebar-language { display:block; } }

.btn-logout {
  display:flex; align-items:center; gap:10px;
  color:var(--sb-txt); font-size:.82rem; padding:9px 10px; border-radius:var(--radius);
  transition:background var(--transition), color var(--transition);
  background:none; border:none; width:100%;
}
.btn-logout svg { width:17px; flex-shrink:0; }
.btn-logout:hover { background:rgba(239,68,68,.12); color:#f87171; }

body.sidebar-hidden .sidebar { transform:translateX(-100%); }

/* ══ SIDEBAR OVERLAY ════════════════════════════════════════════ */
#sidebarOverlay {
  display:none; position:fixed; inset:0;
  background:rgba(0,0,0,.60); backdrop-filter:blur(3px);
  z-index:1999;
}
#sidebarOverlay.open { display:block; }

/* ══ TOPBAR ═════════════════════════════════════════════════════ */
.topbar {
  position: fixed; top:0; left:var(--sidebar-w); right:0;
  height: var(--topbar-h);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  display: flex; align-items:center; justify-content:space-between;
  padding: 0 22px; z-index:1000;
  transition: left var(--transition), background var(--transition), border-color var(--transition);
}
body.sidebar-hidden .topbar { left:0; }

.topbar-left { display:flex; align-items:center; gap:12px; }
.btn-toggle-sidebar {
  width:36px; height:36px; border-radius:var(--radius); border:1px solid var(--border-2);
  background:var(--surface-2); color:var(--txt-muted);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  transition: background var(--transition), color var(--transition);
}
.btn-toggle-sidebar svg { width:16px; display:block; }
.btn-toggle-sidebar:hover { background:var(--surface-3); color:var(--amber); border-color:var(--amber-border); }

.topbar-page-title { font-family:var(--font-display); font-size:12.5px; font-weight:600; color:var(--txt-muted); }
.topbar-page-title .sep { margin:0 5px; opacity:.35; }
.topbar-page-title .current { color:var(--txt); }

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

.user-greeting { text-align:right; line-height:1.3; }
.user-greeting .label { display:block; font-size:10px; color:var(--txt-dim); font-weight:500; }
.user-greeting .name  { display:block; font-size:12.5px; font-weight:700; color:var(--txt); font-family:var(--font-display); }

/* ══ TOPBAR BUTTONS ══════════════════════════════════════════════ */
.db-btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 14px; border-radius:99px;
  font-family:var(--font-body); font-size:12px; font-weight:600;
  cursor:pointer; border:1px solid transparent;
  transition:all 0.18s; letter-spacing:.2px; white-space:nowrap; text-decoration:none;
}
.db-btn-ghost {
  background:var(--surface-2); border-color:var(--border-2); color:var(--txt-muted);
}
.db-btn-ghost:hover { background:var(--surface-3); border-color:var(--amber-border); color:var(--amber); }

.db-btn-theme {
  width:36px; height:36px; border-radius:50%; padding:0;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  background:var(--surface-2); border:1px solid var(--border-2); color:var(--txt-muted);
  transition:all var(--transition);
}
.db-btn-theme:hover { background:var(--surface-3); color:var(--amber); transform:rotate(20deg); }

.language-switcher {
  height:36px;
  min-width:78px;
  display:inline-flex; align-items:center; gap:6px;
  padding:0 8px;
  border:1px solid var(--border-2);
  border-radius:var(--radius);
  background:var(--surface-2);
  color:var(--txt-muted);
  transition:background var(--transition), color var(--transition), border-color var(--transition);
}
.language-switcher:hover { background:var(--surface-3); color:var(--amber); border-color:var(--amber-border); }
.language-switcher svg { width:15px; height:15px; flex-shrink:0; }
.language-select {
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:inherit;
  font:600 11px/1 var(--font-body);
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}
.language-select option { color:#111827; background:#fff; }
.language-switcher--topbar { flex-shrink:0; }
.sidebar-language {
  display:none;
  padding:0 0 10px;
  margin:0 0 4px;
  border-bottom:1px solid var(--sb-border);
}
.sidebar-language-title {
  padding:0 10px 6px;
  font-size:9px; font-weight:700; letter-spacing:.10em; text-transform:uppercase;
  color:var(--sb-txt-dim);
}
.language-switcher--sidebar {
  width:100%;
  background:rgba(255,255,255,.04);
  border-color:var(--sb-border);
  color:var(--sb-txt);
}
.language-switcher--sidebar:hover { background:var(--sb-hover); color:var(--sb-hover-txt); border-color:var(--sb-border); }
@media(max-width:768px) { .sidebar-language { display:block; } }
.auth-language {
  position:fixed;
  top:18px; right:18px;
  z-index:10;
}
.language-switcher--auth {
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.15);
  color:rgba(255,255,255,.78);
  backdrop-filter:blur(14px);
}
.language-switcher--auth:hover { background:rgba(255,255,255,.14); color:#fff; border-color:var(--amber-border); }

/* ══ MAIN WRAPPER ════════════════════════════════════════════════ */
.main-wrapper {
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  transition: background var(--transition);
}
.main-content {
  padding: 24px;
  background: var(--bg);
}

/* ══ PAGE ═════════════════════════════════════════════════════ */
.page-header { margin-bottom:20px; }
.page-header h1 { font-size:1.3rem; font-weight:700; font-family:var(--font-display); color:var(--txt); }
.page-header p  { color:var(--txt-muted); font-size:.82rem; margin-top:3px; }

/* ══ CARDS ════════════════════════════════════════════════════ */
.card {
  background:var(--surface-1);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:18px;
}
.card-amber { background:var(--amber-dim); border-color:var(--amber-border); }
.card-title { font-size:.7rem; color:var(--txt-muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:5px; }
.card-value { font-size:1.45rem; font-weight:800; }

/* ══ STATS ════════════════════════════════════════════════════ */
.stats-row {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:12px; margin-bottom:22px;
}
.stat {
  background:var(--surface-1); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:16px 18px;
}
.stat-label { font-size:.68rem; color:var(--txt-muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:5px; }
.stat-value { font-size:1.3rem; font-weight:800; color:var(--txt); }
.stat-change { font-size:.7rem; margin-top:3px; }
.stat-value.amber  { color:var(--amber); }
.stat-value.green  { color:var(--green); }
.stat-value.red  { color:var(--red); }
.stat-value.purple { color:var(--purple); }

/* ══ BUTTONS ══════════════════════════════════════════════════ */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 16px; border-radius:8px; border:none;
  font-size:.82rem; font-weight:600; cursor:pointer;
  text-decoration:none; transition:all .15s; white-space:nowrap;
}
.btn svg { width:14px; height:14px; }
.btn-amber  { background:var(--amber); color:#0C0D10; }
.btn-amber:hover { background:#E8920A; }
.btn-outline { background:transparent; color:var(--txt-muted); border:1px solid var(--border-2); }
.btn-outline:hover { border-color:var(--amber); color:var(--amber); }
.btn-ghost  { background:transparent; color:var(--txt-muted); }
.btn-ghost:hover { color:var(--txt); }
.btn-green  { background:var(--green-dim); color:var(--green); border:1px solid rgba(34,197,94,.3); }
.btn-red  { background:var(--red-dim); color:var(--red); border:1px solid rgba(239,68,68,.3); }
.btn-admin  { background:var(--admin-dim); color:var(--admin-accent); border:1px solid rgba(168,85,247,.35); }
.btn-sm  { padding:5px 12px; font-size:.76rem; }
.btn-lg  { padding:11px 22px; font-size:.88rem; }
.btn-block { width:100%; justify-content:center; }
.btn-icon { width:34px; height:34px; padding:0; justify-content:center; border-radius:8px; }

/* ══ FORMS ════════════════════════════════════════════════════ */
.form-group { margin-bottom:14px; }
label { display:block; font-size:.76rem; color:var(--txt-muted); margin-bottom:4px; font-weight:500; }
.form-control {
  width:100%;
  background:var(--bg-input);
  border:1px solid var(--border-2);
  border-radius:8px;
  color:var(--txt);
  padding:9px 12px;
  font-size:.85rem;
  outline:none;
  transition:border-color .15s, background .15s;
  font-family:var(--font-body);
}
.form-control:focus { border-color:var(--amber); }
.form-control::placeholder { color:var(--txt-dim); }

[data-theme="light"] .form-control { background:#fff; border-color:rgba(0,0,0,.14); color:var(--txt); }
[data-theme="light"] .form-control:focus { background:#fff; border-color:var(--amber); }
select.form-control option { background:#1a1a1f; color:#fff; }
[data-theme="light"] select.form-control option { background:#fff; color:#111; }

.form-hint { font-size:.7rem; color:var(--txt-muted); margin-top:3px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.input-group { position:relative; }
.input-group .form-control { padding-left:38px; }
.input-icon { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--txt-muted); }
.input-icon svg { width:15px; }

/* ══ ALERTS ═══════════════════════════════════════════════════ */
.alert {
  padding:10px 14px; border-radius:8px; font-size:.82rem;
  margin-bottom:14px; display:flex; align-items:center; gap:9px;
}
.alert svg { width:15px; flex-shrink:0; }
.alert-success { background:var(--green-dim); border:1px solid rgba(34,197,94,.3); color:#86EFAC; }
.alert-error  { background:var(--red-dim); border:1px solid rgba(239,68,68,.3); color:#FCA5A5; }
.alert-warning { background:rgba(245,158,11,.12); border:1px solid rgba(245,158,11,.3); color:#FDE68A; }
.alert-info  { background:var(--blue-dim); border:1px solid rgba(59,130,246,.3); color:#93C5FD; }

[data-theme="light"] .alert-success { color:#166534; }
[data-theme="light"] .alert-error  { color:#991b1b; }
[data-theme="light"] .alert-warning { color:#92400e; }
[data-theme="light"] .alert-info  { color:#1e40af; }

/* ══ TABLES ═══════════════════════════════════════════════════ */
.table-wrap { overflow-x:auto; border-radius:var(--radius-lg); }
table { width:100%; border-collapse:collapse; font-size:.82rem; }
thead tr { border-bottom:1px solid var(--border); }
th {
  padding:9px 13px; color:var(--txt-muted); font-size:.67rem;
  text-transform:uppercase; letter-spacing:.07em; font-weight:600; white-space:nowrap;
  background:var(--surface-2);
}
td { padding:11px 13px; border-bottom:1px solid var(--border); vertical-align:middle; background:var(--surface-1); color:var(--txt); }
tbody tr:hover td { background:var(--bg-hover); }
tbody tr:last-child td { border-bottom:none; }

[data-theme="light"] th { background:var(--surface-2); color:var(--txt-muted); }
[data-theme="light"] td { background:var(--surface-1); color:var(--txt); border-bottom-color:var(--border); }
[data-theme="light"] tbody tr:hover td { background:var(--bg-hover); }
[data-theme="light"] .tx-detail-title { color:var(--txt) !important; }
[data-theme="light"] .tx-code-muted  { color:var(--txt-muted) !important; }
[data-theme="light"] .tx-detail-sub  { color:var(--txt-muted) !important; }
[data-theme="light"] .wallet-tab  { color:var(--txt-muted); }
[data-theme="light"] .wallet-tab:hover{ color:var(--txt); }
[data-theme="light"] .sub-tab  { color:var(--txt-muted); }
[data-theme="light"] .sub-tab:hover  { color:var(--txt); }

.table-card { background:var(--surface-1); border:1px solid var(--border); border-radius:var(--radius-lg); overflow-x:auto; overflow-y:visible; -webkit-overflow-scrolling:touch; }

.tx-code { color:var(--amber); font-weight:600; font-size:.8rem; }
.tx-code-muted { color:var(--txt-muted); font-size:.7rem; margin-top:1px; }
.tx-detail-title { font-weight:600; font-size:.83rem; }
.tx-detail-sub { font-size:.72rem; color:var(--txt-muted); margin-top:1px; }

/* ══ BADGES ═══════════════════════════════════════════════════ */
.badge { display:inline-block; padding:2px 9px; border-radius:var(--radius-full); font-size:.67rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.badge-active  { background:var(--green-dim); color:var(--green); }
.badge-pending  { background:rgba(245,158,11,.15); color:#FCD34D; }
.badge-finished  { background:var(--blue-dim); color:#93C5FD; }
.badge-cancelled { background:var(--red-dim); color:var(--red); }

[data-theme="light"] .badge-pending  { color:#92400e; }
[data-theme="light"] .badge-active  { color:#166534; }
[data-theme="light"] .badge-finished  { color:#1e40af; }
[data-theme="light"] .badge-cancelled { color:#991b1b; }

.status-badge { display:inline-block; padding:3px 9px; border-radius:var(--radius-full); font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.status-active  { background:rgba(34,197,94,.15); color:#4ade80; border:1px solid rgba(34,197,94,.3); }
.status-pending  { background:rgba(245,158,11,.15); color:#fbbf24; border:1px solid rgba(245,158,11,.3); }
.status-inprogress { background:rgba(59,130,246,.15); color:#93c5fd; border:1px solid rgba(59,130,246,.35); }
.status-cancelled { background:rgba(239,68,68,.15); color:#f87171; border:1px solid rgba(239,68,68,.3); }
.mv-debit  { background:rgba(239,68,68,.18); color:var(--red); border:1px solid rgba(239,68,68,.35); border-radius:6px; padding:3px 12px; font-size:.73rem; font-weight:700; display:inline-block; }
.mv-credit { background:rgba(34,197,94,.15); color:var(--green); border:1px solid rgba(34,197,94,.3); border-radius:6px; padding:3px 12px; font-size:.73rem; font-weight:700; display:inline-block; }
.val-debit  { color:var(--red); font-weight:700; }
.val-credit { color:var(--green); font-weight:700; }

/* ══ WALLET TABS ══════════════════════════════════════════════ */
.wallet-tabs { display:flex; border-bottom:1px solid var(--border); margin-bottom:18px; }
.wallet-tab {
  display:flex; align-items:center; gap:6px;
  padding:10px 16px; font-size:.82rem; color:var(--txt-muted);
  border-bottom:2px solid transparent; cursor:pointer; transition:all .15s; margin-bottom:-1px;
}
.wallet-tab svg { width:14px; }
.wallet-tab:hover { color:var(--txt); }
.wallet-tab.active { color:var(--amber); border-bottom-color:var(--amber); }

.sub-tabs { display:flex; border-bottom:1px solid var(--border); margin-bottom:18px; }
.sub-tab { display:flex; align-items:center; gap:6px; padding:9px 14px; font-size:.82rem; color:var(--txt-muted); border-bottom:2px solid transparent; cursor:pointer; transition:all .15s; margin-bottom:-1px; }
.sub-tab:hover { color:var(--txt); }
.sub-tab.active { color:var(--amber); border-bottom-color:var(--amber); }

/* ══ TX ICON ══════════════════════════════════════════════════ */
.tx-icon { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.tx-icon.credit { background:var(--green-dim); }
.tx-icon.debit  { background:var(--red-dim); }
.tx-icon svg  { width:15px; }
.currency-badge { width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:.62rem; font-weight:800; margin-left:-8px; border:1.5px solid var(--surface-1); }
.currency-BRL  { background:#22C55E; color:#000; }
.currency-USDT { background:#26A17B; color:#fff; }
.currency-BTC  { background:#F7931A; color:#fff; }
.currency-ETH  { background:#627EEA; color:#fff; }
.currency-USD  { background:#2563EB; color:#fff; }
.currency-PYG  { background:#16A34A; color:#fff; }

/* ══ PRODUCT CARDS ════════════════════════════════════════════ */
.product-card {
  background:var(--surface-1); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:16px 18px;
  display:flex; flex-direction:column; gap:9px;
  transition:all .15s; border-left:3px solid var(--amber-border);
}
.product-card:hover { border-left-color:var(--amber); background:var(--surface-2); transform:translateY(-1px); }
.product-type-tag { display:inline-block; padding:2px 8px; border-radius:var(--radius-full); font-size:.67rem; font-weight:700; text-transform:uppercase; }
.type-fibo  { background:rgba(245,166,35,.15); color:var(--amber); }
.type-lastro { background:var(--admin-dim); color:var(--admin-accent); }
.type-onil  { background:var(--blue-dim); color:#93C5FD; }

/* ══ NEWS ═════════════════════════════════════════════════════ */
.news-card {
  background:var(--surface-1); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:14px;
  display:flex; flex-direction:column; gap:6px; transition:background .15s;
}
.news-card:hover { background:var(--surface-2); }
.news-cat  { font-size:.67rem; color:var(--amber); text-transform:uppercase; letter-spacing:.06em; }
.news-title{ font-size:.87rem; font-weight:600; line-height:1.4; }
.news-sum  { font-size:.77rem; color:var(--txt-muted); line-height:1.5; }
.news-date { font-size:.7rem; color:var(--txt-dim); }

/* ══ BALANCE HERO ═════════════════════════════════════════════ */
.balance-hero {
  background:linear-gradient(135deg, #1A1600 0%, #1C1A0A 50%, #141412 100%);
  border:1px solid var(--amber-border); border-radius:var(--radius-lg);
  padding:22px 24px; margin-bottom:20px; position:relative; overflow:hidden;
}
.balance-hero::before {
  content:''; position:absolute; top:-40px; right:-40px; width:180px; height:180px;
  border-radius:50%; background:radial-gradient(circle,rgba(245,166,35,.12) 0%,transparent 70%);
  pointer-events:none;
}
[data-theme="light"] .balance-hero { background:linear-gradient(135deg,#1A1600,#2A2000); }
.balance-lbl  { font-size:.72rem; color:rgba(245,166,35,.7); text-transform:uppercase; letter-spacing:.07em; margin-bottom:5px; }
.balance-val  { font-size:2rem; font-weight:800; color:#F0F0F2; letter-spacing:-0.02em; }
.balance-sub  { font-size:.76rem; color:rgba(255,255,255,.5); margin-top:3px; }
.balance-actions { display:flex; gap:9px; margin-top:16px; flex-wrap:wrap; }

/* ══ ADMIN SPECIFIC ═══════════════════════════════════════════ */
.admin-stat-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.admin-stat-icon svg { width:19px; }
.admin-stat-icon.amber  { background:var(--amber-dim); color:var(--amber); }
.admin-stat-icon.green  { background:var(--green-dim); color:var(--green); }
.admin-stat-icon.purple { background:var(--admin-dim); color:var(--admin-accent); }
.admin-stat-icon.blue  { background:var(--blue-dim); color:var(--blue); }

/* Fund editor */
.fund-editor {
  max-width: 1180px;
}
.fund-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.fund-form-card,
.fund-doc-card {
  overflow: hidden;
  padding: 0;
}
.fund-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(245,166,35,.10), rgba(255,255,255,.02)), var(--surface-1);
}
.fund-card-head h3 {
  margin: 0;
  color: var(--txt);
  font-size: 1rem;
  font-weight: 800;
}
.fund-card-head p {
  margin: 4px 0 0;
  color: var(--txt-muted);
  font-size: .8rem;
}
.fund-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fund-form {
  padding: 22px;
}
.fund-form-section {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.fund-form-section:last-of-type {
  margin-bottom: 0;
}
.fund-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.fund-section-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: .78rem;
  font-weight: 900;
}
.fund-section-title strong {
  display: block;
  color: var(--txt);
  font-size: .92rem;
}
.fund-section-title small {
  display: block;
  margin-top: 2px;
  color: var(--txt-muted);
  font-size: .72rem;
}
.fund-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
.fund-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}
.fund-field {
  min-width: 0;
  margin-bottom: 0;
}
.fund-col-12 { grid-column: span 12; }
.fund-col-8 { grid-column: span 8; }
.fund-col-6 { grid-column: span 6; }
.fund-col-4 { grid-column: span 4; }
.fund-col-3 { grid-column: span 3; }
.fund-field .form-control {
  min-height: 40px;
}
.fund-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
}
.fund-doc-body {
  padding: 22px;
}
.fund-doc-table-wrap {
  overflow-x: auto;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.fund-doc-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}
.fund-doc-table th,
.fund-doc-table td {
  padding: 12px 14px;
}
.fund-doc-table th {
  color: var(--txt-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(255,255,255,.035);
}
.fund-doc-table td {
  border-top: 1px solid var(--border);
}
.fund-doc-label {
  font-weight: 700;
}
.fund-doc-order {
  color: var(--txt-muted);
}
.fund-doc-link {
  color: var(--amber);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.fund-doc-upload {
  padding: 18px;
  border: 1px dashed var(--border-2);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
}
.fund-doc-upload-title {
  margin: 0 0 14px;
  color: var(--txt);
  font-size: .88rem;
  font-weight: 800;
}
.fund-doc-upload-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(110px, .7fr) auto;
  gap: 12px;
  align-items: end;
}
.fund-doc-file-field {
  margin-top: 14px;
}
.fund-empty-docs {
  padding: 28px;
  text-align: center;
  color: var(--txt-muted);
}
.fund-table-empty {
  padding: 40px;
  color: var(--txt-muted);
  text-align: center;
}
.fund-index-cell {
  color: var(--txt-dim);
}
.fund-name-cell {
  font-weight: 600;
}
.fund-muted-cell {
  color: var(--txt-muted);
  font-size: .82rem;
}
.fund-compact-cell {
  font-size: .82rem;
}
.fund-positive {
  color: var(--green);
}
.fund-negative {
  color: var(--red);
}
.fund-row-actions {
  display: flex;
  gap: 8px;
}
.fund-category-card {
  max-width: 600px;
}
.fund-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.fund-category-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.btn-danger-soft {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}

/* FIDIC operational dashboard */
.fidic-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.fidic-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.fidic-sync-meta {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-1);
  color: var(--txt-muted);
  font-size: .74rem;
  font-weight: 700;
}
.fidic-subnav {
  padding: 0;
  overflow: hidden;
}
.fidic-subnav-list {
  display: flex;
  align-items: center;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.fidic-subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-bottom: 2px solid transparent;
  color: var(--txt-muted);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.fidic-subnav-link:hover {
  color: var(--txt);
  background: var(--bg-hover);
}
.fidic-subnav-link.is-active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
.fidic-stats-row {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}
.fidic-stat-card {
  min-height: 96px;
}
.stat-value.blue {
  color: var(--blue);
}
.fidic-chart-grid,
.fidic-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.fidic-table-grid {
  align-items: start;
}
.fidic-chart-card,
.fidic-form-card {
  overflow: hidden;
}
.fidic-form-card {
  padding: 0;
}
.fidic-form-card > .fidic-section-head {
  margin-bottom: 0;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(245,166,35,.10), rgba(255,255,255,.02)), var(--surface-1);
}
.fidic-form-card-narrow {
  max-width: 920px;
}
.fidic-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.fidic-section-head h3 {
  margin: 0;
  color: var(--txt);
  font-size: .98rem;
  font-weight: 800;
}
.fidic-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--amber-dim);
  color: var(--amber);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fidic-chart-wrap {
  position: relative;
  height: 290px;
  min-height: 290px;
}
.fidic-chart-wide {
  height: 360px;
  min-height: 360px;
}
.fidic-empty,
.fidic-table-empty {
  color: var(--txt-muted);
  text-align: center;
}
.fidic-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed var(--border-2);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  font-weight: 700;
}
.fidic-table-empty {
  padding: 36px;
}
.fidic-table-note {
  color: var(--txt-muted);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.fidic-name-cell {
  min-width: 170px;
  color: var(--txt);
  font-weight: 700;
}
.fidic-value-positive {
  color: var(--green);
  font-weight: 700;
}
.fidic-value-negative {
  color: var(--red);
  font-weight: 700;
}
.fidic-mono {
  font-variant-numeric: tabular-nums;
}
.fidic-form {
  padding: 22px;
}
.fidic-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 14px;
}
.fidic-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  color: var(--txt);
  font-size: .84rem;
  font-weight: 700;
}
.fidic-check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
  flex-shrink: 0;
}
.fidic-actions,
.fidic-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fidic-actions {
  justify-content: flex-end;
  padding-top: 18px;
}
.fidic-row-actions {
  justify-content: flex-start;
}

/* ══ SEARCH ═══════════════════════════════════════════════════ */
.search-box { position:relative; }
.search-box input { padding-left:36px; }
.search-box svg { position:absolute; left:11px; top:50%; transform:translateY(-50%); width:14px; color:var(--txt-muted); }

/* ══ MISC ══════════════════════════════════════════════════════ */
.breadcrumb { display:flex; align-items:center; gap:5px; font-size:.75rem; color:var(--txt-muted); margin-bottom:16px; flex-wrap:wrap; }
.breadcrumb a:hover { color:var(--amber); }
.breadcrumb-sep { color:var(--txt-dim); }
.section-hd { display:flex; align-items:center; justify-content:space-between; margin-bottom:13px; }
.section-title { font-size:.88rem; font-weight:600; }
.divider { height:1px; background:var(--border); margin:16px 0; }
.data-row { display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid var(--border); }
.data-row:last-child { border-bottom:none; }
.data-label { font-size:.7rem; color:var(--txt-muted); }
.data-val  { font-size:.84rem; font-weight:500; margin-top:2px; }
.progress-bar  { height:4px; background:var(--border); border-radius:3px; overflow:hidden; }
.progress-fill { height:100%; background:linear-gradient(90deg,var(--amber),#E8920A); border-radius:3px; transition:width .5s; }
.sim-table { width:100%; border-collapse:collapse; font-size:.8rem; }
.sim-table th { color:var(--txt-muted); font-size:.68rem; text-transform:uppercase; padding:7px 12px; border-bottom:1px solid var(--border); background:transparent; }
.sim-table td { padding:8px 12px; border-bottom:1px solid var(--border); }

/* ══ GRID ══════════════════════════════════════════════════════ */
.grid  { display:grid; gap:16px; }
.grid-2  { grid-template-columns:repeat(2,1fr); }
.grid-3  { grid-template-columns:repeat(3,1fr); }
.grid-4  { grid-template-columns:repeat(4,1fr); }
.grid-auto  { grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); }

/* ══ UTILS ══════════════════════════════════════════════════════ */
.flex { display:flex; } .flex-col { flex-direction:column; }
.items-center { align-items:center; } .justify-between { justify-content:space-between; }
.justify-center { justify-content:center; }
.gap-4{gap:4px;} .gap-8{gap:8px;} .gap-12{gap:12px;} .gap-16{gap:16px;} .gap-20{gap:20px;}
.mb-4{margin-bottom:4px;} .mb-8{margin-bottom:8px;} .mb-12{margin-bottom:12px;}
.mb-16{margin-bottom:16px;} .mb-20{margin-bottom:20px;} .mb-24{margin-bottom:24px;}
.mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-20{margin-top:20px;} .mt-24{margin-top:24px;}
.text-center{text-align:center;} .text-right{text-align:right;}
.text-amber{color:var(--amber);} .text-green{color:var(--green);} .text-red{color:var(--red);}
.text-muted{color:var(--txt-muted);} .text-purple{color:var(--admin-accent);}
.fw-bold{font-weight:700;} .fw-800{font-weight:800;}
.w-full{width:100%;} .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* ══ AUTH ══════════════════════════════════════════════════════ */
body.auth-body { display:block; padding-left:0; }
.auth-wrap {
  min-height:100vh; display:flex;
  background: radial-gradient(ellipse at 20% 20%, rgba(245,166,35,.05) 0%, transparent 55%), var(--bg);
}
.auth-visual {
  flex:1; background:var(--surface-1); border-right:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:48px; min-height:100vh; gap:0;
}
.auth-visual-logo-wrap {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  margin-bottom:40px;
}
.auth-visual-logo-wrap img {
  width:clamp(140px, 22vw, 220px); height:auto; object-fit:contain;
}
[data-theme="light"] .auth-visual-logo-wrap img { filter: brightness(0) saturate(100%) invert(20%); }
.auth-visual-title { font-size:2rem; font-weight:800; color:var(--txt); text-align:center; line-height:1.2; margin-bottom:12px; }
.auth-visual-title span { color:var(--amber); }
.auth-visual-sub { font-size:.87rem; color:var(--txt-muted); text-align:center; max-width:300px; line-height:1.6; }
.auth-visual-features { margin-top:36px; display:flex; flex-direction:column; gap:12px; width:100%; max-width:300px; }
.auth-feature { display:flex; align-items:center; gap:12px; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.auth-feature-icon { width:32px; height:32px; border-radius:8px; background:var(--amber-dim); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.auth-feature-icon svg { width:15px; color:var(--amber); }
.auth-feature-text strong { font-size:.82rem; display:block; }
.auth-feature-text small  { font-size:.72rem; color:var(--txt-muted); }
.auth-form-wrap { width:420px; max-width:100%; padding:48px 40px; display:flex; flex-direction:column; justify-content:center; }
.auth-logo { display:flex; align-items:center; gap:10px; margin-bottom:32px; }
.auth-logo > img { height:30px; width:auto; object-fit:contain; }
.auth-title  { font-size:1.3rem; font-weight:700; margin-bottom:4px; }
.auth-subtitle { font-size:.82rem; color:var(--txt-muted); margin-bottom:22px; }
.auth-footer  { text-align:center; font-size:.8rem; color:var(--txt-muted); margin-top:18px; }
.auth-footer a { color:var(--amber); }
.auth-divider  { height:1px; background:var(--border); margin:18px 0; position:relative; }
.auth-divider span { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); background:var(--bg); padding:0 10px; font-size:.72rem; color:var(--txt-dim); }
.steps { display:flex; gap:5px; margin-bottom:22px; }
.step  { height:4px; flex:1; border-radius:2px; background:var(--border); transition:background .3s; }
.step.done  { background:var(--amber); opacity:.5; }
.step.active { background:var(--amber); }

/* ══ MOBILE BOTTOM NAV ══════════════════════════════════════════ */
.mobile-bottom-nav { display:none; }

/* ══ RESPONSIVE ═════════════════════════════════════════════════ */
@media(max-width:1100px) {
  .grid-4 { grid-template-columns:repeat(2,1fr); }
  .grid-3 { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:800px) {
  .auth-visual { display:none; }
  .auth-form-wrap { width:100%; padding:72px 22px 32px; min-height:100vh; }
  .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; }
  .form-row { grid-template-columns:1fr; }
  .stats-row { grid-template-columns:repeat(2,1fr); }
}

/* ══ MOBILE — App-like experience ═══════════════════════════════ */
@media(max-width:768px) {
  body { padding-left:0 !important; }

  /* Topbar only on desktop */
  .topbar { display:none !important; }
  .sidebar { transform:translateX(-100%); }
  .sidebar.open { transform:translateX(0); }
  .btn-close-mobile { display:flex; }
  .main-wrapper {
  margin-top:0 !important;
  }
  .main-content {
  padding: 14px 14px calc(72px + env(safe-area-inset-bottom)) 14px;
  min-height:100vh;
  min-width:0;
  max-width:100%;
  overflow-x:clip;
  }
  .mobile-bottom-nav {
  display:flex;
  position:fixed; bottom:0; left:0; right:0;
  background:var(--surface-1);
  border-top:1px solid var(--border-2);
  z-index:1500;
  padding-bottom:env(safe-area-inset-bottom);
  justify-content:space-around; align-items:center;
  height:62px;
  box-shadow:0 -4px 20px rgba(0,0,0,.18);
  }
  [data-theme="light"] .mobile-bottom-nav { box-shadow:0 -4px 12px rgba(0,0,0,.07); }
  .mb-nav-item {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  flex:1; height:100%;
  color:var(--txt-muted); text-decoration:none;
  background:transparent; border:none; font-family:var(--font-body);
  gap:3px; transition:color .2s; cursor:pointer; padding:0 2px;
  -webkit-tap-highlight-color:transparent;
  }
  .mb-nav-item svg { width:20px; height:20px; transition:transform .2s, color .2s; }
  .mb-nav-item span { font-size:9px; font-weight:600; white-space:nowrap; }
  .mb-nav-item:active svg { transform:translateY(-2px) scale(.9); }
  .mb-nav-item.active-state { color:var(--amber); }
  .form-row { grid-template-columns:1fr; gap:10px; }
  .stats-row { grid-template-columns:1fr 1fr; gap:10px; }
  .balance-val { font-size:1.55rem; }
  .wallet-tabs { overflow-x:auto; }
  .card { padding:14px; }
  .stat { padding:13px 14px; }
}
@media(max-width:1024px) {
  .fund-metric-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
  .fund-col-8,
  .fund-col-6,
  .fund-col-4,
  .fund-col-3 {
    grid-column: span 6;
  }
}
@media(max-width:720px) {
  .fund-page-header,
  .fund-card-head {
    flex-direction: column;
    align-items: stretch;
  }
  .fund-form,
  .fund-doc-body {
    padding: 16px;
  }
  .fund-form-section {
    padding: 16px;
  }
  .fund-form-grid,
  .fund-metric-grid,
  .fund-doc-upload-grid {
    grid-template-columns: 1fr;
  }
  .fund-col-12,
  .fund-col-8,
  .fund-col-6,
  .fund-col-4,
  .fund-col-3 {
    grid-column: span 1;
  }
  .fund-actions {
    flex-direction: column-reverse;
  }
  .fund-actions .btn,
  .fund-page-header .btn,
  .fund-doc-upload .btn {
    width: 100%;
    justify-content: center;
  }
  .fund-category-grid {
    grid-template-columns: 1fr;
  }
  .fund-category-actions {
    flex-direction: column;
  }
  .fund-category-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
@media(max-width:480px) {
  .stats-row { grid-template-columns:1fr; }
  .auth-form-wrap { padding:24px 16px; }
  .main-content { padding:12px 12px calc(70px + env(safe-area-inset-bottom)) 12px; }
}
.table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  overflow-y: visible;
}
@media(max-width:768px) {
  .table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  position: relative;
  }
  .table-wrap table {
  min-width: 560px;
  }
  td, th {
  white-space: nowrap;
  }
  .grid[style*="grid-template-columns:1fr 340px"],
  .grid[style*="grid-template-columns: 1fr 340px"],
  .trade-launch-grid {
  grid-template-columns: 1fr !important;
  }
  #previewContent > div[style*="grid-template-columns:1fr 1fr 1fr"] {
  grid-template-columns: 1fr !important;
  }
  .trade-date-row {
  grid-template-columns: 1fr !important;
  }
  .stats-row {
  grid-template-columns: 1fr 1fr;
  }
  td > div[style*="display:flex"][style*="gap"] form {
  flex: 1;
  }
  .card {
  word-break: break-word;
  overflow-wrap: break-word;
  }
  .investor-detail-grid {
  grid-template-columns: 1fr !important;
  }
}
@media(max-width:480px) {
  .table-wrap table {
  min-width: 380px;
  font-size: .75rem;
  }
  th { padding: 7px 9px; }
  td { padding: 9px 9px; }
  .btn-sm { font-size: .72rem; padding: 5px 9px; }
  .stats-row { grid-template-columns: 1fr; }
  .trade-date-row { grid-template-columns: 1fr !important; }
  .hide-xs { display: none !important; }
}
.db-logo-img {
  height: 36px;
  width: auto;
  color: #F5A623;
  flex-shrink: 0; 
}
.db-wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}
.db-wordmark-sep {
  width: 1px;
  height: 28px;
  background: var(--sb-border);
  flex-shrink: 0;
}
.db-wordmark-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--sb-txt-dim);
  white-space: nowrap; 
}
@media(max-width:768px) {
  .table-wrap {
  background:
  linear-gradient(to right, var(--surface-1) 20px, transparent 20px),
  linear-gradient(to left,  var(--surface-1) 20px, transparent 20px) right,
  radial-gradient(farthest-side at 0  50%, rgba(0,0,0,.15), transparent) left,
  radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.15), transparent) right;
  background-attachment: local, local, scroll, scroll;
  background-repeat: no-repeat;
  background-size: 20px 100%, 20px 100%, 10px 100%, 10px 100%;
  }
  .table-wrap::-webkit-scrollbar {
  height: 4px;
  }
  .table-wrap::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 2px;
  }
  .table-wrap::-webkit-scrollbar-thumb {
  background: var(--amber);
  border-radius: 2px;
  }
.auth-logo {
  text-align: center;
}

}

@media(max-width:1100px) {
  .fidic-stats-row {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
  .fidic-chart-grid,
  .fidic-editor-grid,
  .fidic-table-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width:768px) {
  .fidic-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .fidic-header-actions {
    justify-content: flex-start;
  }
  .fidic-header-actions form,
  .fidic-header-actions .btn,
  .fidic-page-header > .btn {
    width: 100%;
  }
  .fidic-header-actions .btn,
  .fidic-page-header > .btn {
    justify-content: center;
  }
  .fidic-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fidic-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fidic-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .fidic-chart-wrap,
  .fidic-chart-wide {
    height: 300px;
    min-height: 300px;
  }
  .fidic-row-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media(max-width:480px) {
  .fidic-stats-row,
  .fidic-form-grid {
    grid-template-columns: 1fr;
  }
  .fidic-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

/* FIDIC operational dashboard v2 */
.fidic-ops-root,
.fidic-ops-root * {
  box-sizing: border-box;
}
.fidic-ops-root {
  --fo-accent: var(--amber);
  --fo-accent-strong: #E8920A;
  --fo-accent-dim: var(--amber-dim);
  --fo-accent-border: var(--amber-border);
  --fo-green: var(--green);
  --fo-green-dim: var(--green-dim);
  --fo-red: var(--red);
  --fo-red-dim: var(--red-dim);
  --fo-amber: #F5A623;
  --fo-amber-dim: rgba(245,166,35,.14);
  --fo-purple: var(--purple);
  --fo-purple-dim: rgba(168,85,247,.14);
  --fo-blue: var(--blue);
  --fo-blue-dim: var(--blue-dim);
  --fo-bg: var(--bg);
  --fo-surface-1: var(--surface-1);
  --fo-surface-2: var(--surface-2);
  --fo-surface-3: var(--surface-3);
  --fo-surface-4: var(--surface-4);
  --fo-border: var(--border);
  --fo-border-2: var(--border-2);
  --fo-text-1: var(--txt);
  --fo-text-2: var(--txt-muted);
  --fo-text-3: var(--txt-dim);
  --fo-font-display: var(--font-display);
  --fo-font-body: var(--font-body);
  --fo-radius-sm: 6px;
  --fo-radius-md: 10px;
  --fo-radius-lg: 14px;
  --fo-radius-xl: 18px;
  --fo-shadow: var(--shadow-md);
  position: relative;
  min-height: calc(100vh - var(--topbar-h));
  margin: -24px;
  width: calc(100% + 48px);
  overflow-x: hidden;
  background: var(--fo-bg);
  color: var(--fo-text-1);
  font-family: var(--fo-font-body);
}
.fidic-ops-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 28% at 82% 0%, rgba(245,166,35,.08), transparent 58%),
    radial-gradient(ellipse 36% 24% at 5% 72%, rgba(34,197,94,.05), transparent 55%);
}
[data-theme="light"] .fidic-ops-glow {
  opacity: .5;
}
.fidic-ops-shell {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 28px 96px;
}
.fo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 26px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--fo-border);
}
.fo-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.fo-logo {
  display: block;
  width: auto;
  height: 28px;
  object-fit: contain;
}
[data-theme="light"] .fo-logo {
  filter: invert(1) brightness(.32);
}
.fo-wordmark-sep {
  width: 1px;
  height: 20px;
  background: var(--fo-border-2);
}
.fo-wordmark-label {
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.fo-title {
  margin: 0;
  color: var(--fo-text-1);
  font-family: var(--fo-font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}
.fo-subtitle {
  margin: 6px 0 0;
  color: var(--fo-text-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.fo-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.fo-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--fo-border-2);
  border-radius: 999px;
  background: var(--fo-surface-1);
  color: var(--fo-text-2);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.fo-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fo-green);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}
.fo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--fo-font-body);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s, border-color .18s, background .18s, color .18s, box-shadow .18s;
  white-space: nowrap;
}
.fo-btn svg {
  width: 14px;
  height: 14px;
}
.fo-btn-primary {
  background: var(--fo-accent);
  color: #0F1923;
}
.fo-btn-primary:hover {
  background: var(--fo-accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245,166,35,.18);
}
.fo-btn-ghost {
  background: var(--fo-surface-2);
  border-color: var(--fo-border-2);
  color: var(--fo-text-2);
}
.fo-btn-ghost:hover {
  color: var(--fo-accent);
  border-color: var(--fo-accent-border);
}
.fo-alert {
  margin-bottom: 18px;
  padding: 13px 16px;
  border-radius: var(--fo-radius-md);
  border: 1px solid var(--fo-border-2);
  background: var(--fo-surface-1);
  color: var(--fo-text-1);
  font-size: 12.5px;
  font-weight: 700;
}
.fo-alert-success {
  border-color: rgba(34,197,94,.28);
  color: var(--fo-green);
  background: var(--fo-green-dim);
}
.fo-alert-error {
  border-color: rgba(239,68,68,.28);
  color: var(--fo-red);
  background: var(--fo-red-dim);
}
.visao-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 14px 20px;
  border: 1px solid var(--fo-border);
  border-radius: var(--fo-radius-lg);
  background: var(--fo-surface-1);
  transition: border-color .2s;
}
.visao-filter-bar:focus-within {
  border-color: var(--fo-accent-border);
}
.vfb-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.vfb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fo-accent);
}
.vfb-controls {
  display: flex;
  justify-content: flex-end;
  flex: 1;
  gap: 10px;
  flex-wrap: wrap;
}
.global-filter-group {
  min-width: 210px;
  max-width: 280px;
  flex: 1;
}
.global-filter-label {
  display: block;
  margin-bottom: 6px;
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.vfb-controls select,
.filters-wrapper select {
  width: 100%;
}
.vfb-controls .select2-container {
  width: 100% !important;
}
.fidic-ops-root .select2-container--default .select2-selection--multiple {
  min-height: 36px;
  border: 1px solid var(--fo-border-2);
  border-radius: var(--fo-radius-md);
  background: var(--fo-surface-2);
}
.fidic-ops-root .select2-container--default .select2-selection--multiple .select2-selection__choice {
  border: 1px solid var(--fo-accent-border);
  background: var(--fo-accent-dim);
  color: var(--fo-text-1);
  font-size: 11px;
  font-weight: 700;
}
.fidic-ops-root .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--fo-accent);
}
.fidic-ops-root .select2-container--default .select2-search--inline .select2-search__field {
  color: var(--fo-text-1);
  font-family: var(--fo-font-body);
  font-size: 12px;
}
.fidic-ops-root .select2-dropdown {
  z-index: 99999;
  border-color: var(--fo-border-2);
  background: var(--fo-surface-1);
  color: var(--fo-text-1);
}
.fidic-ops-root .select2-container--open {
  z-index: 99999 !important;
}
.fidic-ops-root .select2-results__option {
  font-size: 12px;
}
.fidic-ops-root .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--fo-accent);
  color: #0F1923;
}
.mobile-filter-backdrop,
.mobile-filter-fab {
  display: none;
}
.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
}
.section-divider-label {
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-divider-line {
  height: 1px;
  flex: 1;
  background: var(--fo-border);
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.kpi-card {
  position: relative;
  min-height: 104px;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--fo-border);
  border-radius: var(--fo-radius-lg);
  background: var(--fo-surface-1);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--fo-accent-border);
  box-shadow: var(--fo-shadow);
}
.kpi-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fo-accent), transparent);
}
.kpi-green:before { background: linear-gradient(90deg, transparent, var(--fo-green), transparent); }
.kpi-amber:before { background: linear-gradient(90deg, transparent, var(--fo-amber), transparent); }
.kpi-purple:before { background: linear-gradient(90deg, transparent, var(--fo-purple), transparent); }
.kpi-red:before { background: linear-gradient(90deg, transparent, var(--fo-red), transparent); }
.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.kpi-label {
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .7px;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.kpi-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--fo-radius-sm);
  background: var(--fo-accent-dim);
  color: var(--fo-accent);
  font-family: var(--fo-font-display);
  font-size: 12px;
  font-weight: 900;
}
.kpi-icon-wrap svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kpi-green .kpi-icon-wrap { background: var(--fo-green-dim); color: var(--fo-green); }
.kpi-amber .kpi-icon-wrap { background: var(--fo-amber-dim); color: var(--fo-amber); }
.kpi-purple .kpi-icon-wrap { background: var(--fo-purple-dim); color: var(--fo-purple); }
.kpi-red .kpi-icon-wrap { background: var(--fo-red-dim); color: var(--fo-red); }
.kpi-value {
  margin-bottom: 5px;
  color: var(--fo-text-1);
  font-family: var(--fo-font-display);
  font-size: clamp(15px, 1.35vw, 21px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}
.kpi-sub {
  color: var(--fo-text-3);
  font-size: 10.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.fo-color-accent { color: var(--fo-accent) !important; }
.fo-color-amber { color: var(--fo-amber) !important; }
.fo-color-green { color: var(--fo-green) !important; }
.fo-color-red { color: var(--fo-red) !important; }
.fo-color-purple { color: var(--fo-purple) !important; }
.status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--fo-border);
  border-radius: var(--fo-radius-lg);
  background: var(--fo-surface-1);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.status-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--fo-shadow);
}
.status-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--fo-radius-md);
  background: var(--fo-green-dim);
  color: var(--fo-green);
  font-family: var(--fo-font-display);
  font-size: 13px;
  font-weight: 900;
}
.status-icon-wrap svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.status-bad .status-icon-wrap { background: var(--fo-red-dim); color: var(--fo-red); }
.status-warn .status-icon-wrap { background: var(--fo-amber-dim); color: var(--fo-amber); }
.status-accent .status-icon-wrap { background: var(--fo-accent-dim); color: var(--fo-accent); }
.status-purple .status-icon-wrap { background: var(--fo-purple-dim); color: var(--fo-purple); }
.status-info {
  flex: 1;
  min-width: 0;
}
.status-title {
  margin-bottom: 4px;
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.status-val {
  color: var(--fo-text-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-desc {
  margin-top: 3px;
  color: var(--fo-text-3);
  font-size: 11px;
  font-weight: 700;
}
.charts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.chart-card,
.safra-card,
.top5-card,
.geo-wrapper {
  min-width: 0;
  border: 1px solid var(--fo-border);
  border-radius: var(--fo-radius-lg);
  background: var(--fo-surface-1);
  overflow: hidden;
}
.chart-card {
  padding: 20px;
}
.chart-card-header,
.top5-card-header,
.geo-header,
.safra-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.chart-card-header {
  margin-bottom: 14px;
}
.chart-card-eyebrow,
.top5-eyebrow,
.geo-eyebrow,
.safra-eyebrow {
  color: var(--fo-accent);
  font-family: var(--fo-font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.top5-eyebrow.amber { color: var(--fo-amber); }
.top5-eyebrow.green { color: var(--fo-green); }
.chart-card-title,
.top5-card-title,
.geo-title,
.safra-title {
  margin-top: 4px;
  color: var(--fo-text-1);
  font-family: var(--fo-font-display);
  font-size: 15px;
  font-weight: 800;
}
.chart-card-sub,
.top5-card-sub,
.geo-sub,
.safra-sub {
  margin-top: 3px;
  color: var(--fo-text-3);
  font-size: 11.5px;
  line-height: 1.45;
}
.chart-wrap {
  position: relative;
  height: 290px;
}
.chart-wrap-donut {
  max-width: 280px;
  margin: 0 auto;
}
.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.donut-pct {
  color: var(--fo-text-1);
  font-family: var(--fo-font-display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.donut-lbl {
  margin-top: 4px;
  color: var(--fo-text-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.chart-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--fo-border-2);
  border-radius: 999px;
  color: var(--fo-text-2);
  background: var(--fo-surface-2);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.safra-card {
  margin-bottom: 20px;
}
.safra-header {
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--fo-border);
  background: linear-gradient(135deg, var(--fo-surface-2), var(--fo-surface-1));
  flex-wrap: wrap;
}
.safra-header-left {
  flex: 1 1 360px;
  min-width: 0;
}
.custom-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.custom-radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--fo-border-2);
  border-radius: 999px;
  background: var(--fo-surface-1);
  color: var(--fo-text-2);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.custom-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--fo-border-2);
}
.custom-radio input:checked + .radio-mark {
  border-color: var(--fo-accent);
  background: var(--fo-accent);
  box-shadow: 0 0 0 4px var(--fo-accent-dim);
}
.custom-radio:has(input:checked) {
  border-color: var(--fo-accent-border);
  color: var(--fo-accent);
}
.filters-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex: 1 1 420px;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-group {
  min-width: 165px;
  max-width: 220px;
  flex: 1;
}
.filter-label {
  display: block;
  margin-bottom: 6px;
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.safra-chart-section {
  padding: 18px 22px 10px;
}
.chart-wrap-tall {
  position: relative;
  height: 360px;
}
.pivot-wrap {
  overflow-x: auto;
  padding: 0 0 8px;
}
.pivot-tbl {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}
.pivot-tbl th,
.pivot-tbl td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--fo-border);
  color: var(--fo-text-2);
  font-size: 11.5px;
  text-align: right;
  white-space: nowrap;
}
.pivot-tbl th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--fo-surface-2);
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.pivot-tbl th:first-child,
.pivot-tbl td:first-child {
  text-align: left;
}
.pivot-label-col {
  min-width: 280px;
}
.fo-th-danger,
.pivot-pending-cell {
  color: var(--fo-red) !important;
  font-weight: 800;
}
.fo-th-total,
.pivot-total-cell {
  border-left: 2px solid var(--fo-accent-border) !important;
  color: var(--fo-accent) !important;
  font-weight: 900;
}
.row-group {
  cursor: pointer;
}
.row-group td {
  color: var(--fo-text-1);
  font-weight: 800;
}
.row-group:hover td {
  background: var(--fo-surface-2);
}
.safra-details-row {
  display: none;
}
.safra-details-row.expanded {
  display: table-row;
}
.safra-details-row td:first-child {
  padding-left: 34px;
}
.toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 1px solid var(--fo-border-2);
  border-radius: 5px;
  color: var(--fo-accent);
  font-weight: 900;
}
.pivot-toggle-condos {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 12px;
  padding: 0 9px;
  border: 1px solid var(--fo-border-2);
  border-radius: 6px;
  background: var(--fo-surface-3);
  color: var(--fo-text-2);
  font-family: var(--fo-font-display);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.pivot-toggle-condos:hover {
  color: var(--fo-accent);
  border-color: var(--fo-accent-border);
}
.pivot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 16px;
  color: var(--fo-text-3);
  font-size: 11px;
  border-top: 1px solid var(--fo-border);
}
.comp-up { color: var(--fo-green); font-weight: 900; }
.comp-down { color: var(--fo-red); font-weight: 900; }
.comp-down-spaced {
  margin-left: 8px;
}
.comparison-icons {
  display: inline-flex;
  gap: 2px;
  margin-left: 6px;
}
.top5-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.top5-card-header,
.geo-header {
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--fo-border);
}
.top5-body {
  display: grid;
  grid-template-columns: 1fr 122px;
  align-items: stretch;
}
.top5-list {
  min-width: 0;
  padding: 8px 0 10px;
  border-right: 1px solid var(--fo-border);
}
.top5-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 18px;
}
.top5-item:hover {
  background: var(--fo-surface-2);
}
.rank-num {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  color: var(--fo-text-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
}
.rank-num.gold { color: var(--fo-amber); }
.rank-num.silver { color: #9BAAB8; }
.rank-num.bronze { color: #CD7F32; }
.top5-info {
  flex: 1;
  min-width: 0;
}
.top5-name {
  margin-bottom: 5px;
  color: var(--fo-text-1);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top5-bar-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fo-surface-3);
}
.top5-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width .8s ease;
}
.top5-bar-fill.amber { background: linear-gradient(90deg, var(--fo-amber), rgba(245,166,35,.28)); }
.top5-bar-fill.green { background: linear-gradient(90deg, var(--fo-green), rgba(34,197,94,.28)); }
.top5-val-col {
  flex-shrink: 0;
  text-align: right;
}
.top5-val {
  color: var(--fo-text-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.top5-pct {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 900;
}
.top5-pct.amber { color: var(--fo-amber); }
.top5-pct.green { color: var(--fo-green); }
.top5-donut-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
}
.top5-donut-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}
.top5-donut-wrap canvas {
  width: 84px !important;
  height: 84px !important;
}
.top5-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fo-text-1);
  font-family: var(--fo-font-display);
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
}
.top5-donut-label {
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .8px;
  text-align: center;
  text-transform: uppercase;
}
.geo-body {
  display: grid;
  grid-template-columns: 1.25fr minmax(360px, .85fr);
}
.leaflet-map-wrap {
  position: relative;
  min-height: 430px;
  border-right: 1px solid var(--fo-border);
  background: var(--fo-surface-2);
}
#brazilMapLeaflet {
  width: 100%;
  height: 430px;
  background: transparent !important;
}
.leaflet-container {
  background: transparent !important;
  font-family: var(--fo-font-body) !important;
}
.leaflet-control-zoom a {
  background: var(--fo-surface-2) !important;
  color: var(--fo-text-1) !important;
  border-color: var(--fo-border-2) !important;
  font-weight: 900 !important;
}
.leaflet-control-zoom a:hover {
  background: var(--fo-surface-3) !important;
  color: var(--fo-accent) !important;
}
.leaflet-tooltip.geo-tip {
  max-width: 230px;
  padding: 13px 16px !important;
  border: 1px solid var(--fo-border-2) !important;
  border-radius: 10px !important;
  background: var(--fo-surface-1) !important;
  box-shadow: var(--fo-shadow) !important;
  color: var(--fo-text-1) !important;
  font-family: var(--fo-font-body) !important;
  white-space: normal;
}
.leaflet-tooltip.geo-tip:before {
  display: none !important;
}
.geo-tip-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fo-border);
  color: var(--fo-text-1);
  font-family: var(--fo-font-display);
  font-size: 13px;
  font-weight: 900;
}
.geo-tip-title .tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fo-accent);
}
.geo-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  font-size: 11.5px;
}
.geo-tip-hint {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--fo-border);
}
.geo-tip-label {
  color: var(--fo-text-3);
  font-weight: 700;
}
.geo-tip-hint-label {
  font-size: 10px;
  font-style: italic;
}
.geo-tip-val {
  color: var(--fo-text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}
.geo-tip-val.accent { color: var(--fo-accent); }
.geo-tip-val.green { color: var(--fo-green); }
.map-scroll-overlay {
  position: absolute;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(3px);
  pointer-events: none;
}
.map-scroll-overlay.show {
  display: flex;
}
.map-scroll-msg {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid var(--fo-border-2);
  border-radius: var(--fo-radius-md);
  background: var(--fo-surface-1);
  color: var(--fo-text-2);
  font-family: var(--fo-font-display);
  font-size: 12px;
  font-weight: 900;
}
.map-scroll-msg kbd {
  padding: 2px 7px;
  border: 1px solid var(--fo-border-2);
  border-radius: 4px;
  background: var(--fo-surface-3);
  color: var(--fo-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}
.map-back-btn {
  position: absolute;
  top: 14px;
  left: 54px;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--fo-border-2);
  border-radius: var(--fo-radius-sm);
  background: var(--fo-surface-1);
  cursor: pointer;
  color: var(--fo-text-2);
  font-family: var(--fo-font-display);
  font-size: 11px;
  font-weight: 900;
  box-shadow: var(--fo-shadow);
}
.map-back-btn.visible {
  display: flex;
}
.map-back-btn:hover {
  color: var(--fo-accent);
  border-color: var(--fo-accent-border);
}
.map-back-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}
.map-legend {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 9997;
  padding: 10px 13px;
  border: 1px solid var(--fo-border-2);
  border-radius: var(--fo-radius-md);
  background: var(--fo-surface-1);
  box-shadow: var(--fo-shadow);
  pointer-events: none;
}
.map-legend-title {
  margin-bottom: 7px;
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.map-legend-scale {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fo-text-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
}
.map-legend-bar {
  width: 72px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2B333C, #E8920A 60%, #22C55E);
}
[data-theme="light"] .map-legend-bar {
  background: linear-gradient(90deg, #C8DBF0, #F5A623 60%, #22C55E);
}
.geo-table-side {
  overflow-x: auto;
  max-height: 430px;
}
.geo-tbl {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}
.geo-tbl th,
.geo-tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--fo-border);
  color: var(--fo-text-2);
  font-size: 11.5px;
  text-align: right;
  white-space: nowrap;
}
.geo-tbl th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--fo-surface-2);
  color: var(--fo-text-3);
  font-family: var(--fo-font-display);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.geo-tbl th:first-child,
.geo-tbl td:first-child {
  text-align: left;
}
.geo-tbl td:first-child {
  color: var(--fo-text-1);
  font-weight: 800;
}
.td-pct { color: var(--fo-accent) !important; font-weight: 900; }
.td-pago { color: var(--fo-green) !important; }
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 24px;
  border: 1px dashed var(--fo-border-2);
  border-radius: var(--fo-radius-md);
  color: var(--fo-text-3);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}
.fidic-empty-row {
  text-align: center !important;
  padding: 32px !important;
  color: var(--fo-text-3) !important;
  font-weight: 800;
}
@media (max-width: 1180px) {
  .charts-row {
    grid-template-columns: 1fr 1fr;
  }
  .charts-row .chart-card:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .fo-header {
    flex-direction: column;
  }
  .fo-header-actions {
    justify-content: flex-start;
  }
  .charts-row,
  .top5-grid,
  .geo-body {
    grid-template-columns: 1fr;
  }
  .charts-row .chart-card:last-child {
    grid-column: auto;
  }
  .top5-body {
    grid-template-columns: 1fr;
  }
  .top5-list,
  .leaflet-map-wrap {
    border-right: none;
    border-bottom: 1px solid var(--fo-border);
  }
  #brazilMapLeaflet,
  .leaflet-map-wrap {
    min-height: 330px;
    height: 330px;
  }
  .top5-donut-panel {
    flex-direction: row;
  }
}
@media (max-width: 768px) {
  .fidic-ops-root {
    margin: -14px -14px calc(-72px - env(safe-area-inset-bottom));
    width: calc(100% + 28px);
    min-height: 100vh;
  }
  .fidic-ops-shell {
    padding: 18px 14px calc(128px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 640px) {
  .fo-title {
    font-size: 20px;
  }
  .fo-subtitle {
    font-size: 11.5px;
  }
  .visao-filter-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3200;
    display: block;
    max-height: 76vh;
    overflow-y: auto;
    margin: 0;
    padding: 28px 18px calc(96px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    border-color: var(--fo-border-2);
    transform: translateY(105%);
    transition: transform .25s ease;
    box-shadow: 0 -12px 36px rgba(0,0,0,.34);
  }
  .visao-filter-bar.open {
    transform: translateY(0);
  }
  .visao-filter-bar:before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: var(--fo-border-2);
    transform: translateX(-50%);
  }
  .vfb-title {
    margin-bottom: 14px;
  }
  .vfb-controls {
    display: grid;
    grid-template-columns: 1fr;
  }
  .global-filter-group,
  .vfb-controls .select2-container {
    min-width: 100%;
    max-width: 100%;
  }
  .mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3190;
    display: none;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
  }
  .mobile-filter-backdrop.open {
    display: block;
  }
  .mobile-filter-fab {
    position: fixed;
    left: 50%;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 1600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--fo-accent-border);
    border-radius: 999px;
    background: var(--fo-surface-1);
    color: var(--fo-accent);
    box-shadow: 0 8px 26px rgba(0,0,0,.28);
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 900;
  }
  .fidic-ops-root.filters-open {
    z-index: 3100;
  }
  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .status-strip {
    grid-template-columns: 1fr;
  }
  .chart-card,
  .safra-header,
  .top5-card-header,
  .geo-header {
    padding: 16px;
  }
  .chart-wrap {
    height: 235px;
  }
  .chart-wrap-tall {
    height: 280px;
  }
  .filters-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .filter-group {
    min-width: 100%;
    max-width: 100%;
  }
  .pivot-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 430px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }
}
/* End FIDIC operational dashboard v2 */


/* Migrated view styles from PHP views */
html[data-theme="dark"] { background: #0E0E10; }
html[data-theme="light"] { background: #F1F4F8; }

/* Migrated from app/views/account/deposit.php */
#depositToast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%) translateY(20px);background:#1e1e2e;border:1px solid rgba(239,68,68,.5);color:#f87171;padding:11px 20px;border-radius:10px;font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:8px;box-shadow:0 8px 32px rgba(0,0,0,.4);opacity:0;transition:opacity .25s,transform .25s;pointer-events:none;z-index:9999;white-space:nowrap;}
#depositToast.show{opacity:1;transform:translateX(-50%) translateY(0);}

/* Migrated from app/views/account/withdraw.php */
#withdrawToast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%) translateY(20px);background:#1e1e2e;border:1px solid rgba(239,68,68,.5);color:#f87171;padding:11px 20px;border-radius:10px;font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:8px;box-shadow:0 8px 32px rgba(0,0,0,.4);opacity:0;transition:opacity .25s,transform .25s;pointer-events:none;z-index:9999;white-space:nowrap;}
#withdrawToast.show{opacity:1;transform:translateX(-50%) translateY(0);}

/* Migrated from app/views/admin/roles/form.php */
.perm-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.perm-block:hover { border-color: var(--amber); }
.perm-block--on {
  border-color: var(--amber);
  background: rgba(245,158,11,.08);
}
.perm-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 900; color: transparent;
  transition: all .15s; flex-shrink: 0;
}
.perm-block--on .perm-check {
  background: var(--amber);
  border-color: var(--amber);
  color: #000;
}

/* Migrated from app/views/admin/site_faq_form.php */
.grid-2 { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }

/* Chamados — detalhe admin (responsivo) */
.ticket-detail-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,300px);
  gap:16px;
  align-items:start;
  width:100%;
  max-width:100%;
  min-width:0;
}
.ticket-detail-main,
.ticket-detail-side {
  min-width:0;
  max-width:100%;
}
.ticket-chat-list {
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
}
.ticket-chat-row {
  display:flex;
  gap:10px;
  align-items:flex-start;
  min-width:0;
  max-width:100%;
}
.ticket-chat-row--team {
  flex-direction:row-reverse;
}
.ticket-chat-avatar {
  width:36px;
  height:36px;
  border-radius:50%;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:.8rem;
  border:1px solid var(--border);
}
.ticket-chat-bubble {
  flex:0 1 auto;
  min-width:0;
  max-width:min(85%, calc(100% - 46px));
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px 14px;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.ticket-chat-bubble--team {
  background:rgba(245,158,11,.1);
}
.ticket-chat-bubble--user {
  background:rgba(255,255,255,.04);
}
@media (max-width:900px) {
  .ticket-detail-layout {
    grid-template-columns:1fr;
    gap:12px;
  }
  .ticket-detail-side {
    order:-1;
  }
}
@media (max-width:480px) {
  .ticket-chat-bubble {
    max-width:calc(100% - 46px);
  }
  .ticket-detail-header {
    flex-direction:column;
    align-items:flex-start !important;
  }
}

/* Migrated from app/views/admin/site_settings.php */
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.mb-20  { margin-bottom:20px; }

/* Migrated from app/views/admin/site_testimonial_form.php */
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }

/* Migrated from app/views/admin/staff_home.php */
.staff-module-card { border: 2px solid var(--border); border-radius: 12px; }
.staff-module-card:hover { border-color: var(--amber); transform: translateY(-2px); }

/* Migrated from app/views/admin/trade_analytics.php */
/* ═══════════════════════ TRADE ANALYTICS PREMIUM ═══════════════════════ */
.ta-hero {
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:10px; margin-bottom:24px;
}
.ta-hero h1 { margin:0; }
.ta-live-badge {
  display:inline-flex; align-items:center; gap:6px;
  font-size:.72rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:#22c55e; background:rgba(34,197,94,.1); border:1px solid rgba(34,197,94,.25);
  border-radius:20px; padding:4px 12px;
}
.ta-live-badge::before {
  content:''; width:7px; height:7px; border-radius:50%;
  background:#22c55e; animation:tablink 1.4s ease-in-out infinite;
}
@keyframes tablink { 0%,100%{opacity:1} 50%{opacity:.2} }

.ta-kpi-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:14px; margin-bottom:24px;
}
.ta-kpi {
  background:var(--surface-1); border:1px solid var(--border);
  border-radius:14px; padding:16px 18px; position:relative; overflow:hidden;
  transition:border-color .2s, transform .15s;
}
.ta-kpi:hover { border-color:var(--amber); transform:translateY(-2px); }
.ta-kpi-accent { position:absolute; top:0; right:0; width:70px; height:70px; border-radius:0 14px 0 70px; opacity:.07; }
.ta-kpi-icon { width:36px; height:36px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; margin-bottom:12px; }
.ta-kpi-icon.green  { background:rgba(34,197,94,.15); color:#22c55e; }
.ta-kpi-icon.amber  { background:rgba(245,158,11,.15); color:#f59e0b; }
.ta-kpi-icon.blue  { background:rgba(59,130,246,.15); color:#3b82f6; }
.ta-kpi-icon.purple { background:rgba(168,85,247,.15); color:#a855f7; }
.ta-kpi-label { font-size:.68rem; color:var(--txt-muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:4px; }
.ta-kpi-value { font-size:1.3rem; font-weight:800; color:var(--txt); line-height:1; }
.ta-kpi-value.green  { color:#22c55e; }
.ta-kpi-value.amber  { color:#f59e0b; }
.ta-kpi-value.blue  { color:#3b82f6; }
.ta-kpi-value.purple { color:#a855f7; }

.ta-filter-card {
  background:var(--surface-1); border:1px solid var(--border);
  border-radius:14px; padding:14px 20px; margin-bottom:20px;
  display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap;
}
.ta-filter-group label {
  display:block; font-size:.7rem; color:var(--txt-muted);
  font-weight:600; text-transform:uppercase; letter-spacing:.04em; margin-bottom:5px;
}

.ta-chart-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:8px; }
.ta-chart-title { font-size:.82rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--txt-muted); }
.ta-chart-sub  { font-size:.72rem; color:var(--txt-muted); }

.ta-row-2 { display:grid; grid-template-columns:2fr 1fr; gap:18px; margin-bottom:20px; }
.ta-row-1 { margin-bottom:20px; }
@media(max-width:900px){ .ta-row-2 { grid-template-columns:1fr; } }

.ta-bar-bg  { width:70px; height:6px; background:var(--border); border-radius:3px; overflow:hidden; display:inline-block; vertical-align:middle; }
.ta-bar-fill { height:100%; border-radius:3px; }

.ta-pie-legend { display:flex; justify-content:center; gap:22px; margin-top:14px; }
.ta-pie-dot { width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:5px; vertical-align:middle; }

.ta-table-wrap { max-height:420px; overflow-y:auto; }
.ta-table-wrap::-webkit-scrollbar { width:4px; }
.ta-table-wrap::-webkit-scrollbar-track { background:transparent; }
.ta-table-wrap::-webkit-scrollbar-thumb { background:var(--border-2); border-radius:2px; }

.ta-th-sort { cursor:pointer; user-select:none; white-space:nowrap; display:inline-flex; align-items:center; gap:4px; }
.ta-th-sort:hover { color:var(--amber); }
.ta-sort-icon { font-size:.7rem; opacity:.4; transition:opacity .15s; }
.ta-sort-icon.active { opacity:1; color:var(--amber); }

/* Migrated from app/views/admin/trade_launch.php */
.trade-launch-grid { display:grid; grid-template-columns:1fr 340px; gap:20px; align-items:start; }
.trade-date-row { grid-template-columns:1fr 1fr; }
@media(max-width:900px) { .trade-launch-grid { grid-template-columns:1fr; } }
@media(max-width:560px) { .trade-date-row { grid-template-columns:1fr !important; } }

/* Migrated from app/views/admin/trade_operations.php */
/* ═══════════════════════ TRADE OPERATIONS PREMIUM ═══════════════════════ */
.top-hero {
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:10px; margin-bottom:24px;
}
.top-hero h1 { margin:0; }

.top-kpi-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(165px,1fr));
  gap:14px; margin-bottom:22px;
}
.top-kpi {
  background:var(--surface-1); border:1px solid var(--border);
  border-radius:14px; padding:16px 18px;
  position:relative; overflow:hidden;
  transition:border-color .2s, transform .15s;
}
.top-kpi:hover { border-color:var(--amber); transform:translateY(-2px); }
.top-kpi-accent {
  position:absolute; top:0; right:0; width:70px; height:70px;
  border-radius:0 14px 0 70px; opacity:.07;
}
.top-kpi-icon {
  width:36px; height:36px; border-radius:10px;
  display:inline-flex; align-items:center; justify-content:center; margin-bottom:12px;
}
.top-kpi-icon.blue  { background:rgba(59,130,246,.15); color:#3b82f6; }
.top-kpi-icon.green  { background:rgba(34,197,94,.15);  color:#22c55e; }
.top-kpi-icon.amber  { background:rgba(245,158,11,.15); color:#f59e0b; }
.top-kpi-icon.purple { background:rgba(168,85,247,.15); color:#a855f7; }
.top-kpi-label { font-size:.68rem; color:var(--txt-muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:4px; }
.top-kpi-value { font-size:1.25rem; font-weight:800; color:var(--txt); line-height:1; }
.top-kpi-value.blue  { color:#3b82f6; }
.top-kpi-value.green  { color:#22c55e; }
.top-kpi-value.amber  { color:#f59e0b; }
.top-kpi-value.purple { color:#a855f7; }

.top-filter-card {
  background:var(--surface-1); border:1px solid var(--border);
  border-radius:14px; padding:14px 20px; margin-bottom:20px;
  display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap;
}
.top-filter-group label {
  display:block; font-size:.7rem; color:var(--txt-muted);
  font-weight:600; text-transform:uppercase; letter-spacing:.04em; margin-bottom:5px;
}

.top-chart-wrap { height:210px; }
.top-chart-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:16px; flex-wrap:wrap; gap:8px;
}
.top-chart-title { font-size:.82rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--txt-muted); }
.top-chart-sub  { font-size:.72rem; color:var(--txt-muted); margin-top:2px; }

.top-table-card { background:var(--surface-1); border:1px solid var(--border); border-radius:14px; overflow:hidden; margin-top:20px; }
.top-table-hd { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--border); }
.top-table-title { font-size:.82rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--txt-muted); }
.top-table-sub  { font-size:.72rem; color:var(--txt-muted); margin-top:2px; }

.top-bar-bg  { width:65px; height:6px; background:var(--border); border-radius:3px; overflow:hidden; display:inline-block; vertical-align:middle; }
.top-bar-fill { height:100%; border-radius:3px; }

.top-result-badge {
  font-weight:800; font-size:.85rem; padding:3px 10px; border-radius:7px; display:inline-block;
}
.top-result-pos { color:#22c55e; background:rgba(34,197,94,.1); }
.top-result-neg { color:#ef4444; background:rgba(239,68,68,.1); }

.top-eff-pos { color:#22c55e; font-weight:800; }
.top-eff-neg { color:#ef4444; font-weight:800; }

/* Sortable headers */
.top-th-sort {
  cursor:pointer; user-select:none; white-space:nowrap;
  display:inline-flex; align-items:center; gap:4px;
}
.top-th-sort:hover { color:var(--amber); }
.top-sort-icon { font-size:.7rem; opacity:.4; transition:opacity .15s; }
.top-sort-icon.active { opacity:1; color:var(--amber); }

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

/* Migrated from app/views/admin/withdrawal_review.php */
#wrToast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%) translateY(20px);background:#1e1e2e;border:1px solid rgba(239,68,68,.5);color:#f87171;padding:11px 20px;border-radius:10px;font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:8px;box-shadow:0 8px 32px rgba(0,0,0,.4);opacity:0;transition:opacity .25s,transform .25s;pointer-events:none;z-index:9999;white-space:nowrap;}
#wrToast.show{opacity:1;transform:translateX(-50%) translateY(0);}

/* Migrated from app/views/investment/amount.php */
#amtToast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%) translateY(20px);background:#1e1e2e;border:1px solid rgba(239,68,68,.5);color:#f87171;padding:11px 20px;border-radius:10px;font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:8px;box-shadow:0 8px 32px rgba(0,0,0,.4);opacity:0;transition:opacity .25s,transform .25s;pointer-events:none;z-index:9999;white-space:nowrap;}
#amtToast.show{opacity:1;transform:translateX(-50%) translateY(0);}

/* Migrated from app/views/layouts/main.php */
.tt-item{display:flex;align-items:center;gap:5px;font-size:.72rem;white-space:nowrap;}
  .tt-sym{font-weight:700;color:var(--txt-muted);letter-spacing:.02em;}
  .tt-price{font-weight:700;color:var(--txt);font-variant-numeric:tabular-nums;}
  .tt-chg{font-weight:600;font-size:.67rem;padding:1px 5px;border-radius:4px;}
  .tt-chg.up{color:var(--green);background:rgba(34,197,94,.1);}
  .tt-chg.dn{color:#ef4444;background:rgba(239,68,68,.1);}
  .tt-sep{color:var(--border);font-size:.55rem;margin:0 2px;}
  @media(max-width:860px){#topbarTicker{display:none!important;}}

/* Migrated from app/views/market/index.php */
/* ═══════════════════════════════ MARKET VIEW ═══════════════════════════════ */
.mkt-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.mkt-hero h1 { margin: 0; }
.mkt-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.25);
  border-radius: 20px;
  padding: 4px 12px;
}
.mkt-live-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

/* ── Ticker tape ── */
.ticker-wrap {
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  margin-bottom: 24px;
  position: relative;
}
.ticker-wrap::before, .ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.ticker-wrap::before { left:0; background: linear-gradient(to right, var(--bg-elevated), transparent); }
.ticker-wrap::after  { right:0; background: linear-gradient(to left, var(--bg-elevated), transparent); }
.ticker-track {
  display: flex;
  gap: 0;
  animation: tickerMove 38s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tickerMove { from{transform:translateX(0)} to{transform:translateX(-50%)} }
.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  min-width: 160px;
}
.ticker-sym  { font-size: .78rem; font-weight: 700; color: var(--txt); }
.ticker-price{ font-size: .82rem; font-weight: 600; color: var(--txt); font-variant-numeric: tabular-nums; }
.ticker-chg  { font-size: .72rem; font-weight: 600; }
.ticker-chg.up  { color: var(--green); }
.ticker-chg.dn  { color: var(--red,#ef4444); }

/* ── Grid ── */
.mkt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.mkt-grid-wide {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media(max-width:960px){
  .mkt-grid  { grid-template-columns: 1fr 1fr; }
  .mkt-grid-wide  { grid-template-columns: 1fr; }
}
@media(max-width:600px){
  .mkt-grid { grid-template-columns: 1fr; }
}

/* ── Quote card ── */
.qcard {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.qcard:hover { border-color: var(--blue); }
.qcard-accent {
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 0 14px 0 80px;
  opacity: .07;
}
.qcard-sym  { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-muted); margin-bottom: 2px; }
.qcard-name  { font-size: .8rem; color: var(--txt); font-weight: 600; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qcard-price { font-size: 1.55rem; font-weight: 800; color: var(--txt); font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 8px; }
.qcard-row  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qcard-chg  { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.qcard-chg.up { background: rgba(34,197,94,.12); color: var(--green); }
.qcard-chg.dn { background: rgba(239,68,68,.12); color: var(--red,#ef4444); }
.qcard-hl  { font-size: .7rem; color: var(--txt-muted); }
.qcard-mini  { height: 48px; margin-top: 12px; }
.qcard-loading { opacity: .4; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:.15} }
.skeleton { background: var(--border); border-radius: 4px; display: inline-block; }

/* ── Crypto row ── */
.crypto-table { width: 100%; border-collapse: collapse; }
.crypto-table th {
  font-size: .68rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--txt-muted);
  padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left;
}
.crypto-table td {
  padding: 10px 10px; border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .82rem; vertical-align: middle;
}
.crypto-table tr:last-child td { border-bottom: none; }
.crypto-table tr:hover td { background: rgba(255,255,255,.025); }
.c-sym { font-weight: 700; }
.c-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.c-chg { font-weight: 700; text-align: right; }
.c-chg.up { color: var(--green); }
.c-chg.dn { color: var(--red,#ef4444); }
.c-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .72rem; margin-right: 8px;
  flex-shrink: 0;
}

/* ── Sparkline canvas ── */
.spark { display: block; }

/* ── News ── */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: opacity .15s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { opacity: .75; }
.news-thumb {
  width: 58px; height: 44px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
}
.news-thumb-ph {
  width: 58px; height: 44px;
  border-radius: 7px;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.news-body { flex: 1; min-width: 0; }
.news-title { font-size: .8rem; font-weight: 600; line-height: 1.35; color: var(--txt); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.news-meta  { font-size: .68rem; color: var(--txt-muted); }
.news-src  { font-weight: 600; }

/* ── Forex row ── */
.forex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media(max-width:480px){ .forex-grid { grid-template-columns: 1fr; } }
.fcard {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.fcard-pair { font-size: .8rem; font-weight: 700; }
.fcard-rate { font-size: .9rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--amber); }
.fcard-chg  { font-size: .72rem; font-weight: 600; }

/* ── Section header ── */
.mkt-section-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.mkt-section-title {
  font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--txt-muted);
  display: flex; align-items: center; gap: 7px;
}
.mkt-section-title svg { opacity: .6; }

/* ── Timestamp ── */
.mkt-ts { font-size: .68rem; color: var(--txt-muted); font-variant-numeric: tabular-nums; }

/* ── Chart container ── */
.mkt-chart-wrap {
  position: relative;
  height: 220px;
}
#mktMainChart { width: 100%; height: 100%; }

/* ── Tabs ── */
.mkt-tabs {
  display: flex; gap: 4px;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 3px;
}
.mkt-tab {
  font-size: .72rem; font-weight: 600;
  padding: 5px 12px; border-radius: 6px;
  cursor: pointer; border: none;
  background: transparent; color: var(--txt-muted);
  transition: background .15s, color .15s;
}
.mkt-tab.active {
  background: var(--blue);
  color: #fff;
}

/* ── Fear & Greed ── */
.fg-gauge {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 4px;
}
.fg-arc { margin-bottom: 6px; }
.fg-val { font-size: 2rem; font-weight: 800; }
.fg-lbl { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ── Responsive tweaks ── */
@media(max-width:480px){
  .qcard-price { font-size: 1.2rem; }
}

/* Migrated from app/views/site/_funds_section.php */
.funds-section {
  padding: 96px 0;
  background: linear-gradient(180deg, rgba(20,22,28,.02), rgba(255,255,255,.015));
}

.funds-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -8px 0 34px;
}

.fund-tab {
  min-height: 36px;
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,.03);
  color: var(--txt-muted);
  font: 700 .82rem var(--font-body);
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}

.fund-tab:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-1px);
}

.fund-tab.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #0C0D10;
}

.funds-list {
  display: grid;
  gap: 20px;
}

.fund-card {
  background:
    linear-gradient(135deg, rgba(91,196,223,.08), rgba(255,255,255,.015)),
    linear-gradient(135deg, #1A1D26 0%, #14161C 100%);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
  overflow: hidden;
}

.fund-card.hidden {
  display: none;
}

.fund-card-inner {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.fund-name-block {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fund-category-badge {
  width: fit-content;
  margin-bottom: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.fund-name {
  max-width: 220px;
  color: var(--txt);
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.14;
}

.fund-data-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fund-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}

.fund-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: .78rem;
}

.fund-table thead th {
  padding: 11px 12px;
  background: rgba(91,196,223,.09);
  color: var(--txt);
  font-weight: 800;
  text-align: left;
  letter-spacing: .025em;
}

.fund-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.055);
  color: rgba(245,247,250,.88);
}

.fund-row-main td {
  background: rgba(255,255,255,.025);
}

.fund-row-cdi td {
  border-bottom: 0;
  background: rgba(91,196,223,.075);
  color: var(--txt-muted);
}

.fund-cell-name,
.fund-cell-cdi {
  color: var(--txt) !important;
  font-weight: 800;
}

.fund-cell-cdi {
  color: var(--amber) !important;
  letter-spacing: .04em;
}

.fund-cell-ret,
.fund-cell-cdi-value {
  color: var(--amber) !important;
  font-weight: 800;
}

.fund-cell-pl {
  color: rgba(245,247,250,.72) !important;
}

.fund-cell-empty {
  color: transparent;
}

.fund-docs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fund-doc-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,.03);
  color: var(--txt);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}

.fund-doc-btn:hover {
  border-color: var(--amber);
  background: var(--amber-dim);
  color: var(--amber);
  transform: translateY(-1px);
}

.fund-doc-btn svg {
  flex: 0 0 auto;
  opacity: .8;
}

@media (max-width: 980px) {
  .fund-card-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .fund-name {
    max-width: none;
  }

  .fund-docs {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .funds-section {
    padding: 72px 0;
  }

  .funds-filter {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 24px;
  }

  .fund-tab {
    flex: 0 0 auto;
    padding-inline: 18px;
  }

  .fund-card {
    padding: 20px;
  }

  .fund-table {
    min-width: 920px;
    font-size: .75rem;
  }

  .fund-table thead th,
  .fund-table tbody td {
    padding: 9px 10px;
  }

  .fund-doc-btn {
    width: 100%;
  }
}

/* Migrated from app/views/trade/dashboard.php */
/* ── Trade Dashboard — Mobile First ─────────────────────────── */
.td-page-header { margin-bottom:16px; }
.td-page-header h1 { font-size:1.2rem; font-weight:800; }
.td-page-header p  { font-size:.78rem; color:var(--txt-muted); margin-top:2px; }

.td-filter-form { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; }
.td-filter-form .td-fg { display:flex; flex-direction:column; gap:4px; flex:1; min-width:120px; }
.td-filter-form label { font-size:.68rem; color:var(--txt-muted); text-transform:uppercase; letter-spacing:.04em; }
.td-filter-form input[type=date] {
  padding:8px 10px; background:var(--surface-3); border:1px solid var(--border);
  border-radius:8px; color:var(--txt); font-size:.82rem; width:100%;
}

.td-charts-grid { display:grid; grid-template-columns:2fr 1fr; gap:16px; margin-bottom:20px; }
@media(max-width:640px){
  .td-charts-grid { grid-template-columns:1fr; }
  .td-charts-grid .card:last-child { margin-top:0; }
}

.td-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.td-table-wrap table { min-width:520px; }

.td-pc {
  flex: 0 0 calc(50% - 7px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  display: flex; flex-direction:column; gap:12px;
  box-sizing:border-box; min-width:0;
}
@media(max-width:640px){ .td-pc { flex:0 0 100%; } }

/* Migrated from app/views/errors/404.php */
.error-page * { box-sizing: border-box; margin: 0; padding: 0; }
body.error-page {
  background: #0E0E10;
  color: #F0F0F2;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  padding-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-page .n { font-size: 5rem; font-weight: 800; color: #F5A623; letter-spacing: -.04em; }
.error-page h1 { font-size: 1.4rem; font-weight: 700; margin: 8px 0; }
.error-page p { color: #6B7280; margin: 8px 0 28px; }
.error-page a { background: #F5A623; color: #000; padding: 11px 26px; border-radius: 9px; font-weight: 700; font-size: .9rem; text-decoration: none; display: inline-block; }
.error-page a:hover { background: #E8920A; }

/* Migrated from app/views/site/home.php */
body.site-home-page { --amber: #F5A623; --amber-dim: rgba(245,166,35,.12); --amber-glow: rgba(245,166,35,.35); --dark: #0C0D10; --dark-2: #111215; --dark-3: #18191E; --dark-4: #22242C; --border: rgba(255,255,255,.07); --border-2: rgba(255,255,255,.12); --txt: #F0F0F2; --txt-muted: rgba(240,240,242,.55); --txt-dim: rgba(240,240,242,.28); --green: #22C55E; --radius: 12px; --radius-lg: 20px; --radius-xl: 32px; --transition: 0.4s cubic-bezier(0.16,1,0.3,1); --font-body: 'Plus Jakarta Sans', sans-serif; --font-serif: 'DM Serif Display', serif; }
.site-home-page *, .site-home-page *::before, .site-home-page *::after { box-sizing:border-box; margin:0; padding:0; }
html.site-home-root { scroll-behavior:smooth; font-size:15px; }
body.site-home-page { font-family: var(--font-body); background: var(--dark); color: var(--txt); padding-left: 0; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.site-home-page a { text-decoration:none; color:inherit; }
.site-home-page img { max-width:100%; }
.site-home-page .container { max-width:1240px; margin:0 auto; padding:0 5%; }
body.site-home-page::-webkit-scrollbar { width:5px; }
body.site-home-page::-webkit-scrollbar-track { background:var(--dark-2); }
body.site-home-page::-webkit-scrollbar-thumb { background:var(--dark-4); border-radius:3px; }
.site-home-page header { position:fixed; top:0; left:0; width:100%; z-index:1000; background:rgba(12,13,16,.85); backdrop-filter:blur(18px); border-bottom:1px solid var(--border); transition:background var(--transition); }
.site-home-page header.scrolled { background:rgba(12,13,16,.97); }
.site-home-page nav { height:72px; display:flex; align-items:center; justify-content:space-between; }
.site-home-page .nav-brand { display:flex; align-items:center; gap:10px; }
.site-home-page .nav-logo-img { height:32px; width:auto; object-fit:contain; display:block; flex-shrink:0; }
.site-home-page .nav-brand-name { display:none; }
.site-home-page .nav-links { display:flex; align-items:center; gap:32px; list-style:none; }
.site-home-page .nav-links a { font-size:.88rem; font-weight:500; color:var(--txt-muted); transition:color var(--transition); position:relative; }
.site-home-page .nav-links a::after { content:''; position:absolute; bottom:-4px; left:0; width:0; height:2px; background:var(--amber); transition:width var(--transition); }
.site-home-page .nav-links a:hover { color:var(--txt); }
.site-home-page .nav-links a:hover::after { width:100%; }
.site-home-page .nav-actions { display:flex; align-items:center; gap:12px; }
.site-home-page .btn { display:inline-flex; align-items:center; gap:8px; padding:10px 22px; border-radius:var(--radius); font-size:.85rem; font-weight:600; cursor:pointer; border:none; transition:var(--transition); }
.site-home-page .btn-outline { background:transparent; color:var(--txt-muted); border:1px solid var(--border-2); }
.site-home-page .btn-outline:hover { border-color:var(--amber); color:var(--amber); }
.site-home-page .btn-amber { background:var(--amber); color:#0C0D10; font-weight:700; }
.site-home-page .btn-amber:hover { background:#E8920A; box-shadow:0 8px 24px var(--amber-glow); transform:translateY(-1px); }
.site-home-page .btn-lg { padding:14px 32px; font-size:.95rem; border-radius:var(--radius-lg); }
.site-home-page .btn-ghost { background:rgba(255,255,255,.06); color:var(--txt); border:1px solid var(--border-2); }
.site-home-page .btn-ghost:hover { background:rgba(255,255,255,.1); }
.site-home-page .mobile-toggle { display:none; background:none; border:1px solid var(--border-2); color:var(--txt); width:40px; height:40px; border-radius:var(--radius); align-items:center; justify-content:center; cursor:pointer; }
.site-home-page .mobile-drawer { position:fixed; inset:0; z-index:999; pointer-events:none; }
.site-home-page .mobile-drawer.open { pointer-events:auto; }
.site-home-page .mobile-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0); backdrop-filter:blur(0px); transition:background .35s, backdrop-filter .35s; }
.site-home-page .mobile-drawer.open .mobile-backdrop { background:rgba(0,0,0,.7); backdrop-filter:blur(4px); }
.site-home-page .mobile-panel { position:absolute; top:0; right:0; bottom:0; width:82vw; max-width:320px; background:var(--dark); padding:28px 28px 36px; transform:translateX(100%); transition:transform var(--transition); display:flex; flex-direction:column; overflow-y:auto; }
.site-home-page .mobile-drawer.open .mobile-panel { transform:translateX(0); }
.site-home-page .mobile-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:40px; }
.site-home-page .mobile-header .nav-brand { display:flex; align-items:center; gap:10px; }
.site-home-page .mobile-header .nav-logo-img { height:26px; flex-shrink:0; }
.site-home-page .mobile-header .nav-brand-name { font-size:.95rem; }
.site-home-page .mobile-close { background:rgba(255,255,255,.06); border:1px solid var(--border-2); color:var(--txt-muted); width:34px; height:34px; border-radius:9px; cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; transition:background var(--transition), color var(--transition); }
.site-home-page .mobile-close:hover { background:rgba(255,255,255,.1); color:var(--txt); }
.site-home-page .mobile-nav { display:flex; flex-direction:column; flex:1; }
.site-home-page .mobile-panel a.mobile-nav-link { display:block; padding:18px 0; font-size:1.1rem; font-weight:600; color:var(--txt-muted); border-bottom:1px solid var(--border); transition:color var(--transition); }
.site-home-page .mobile-panel a.mobile-nav-link:first-child { border-top:1px solid var(--border); }
.site-home-page .mobile-panel a.mobile-nav-link:hover { color:var(--txt); }
.site-home-page .mobile-actions { display:flex; flex-direction:column; gap:12px; padding-top:32px; }
.site-home-page .mobile-panel .btn { width:100%; justify-content:center; }
.site-home-page .mobile-panel .btn-amber { box-shadow:0 4px 20px var(--amber-glow); }
.site-home-page .mobile-panel .btn-ghost { border-color:var(--border-2); }
.site-home-page .language-switcher--site {
  background:rgba(255,255,255,.06);
  border-color:var(--border-2);
  color:var(--txt-muted);
}
.site-home-page .language-switcher--site:hover {
  background:rgba(255,255,255,.1);
  border-color:var(--amber-glow);
  color:var(--amber);
}
.site-home-page .site-mobile-language {
  padding:18px 0 20px;
  border-bottom:1px solid var(--border);
}
.site-home-page .site-mobile-language-title {
  margin-bottom:8px;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:var(--txt-dim);
}
.site-home-page .language-switcher--site-mobile {
  width:100%;
  background:rgba(255,255,255,.06);
  border-color:var(--border-2);
  color:var(--txt-muted);
}
.site-home-page .hero { position:relative; min-height:100vh; display:flex; align-items:center; overflow:hidden; padding-top:72px; }
.site-home-page .hero::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(245,166,35,.08), transparent), radial-gradient(ellipse 50% 70% at 20% 80%, rgba(245,166,35,.05), transparent), linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%); z-index:0; }
.site-home-page .hero-grid { position:absolute; inset:0; z-index:0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size:60px 60px; mask-image:radial-gradient(ellipse 70% 80% at 70% 50%, black, transparent); }
.site-home-page .hero-content { position:relative; z-index:2; display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center; padding:60px 0; }
.site-home-page .hero-text {  }
.site-home-page .hero-badge { display:inline-flex; align-items:center; gap:8px; background:var(--amber-dim); border:1px solid var(--amber-glow); color:var(--amber); padding:6px 14px; border-radius:var(--radius-xl); font-size:.75rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; margin-bottom:24px; }
.site-home-page .hero-badge svg { width:14px; height:14px; }
.site-home-page .hero-title { font-family:var(--font-serif); font-size:clamp(2.6rem, 5vw, 4rem); line-height:1.1; font-weight:400; color:var(--txt); margin-bottom:20px; }
.site-home-page .hero-title .accent { color:var(--amber); }
.site-home-page .hero-subtitle { font-size:1.05rem; color:var(--txt-muted); line-height:1.7; max-width:520px; margin-bottom:36px; }
.site-home-page .hero-actions { display:flex; gap:14px; flex-wrap:wrap; }
.site-home-page .hero-card { background:var(--dark-3); border:1px solid var(--border); border-radius:var(--radius-lg); padding:32px; box-shadow:0 40px 80px rgba(0,0,0,.5); }
.site-home-page .hero-card-title { font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--txt-dim); margin-bottom:24px; }
.site-home-page .stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.site-home-page .stat-item { background:var(--dark-4); border:1px solid var(--border); border-radius:var(--radius); padding:20px; text-align:center; }
.site-home-page .stat-value { font-family:var(--font-body); font-size:1.6rem; font-weight:800; color:var(--amber); line-height:1; }
.site-home-page .stat-label { font-size:.75rem; color:var(--txt-muted); margin-top:6px; }
.site-home-page .hero-chart-bar { margin-top:24px; display:flex; align-items:flex-end; gap:5px; height:50px; }
.site-home-page .bar { flex:1; border-radius:4px 4px 0 0; background:var(--border-2); transition:height .3s; }
.site-home-page .bar.lit { background:linear-gradient(to top, #E8920A, var(--amber)); }
.site-home-page .chart-label { font-size:.7rem; color:var(--txt-dim); display:flex; justify-content:space-between; margin-top:4px; }
.site-home-page section { padding:100px 0; }
.site-home-page .section-eyebrow { font-size:.72rem; font-weight:700; letter-spacing:.10em; text-transform:uppercase; color:var(--amber); margin-bottom:12px; }
.site-home-page .section-title { font-family:var(--font-serif); font-size:clamp(1.9rem, 3.5vw, 2.8rem); line-height:1.15; color:var(--txt); margin-bottom:16px; }
.site-home-page .section-subtitle { font-size:1rem; color:var(--txt-muted); line-height:1.7; max-width:580px; }
.site-home-page .section-header { margin-bottom:60px; }
.site-home-page .section-header.center { text-align:center; }
.site-home-page .section-header.center .section-subtitle { margin:0 auto; }
.site-home-page .about { background:var(--dark-2); }
.site-home-page .about-grid { display:grid; grid-template-columns:1fr 1fr; gap:80px; align-items:center; }
.site-home-page .about-text p { color:var(--txt-muted); line-height:1.8; font-size:.95rem; margin-bottom:28px; }
.site-home-page .features-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.site-home-page .feature-card { background:var(--dark-3); border:1px solid var(--border); border-radius:var(--radius); padding:24px; transition:border-color var(--transition), transform var(--transition); }
.site-home-page .feature-card:hover { border-color:var(--amber-glow); transform:translateY(-3px); }
.site-home-page .feature-icon { width:44px; height:44px; border-radius:10px; background:var(--amber-dim); border:1px solid var(--amber-glow); display:flex; align-items:center; justify-content:center; color:var(--amber); margin-bottom:14px; }
.site-home-page .feature-icon svg { width:22px; height:22px; }
.site-home-page .feature-card h4 { font-size:.9rem; font-weight:700; color:var(--txt); margin-bottom:6px; }
.site-home-page .feature-card p { font-size:.8rem; color:var(--txt-muted); line-height:1.6; }
.site-home-page .testimonials { background:var(--dark); }
.site-home-page .testimonials-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }
.site-home-page .testimonial-card { background:var(--dark-3); border:1px solid var(--border); border-radius:var(--radius-lg); padding:28px; transition:border-color var(--transition), transform var(--transition); }
.site-home-page .testimonial-card:hover { border-color:var(--amber-glow); transform:translateY(-4px); }
.site-home-page .stars { color:var(--amber); font-size:.85rem; margin-bottom:16px; letter-spacing:2px; }
.site-home-page .testimonial-text { font-size:.88rem; color:var(--txt-muted); line-height:1.75; margin-bottom:20px; font-style:italic; }
.site-home-page .testimonial-author { display:flex; align-items:center; gap:12px; }
.site-home-page .author-avatar { width:40px; height:40px; border-radius:50%; background:var(--amber-dim); border:2px solid var(--amber-glow); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; color:var(--amber); flex-shrink:0; }
.site-home-page .author-name { font-size:.85rem; font-weight:700; color:var(--txt); }
.site-home-page .author-role { font-size:.75rem; color:var(--txt-dim); }
.site-home-page .faq { background:var(--dark-2); }
.site-home-page .faq-list { max-width:780px; margin:0 auto; }
.site-home-page .faq-item { border-bottom:1px solid var(--border); }
.site-home-page .faq-question { width:100%; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 0; background:none; border:none; color:var(--txt); font-size:.95rem; font-weight:600; cursor:pointer; text-align:left; font-family:var(--font-body); transition:color var(--transition); }
.site-home-page .faq-question:hover { color:var(--amber); }
.site-home-page .faq-question svg { width:18px; height:18px; flex-shrink:0; color:var(--amber); transition:transform var(--transition); }
.site-home-page .faq-item.open .faq-question svg { transform:rotate(45deg); }
.site-home-page .faq-answer { overflow:hidden; max-height:0; transition:max-height .4s cubic-bezier(0.16,1,0.3,1), padding .3s; padding:0; }
.site-home-page .faq-item.open .faq-answer { max-height:300px; padding-bottom:20px; }
.site-home-page .faq-answer p { color:var(--txt-muted); font-size:.88rem; line-height:1.8; }
.site-home-page .cta-section { background:var(--dark-3); border-top:1px solid var(--border); border-bottom:1px solid var(--border); text-align:center; position:relative; overflow:hidden; }
.site-home-page .cta-section::before { content:''; position:absolute; inset:0; background:radial-gradient(ellipse 60% 80% at 50% 50%, rgba(245,166,35,.07), transparent); }
.site-home-page .cta-inner { position:relative; z-index:1; max-width:600px; margin:0 auto; }
.site-home-page .cta-inner .section-title { margin-bottom:14px; }
.site-home-page .cta-inner p { color:var(--txt-muted); margin-bottom:36px; font-size:.95rem; }
.site-home-page footer { background:var(--dark-2); border-top:1px solid var(--border); padding:60px 0 32px; }
.site-home-page .footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1.4fr; gap:40px; margin-bottom:48px; }
.site-home-page .footer-brand p { color:var(--txt-dim); font-size:.82rem; line-height:1.7; margin-top:14px; max-width:280px; }
.site-home-page .footer-col h5 { font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--amber); margin-bottom:16px; }
.site-home-page .footer-col ul { list-style:none; }
.site-home-page .footer-col ul li { margin-bottom:10px; }
.site-home-page .footer-col ul li a { font-size:.82rem; color:var(--txt-dim); transition:color var(--transition); }
.site-home-page .footer-col ul li a:hover { color:var(--amber); }
.site-home-page .footer-contact-item { display:flex; gap:10px; align-items:flex-start; font-size:.82rem; color:var(--txt-dim); margin-bottom:12px; }
.site-home-page .footer-contact-item svg { width:15px; height:15px; flex-shrink:0; margin-top:2px; color:var(--amber); }
.site-home-page .footer-bottom { border-top:1px solid var(--border); padding-top:24px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.site-home-page .footer-bottom p { font-size:.78rem; color:var(--txt-dim); }
.site-home-page .social-links { display:flex; gap:10px; }
.site-home-page .social-link { width:36px; height:36px; border-radius:var(--radius); background:var(--dark-4); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--txt-dim); transition:var(--transition); }
.site-home-page .social-link:hover { background:var(--amber-dim); border-color:var(--amber-glow); color:var(--amber); }
.site-home-page .social-link svg { width:15px; height:15px; }
@media (max-width:1024px) {
.site-home-page .hero-content { grid-template-columns:1fr; gap:40px; }
.site-home-page .hero-card { max-width:500px; }
.site-home-page .about-grid { grid-template-columns:1fr; gap:40px; }
.site-home-page .testimonials-grid { grid-template-columns:1fr 1fr; }
.site-home-page .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:768px) {
.site-home-page section { padding:70px 0; }
.site-home-page .nav-links, .site-home-page .nav-actions .btn-outline, .site-home-page .nav-actions .btn-amber { display:none; }
.site-home-page .language-switcher--site { display:none; }
.site-home-page .mobile-toggle { display:flex; }
.site-home-page .hero-content { padding:30px 0; }
.site-home-page .hero-title { font-size:2.2rem; }
.site-home-page .stats-grid { grid-template-columns:1fr 1fr; }
.site-home-page .features-grid { grid-template-columns:1fr; }
.site-home-page .testimonials-grid { grid-template-columns:1fr; }
.site-home-page .footer-grid { grid-template-columns:1fr; }
.site-home-page .footer-bottom { flex-direction:column; text-align:center; }
}

/* Migrated from app/views/auth/2fa_recovery_codes.php print popup */
.recovery-print-page { font-family: monospace; padding: 32px; color: #111; background: #fff; }
.recovery-print-page h2 { margin-bottom: 8px; }
.recovery-print-page p { color: #666; margin-bottom: 24px; }
.recovery-print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 360px; }
.recovery-print-code { border: 1px solid #ccc; border-radius: 6px; padding: 10px; text-align: center; font-size: 1rem; }
.recovery-print-meta { margin-top: 24px; font-size: .8rem; color: #999; }
/* End migrated view styles from PHP views */
