/* ═══════════════════════════════════════════════════
   PORTFOLIO OS — css/components.css
   Buttons, cards, tables, badges, forms, modals
═══════════════════════════════════════════════════ */

/* ── BUTTONS — Institutional compact style ──────────── */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 6px;
  font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.15s;
  white-space: nowrap; text-decoration: none; letter-spacing: 0.1px;
  line-height: 1.4;
}
.btn-gold    { background: var(--gold); color: #fff; font-weight: 700; }
.btn-gold:hover { background: var(--gold-h); }
.btn-outline { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--border2); background: var(--bg2); color: var(--text); }
.btn-ghost   { background: transparent; color: var(--text3); border: 1px solid transparent; }
.btn-ghost:hover  { background: var(--bg2); color: var(--text2); }
.btn-danger  { background: var(--red-bg); color: var(--red); border: 1px solid rgba(220,38,38,.2); }
.btn-danger:hover { background: rgba(220,38,38,.15); }
.btn-warning { background: rgba(217,119,6,.1); color: #D97706; border: 1px solid rgba(217,119,6,.2); }
.btn-warning:hover { background: rgba(217,119,6,.18); }
.btn-teal    { background: var(--teal); color: #fff; }
.btn-teal:hover  { opacity: 0.88; }
.btn-sm   { padding: 5px 12px; font-size: 11px; }
.btn-xs   { padding: 3px 8px; font-size: 10px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 5px; aspect-ratio: 1; }

/* ── CARDS ───────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 14px;
}
.card-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.card-sub   { font-size: 12px; color: var(--text3); margin-top: 2px; }
.card-body  { padding: 20px 22px; }

/* Metric card */
.metric-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 22px 24px; box-shadow: var(--shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}
.metric-card:hover { box-shadow: var(--shadow2); transform: translateY(-1px); }
.metric-lbl  { font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.metric-val  { font-size: 27px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 8px; letter-spacing: -0.5px; }
.metric-sub  { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 5px; }

/* ── BADGES ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap; letter-spacing: 0.2px;
}
.badge-green  { background: var(--green-bg);  color: var(--green);  }
.badge-red    { background: var(--red-bg);    color: var(--red);    }
.badge-teal   { background: var(--teal-bg);   color: var(--teal);   }
.badge-gold   { background: var(--gold-bg);   color: var(--gold);   }
.badge-blue   { background: var(--blue-bg);   color: var(--blue);   }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-gray   { background: var(--bg2); color: var(--text2); border: 1px solid var(--border); }

/* ── TABLES ──────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); background: var(--surface2); }
th {
  padding: 10px 18px; text-align: left;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text3); white-space: nowrap;
}
th.r, td.r { text-align: right; }
th.c, td.c { text-align: center; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text2); }
th.sortable.active { color: var(--gold); }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg2); }
tbody tr.expandable { cursor: pointer; }
tbody tr.expanded { background: var(--bg2); }
tbody tr.detail-row { background: var(--surface2, var(--bg2)); }
tbody tr.detail-row:hover { background: var(--surface2, var(--bg2)); }
tbody tr.detail-row td { padding: 0; border-top: none; }
td { padding: 14px 18px; color: var(--text); vertical-align: middle; white-space: nowrap; }

/* ── Expandable detail panel ──────────────────────── */
.detail-panel { padding: 20px 24px; }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.detail-header h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.detail-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 18px; padding: 4px 8px; border-radius: var(--r); }
.detail-close:hover { background: var(--bg2); color: var(--text); }
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 768px) { .detail-cols { grid-template-columns: 1fr; } }
.detail-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.detail-item { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.detail-item:last-child { border-bottom: none; }
.detail-item .dlabel { color: var(--text3); }
.detail-item .dvalue { color: var(--text); font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }
.detail-chart-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.detail-chart-wrap canvas { width: 100% !important; height: 260px !important; }
.detail-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.detail-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 14px; min-width: 100px; }
.detail-stat-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.detail-stat-value { font-size: 14px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.detail-spinner { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text3); font-size: 13px; gap: 10px; }
.detail-spinner::before { content: ''; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
td.mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: -0.3px; }

/* ── FORMS ───────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  font-size: 11px; font-weight: 700; color: var(--text3);
  letter-spacing: 1px; text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 13px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 13.5px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-bg);
}
.form-input::placeholder { color: var(--text4); }
.form-select  { cursor: pointer; appearance: auto; }
.form-textarea { resize: vertical; min-height: 64px; }
.form-hint { font-size: 11.5px; color: var(--text3); margin-top: 3px; }
.form-error { font-size: 11.5px; color: var(--red); margin-top: 3px; }

.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-full  { grid-column: 1 / -1; }
.form-section {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text3);
  margin: 20px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.form-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── FILTER PILLS ────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.fpill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 10px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; border: 1px solid var(--border);
  background: transparent; color: var(--text3); white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.fpill:hover { border-color: var(--border2); color: var(--text2); background: var(--bg2); }
.fpill.on { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ── ASSET ICON ──────────────────────────────────────── */
.asset-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}

/* ── MODALS ──────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
}
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 660px;
  max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow3); animation: slideUp 0.18s ease;
}
.modal-sm { max-width: 440px; }
.modal-lg { max-width: 860px; }
.modal-header {
  padding: 22px 26px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-body  { padding: 24px 26px; }
.modal-footer {
  padding: 16px 26px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 9px;
}

/* Type selector grid */
.type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.type-card {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: var(--r2); padding: 16px 12px;
  cursor: pointer; text-align: center; transition: all 0.15s;
}
.type-card:hover { border-color: var(--gold); background: var(--gold-bg); }
.type-card.sel   { border-color: var(--gold); background: var(--gold-bg); }
.type-card-icon  { font-size: 22px; margin-bottom: 6px; }
.type-card-name  { font-size: 12px; font-weight: 600; color: var(--text2); }
.type-card.sel .type-card-name { color: var(--gold); }

/* Confirm dialog */
.confirm-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; max-width: 400px; width: 100%;
  box-shadow: var(--shadow3); animation: slideUp 0.18s ease;
}
.confirm-title { font-size: 17px; font-weight: 700; margin-bottom: 9px; }
.confirm-text  { font-size: 13.5px; color: var(--text2); margin-bottom: 24px; line-height: 1.65; }
.confirm-btns  { display: flex; gap: 9px; justify-content: flex-end; }

/* Live preview box */
.live-preview {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  margin-top: 14px; display: flex; gap: 24px; flex-wrap: wrap;
}
.lp-label { font-size: 10px; font-weight: 600; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px; }
.lp-val   { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; }

/* ── TOAST NOTIFICATION SYSTEM ───────────────────────── */
#toasts {
  position: fixed; top: 52px; right: 24px;
  display: flex; flex-direction: column; gap: 10px; z-index: 9999;
  pointer-events: none; max-width: 440px; width: 100%;
}
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px;
  font-size: 13px; font-weight: 500; color: var(--text);
  box-shadow: var(--shadow2); display: flex; align-items: flex-start; gap: 12px;
  animation: toastIn 0.25s ease; pointer-events: all;
  border-left: 4px solid var(--border);
}
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.toast-msg { font-size: 12px; color: var(--text2); line-height: 1.5; word-break: break-word; }
.toast-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 4px; }
.toast-copy {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 8px; font-size: 10px; font-weight: 600; color: var(--text3);
  cursor: pointer; white-space: nowrap;
}
.toast-copy:hover { border-color: var(--gold); color: var(--gold); }
.toast-close {
  background: none; border: none; font-size: 18px; line-height: 1;
  color: var(--text4); cursor: pointer; padding: 0 2px;
}
.toast-close:hover { color: var(--text); }

.toast-ok   { border-left-color: var(--green); }
.toast-ok .toast-icon { color: var(--green); }
.toast-ok .toast-title { color: var(--green); }

.toast-err  { border-left-color: var(--red); background: rgba(220,38,38,0.04); }
.toast-err .toast-icon { color: var(--red); }
.toast-err .toast-title { color: var(--red); }

.toast-warn { border-left-color: var(--amber); background: rgba(245,158,11,0.04); }
.toast-warn .toast-icon { color: var(--amber); }
.toast-warn .toast-title { color: var(--amber); }

.toast-info { border-left-color: var(--blue); }
.toast-info .toast-icon { color: var(--blue); }
.toast-info .toast-title { color: var(--blue); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ── INFO NOTE ───────────────────────────────────────── */
.info-note {
  background: var(--gold-bg); border: 1px solid var(--gold-bdr);
  border-radius: var(--r); padding: 12px 16px;
  font-size: 12.5px; color: var(--text2); line-height: 1.65;
}

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 32px; border: 1px dashed var(--border); border-radius: var(--r-md); background: var(--surface2); }
.empty-icon  { font-size: 32px; margin-bottom: 16px; opacity: 0.15; }
.empty-title { font-size: 14px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.empty-sub   { font-size: 13px; color: var(--text3); line-height: 1.6; margin-bottom: 20px; max-width: 360px; margin-left: auto; margin-right: auto; }

/* ── SUMMARY BAR ─────────────────────────────────────── */
.sum-bar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 22px;
  display: flex; gap: 32px; flex-wrap: wrap; margin-top: 16px; box-shadow: var(--shadow);
}
.sum-lbl { font-size: 10.5px; font-weight: 600; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px; }
.sum-val { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 600; }

/* ── LOADING ─────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--gold);
  animation: spin 0.7s linear infinite; flex-shrink: 0;
}
.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  padding: 40px; gap: 12px; color: var(--text3); font-size: 13.5px;
}

/* ── RESPONSIVE TABLES ───────────────────────────────── */

/* Column-hiding utility classes */
@media (max-width: 900px) {
  .col-hide-tablet { display: none !important; }
}
@media (max-width: 640px) {
  .col-hide-mobile { display: none !important; }
}

/* Mobile table adjustments */
@media (max-width: 768px) {
  td { white-space: normal; padding: 10px 8px; font-size: 12.5px; }
  th { padding: 8px 8px; font-size: 9.5px; letter-spacing: 1px; }
  td.mono { font-size: 12px; }

  /* Compact asset icon + name on mobile */
  .asset-icon { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }

  /* Touch-friendly action buttons */
  .tbl-wrap .btn-xs { min-height: 36px; min-width: 36px; padding: 6px 8px; font-size: 11px; }

  /* Summary bar stacks */
  .sum-bar { gap: 14px; padding: 12px 14px; }
  .sum-val { font-size: 13px; }

  /* Cards tighter on mobile */
  .card-body { padding: 14px 14px; }
  .card-header { padding: 12px 14px; }
}

/* Phone-specific table tweaks */
@media (max-width: 480px) {
  td { padding: 8px 6px; font-size: 12px; }
  th { padding: 7px 6px; font-size: 10px; }
  td.mono { font-size: 11.5px; }

  /* Action button text hidden — icon only */
  .tbl-wrap .btn-xs { padding: 6px; }
  .tbl-wrap .btn-xs .btn-label { display: none; }
}

/* Horizontal scroll hint gradient on right edge */
.tbl-wrap {
  position: relative;
}
.tbl-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; width: 24px;
  background: linear-gradient(to right, transparent, var(--surface) 80%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
@media (max-width: 900px) {
  .tbl-wrap.has-scroll::after { opacity: 1; }
}

/* ── AI ADVISOR ──────────────────────────────────────── */
.advisor-questionnaire {
  max-width: 620px; margin: 0 auto; padding: 48px 0;
  animation: fadeIn .3s ease;
}
.advisor-questionnaire .advisor-q-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 28px 20px; margin-bottom: 28px;
}
.advisor-q-header { text-align: center; margin-bottom: 32px; }
.advisor-q-icon { font-size: 48px; margin-bottom: 12px; }
.advisor-q-title { font-size: 22px; font-weight: 800; color: var(--text1); }
.advisor-q-sub { font-size: 13px; color: var(--text3); margin-top: 6px; }
.advisor-progress {
  height: 4px; background: var(--border); border-radius: 4px;
  margin-bottom: 8px; overflow: hidden;
}
.advisor-progress-bar {
  height: 100%; background: var(--gold); border-radius: 4px;
  transition: width .4s ease;
}
.advisor-q-step {
  text-align: center; font-size: 11px; color: var(--text4);
  letter-spacing: .05em; margin-bottom: 28px;
}
.advisor-q-question {
  font-size: 17px; font-weight: 700; color: var(--text1);
  text-align: center; margin-bottom: 24px;
}
.advisor-options { display: flex; flex-direction: column; gap: 10px; }
.advisor-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: border-color .12s, background .12s; text-align: left;
  font-family: inherit; font-size: 14px; color: var(--text); width: 100%;
}
.advisor-option:hover { border-color: var(--gold); background: var(--bg2); }
.advisor-option.selected {
  border-color: var(--gold); background: var(--bg2);
}
.advisor-option-icon { font-size: 24px; flex-shrink: 0; }
.advisor-option-label { font-weight: 600; }
.advisor-option-desc { font-size: 12px; color: var(--text3); margin-top: 2px; }
.advisor-q-nav {
  display: flex; justify-content: space-between; margin-top: 32px;
}

/* Advisor dashboard */
.advisor-profile-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 22px;
}
.advisor-profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 18px; text-align: center;
  transition: all .2s ease; position: relative; overflow: hidden;
}
.advisor-profile-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(135deg, rgba(212,175,55,.06), rgba(212,175,55,.02));
  transition: opacity .2s;
}
.advisor-profile-card:hover { border-color: rgba(212,175,55,.3); box-shadow: 0 4px 16px rgba(212,175,55,.08); transform: translateY(-1px); }
.advisor-profile-card:hover::before { opacity: 1; }
.advisor-profile-icon { font-size: 30px; margin-bottom: 10px; position: relative; }
.advisor-profile-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; position: relative; }
.advisor-profile-value { font-size: 14px; font-weight: 700; color: var(--gold); margin-top: 6px; position: relative; }
.advisor-goal-banner {
  background: linear-gradient(135deg, rgba(212,175,55,.07), rgba(212,175,55,.03));
  border: 1px solid rgba(212,175,55,.2); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 16px 22px; margin-bottom: 22px;
  font-size: 13.5px; color: var(--text2); line-height: 1.6;
}
/* Advisor tabs */
.advisor-tabs {
  display: flex; gap: 0; margin-bottom: 22px;
  border-bottom: 2px solid var(--border); position: relative;
}
.advisor-tab {
  padding: 12px 22px; font-size: 13px; font-weight: 600;
  color: var(--text3); background: none; border: none;
  cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .2s ease; display: flex; align-items: center; gap: 7px;
  position: relative;
}
.advisor-tab:hover { color: var(--text1); background: var(--bg2); border-radius: 8px 8px 0 0; }
.advisor-tab.active {
  color: var(--gold);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--gold), rgba(212,175,55,.5)) 1;
}

/* AI Simulate scenario cards */
.ai-sim-btn {
  display: flex !important; align-items: center; gap: 14px;
  text-align: left; padding: 16px 20px !important;
  border-radius: 8px !important; border: 1px solid var(--border) !important;
  background: var(--surface) !important; color: var(--text) !important;
  transition: border-color .15s, background .15s !important;
  cursor: pointer; font-family: 'Inter', sans-serif;
}
.ai-sim-btn:hover {
  border-color: var(--gold) !important;
  background: var(--bg2) !important;
}
.ai-sim-btn .ai-sim-text { flex: 1; }
.ai-sim-btn .ai-sim-text .ai-sim-title { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.ai-sim-btn .ai-sim-text .ai-sim-desc { font-size: 11px; color: var(--text3); line-height: 1.5; }

/* AI loading pulse animation */
@keyframes aiPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
@keyframes aiDots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}
.ai-loading-bar {
  display: flex; align-items: center; gap: 14px; padding: 24px 28px;
  background: linear-gradient(135deg, rgba(212,175,55,.08), rgba(212,175,55,.03));
  border: 1px solid rgba(212,175,55,.2); border-radius: 14px;
}
.ai-loading-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(212,175,55,.2); border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
.ai-loading-text { font-size: 13px; font-weight: 600; color: var(--gold); animation: aiPulse 1.5s ease infinite; }

.advisor-actions {
  display: flex; gap: 12px; margin-bottom: 20px;
}
.advisor-response-card { margin-bottom: 20px; }
.advisor-response-body {
  padding: 20px 24px; font-size: 14px; line-height: 1.7;
  color: var(--text2);
}
.advisor-response-body h2 { font-size: 18px; font-weight: 800; color: var(--text1); margin: 24px 0 10px; }
.advisor-response-body h3 { font-size: 15px; font-weight: 700; color: var(--text1); margin: 20px 0 8px; }
.advisor-response-body h4 { font-size: 13px; font-weight: 700; color: var(--text1); margin: 16px 0 6px; }
.advisor-response-body ul { padding-left: 20px; margin: 8px 0; }
.advisor-response-body li { margin: 4px 0; }
.advisor-response-body strong { color: var(--text1); }
.advisor-response-body p { margin: 8px 0; }

.advisor-session-item {
  display: flex; gap: 12px; padding: 14px 24px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background .15s;
}
.advisor-session-item:hover { background: var(--bg2); }
.advisor-session-item.latest { background: rgba(212,175,55,0.04); }
.advisor-session-type { font-size: 20px; flex-shrink: 0; padding-top: 2px; }
.advisor-session-question { font-size: 13px; font-weight: 600; color: var(--text1); }
.advisor-session-date { font-size: 11px; color: var(--text4); margin-top: 2px; }

.spinner-sm {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; animation: spin .6s linear infinite;
}

@media (max-width: 700px) {
  .advisor-profile-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .advisor-actions { flex-direction: column; }
  .ai-sim-grid { grid-template-columns: 1fr !important; }
}

/* ── AI ADVISOR REPORT ───────────────────────────────── */
.adv-report { animation: fadeIn .4s ease; }

.adv-report-header {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 20px 24px;
  margin-bottom: 22px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.adv-report-header::before {
  display: none;
}

/* Key metrics row */
.adv-metrics-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.adv-metric-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 18px 20px; text-align: center;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.adv-metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow2); }
.adv-metric-icon { font-size: 24px; margin-bottom: 6px; }
.adv-metric-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text3); margin-bottom: 6px;
}
.adv-metric-value {
  font-size: 20px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace; letter-spacing: -0.5px;
}

/* Charts row */
.adv-charts-row {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.adv-charts-row > .card { min-width: 280px; }

/* Sections */
.adv-section { margin-bottom: 16px; }
.adv-section-body {
  padding: 20px 24px; font-size: 13.5px; line-height: 1.75;
  color: var(--text2);
}

/* Sub-headings inside sections */
.adv-subhead {
  font-size: 13px; font-weight: 700; color: var(--text1);
  margin: 18px 0 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* Lists */
.adv-list {
  padding-left: 22px; margin: 10px 0;
}
.adv-list li {
  margin: 6px 0; line-height: 1.65; color: var(--text2);
}
.adv-list li::marker { color: var(--gold); }

/* Paragraphs */
.adv-para { margin: 10px 0; line-height: 1.7; }

/* Inline code */
.adv-code {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; font-size: 12px;
  font-family: 'JetBrains Mono', monospace; color: var(--teal);
}

/* Highlighted percentages & amounts */
.adv-pct {
  font-weight: 700; color: var(--teal);
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
}
.adv-amt {
  font-weight: 700; color: var(--gold);
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
}

/* Tables */
.adv-tbl-wrap {
  overflow-x: auto; margin: 12px 0; border-radius: var(--r);
  border: 1px solid var(--border);
}
.adv-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
.adv-table th {
  background: var(--surface2); padding: 10px 14px; text-align: left;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text3); white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.adv-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text2); white-space: nowrap;
}
.adv-table tr:last-child td { border-bottom: none; }
.adv-table tr:hover td { background: var(--bg2); }

/* Chart center label (absolute positioned in chart) */
.adv-chart-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}

/* Custom legend */
.adv-chart-legend {
  display: flex; flex-direction: column; gap: 6px;
  flex: 1; min-width: 0;
}
.adv-legend-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; border-radius: 8px;
  cursor: pointer; transition: all .15s;
  font-size: 12px;
}
.adv-legend-item:hover {
  background: var(--bg2);
  transform: translateX(3px);
}
.adv-legend-dot {
  width: 10px; height: 10px; border-radius: 3px;
  flex-shrink: 0;
}
.adv-legend-label {
  font-weight: 600; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adv-legend-pct {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 11px; color: var(--gold);
  min-width: 38px; text-align: right;
}
.adv-legend-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text3);
  min-width: 70px; text-align: right;
}

/* Chart card styling */
.adv-chart-card { overflow: visible; }
.adv-chart-card canvas { cursor: pointer; }

/* Section toggle */
.adv-toggle { transition: transform .2s; }

/* Follow-up chat */
.adv-chat-card { overflow: hidden; }
.adv-chat-msg { padding: 8px 20px; }
.adv-chat-user { display: flex; justify-content: flex-end; }
.adv-chat-ai { display: flex; justify-content: flex-start; }
.adv-chat-bubble {
  max-width: 85%; padding: 12px 16px;
  border-radius: 14px; font-size: 13px; line-height: 1.65;
  animation: fadeIn .3s ease;
}
.adv-chat-bubble-user {
  background: linear-gradient(135deg, rgba(212,175,55,.12), rgba(212,175,55,.06));
  border: 1px solid rgba(212,175,55,.2);
  color: var(--text1);
}
.adv-chat-bubble-ai {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
}
.adv-chat-ai-body p { margin: 4px 0; }
.adv-chat-ai-body ul { padding-left: 18px; margin: 6px 0; }
.adv-chat-ai-body li { margin: 3px 0; }
.adv-chat-ai-body strong { color: var(--text1); }

@media (max-width: 700px) {
  .adv-metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .adv-metric-value { font-size: 16px; }
  .adv-charts-row { flex-direction: column; }
  .adv-charts-row > .card { min-width: unset; }
  .adv-section-body { padding: 14px 16px; font-size: 13px; }
  .adv-report-header { padding: 18px 20px; }
  .adv-table td, .adv-table th { padding: 8px 10px; }
  .adv-chart-card > div { flex-direction: column !important; }
  .adv-chart-legend { margin-top: 10px; }
}

/* ═══════════════════════════════════════════════════
   FINTECH UI COMPONENTS — Phase 2
═══════════════════════════════════════════════════ */

/* ── STICKY TABLE HEADERS ───────────────────────── */
.tbl-wrap table thead { position: sticky; top: 0; z-index: 2; }
.tbl-wrap table thead tr { background: var(--surface); }

/* ── STRIPED TABLES ─────────────────────────────── */
.tbl-striped tbody tr:nth-child(even) { background: var(--surface2); }
.tbl-striped tbody tr:nth-child(even):hover { background: var(--bg2); }

/* ── CARD VARIANTS ──────────────────────────────── */
.card-elevated {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card-elevated:hover { box-shadow: var(--shadow2); transform: translateY(-1px); }

.card-compact { padding: 14px 16px; }
.card-compact .card-body { padding: 14px 16px; }
.card-compact .card-header { padding: 12px 16px; }

.card-border-left {
  border-left: 3px solid var(--accent, var(--gold));
}

/* ── ACCOUNT CARDS ──────────────────────────────── */
.acct-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--gold));
  border-radius: var(--r2); overflow: hidden;
  cursor: pointer; transition: all 0.15s;
  margin-bottom: 8px;
}
.acct-card:hover { box-shadow: var(--shadow); border-color: var(--border2); }

.acct-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; gap: 12px;
}
.acct-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
}
.acct-info { flex: 1; min-width: 0; }
.acct-name { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-sub { font-size: 11px; color: var(--text3); margin-top: 1px; }
.acct-balance { text-align: right; flex-shrink: 0; }
.acct-balance-val { font-size: 16px; font-weight: 700; color: var(--text); font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.acct-balance-sub { font-size: 11px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }

.acct-detail {
  border-top: 1px solid var(--border); padding: 16px 20px;
  background: var(--bg); animation: fadeIn 0.15s ease;
}
.acct-chevron {
  transition: transform 0.2s; color: var(--text4); font-size: 12px;
}
.acct-card.expanded .acct-chevron { transform: rotate(180deg); }

/* ── SECTION GROUPS ─────────────────────────────── */
.section-group { margin-bottom: 24px; }
.section-group-title {
  font-size: 13px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}

/* ── PROGRESS/HEALTH BARS ───────────────────────── */
.h-bar {
  height: 6px;
  background: var(--bg2);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.h-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}
/* Subtle shine effect */
.h-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
  border-radius: 99px 99px 0 0;
}
/* Labeled progress bar */
.h-bar-labeled {
  display: flex;
  align-items: center;
  gap: 8px;
}
.h-bar-labeled .h-bar {
  flex: 1;
}
.h-bar-pct {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text2);
  min-width: 36px;
  text-align: right;
}
.h-bar-sm { height: 4px; }
.h-bar-lg { height: 10px; }

/* ── KPI CHIPS ──────────────────────────────────── */
.kpi-chip {
  background: var(--surface2); border-radius: var(--r);
  padding: 6px 10px; min-width: 80px;
}
.kpi-chip-label {
  font-size: 10px; color: var(--text3); margin-bottom: 2px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.kpi-chip-value {
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── TOKEN BADGES (crypto) ──────────────────────── */
.token-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--surface2); padding: 2px 8px;
  border-radius: 6px; font-size: 11px; font-weight: 600;
  color: var(--text); white-space: nowrap;
}

/* ── ASSET ICON with dynamic color ──────────────── */
.asset-icon[style*="--c"] {
  background: color-mix(in srgb, var(--c) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
}

/* ── FORM FILTER (compact) ──────────────────────── */
.form-filter {
  padding: 6px 10px; font-size: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text);
  font-family: 'Inter', sans-serif; outline: none;
  transition: border-color 0.15s;
}
.form-filter:focus { border-color: var(--gold); }

/* ── BADGE AMBER ────────────────────────────────── */
.badge-amber { background: var(--amber-bg); color: var(--amber); }

/* ── STATUS DOT ─────────────────────────────────── */
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-red   { background: var(--red);   box-shadow: 0 0 6px var(--red); }
.dot-amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.dot-gray  { background: var(--text4); }

/* ── COLLAPSIBLE SECTION ────────────────────────── */
.collapsible-header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.collapsible-header:hover { background: var(--bg2); }
.collapsible-chevron { transition: transform 0.2s; color: var(--text3); }
.collapsible-header.open .collapsible-chevron { transform: rotate(180deg); }
.collapsible-body { display: none; }
.collapsible-body.open { display: block; }

/* ── INLINE ERROR BOX ───────────────────────────── */
.inline-error {
  margin-top: 12px; padding: 10px 14px;
  background: var(--red-bg); border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--r); font-size: 12px; color: var(--red); font-weight: 500;
}

/* ── WALLET CHAIN CARD ──────────────────────────── */
.chain-card {
  background: var(--surface); border-radius: var(--r2);
  padding: 16px 18px; border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: all 0.15s;
  display: flex; flex-direction: column;
}
.chain-card:hover { box-shadow: var(--shadow2); }
.chain-card-active { border-color: var(--gold); }
.chain-card-setup {
  border-style: dashed; opacity: 0.6;
  cursor: pointer;
}
.chain-card-setup:hover { opacity: 1; border-color: var(--gold); }
.chain-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.chain-card-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--text);
}
.chain-card-name span:first-child { font-size: 20px; }
.chain-card-addr {
  font-size: 11px; color: var(--text3); font-family: 'JetBrains Mono', monospace;
  cursor: pointer; padding: 4px 0;
}
.chain-card-balances {
  margin: 8px 0; display: flex; flex-direction: column; gap: 3px;
}
.chain-card-bal-row {
  display: flex; justify-content: space-between; align-items: center;
}
.chain-card-bal-token { font-size: 12px; font-weight: 600; color: var(--text); }
.chain-card-bal-usd { font-size: 11px; color: var(--text3); }
.chain-card-actions {
  margin-top: auto; display: flex; gap: 6px;
  border-top: 1px solid var(--border); padding-top: 10px;
}
.chain-card-actions .btn { flex: 1; justify-content: center; font-size: 11px; padding: 6px 0; }

/* ── DEBT OVERVIEW ──────────────────────────────── */
.debt-overview {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 20px 24px; margin-top: 16px;
  box-shadow: var(--shadow);
}
.debt-stat { text-align: center; }
.debt-stat-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text3); margin-bottom: 6px;
}
.debt-stat-value {
  font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 768px) {
  .debt-overview { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
  .debt-stat-value { font-size: 18px; }
}
@media (max-width: 480px) {
  .debt-overview { grid-template-columns: 1fr; }
}

/* ── BANKING SUB-TABS ────────────────────────────────── */
.bk-tabs {
  display: flex; gap: 0; margin-bottom: 22px;
  border-bottom: 2px solid var(--border); position: relative;
}
.bk-tab {
  padding: 12px 22px; font-size: 13px; font-weight: 600;
  color: var(--text3); background: none; border: none;
  cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .2s ease; display: flex; align-items: center; gap: 7px;
}
.bk-tab:hover { color: var(--text); background: var(--bg2); border-radius: 8px 8px 0 0; }
.bk-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
@media (max-width: 599px) {
  .bk-tab { padding: 10px 14px; font-size: 12px; }
}

/* ── FAQ & HELP CENTER ───────────────────────────────── */
.faq-search-wrap {
  margin-bottom: 28px;
}
.faq-search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}
.faq-search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text3); pointer-events: none;
}
.faq-search-input {
  width: 100%; padding: 14px 18px 14px 46px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 15px; font-family: inherit;
  color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s;
}
.faq-search-input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.12);
}
.faq-search-input::placeholder { color: var(--text3); }

.faq-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 28px;
  min-height: 400px;
}

/* Sidebar */
.faq-sidebar {
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 80px; align-self: start;
}
.faq-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  cursor: pointer; transition: all .15s;
  font-size: 13.5px; font-weight: 500; color: var(--text2);
}
.faq-sidebar-item:hover { background: var(--bg2); color: var(--text); }
.faq-sidebar-item.active {
  background: rgba(212,175,55,.1); color: var(--gold); font-weight: 600;
}
.faq-sidebar-item.dimmed { opacity: .35; }
.faq-sidebar-icon { font-size: 17px; flex-shrink: 0; }
.faq-sidebar-label { flex: 1; }
.faq-sidebar-count {
  font-size: 11px; font-weight: 600; color: var(--text3);
  background: var(--bg2); padding: 2px 8px; border-radius: 10px;
  min-width: 22px; text-align: center;
}
.faq-sidebar-item.active .faq-sidebar-count {
  background: rgba(212,175,55,.15); color: var(--gold);
}

/* Content area */
.faq-main { min-width: 0; }
.faq-category-block { margin-bottom: 24px; }
.faq-category-header {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.faq-items { display: flex; flex-direction: column; gap: 8px; }

/* Accordion items */
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.faq-item:hover { border-color: var(--border2); }
.faq-item.open { border-color: rgba(212,175,55,.3); box-shadow: 0 2px 12px rgba(0,0,0,.06); }

.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer; gap: 12px;
  font-size: 14px; font-weight: 600; color: var(--text);
  transition: background .15s;
}
.faq-question:hover { background: var(--bg2); }
.faq-item.open .faq-question { color: var(--gold); }
.faq-q-text { flex: 1; }

.faq-chevron {
  flex-shrink: 0; transition: transform .25s ease;
  color: var(--text3);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--gold); }

.faq-answer {
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-answer-inner {
  padding: 0 20px 18px 20px;
  font-size: 13.5px; line-height: 1.7; color: var(--text2);
}
.faq-answer-inner strong { color: var(--text); font-weight: 600; }
.faq-answer-inner mark {
  background: var(--gold); color: #000;
  padding: 1px 3px; border-radius: 3px;
}

/* Search results info */
.faq-search-info {
  font-size: 13px; color: var(--text3); margin-bottom: 20px;
  padding: 10px 14px; background: var(--bg2); border-radius: 8px;
}

/* Empty state */
.faq-empty {
  text-align: center; padding: 60px 20px;
}
.faq-empty-icon { font-size: 48px; margin-bottom: 16px; }
.faq-empty-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.faq-empty-desc { font-size: 14px; color: var(--text3); }

/* Contact support section */
.faq-contact {
  margin-top: 40px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.faq-contact-inner {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 28px;
}
.faq-contact-icon { font-size: 32px; flex-shrink: 0; }
.faq-contact-text { flex: 1; }
.faq-contact-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.faq-contact-desc { font-size: 13px; color: var(--text3); line-height: 1.5; }

/* Mobile responsive */
@media (max-width: 768px) {
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .faq-sidebar {
    position: static;
    flex-direction: row; flex-wrap: wrap; gap: 6px;
  }
  .faq-sidebar-item {
    padding: 8px 12px; font-size: 12.5px;
    border: 1px solid var(--border); border-radius: 20px;
  }
  .faq-sidebar-item.active {
    border-color: var(--gold);
  }
  .faq-sidebar-count { display: none; }
  .faq-question { padding: 14px 16px; font-size: 13.5px; }
  .faq-answer-inner { padding: 0 16px 16px 16px; font-size: 13px; }
  .faq-contact-inner {
    flex-direction: column; text-align: center;
    padding: 20px;
  }
}

/* ── LEGAL PAGE ──────────────────────────────────────── */
.legal-tabs-wrap {
  display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px;
  border-bottom: 1px solid var(--border); margin-bottom: 24px;
  scrollbar-width: none;
}
.legal-tabs-wrap::-webkit-scrollbar { display: none; }
.legal-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--r) var(--r) 0 0;
  font-size: 12.5px; font-weight: 600; color: var(--text3);
  cursor: pointer; white-space: nowrap; transition: all .15s;
  border-bottom: 2px solid transparent;
}
.legal-tab:hover { color: var(--text); background: var(--bg2); }
.legal-tab.active {
  color: var(--gold); border-bottom-color: var(--gold);
  background: rgba(184,134,11,.06);
}
.legal-tab-icon { font-size: 14px; }
.legal-body {
  animation: fadeIn .3s; line-height: 1.7;
}
.legal-header { margin-bottom: 28px; }
.legal-h2 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.legal-effective { font-size: 12px; color: var(--text4); }
.legal-section { margin-bottom: 24px; }
.legal-h3 {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 0 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.legal-p { font-size: 13px; color: var(--text2); margin: 0 0 10px; }
.legal-ul {
  list-style: none; padding: 0; margin: 0 0 10px;
}
.legal-ul li {
  font-size: 13px; color: var(--text2); padding: 5px 0 5px 18px;
  position: relative;
}
.legal-ul li::before {
  content: ''; position: absolute; left: 0; top: 12px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); opacity: .7;
}
.legal-warning-box {
  background: rgba(217,119,6,.08); border: 1px solid rgba(217,119,6,.2);
  border-radius: var(--r); padding: 16px 20px;
  font-size: 13px; color: var(--text2); line-height: 1.65;
}
.legal-warning-box strong { color: #D97706; }
.legal-table {
  width: 100%; border-collapse: collapse; margin: 8px 0;
}
.legal-table td {
  padding: 10px 14px; font-size: 13px; color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td:first-child { width: 220px; color: var(--text3); font-size: 12px; }

/* Legal disclaimer bar — fixed at bottom of viewport */
.legal-disclaimer-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  padding: 8px 24px; text-align: center;
  font-size: 10.5px; color: var(--text4); line-height: 1.5;
  border-top: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.legal-disclaimer-bar a { color: var(--gold); white-space: nowrap; text-decoration: none; }
.legal-disclaimer-bar a:hover { text-decoration: underline; }
.legal-disclaimer-bar .disc-sep { opacity: .3; }
/* Ensure page content doesn't hide behind fixed footer */
.page { padding-bottom: 44px; }

@media (max-width: 700px) {
  .legal-tab { padding: 8px 10px; font-size: 11px; gap: 4px; }
  .legal-tab-icon { font-size: 12px; }
  .legal-h2 { font-size: 18px; }
  .legal-table td:first-child { width: 140px; }
}

/* ── AI TEAM CHAT ────────────────────────────────────── */
.ai-team-layout { display: flex; height: calc(100vh - 80px); gap: 0; }
.ai-team-sidebar { width: 260px; border-right: 1px solid var(--border); overflow-y: auto; padding: 16px; background: var(--surface); flex-shrink: 0; }
.ai-team-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ai-team-profile { width: 280px; border-left: 1px solid var(--border); padding: 20px; overflow-y: auto; flex-shrink: 0; background: var(--surface); }

.ai-agent-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: all .15s; margin-bottom: 4px; }
.ai-agent-card:hover, .ai-agent-card.active { background: var(--gold-bg); }
.ai-agent-avatar { font-size: 24px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface2); flex-shrink: 0; }
.ai-agent-name { font-weight: 700; font-size: 13px; }
.ai-agent-title { font-size: 10px; color: var(--text3); }
.ai-agent-status { margin-left: auto; font-size: 10px; color: #16A34A; white-space: nowrap; }

.ai-chat-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; background: var(--surface); }
.ai-chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ai-report-bar { padding: 6px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; background: var(--surface); }
.ai-report-btn { padding: 3px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); font-size: 10px; font-weight: 600; cursor: pointer; color: var(--text2); transition: all .15s; font-family: 'Inter', sans-serif; }
.ai-report-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,0.06); }
.ai-chat-input-wrap { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; background: var(--surface); }
.ai-chat-input { flex: 1; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); font-size: 14px; outline: none; background: var(--bg); font-family: 'Inter', sans-serif; }
.ai-chat-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.1); }
.ai-chat-input:disabled { opacity: 0.6; }
.ai-chat-send { padding: 12px 24px; border-radius: 12px; background: var(--gold); color: white; border: none; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 13px; transition: all .15s; }
.ai-chat-send:hover:not(:disabled) { background: var(--gold-h); transform: translateY(-1px); }
.ai-chat-send:disabled { opacity: 0.6; cursor: not-allowed; }

.ai-msg { padding: 12px 16px; border-radius: 16px; font-size: 13px; line-height: 1.6; animation: aiMsgIn 0.3s ease; word-wrap: break-word; }
.ai-msg.user { background: var(--gold); color: white; border-bottom-right-radius: 4px; }
.ai-msg.assistant { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ai-msg-meta { font-size: 10px; color: var(--text4); margin-top: 4px; }

.ai-typing { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 12px; color: var(--text3); font-style: italic; }
.ai-typing-dots { display: inline-flex; gap: 3px; }
.ai-typing-dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: aiTyping 1.4s infinite; }
.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes aiTyping { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

.ai-welcome { text-align: center; padding: 60px 20px; }
.ai-welcome h2 { font-size: 28px; margin-bottom: 8px; color: var(--text); }
.ai-welcome p { color: var(--text3); margin-bottom: 40px; font-size: 15px; }
.ai-welcome-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 720px; margin: 0 auto; }
.ai-welcome-card { padding: 24px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all .2s; text-align: center; }
.ai-welcome-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.ai-welcome-card .ai-agent-avatar { font-size: 36px; width: 56px; height: 56px; margin: 0 auto 12px; }

.ai-conv-list { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.ai-conv-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; margin-bottom: 2px; transition: background .1s; }
.ai-conv-item:hover { background: var(--gold-bg); }
.ai-conv-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-conv-date { font-size: 10px; color: var(--text4); }

/* AI Team FAB (replaced by chat-panel.css #chat-fab) */

@media (max-width: 1100px) {
  .ai-team-profile { display: none; }
}
@media (max-width: 900px) {
  .ai-team-layout { flex-direction: column; height: auto; min-height: calc(100vh - 80px); }
  .ai-team-sidebar { width: 100%; overflow-x: auto; white-space: nowrap; border-right: none; border-bottom: 1px solid var(--border); padding: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
  .ai-team-sidebar .ai-conv-list { display: none; }
  .ai-team-sidebar > div:first-child { display: none; }
  .ai-agent-card { white-space: nowrap; margin-bottom: 0; }
  .ai-team-chat { min-height: 500px; }
  .ai-welcome-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-msg { max-width: 85% !important; }
}

/* ── ADMIN QUICK ACCESS MENU ────────────────────────── */
.adm-menu { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.adm-menu-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text2); padding: 16px 0; border-radius: 12px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; min-width: 80px; transition: all .2s ease; text-align: center; font-family: 'Inter', sans-serif; }
.adm-menu-btn:hover { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }
.adm-menu-btn.active { background: var(--gold); color: white; border-color: var(--gold); }
.adm-menu-btn.active .adm-menu-icon { background: rgba(255,255,255,0.2); }
.adm-menu-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--bg); }
.adm-menu-btn:hover .adm-menu-icon { background: rgba(212,175,55,0.15); }
@media (max-width: 768px) { .adm-menu { gap: 6px; } .adm-menu-btn { padding: 12px 0; font-size: 10px; min-width: 60px; } .adm-menu-icon { width: 36px; height: 36px; font-size: 18px; } }

/* Admin sub-nav (settings tabs) */
.adm-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-nav-btn { padding: 6px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text2); transition: all .15s; font-family: 'Inter', sans-serif; white-space: nowrap; }
.adm-nav-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,0.06); }
.adm-nav-btn.active { background: var(--gold); color: white; border-color: var(--gold); }
.adm-nav-btn.adm-sub { font-size: 11px; padding: 5px 12px; border-radius: 8px; }
.adm-nav-btn.adm-sub.active { background: rgba(212,175,55,0.15); color: var(--gold); border-color: var(--gold); }

/* ── WIZARD (RWA Onboard, FixedNote create) ─────────── */
.wiz-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; min-height: 520px; }
.wiz-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 20px; height: fit-content; position: sticky; top: 80px; }
.wiz-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-left: 3px solid var(--border); margin-bottom: 4px; border-radius: 0 8px 8px 0; transition: all 0.15s; }
.wiz-step.done { border-left-color: var(--green); cursor: pointer; }
.wiz-step.done:hover { background: rgba(34,197,94,0.06); }
.wiz-step.active { border-left-color: var(--gold); background: rgba(212,175,55,0.08); }
.wiz-step-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; border: 2px solid var(--border); color: var(--text4); background: var(--bg); flex-shrink: 0; }
.wiz-step.active .wiz-step-num { background: var(--gold); color: #000; border-color: var(--gold); }
.wiz-step.done .wiz-step-num { background: rgba(34,197,94,0.15); color: var(--green); border-color: var(--green); }
.wiz-step-label { font-size: 12px; font-weight: 500; color: var(--text4); }
.wiz-step.active .wiz-step-label { font-weight: 700; color: var(--text); }
.wiz-step.done .wiz-step-label { color: var(--text3); }
.wiz-progress { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.wiz-progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.wiz-progress-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width .3s; }
.wiz-progress-text { font-size: 10px; color: var(--text4); text-align: center; margin-top: 6px; }
.wiz-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 28px; min-height: 420px; }
.wiz-step-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.wiz-step-sub { font-size: 11px; color: var(--text4); margin-bottom: 22px; }
.wiz-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding: 14px 0; }
.wiz-footer .btn { padding: 10px 26px; }
.wiz-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.wiz-field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.wiz-field-full { margin-bottom: 14px; }
.wiz-section-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text3); margin: 18px 0 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.wiz-card-pick { cursor: pointer; padding: 16px 10px; border-radius: 10px; text-align: center; border: 2px solid var(--border); background: var(--surface2); transition: all 0.15s; }
.wiz-card-pick:hover { transform: translateY(-2px); border-color: var(--gold); }
.wiz-card-pick.selected { border-color: var(--gold); background: rgba(212,175,55,0.06); }
.wiz-card-pick .ico { font-size: 28px; margin-bottom: 6px; }
.wiz-card-pick .lbl { font-size: 13px; font-weight: 700; color: var(--text); }
.wiz-card-pick .desc { font-size: 10px; color: var(--text4); margin-top: 4px; line-height: 1.4; }

@media (max-width: 900px) {
  .wiz-layout { grid-template-columns: 200px 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .wiz-layout { grid-template-columns: 1fr; }
  .wiz-sidebar { position: static; }
  .wiz-field-row { grid-template-columns: 1fr; }
  .wiz-field-row.three { grid-template-columns: 1fr; }
}

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes slideUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes spin    { to { transform: rotate(360deg); } }
