/* =========================================================
   Bioly Design System — Modern SaaS · blue #2563EB + cyan #06B6D4
   Fonts: Be Vietnam Pro (display 700/800, body 400/500/600)
   Motion: subtle · tokens 240ms out-expo; only transform/opacity
   ========================================================= */
:root {
  /* palette — light */
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --text: #10182B;
  --muted: #5B6478;
  --border: #E3E8F0;
  --accent: #2563EB;
  --accent-2: #06B6D4;
  --accent-fg: #FFFFFF;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --danger: #DC2626;
  --danger-soft: rgba(220, 38, 38, 0.09);
  --ok: #059669;
  --ring: rgba(37, 99, 235, 0.45);

  /* elevation (light) */
  --shadow-1: 0 1px 2px rgb(16 24 40 / .06);
  --shadow-2: 0 4px 16px rgb(16 24 40 / .10);
  --shadow-3: 0 16px 48px rgb(16 24 40 / .14);

  /* radius scale per role */
  --r-1: 8px;     /* inputs, small */
  --r-2: 12px;    /* buttons, chips */
  --r-3: 18px;    /* cards, modals */

  /* spacing tokens (4/8 grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* motion */
  --dur-fast: 140ms; --dur: 240ms; --dur-slow: 480ms;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --container: 1180px;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[data-theme="dark"] {
  --bg: #0B0E14;
  --surface: #12151D;
  --raised: #171B25;
  --text: #EDF1F7;
  --muted: #9AA4B8;
  --border: rgba(255, 255, 255, .09);
  --accent-soft: rgba(96, 165, 250, .14);
  --danger-soft: rgba(248, 113, 113, .12);
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: none;
}

/* ---------- Reset + base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 var(--s-4); }
h1.display { font-size: clamp(2rem, 3.4vw + 1rem, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2vw + .9rem, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--accent-soft); padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }
.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 0 0 var(--r-1) 0; z-index: 60; }
.skip-link:focus { left: 0; }
/* chống bôi đen khi bấm nhanh trên mobile */
button, .btn, [data-copy] { -webkit-tap-highlight-color: transparent; user-select: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 10px 20px; border-radius: var(--r-2);
  border: 1px solid transparent; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none; text-align: center; justify-content: center;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(115deg, var(--accent), color-mix(in srgb, var(--accent) 72%, var(--accent-2))); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: var(--shadow-2); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-inverse { background: #fff; color: #0B2C66; }
.btn-inverse:hover { color: #0B2C66; filter: brightness(.96); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--r-2); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; color: var(--text);
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.icon-btn:active { transform: scale(.95); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-1); }
.header-inner { display: flex; align-items: center; gap: var(--s-5); min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.12rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-1);
}
.brand-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.main-nav { display: flex; gap: var(--s-4); margin-inline: auto; }
.main-nav a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 2px; border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.main-nav a:hover { color: var(--text); border-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.nav-burger { display: none; }

.user-menu { position: relative; }
.user-menu-btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.user-menu-btn:hover { border-color: var(--accent); }
.avatar-mini { width: 30px; height: 30px; border-radius: 999px; overflow: hidden; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); }
.avatar-mini img { width: 100%; height: 100%; object-fit: cover; }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; padding: 6px;
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-2);
  box-shadow: var(--shadow-2); display: flex; flex-direction: column; z-index: 55;
}
.user-menu-panel a, .user-menu-panel button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text); background: none; border: 0; cursor: pointer; width: 100%; text-align: left; font-size: .93rem;
}
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--accent-soft); }
.menu-logout { color: var(--danger); }
.user-menu-panel hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* ---------- Flash ---------- */
.flash-zone { margin-top: var(--s-4); }
.flash {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-2);
  border: 1px solid var(--border); background: var(--raised); box-shadow: var(--shadow-1); font-size: .95rem;
}
.flash i { color: var(--accent); }
.flash-error { border-color: rgba(220,38,38,.35); background: var(--danger-soft); }
.flash-error i, .flash-error { color: var(--danger); }
.flash .flash-close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; padding: 6px; border-radius: 6px; }

/* ---------- Hero (landing) ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vh, 110px) 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); gap: var(--s-7); align-items: center; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s-3); }
.hero-copy .display em.grad-text { font-style: normal; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 58ch; margin: 0 0 var(--s-5); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-5); }
.hero-cta.center { justify-content: center; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 4px var(--s-4); padding: 0; margin: 0; color: var(--muted); font-size: .92rem; }
.hero-points i { color: var(--ok); margin-right: 6px; }
.hero-wave { height: 26px; margin-top: -10px; background: radial-gradient(closest-side, var(--accent-soft), transparent 72%) no-repeat center / 130% 26px; }

/* phone mock */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone-frame {
  width: min(320px, 84vw); border-radius: 40px; padding: 14px;
  background: #0f1526; box-shadow: var(--shadow-3); border: 1px solid rgba(255,255,255,.1);
  transform: rotate(-1.6deg); transition: transform var(--dur-slow) var(--ease);
}
.phone-frame:hover { transform: rotate(0deg) translateY(-4px); }
.phone-screen { background: linear-gradient(160deg, #2563EB, #06B6D4); border-radius: 30px; padding: 26px 18px; color: #fff; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; min-height: 470px; }
.demo-avatar { width: 92px; height: 92px; border-radius: 999px; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 34px; border: 3px solid rgba(255,255,255,.7); }
.demo-name { font-weight: 700; font-size: 1.15rem; }
.demo-user { font-size: .8rem; opacity: .85; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; background: rgba(255,255,255,.2); padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); }
.demo-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; justify-content: center;
  background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.45);
  padding: 11px 14px; border-radius: 14px; font-weight: 600; font-size: .9rem; backdrop-filter: blur(4px);
}
.demo-ico { display: inline-flex; width: 20px; }
.demo-stats { margin-top: auto; font-size: .74rem; opacity: .8; }
.hero-card {
  position: absolute; display: flex; flex-direction: column; gap: 4px; padding: 14px 18px;
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-3);
  box-shadow: var(--shadow-2); font-size: .85rem; animation: floaty 7s ease-in-out infinite alternate;
}
.hero-card i { color: var(--accent); font-size: 1.1rem; }
.hero-card .hc-title { font-weight: 700; }
.hero-card .hc-text { color: var(--muted); font-size: .78rem; }
.hero-card-v1 { top: 12%; left: -2%; }
.hero-card-v2 { bottom: 9%; right: -3%; animation-delay: 1.2s; }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* ---------- Sections ---------- */
.section { padding: var(--s-9) 0; }
.section-tinted { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 68ch; margin-bottom: var(--s-7); }
.section-head h2 { margin-bottom: var(--s-3); }
.section-head > p { color: var(--muted); margin: 0; }

.feature-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s-7); align-items: center; padding: var(--s-6) 0; }
.feature-row + .feature-row { border-top: 1px dashed var(--border); }
.feature-copy p { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: baseline; }
.check-list i { color: var(--ok); }
.feature-visual {
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-3);
  padding: var(--s-5); min-height: 260px; display: flex; gap: var(--s-3);
  box-shadow: var(--shadow-1);
}
.feature-row.flip .feature-visual { order: -1; }
.feature-editor-mock .mock-pane { border-radius: 10px; background: var(--bg); border: 1px solid var(--border); padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.feature-editor-mock .mock-side { flex: .8; }
.feature-editor-mock .mock-preview { flex: .9; align-items: center; justify-content: center; color: var(--accent); font-size: .9rem; font-weight: 600; }
.mock-pane span { height: 10px; border-radius: 6px; background: var(--accent-soft); display: block; }
.mock-pane .lg { width: 100%; }
.mock-pane .short { width: 55%; }
.feature-stats-mock { flex-direction: column; gap: var(--s-4); justify-content: center; }
.stat-chip { display: flex; justify-content: space-between; align-items: baseline; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--bg); }
.sc-label { color: var(--muted); font-size: .82rem; }
.sc-val { font-weight: 700; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.mini-bars { display: flex; gap: 6px; align-items: flex-end; height: 72px; padding: 0 6px; }
.mini-bars span { width: 22px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-radius: 6px 6px 0 0; height: 40%; opacity: .75; }
.mini-bars .tall { height: 65%; opacity: .9; }
.mini-bars .taller { height: 90%; }
.feature-branding-mock { flex-direction: column; gap: var(--s-4); justify-content: center; }
.brand-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--bg); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: .8rem; font-weight: 600; }
.og-preview { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg); max-width: 380px; }
.og-img { height: 120px; background: linear-gradient(120deg, var(--accent), var(--accent-2)); }
.og-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }

/* ---------- Theme gallery ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.theme-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; }
.theme-thumb { border-radius: var(--r-3); border: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 170px; background-color: var(--bio-bg, #fff); background-image: var(--bio-bg-image, none); background-size: cover; background-position: center; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.theme-card:hover .theme-thumb { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tt-avatar { width: 46px; height: 46px; border-radius: 999px; margin-inline: auto; border: 2px solid var(--bio-fg, #111); opacity: .85; background: transparent; }
.tt-btn { height: 26px; border-radius: 9px; background: var(--bio-btn-bg, #eee); border: 1.5px solid var(--bio-btn-border, transparent); width: 100%; opacity: .9; }
.tt-btn.short { width: 72%; }
.tt-btn.shorter { width: 58%; }
.theme-meta { display: flex; flex-direction: column; gap: 2px; }
.theme-meta .small { font-size: .82rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; width: fit-content; }
.badge-premium { background: linear-gradient(120deg, #F59E0B, #F97316); color: #fff; }

/* ---------- Steps / pricing plans / faq ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.step { position: relative; background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-5); box-shadow: var(--shadow-1); }
.step-num { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: var(--s-3); }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }
.plan-card { background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-5); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--s-4); }
.plan-card.featured { border: 2px solid var(--accent); box-shadow: var(--shadow-2); position: relative; }
.plan-card.featured::before { content: 'Phổ biến nhất'; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: .04em; }
.plan-price { font-size: 1.7rem; font-weight: 800; margin: 0; }
.plan-price span { font-size: .85rem; color: var(--muted); font-weight: 500; }
.plan-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: .93rem; }
.plan-card li i { color: var(--ok); margin-right: 8px; }
.plan-card li.no i { color: var(--danger); }
.plan-card li.no { color: var(--muted); }
.faq-wrap { max-width: 780px; margin-inline: auto; }
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-2); padding: 2px 0; }
.faq-item summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '\002B'; font-size: 1.3rem; color: var(--accent); line-height: 1; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item > p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, #123B8F, var(--accent) 55%, var(--accent-2)); color: #fff; padding: var(--s-8) 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 4px; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: var(--s-7) 0 var(--s-5); margin-top: var(--s-8); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-6); }
.footer-brand p { color: var(--muted); margin: 12px 0 0; max-width: 40ch; font-size: .92rem; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; }
.footer-col a { color: var(--text); text-decoration: none; font-size: .93rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px dashed var(--border); color: var(--muted); font-size: .85rem; }
.muted-footer { color: var(--muted); }

/* ---------- Auth pages ---------- */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 380px); gap: var(--s-7); justify-content: center; padding: var(--s-8) 24px; align-items: center; min-height: 78vh; }
.auth-card { background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-6); box-shadow: var(--shadow-2); }
.auth-brand { margin-bottom: var(--s-5); }
.auth-sub { color: var(--muted); margin: -6px 0 var(--s-5); font-size: .95rem; }
.auth-links { display: flex; gap: 10px; align-items: center; margin-top: var(--s-4); font-size: .93rem; }
.auth-links .dot { color: var(--muted); }
.auth-side-card { background: linear-gradient(150deg, var(--accent-soft), transparent 70%), var(--raised); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-5); }
.auth-side-card i { font-size: 1.4rem; color: var(--accent); }
.auth-side-card h3 { margin-top: 10px; }
.auth-side-card p { color: var(--muted); margin: 0; font-size: .93rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .help { color: var(--muted); font-size: .82rem; margin: 5px 0 0; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="url"], .field input[type="number"], .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-1);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); outline: none;
}
.field-check { display: flex; gap: 10px; align-items: center; }
.field-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.field-check label { margin: 0; font-weight: 400; font-size: .9rem; }
.pwd-wrap { position: relative; }
.pwd-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; padding: 8px; color: var(--muted); border-radius: 8px; }
.pwd-toggle:hover { color: var(--accent); }

/* ---------- Dashboard ---------- */
.dash { padding: var(--s-6) 0 var(--s-8); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.page-head .h1 { font-size: clamp(1.7rem, 2vw + 1rem, 2.3rem); font-weight: 800; margin-bottom: 2px; }
.create-bio-form { display: flex; gap: 8px; }
.create-bio-form .input { min-width: 220px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-5); }
.stat-card { background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-4); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-1); }
.panel { background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-5); margin-bottom: var(--s-5); box-shadow: var(--shadow-1); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: var(--s-4); }
.panel-head h2 { font-size: 1.15rem; margin: 0; }
.dash-chart { display: flex; flex-direction: column; gap: 10px; }
.chart-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; min-height: 110px; }
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 72px; }
.bar { width: 12px; border-radius: 4px 4px 2px 2px; }
.bar.v { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.bar.c { background: var(--accent-soft); }
.bar-day { font-size: .7rem; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); }
.leg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.leg.v { background: var(--accent); }
.leg.c { background: var(--accent-soft); }
.bio-list { display: grid; gap: var(--s-3); }
.bio-card { border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-4); background: var(--bg); display: grid; gap: var(--s-3); transition: border-color var(--dur-fast) var(--ease); }
.bio-card:hover { border-color: var(--accent); }
.bio-card-head { display: flex; gap: 14px; align-items: center; }
.bio-avatar { width: 52px; height: 52px; border-radius: 999px; overflow: hidden; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.3rem; }
.bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bio-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bio-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-chip { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.st-draft { background: var(--accent-soft); color: var(--accent); }
.st-published { background: rgba(5,150,105,.12); color: var(--ok); }
.st-hidden { background: var(--danger-soft); color: var(--danger); }
.st-locked { background: rgba(120,123,134,.15); color: var(--muted); }
.copy-link { background: none; border: 0; color: var(--accent); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; padding: 2px 0; border-radius: 6px; text-align: left; }
.copy-link:hover { color: var(--accent-2); }
.copy-link code { background: transparent; padding: 0; color: inherit; }
.bio-counts i { margin-left: 8px; }
.bio-counts i:first-child { margin-left: 0; }
.bio-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bio-card-actions .btn { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.bio-card-actions form { display: inline; }
.dash-note { max-width: 90ch; }
.empty-state { text-align: center; padding: var(--s-8) var(--s-5); color: var(--muted); }
.empty-state i { font-size: 2.4rem; color: var(--accent); opacity: .55; margin-bottom: 12px; display: block; }
.empty-state h3 { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: var(--s-2); }
  .hero-card { display: none; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.flip .feature-visual { order: 0; }
  .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .main-nav {
    position: fixed; inset: 66px 0 auto 0; background: var(--raised); flex-direction: column;
    padding: var(--s-4); gap: 4px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-2); display: none; z-index: 49;
  }
  .main-nav.open { display: flex; }
  .nav-burger { display: inline-flex; }
  .auth-wrap { grid-template-columns: minmax(0, 460px); padding: var(--s-6) 20px; }
  .auth-side { display: none; }
  .steps { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 560px) {
  .container { width: min(var(--container), 100% - 24px); }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .theme-grid { grid-template-columns: 1fr; }
  .create-bio-form { width: 100%; }
  .create-bio-form .input { flex: 1; min-width: 0; }
  .bio-card-actions { gap: 6px; }
  .bio-card-actions .btn { padding: 6px 10px; font-size: .82rem; }
  .user-name { display: none; }
  .chart-bars { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .bar-day { font-size: .6rem; }
}

/* A11y: hide number spinners for cleaner inputs */
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
