/* fintech-theme.css — Shared design tokens, header/nav/footer for TradeNavi platform pages.
 * Pages should link this LAST so its rules override any page-local defaults.
 */

:root{
  --bg:#FAFBFC;--surface:#FFFFFF;--surface-2:#F5F7FA;
  --border:#E5E7EB;--border-strong:#D1D5DB;
  --text:#0F172A;--text-2:#475569;--text-3:#94A3B8;
  --brand:#0F3CC9;--brand-2:#1E50E5;--brand-soft:#EEF2FF;--brand-strong:#0A2BA5;
  --up:#DC2626;--up-soft:#FEF2F2;
  --down:#10B981;--down-soft:#ECFDF5;
  --gold:#F59E0B;--gold-soft:#FFFBEB;
  --radius:14px;--radius-lg:20px;--radius-pill:999px;
  --shadow-sm:0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:0 4px 12px rgba(15,23,42,0.06), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg:0 12px 32px rgba(15,37,121,0.08), 0 4px 12px rgba(15,37,121,0.04);
  /* legacy aliases used by some pages */
  --accent:#0F3CC9;--accent2:#EEF2FF;--accent3:#C7D2FE;
  --gold2:#FFFBEB;
  --green:#10B981;--green2:#ECFDF5;
  --red:#DC2626;--red2:#FEF2F2;
}

html,body{font-family:'Inter','Noto Sans TC',sans-serif;background:var(--bg);color:var(--text);}
body{font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;}

/* ── Header ───────────────────────────────────────── */
.tn-header{
  background:rgba(255,255,255,0.85);
  backdrop-filter:saturate(180%) blur(10px);
  -webkit-backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--border);
  position:sticky;top:0;z-index:200;
}
.tn-header-inner{max-width:1280px;margin:0 auto;padding:0 28px;height:64px;display:flex;align-items:center;gap:32px;}
.tn-logo{display:flex;align-items:center;gap:8px;cursor:pointer;flex-shrink:0;text-decoration:none;}
.tn-logo-mark{
  width:32px;height:32px;border-radius:9px;
  background:linear-gradient(135deg,var(--brand) 0%,var(--brand-2) 100%);
  display:flex;align-items:center;justify-content:center;
  color:white;font-weight:900;font-size:16px;
  box-shadow:0 4px 12px rgba(15,60,201,0.3);
}
.tn-logo-text{font-size:18px;font-weight:800;letter-spacing:-0.4px;color:var(--text);font-family:'Inter','Noto Sans TC',sans-serif;}
.tn-logo-text em{font-style:normal;color:var(--brand);}
.tn-nav{display:flex;gap:2px;align-items:center;}
.tn-nav-btn{padding:8px 14px;border-radius:8px;font-size:14px;font-weight:500;color:var(--text-2);transition:all 0.15s;border:none;background:none;cursor:pointer;font-family:inherit;}
.tn-nav-btn:hover{background:var(--surface-2);color:var(--text);}
.tn-nav-btn.active{background:var(--brand-soft);color:var(--brand);font-weight:600;}
.tn-header-right{margin-left:auto;display:flex;align-items:center;gap:12px;flex-shrink:0;}
.tn-btn-login{padding:8px 18px;border-radius:var(--radius-pill);background:var(--text);color:white;font-size:13px;font-weight:600;transition:all 0.15s;border:none;cursor:pointer;font-family:inherit;}
.tn-btn-login:hover{background:#000;transform:translateY(-1px);box-shadow:var(--shadow-md);}
.tn-user-info{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--text-2);}
.tn-user-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;border:1.5px solid var(--border);}
.tn-btn-signout{font-size:12px;color:var(--text-3);padding:4px 8px;border-radius:6px;background:none;border:none;cursor:pointer;font-family:inherit;}
.tn-btn-signout:hover{background:var(--surface-2);color:var(--text);}

/* 行動版：隱藏桌機 nav（改用底部 bottom nav），縮短 header 內距，避免 nav-btn 中文字直立顯示 */
@media(max-width:640px){
  .tn-nav{display:none;}
  .tn-header-inner{padding:0 14px;gap:12px;height:54px;}
  .tn-logo-text{font-size:16px;}
  .tn-nav-btn{white-space:nowrap;}
}

/* ── Footer ───────────────────────────────────────── */
.tn-footer{background:#0F172A;color:#94A3B8;padding:48px 28px 32px;font-size:13px;}
.tn-footer-inner{max-width:1280px;margin:0 auto;}
.tn-footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:32px;margin-bottom:32px;}
@media(max-width:700px){.tn-footer-grid{grid-template-columns:1fr 1fr;gap:28px 20px;}}
.tn-footer-brand{font-size:18px;font-weight:800;color:white;margin-bottom:10px;}
.tn-footer-brand em{font-style:normal;color:#60A5FA;}
.tn-footer-tag{font-size:13px;color:#94A3B8;line-height:1.6;max-width:280px;}
.tn-footer-col h4{font-size:12px;font-weight:700;color:white;letter-spacing:1px;text-transform:uppercase;margin-bottom:12px;}
.tn-footer-col a{display:block;font-size:13px;color:#94A3B8;padding:4px 0;text-decoration:none;transition:color 0.15s;}
.tn-footer-col a:hover{color:white;}
.tn-footer-disclaimer{border-top:1px solid #334155;padding-top:24px;font-size:11px;line-height:1.7;color:#64748B;}
.tn-footer-bottom{margin-top:18px;padding-top:18px;border-top:1px solid #334155;display:flex;justify-content:space-between;font-size:11px;color:#64748B;}
@media(max-width:600px){.tn-footer-bottom{flex-direction:column;gap:6px;}}

/* ── Common buttons ──────────────────────────────── */
.tn-btn-primary{padding:13px 26px;border-radius:var(--radius-pill);background:var(--brand);color:white;font-size:15px;font-weight:600;transition:all 0.15s;display:inline-flex;align-items:center;gap:8px;border:none;cursor:pointer;font-family:inherit;}
.tn-btn-primary:hover{background:var(--brand-strong);transform:translateY(-1px);box-shadow:0 8px 20px rgba(15,60,201,0.25);}
.tn-btn-ghost{padding:13px 26px;border-radius:var(--radius-pill);background:var(--surface);color:var(--text);border:1px solid var(--border);font-size:15px;font-weight:600;transition:all 0.15s;cursor:pointer;font-family:inherit;}
.tn-btn-ghost:hover{border-color:var(--text);}

.mono{font-family:'JetBrains Mono',monospace;font-feature-settings:"tnum" 1;}
