﻿/* =========================================================
   WYNOT design system — Light (white & blue) professional theme
   ========================================================= */
:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --border: #e3e9f3;
  --border-strong: #cfd8e6;
  --text: #0f1f3d;
  --text-2: #334766;
  --muted: #6b7a94;
  --primary: #1f5eff;
  --primary-600: #1a4fd6;
  --primary-700: #1642b3;
  --primary-50: #eef3ff;
  --primary-100: #dce6ff;
  --sky: #0ea5e9;
  --green: #12a150;  --green-50: #e8f8ef;
  --amber: #d97706;  --amber-50: #fff5e6;
  --red: #dc3545;    --red-50: #fdecee;
  --violet: #6d4aff; --violet-50: #f1edff;
  --grad: linear-gradient(135deg, #1f5eff 0%, #2f8bff 55%, #19b6f5 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 38, 84, .06);
  --shadow: 0 1px 3px rgba(16, 38, 84, .06), 0 8px 24px -12px rgba(16, 38, 84, .12);
  --shadow-lg: 0 24px 60px -24px rgba(31, 94, 255, .35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-700); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.015em; color: var(--text); font-family: var(--font-display); }
body { text-rendering: optimizeLegibility; -moz-osx-font-smoothing: grayscale; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); background: var(--primary-50); color: var(--primary-700); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.container { width: min(1200px, 92%); margin-inline: auto; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 } .mb-0 { margin-bottom: 0 } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem }
.flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .62rem 1.1rem; border-radius: 0; border: 1px solid var(--primary); cursor: pointer;
  font: 600 .9rem var(--font-display); letter-spacing: .01em; color: #fff; background: var(--primary); transition: background .15s, box-shadow .15s, transform .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; box-shadow: 0 6px 16px -6px rgba(31, 94, 255, .55); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--primary); border-color: var(--primary); box-shadow: none; }
.btn-soft { background: var(--primary-50); color: var(--primary); border-color: var(--primary-50); }
.btn-soft:hover { background: var(--primary-100); color: var(--primary-700); border-color: var(--primary-100); box-shadow: none; }
.btn-sm { padding: .4rem .75rem; font-size: .82rem; }
.btn-xs { padding: .2rem .5rem; font-size: .75rem; border-radius: 0; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-success:hover { background: #0e8a44; border-color: #0e8a44; box-shadow: none; }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c3c8; }
.btn-danger:hover { background: var(--red-50); color: var(--red); border-color: var(--red); box-shadow: none; }
.btn-block { width: 100%; }

/* ----- Cards ----- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 1rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: -1.35rem -1.35rem 1.1rem; padding: 1rem 1.35rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }

/* Stat cards */
.stat { position: relative; display: block; color: inherit; }
a.stat:hover { border-color: var(--primary-100); box-shadow: var(--shadow); color: inherit; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat .value { font-size: 1.55rem; font-weight: 700; margin-top: .2rem; letter-spacing: -.02em; }
.stat .hint { margin-top: .25rem; }
.stat .icon { position: absolute; right: 1.1rem; top: 1.1rem; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.stat .icon .ico { width: 20px; height: 20px; }
.stat.green .icon { background: var(--green-50); color: var(--green); }
.stat.cyan .icon { background: #e6f6fd; color: var(--sky); }
.stat.amber .icon { background: var(--amber-50); color: var(--amber); }
.stat.violet .icon { background: var(--violet-50); color: var(--violet); }
.stat.red .icon { background: var(--red-50); color: var(--red); }
.stat-primary { background: var(--grad); border: 0; color: #fff; }
.stat-primary .label, .stat-primary .hint { color: rgba(255,255,255,.85); }
.stat-primary .icon { background: rgba(255,255,255,.18); color: #fff; }

/* ----- Forms ----- */
label { display: block; font-size: .84rem; color: var(--text-2); margin-bottom: .35rem; font-weight: 500; }
.field { margin-bottom: 1rem; }
input, select, textarea {
  width: 100%; padding: .62rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: #fff; color: var(--text); font: 400 .92rem var(--font); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #9aa7bd; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, .15); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=range] { padding: 0; height: 6px; accent-color: var(--primary); border: 0; }
.check { display: flex; gap: .55rem; align-items: center; font-weight: 400; color: var(--text-2); cursor: pointer; }
.hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.input-group { display: flex; gap: .5rem; }
.input-group input { flex: 1; min-width: 0; }

/* ----- Alerts & badges ----- */
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .9rem; display: flex; gap: .6rem; align-items: flex-start; }
.alert-success { background: var(--green-50); border-color: #b9e8cc; color: #0b6b36; }
.alert-error { background: var(--red-50); border-color: #f5c2c7; color: #a31f2d; }
.alert-info { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-700); }
.alert-warn { background: var(--amber-50); border-color: #fbd9a5; color: #92500a; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.4; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-blue { background: var(--primary-50); color: var(--primary); }
.badge-gray { background: #eef1f6; color: var(--muted); }

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.card > .table-wrap:only-child, .card-flush .table-wrap { border: 0; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
td.wrap { white-space: normal; min-width: 200px; }
td.actions { white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 2.2rem 1rem !important; }
.pos { color: var(--green); font-weight: 600; } .neg { color: var(--red); font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.hash { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--mono); font-size: .8rem; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: .15rem .45rem; border-radius: 6px; }
.hash button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; display: inline-flex; }
.hash button:hover { color: var(--primary); }
.hash .ico { width: 14px; height: 14px; }
.hash button.copied { color: var(--green); }
.rank { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; background: var(--primary-50); color: var(--primary-700); font-weight: 700; font-size: .78rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.mini { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .9rem; }
.mini span { display: block; font-size: .75rem; color: var(--muted); }
.mini strong { font-size: 1.1rem; }
.user-cell { display: flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--text); }
.user-cell .avatar { width: 28px; height: 28px; font-size: .75rem; }
.action-stack { display: flex; flex-direction: column; gap: .4rem; min-width: 260px; }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.inline-form input { padding: .38rem .55rem; font-size: .8rem; width: 140px; }

/* ----- Public nav ----- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); display: inline-flex; align-items: center; gap: .55rem; }
.logo:hover { color: var(--text); }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px -6px rgba(31, 94, 255, .6); }
.logo-mark .ico { width: 18px; height: 18px; stroke-width: 2.5; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a:not(.btn) { color: var(--text-2); font-weight: 500; font-size: .92rem; }
.nav-links a:not(.btn):hover { color: var(--primary); }

/* ----- Hero ----- */
.hero { padding: 5rem 0 4.5rem; position: relative; overflow: hidden; background:
  radial-gradient(700px 380px at 85% 10%, rgba(25, 182, 245, .14), transparent 70%),
  radial-gradient(800px 420px at 5% 0%, rgba(31, 94, 255, .12), transparent 70%),
  linear-gradient(180deg, #fff 0%, #f4f7fc 100%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); letter-spacing: -.035em; }
.hero p.lead { font-size: 1.12rem; color: var(--text-2); max-width: 540px; }
.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 999px; background: var(--primary-50); color: var(--primary-700); font-size: .82rem; font-weight: 600; margin-bottom: 1.2rem; border: 1px solid var(--primary-100); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(18, 161, 80, .18); animation: pulse 2s infinite; }
.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.hero-stats strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.hero-stats span { font-size: .85rem; color: var(--muted); }
.calc-card { box-shadow: var(--shadow-lg); border-color: var(--primary-100); padding: 1.6rem; }
.calc-result { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .8rem; }
.calc-result div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .85rem 1rem; }
.calc-result span { font-size: .8rem; }
.calc-result strong { display: block; font-size: 1.3rem; }
.calc-result .big { background: var(--primary-50); border-color: var(--primary-100); }

section { padding: 4.5rem 0; }
section.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: .6rem; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 2.8rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -.03em; }
.section-head p { color: var(--text-2); }
.feature .fico { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin-bottom: 1rem; }
.feature .fico .ico { width: 22px; height: 22px; }
.feature h3 { font-size: 1.05rem; }
.card.hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-100); }
.card-highlight { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.plan { text-align: center; padding: 1.8rem 1.5rem; }
.plan h3 { font-size: 1.05rem; color: var(--text-2); }
.plan .apy { font-size: 2.6rem; font-weight: 800; color: var(--primary); letter-spacing: -.03em; line-height: 1.1; }
.plan ul { list-style: none; padding: 0; margin: 1.3rem 0 1.5rem; color: var(--text-2); font-size: .9rem; text-align: left; }
.plan li { padding: .5rem 0; border-bottom: 1px solid var(--border); display: flex; gap: .5rem; align-items: center; }
.plan li .ico { color: var(--green); width: 16px; height: 16px; }
.plan.featured { border: 2px solid var(--primary); position: relative; box-shadow: var(--shadow-lg); }
.plan.featured::before { content: 'Most popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 700; margin-bottom: .9rem; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: '+'; color: var(--primary); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { margin-bottom: .6rem; }
.faq p { color: var(--text-2); }
.cta-band { background: var(--grad); color: #fff; border-radius: 18px; padding: 3rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; margin: 0 0 .4rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,.88); }
.cta-band .btn { background: #fff; color: var(--primary); border-color: #fff; }
.footer { background: #fff; border-top: 1px solid var(--border); padding: 2.5rem 0; color: var(--muted); font-size: .86rem; }
.disclaimer { font-size: .78rem; color: var(--muted); max-width: 900px; }

/* Binary explainer diagram (landing) */
.bdiagram { display: grid; justify-items: center; gap: 1.2rem; }
.bdiagram .row { display: flex; gap: 3rem; justify-content: center; }
.bdiagram .bnode { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .6rem 1rem; font-weight: 600; font-size: .85rem; box-shadow: var(--shadow-sm); min-width: 110px; text-align: center; }
.bdiagram .bnode.you { background: var(--primary); color: #fff; border-color: var(--primary); }
.bdiagram .bnode small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.bdiagram .bnode.you small { color: rgba(255,255,255,.8); }
.match-box { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: center; text-align: center; }
.match-box .leg { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .9rem; }
.match-box .leg strong { display: block; font-size: 1.25rem; }

/* ----- Auth ----- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--grad); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 80px solid rgba(255,255,255,.07); right: -200px; bottom: -200px; }
.auth-side .logo { color: #fff; }
.auth-side .logo-mark { background: rgba(255,255,255,.2); box-shadow: none; }
.auth-side h2 { color: #fff; font-size: 2rem; max-width: 420px; }
.auth-side ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.auth-side li { display: flex; gap: .6rem; align-items: center; color: rgba(255,255,255,.92); }
.auth-main { display: grid; place-items: center; padding: 2rem 1rem; background: #fff; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .3rem; }

/* ----- Dashboard shell ----- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 1.1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .logo { padding: .2rem .6rem 1.1rem; }
.side-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #97a3b8; padding: 1rem .75rem .4rem; font-weight: 700; }
.side-link { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; font-size: .9rem; transition: background .15s, color .15s; margin-bottom: 1px; }
.side-link .ico { color: #8592a8; }
.side-link:hover { background: var(--surface-2); color: var(--primary); }
.side-link:hover .ico { color: var(--primary); }
.side-link.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.side-link.active .ico { color: var(--primary); }
.side-link .count { margin-left: auto; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; }
.side-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.side-card { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius-sm); padding: .85rem; margin: .5rem 0 .8rem; font-size: .82rem; color: var(--text-2); }
.side-card strong { display: block; color: var(--primary-700); font-size: 1.05rem; }
.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 1.75rem; gap: 1rem; position: sticky; top: 0; z-index: 40; }
.crumbs { font-size: .82rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.45rem; margin: 0; }
.page-head p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.main { padding: 1.6rem 1.75rem 3rem; }
.user-chip { display: flex; align-items: center; gap: .6rem; font-size: .88rem; font-weight: 600; color: var(--text); }
.user-chip small { display: block; font-weight: 500; color: var(--muted); font-size: .74rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.top-actions { display: flex; align-items: center; gap: 1rem; }
.balance-pill { display: flex; align-items: center; gap: .45rem; background: var(--primary-50); color: var(--primary-700); border-radius: 999px; padding: .35rem .8rem; font-weight: 600; font-size: .85rem; }
.menu-toggle { display: none; background: #fff; border: 1px solid var(--border-strong); color: var(--text); border-radius: var(--radius-sm); padding: .4rem .55rem; cursor: pointer; }
.progress { height: 6px; border-radius: 999px; background: #e8edf5; overflow: hidden; min-width: 90px; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.copy-box { display: flex; gap: .5rem; }
.copy-box input { font-family: var(--mono); font-size: .82rem; background: var(--surface-2); }
.tabs { display: flex; gap: .25rem; margin-bottom: 1.2rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tabs a { padding: .6rem .95rem; color: var(--muted); font-size: .88rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--primary); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .tabs { margin-bottom: 0; border-bottom: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .2rem; }
.toolbar .tabs a { border: 0; border-radius: 6px; padding: .4rem .8rem; margin: 0; }
.toolbar .tabs a.active { background: var(--primary-50); }
.search { position: relative; }
.search .ico { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { padding-left: 2.1rem; width: 260px; }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.plan-pick label { margin: 0; cursor: pointer; }
.plan-pick input { display: none; }
.plan-pick .opt { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .85rem; background: #fff; transition: all .15s; color: var(--text); }
.plan-pick .opt:hover { border-color: var(--primary); }
.plan-pick input:checked + .opt { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, .15); background: var(--primary-50); }
.plan-pick .opt b { display: block; font-size: 1rem; }
.plan-pick .opt .rate { color: var(--primary); font-weight: 700; font-size: .9rem; }
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 1rem; border-bottom: 1px solid var(--border); }
.chart-bars .bar { flex: 1; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; transition: opacity .15s; position: relative; }
.chart-bars .bar.alt { background: #93c5fd; }
.chart-bars .bar:hover { opacity: 1; }
.chart-bars .bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: .25rem .5rem; border-radius: 6px; font-size: .72rem; white-space: nowrap; z-index: 5; }
.chart-labels { display: flex; gap: 6px; font-size: .68rem; color: var(--muted); margin-top: .4rem; }
.chart-labels span { flex: 1; text-align: center; }
.legend { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; font-size: .88rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.pager { display: flex; gap: .35rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }

/* ----- Binary genealogy tree ----- */
.tree-wrap { overflow-x: auto; padding: 1rem 0 .5rem; }
.tree { min-width: 900px; }
.tree ul { padding-top: 22px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.tree > ul { padding-top: 0; }
.tree li { list-style: none; position: relative; padding: 22px 4px 0; flex: 1; display: flex; flex-direction: column; align-items: center; }
.tree > ul > li { padding-top: 0; }
.tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 2px solid #c9d6ee; width: 50%; height: 22px; }
.tree li::after { right: auto; left: 50%; border-left: 2px solid #c9d6ee; }
.tree li:only-child::before, .tree li:only-child::after { display: none; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid #c9d6ee; border-radius: 0 8px 0 0; }
.tree li:first-child::after { border-radius: 8px 0 0 0; }
.tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid #c9d6ee; height: 22px; }
.tnode { display: flex; flex-direction: column; align-items: center; gap: .15rem; width: 128px; padding: .7rem .5rem; background: #fff; border: 1px solid var(--border); border-radius: 10px; color: var(--text); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; position: relative; z-index: 1; }
a.tnode:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.tnode .tavatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--grad); color: #fff; }
.tnode.inactive .tavatar { background: #cbd5e1; }
.tnode.empty { border-style: dashed; background: var(--surface-2); box-shadow: none; color: var(--muted); }
.tnode.empty .tavatar { background: #fff; border: 1px dashed var(--border-strong); color: var(--muted); }
.tnode .tname { font-weight: 600; font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tnode .tmeta { font-size: .74rem; color: var(--muted); }
.tnode.active .tmeta { color: var(--green); font-weight: 600; }
.tnode .tlegs { display: flex; gap: .3rem; margin-top: .2rem; }
.tnode .tlegs span { font-size: .68rem; font-weight: 600; background: var(--primary-50); color: var(--primary); padding: .05rem .4rem; border-radius: 4px; }
.tree > ul > li > .tnode { border: 2px solid var(--primary); width: 150px; }
.leg-card { border-top: 3px solid var(--primary); }
.leg-card.right { border-top-color: var(--sky); }

/* ----- Animations ----- */
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; } }

/* ----- Responsive ----- */
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .hero-grid, .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .cols-3.stack-md, .cols-2.stack-md { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .nav-links a:not(.btn) { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 264px; z-index: 100; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .main { padding: 1.2rem 1rem 3rem; }
  .topbar { padding: 0 1rem; }
  .balance-pill, .crumbs { display: none; }
  .search input { width: 100%; }
}
@media (max-width: 600px) { .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr; } .cta-band { padding: 2rem; } }

/* Landing check list */
.check-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; color: var(--text-2); }
.check-list li .ico { color: var(--green); width: 18px; height: 18px; flex: none; margin-top: .15rem; }

.bdiagram .row.sm { gap: .6rem; }
.bdiagram .row.sm .bnode { min-width: 64px; padding: .5rem .6rem; }

/* Compact, aligned approve/reject rows */
.action-stack { min-width: 240px; }
.action-stack .inline-form { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: .4rem; align-items: center; margin: 0; }
.action-stack .inline-form input:not([type=hidden]) { width: 100%; min-width: 0; padding: .4rem .6rem; font-size: .85rem; }
.action-stack .inline-form .btn { justify-content: center; width: 100%; }

.action-stack { min-width: 220px; }
.action-stack .inline-form { grid-template-columns: minmax(0, 1fr) 92px; }
.nowrap { white-space: nowrap; }


/* Password visibility toggle with eye icon */
.input-eye-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-eye-wrap input {
  padding-right: 2.75rem !important;
  width: 100%;
}
.input-eye-wrap .btn-eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0.35rem;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  line-height: 1;
  z-index: 2;
}
.input-eye-wrap .btn-eye:hover {
  color: var(--primary);
  background: var(--surface-2);
}
.input-eye-wrap .btn-eye svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Daily Return highlight cards */
.daily-banner {
  background: linear-gradient(135deg, rgba(31,94,255,0.06), rgba(16,185,129,0.08));
  border: 1px solid rgba(16,185,129,0.35);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.daily-banner-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.daily-badge-ist {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(16,185,129,0.12);
  color: #059669;
  font-size: .78rem;
  font-weight: 600;
}
