/* ============================================================
   Staffly — design system
   Warm ivory + goldenrod. Serif display, humanist sans body.
   Tighter, more architectural shapes than the previous version.
   ============================================================ */
:root {
  --bg: #FBF9F4;
  --bg-soft: #F2EBDC;
  --surface: #FFFFFF;
  --border: #E7DFCC;
  --border-strong: #D6C9A8;

  --ink: #1C1712;
  --ink-dim: #6B6055;
  --ink-faint: #A79A85;

  --gold: #B8860B;
  --gold-dim: #8F6A08;
  --gold-bright: #D4A017;
  --gradient: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-dim) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(184,134,11,0.09), rgba(143,106,8,0.09));

  --success: #3F7D45;
  --success-bg: #E9F2E7;
  --danger: #AE3B2E;
  --danger-bg: #F9E9E5;
  --warn: #B1621E;
  --warn-bg: #FAEEDD;

  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --container: 1180px;
  --shadow-xs: 0 1px 2px rgba(28,23,18,0.06);
  --shadow-sm: 0 3px 12px -5px rgba(28,23,18,0.12);
  --shadow-md: 0 12px 28px -12px rgba(28,23,18,0.16);
  --shadow-lg: 0 24px 56px -20px rgba(28,23,18,0.20);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* semantic aliases for older markup — keep in sync with the tokens above */
  --blue: var(--gold); --blue-dim: var(--gold-dim);
  --purple: var(--gold-bright); --purple-dim: var(--gold-dim);
  --void: var(--bg); --paper: var(--bg); --text: var(--ink); --ink-dim2: var(--ink-dim);
  --text-dim: var(--ink-dim); --text-faint: var(--ink-faint); --surface-2: var(--bg-soft);
  --surface-3: var(--border); --surface-tint: var(--gradient-soft); --green: var(--success);
  --green-bg: var(--success-bg); --red: var(--danger); --red-bg: var(--danger-bg);
  --amber: var(--warn); --amber-bg: var(--warn-bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.006em;
  margin: 0;
  color: var(--ink);
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
  font-size: 13.5px; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gradient); }

.logo-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; overflow: hidden; background: #07070b; flex-shrink: 0; }
.logo-badge img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   Buttons — one system, every page
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), opacity 0.18s ease;
  white-space: nowrap; position: relative;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--bg-soft); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--blue); background: #fff; }
.btn-ghost { background: transparent; color: var(--ink-dim); }
.btn-ghost:hover:not(:disabled) { color: var(--ink); background: var(--bg-soft); }
.btn-block { width: 100%; }
.btn-lg { padding: 14.5px 26px; font-size: 15.5px; }
.btn-sm { padding: 8px 15px; font-size: 13px; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #fbdcde; }

.btn-discord { background: #5865F2; color: #fff; }
.btn-discord:hover:not(:disabled) { background: #4a55d9; transform: translateY(-1px); }
.btn-roblox { background: var(--ink); color: #fff; }
.btn-roblox:hover:not(:disabled) { background: #2a2a35; transform: translateY(-1px); }

.btn-loading { color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn-secondary.btn-loading::after, .btn-ghost.btn-loading::after { border-color: rgba(18,18,26,0.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* icon-only buttons */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-dim);
  cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--ink); background: var(--bg-soft); }
.icon-btn svg, .icon-btn i { width: 18px; height: 18px; }

/* ============================================================
   Nav — transparent to blurred-glass on scroll, mobile menu
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-scrolled {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(16,16,20,0.02);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; max-width: var(--container); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.brand .ly { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-dim); }
.nav-links a { padding: 9px 14px; border-radius: var(--radius-full); transition: color 0.15s ease, background 0.15s ease; }
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); align-items: center; justify-content: center; cursor: pointer;
}
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 70; background: var(--bg);
  padding: 20px 24px; flex-direction: column;
}
.mobile-menu.open { display: flex; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.mobile-menu a { display: block; padding: 16px 4px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-menu .hero-cta { margin-top: 24px; flex-direction: column; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-secondary { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero-wrap { position: relative; overflow: hidden; background: var(--bg); }
.hero-wrap::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, black, transparent 75%);
  opacity: 0.5;
}
.hero { padding: 76px 0 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; text-align: left; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--surface); font-size: 13px; color: var(--ink-dim); box-shadow: var(--shadow-xs);
}
.hero h1 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.12; margin-top: 18px; }
.hero h1 .grad { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17px; color: var(--ink-dim); margin-top: 18px; max-width: 480px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { font-size: 13px; color: var(--ink-faint); font-family: var(--font-mono); margin-top: 16px; }

/* Layered product mockup — the visual focus, not a flat centered card */
.hero-stage { position: relative; height: 460px; perspective: 1400px; }
.hero-preview {
  position: absolute; top: 50%; left: 50%;
  width: 100%; max-width: 460px;
  transform: translate(-50%, -50%) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.2s ease-out;
  transform-style: preserve-3d;
}
.hero-preview-frame {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-preview-bar { display: flex; align-items: center; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.hero-preview-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }

.hero-float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 14px 16px;
  transform: translateZ(60px);
}
.hero-float-1 { top: -18px; right: -30px; width: 190px; }
.hero-float-1 .n { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.hero-float-1 .l { font-size: 11px; color: var(--ink-faint); font-family: var(--font-mono); margin-top: 2px; }
.hero-float-2 { bottom: -34px; left: -46px; width: 210px; display: flex; align-items: center; gap: 10px; }
.hero-float-2 .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gradient); flex-shrink: 0; }
.hero-float-2 .t { font-size: 13px; font-weight: 700; }
.hero-float-2 .s { font-size: 11px; color: var(--ink-faint); }

/* Signature element: live activity feed, reused inside the hero preview */
.feed-card { background: var(--surface); overflow: hidden; }
.feed-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.feed-title { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-dim); letter-spacing: 0.03em; display: flex; align-items: center; gap: 8px; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px rgba(18,135,90,0.4); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.feed-body { height: 230px; overflow: hidden; position: relative; mask-image: linear-gradient(180deg, transparent 0, black 24px, black 82%, transparent 100%); text-align: left; }
.feed-track { display: flex; flex-direction: column; }
.feed-row { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 13.5px; align-items: flex-start; }
.feed-ts { font-family: var(--font-mono); color: var(--ink-faint); font-size: 12px; padding-top: 2px; flex-shrink: 0; }
.feed-tag { font-family: var(--font-mono); font-size: 10.5px; padding: 2px 7px; border-radius: 5px; flex-shrink: 0; margin-top: 1px; text-transform: uppercase; letter-spacing: 0.02em; }
.tag-shift { background: #EDEFF3; color: #4A5568; }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-ban { background: var(--danger-bg); color: var(--danger); }
.tag-app { background: var(--gradient-soft); color: var(--purple-dim); }
.tag-promo { background: var(--success-bg); color: var(--success); }
.feed-text { color: var(--ink-dim); }
.feed-text b { color: var(--ink); font-weight: 600; }

/* ============================================================
   Sections
   ============================================================ */
section { position: relative; z-index: 1; }
.section { padding: 84px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto 50px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin-top: 16px; line-height: 1.15; }
.section-head p { margin-top: 16px; color: var(--ink-dim); font-size: 16.5px; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px 26px; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(184,134,11,0.28); }
.card-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--gradient-soft); margin-bottom: 20px; color: var(--blue-dim); }
.card-icon svg, .card-icon i { width: 22px; height: 22px; }
.card h3 { font-size: 18.5px; margin-bottom: 10px; }
.card p { color: var(--ink-dim); font-size: 14.5px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-block .num { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); font-weight: 700; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-block .label { color: var(--ink-dim); font-size: 14px; margin-top: 6px; }

/* Trusted-by strip */
.trusted-strip { display: flex; align-items: center; justify-content: center; gap: 46px; flex-wrap: wrap; opacity: 0.7; }
.trusted-strip .name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink-faint); }

/* Testimonials */
.testimonial { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-xs); }
.testimonial .stars { color: #F2B93D; font-size: 14px; margin-bottom: 14px; letter-spacing: 2px; }
.testimonial p { font-size: 14.5px; color: var(--ink); line-height: 1.6; margin-bottom: 18px; }
.testimonial-who { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gradient); flex-shrink: 0; }
.testimonial-who .name { font-weight: 700; font-size: 13.5px; }
.testimonial-who .role { color: var(--ink-faint); font-size: 12px; }

/* Integrations */
.integration-row { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.integration-chip { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-xs); }

/* FAQ accordion */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-weight: 700; font-size: 15.5px; color: var(--ink);
}
.faq-q .chev { transition: transform 0.25s var(--ease); color: var(--ink-faint); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
.faq-a-inner { padding: 0 22px 20px; color: var(--ink-dim); font-size: 14.5px; line-height: 1.65; }
.faq-item.open .faq-a { max-height: 260px; }

/* Feature rows */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.feature-row.reverse .feature-copy { order: 2; }
.feature-copy h3 { font-size: 27px; margin-bottom: 14px; line-height: 1.2; }
.feature-copy p { color: var(--ink-dim); font-size: 15.5px; margin-bottom: 20px; }
.feature-list { display: flex; flex-direction: column; gap: 10px; }
.feature-list li { list-style: none; display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-dim); align-items: flex-start; }
.feature-list svg, .feature-list i { flex-shrink: 0; margin-top: 2px; color: var(--success); width: 18px; height: 18px; }

.mock { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mock-body { padding: 20px; }

.roster-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.roster-row:last-child { border-bottom: none; }
.roster-who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gradient); flex-shrink: 0; }
.roster-role { color: var(--ink-faint); font-family: var(--font-mono); font-size: 11.5px; }
.badge-status { font-family: var(--font-mono); font-size: 11px; padding: 3px 9px; border-radius: var(--radius-full); background: var(--success-bg); color: var(--success); }
.badge-status.off { background: var(--bg-soft); color: var(--ink-faint); }
.quota-bar-track { height: 6px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; margin-top: 8px; }
.quota-bar-fill { height: 100%; background: var(--gradient); border-radius: 4px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step-num {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: #fff;
  background: var(--gradient); border-radius: 50%; margin-bottom: 18px;
}
.step h3 { font-size: 18.5px; margin-bottom: 10px; }
.step p { color: var(--ink-dim); font-size: 14.5px; }

/* CTA band — one bold saturated moment */
.cta-band { background: var(--gradient); border-radius: var(--radius-lg); padding: 64px 50px; text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 50% 0%, rgba(255,255,255,0.18), transparent 70%); }
.cta-band .eyebrow { color: rgba(255,255,255,0.85); }
.cta-band .eyebrow::before { background: #fff; }
.cta-band h2 { font-size: clamp(26px, 3.2vw, 36px); position: relative; color: #fff; }
.cta-band p { color: rgba(255,255,255,0.88); margin-top: 14px; position: relative; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-band .hero-cta { justify-content: center; position: relative; margin-top: 30px; }
.cta-band .btn-primary { background: #fff; color: var(--purple-dim); box-shadow: 0 10px 26px -8px rgba(0,0,0,0.25); }
.cta-band .btn-secondary { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); color: #fff; }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,0.2); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 60px 0 30px; color: var(--ink-faint); font-size: 13.5px; background: var(--bg-soft); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 30px; padding-bottom: 40px; }
.footer-brand p { color: var(--ink-dim); font-size: 13.5px; margin-top: 14px; max-width: 260px; }
.footer-col h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--ink-dim); padding: 6px 0; font-size: 14px; }
.footer-col a:hover { color: var(--ink); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom-links a:hover { color: var(--ink-dim); }

/* ============================================================
   Cookie consent
   ============================================================ */
.cookie-bar {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 200;
  max-width: 620px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
  transform: translateY(140%); transition: transform 0.4s var(--ease);
}
.cookie-bar.show { transform: translateY(0); }
.cookie-bar p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.55; }
.cookie-bar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(16,16,26,0.4); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--surface); border-radius: var(--radius-lg); max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg); padding: 30px; animation: modalIn 0.25s var(--ease) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-card h3 { font-size: 19px; margin-bottom: 8px; }
.modal-card .sub { color: var(--ink-dim); font-size: 14px; margin-bottom: 20px; }
.pref-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.pref-row:last-of-type { border-bottom: none; }
.pref-row .t { font-weight: 700; font-size: 14px; }
.pref-row .d { color: var(--ink-faint); font-size: 12.5px; margin-top: 3px; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-strong); border-radius: var(--radius-full); transition: background 0.2s ease; cursor: pointer; }
.switch .track::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s ease; box-shadow: var(--shadow-xs); }
.switch input:checked + .track { background: var(--gradient); }
.switch input:checked + .track::before { transform: translateX(18px); }
.switch input:disabled + .track { opacity: 0.5; cursor: not-allowed; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }

/* ============================================================
   Forms
   ============================================================ */
.field { margin-bottom: 16px; text-align: left; }
.field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field-input-wrap { position: relative; }
.field-input {
  width: 100%; padding: 12.5px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: 14.5px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-input::placeholder { color: var(--ink-faint); }
.field-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3.5px rgba(184,134,11,0.14); }
.field-input.error { border-color: var(--danger); }
.field-input.success { border-color: var(--success); }
.field-hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; }
.field-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.field-success { font-size: 12.5px; color: var(--success); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer; color: var(--ink-faint); border-radius: 7px;
}
.password-toggle:hover { color: var(--ink-dim); background: var(--bg-soft); }
.password-toggle svg, .password-toggle i { width: 17px; height: 17px; }

/* Skeleton loading */
.skeleton { position: relative; overflow: hidden; background: var(--bg-soft); border-radius: 8px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Empty states */
.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-faint); }
.empty-state .icon { width: 44px; height: 44px; margin: 0 auto 16px; color: var(--ink-faint); }
.empty-state .title { font-weight: 700; color: var(--ink-dim); font-size: 15px; margin-bottom: 6px; }
.empty-state .sub { font-size: 13.5px; }

/* ============================================================
   Auth pages
   ============================================================ */
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.auth-bg-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(900px 700px at 68% 40%, black, transparent 75%);
  opacity: 0.6;
}
.auth-blob {
  position: absolute; filter: blur(6px); mix-blend-mode: multiply; opacity: 0.5;
  animation: blobMorph 22s ease-in-out infinite, blobDrift 32s ease-in-out infinite;
}
.auth-blob.b1 {
  width: 640px; height: 640px; top: -140px; right: -160px;
  background: linear-gradient(135deg, rgba(212,160,23,0.5), rgba(184,134,11,0.35));
  animation-delay: 0s, 0s;
}
.auth-blob.b2 {
  width: 420px; height: 420px; bottom: -120px; left: -100px;
  background: linear-gradient(135deg, rgba(184,134,11,0.3), rgba(143,106,8,0.22));
  animation-delay: -8s, -12s;
}
@keyframes blobMorph {
  0%, 100% { border-radius: 42% 58% 64% 36% / 45% 40% 60% 55%; }
  25% { border-radius: 58% 42% 38% 62% / 60% 55% 45% 40%; }
  50% { border-radius: 50% 50% 68% 32% / 35% 60% 40% 65%; }
  75% { border-radius: 64% 36% 50% 50% / 55% 45% 55% 45%; }
}
@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(-30px, 24px) rotate(8deg) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-blob { animation: none; }
}

.auth-shell { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 40px 20px; }
.auth-enter { animation: authEnter 0.5s var(--ease) both; }
@keyframes authEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.auth-card { width: 100%; max-width: 408px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: var(--shadow-lg); }
.auth-top-strip { height: 3px; background: var(--gradient); border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin: -36px -32px 26px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-logo .logo-badge { width: 48px; height: 48px; border-radius: 12px; }

.auth-status { margin-top: 16px; font-size: 13px; text-align: center; color: var(--ink-dim); min-height: 18px; }
.auth-foot { text-align: center; margin-top: 22px; font-size: 13px; color: var(--ink-faint); }
.auth-foot a { color: var(--blue-dim); font-weight: 600; }
.auth-footer-legal { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 408px; margin: 20px auto 0; font-size: 12.5px; color: var(--ink-faint); }
.auth-footer-legal .links { display: flex; gap: 18px; }
.auth-footer-legal a:hover { color: var(--ink-dim); }

.linked-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.linked-row + .linked-row { margin-top: 10px; }
.linked-yes { color: var(--success); font-family: var(--font-mono); font-size: 12px; }
.linked-no { color: var(--ink-faint); font-family: var(--font-mono); font-size: 12px; }

/* ============================================================
   Onboarding
   ============================================================ */
.onboard-shell { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 40px 28px 60px; }
.onboard-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 50px; }
.onboard-head { margin-bottom: 32px; }
.onboard-head h1 { font-size: clamp(24px, 3.4vw, 32px); }
.onboard-head p { color: var(--ink-dim); margin-top: 10px; font-size: 15.5px; }

.workspace-grid-rich { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.workspace-card-rich {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.workspace-card-rich:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.workspace-card-icon {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; overflow: hidden;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.workspace-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.workspace-card-body { flex: 1; min-width: 0; }
.workspace-card-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.workspace-card-name .verified { width: 15px; height: 15px; }
.workspace-card-meta { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.workspace-card-meta .role { color: var(--gold-dim); font-weight: 600; }
.workspace-card-arrow { width: 17px; height: 17px; color: var(--ink-faint); flex-shrink: 0; transition: transform 0.15s ease; }
.workspace-card-rich:hover .workspace-card-arrow { transform: translateX(3px); color: var(--gold); }

.onboard-divider { display: flex; align-items: center; gap: 14px; margin: 30px 0 24px; color: var(--ink-faint); font-size: 12.5px; }
.onboard-divider::before, .onboard-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.onboard-options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.onboard-options-secondary { grid-template-columns: 1fr 1fr; }
.onboard-options-secondary .onboard-card { padding: 20px; }
.onboard-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-xs); }
.onboard-card-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--gradient-soft); color: var(--gold-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.onboard-card-icon i, .onboard-card-icon svg { width: 18px; height: 18px; }
.onboard-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.onboard-card p { color: var(--ink-dim); font-size: 13.5px; margin-bottom: 18px; }

.workspace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.workspace-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; text-align: left; }
.workspace-tile:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.workspace-tile-icon { width: 100%; aspect-ratio: 1.6/1; border-radius: 10px; background: var(--gradient-soft); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--blue-dim); margin-bottom: 12px; }
.workspace-tile-name { font-weight: 700; font-size: 14.5px; }
.workspace-tile-meta { color: var(--ink-faint); font-size: 12px; margin-top: 3px; font-family: var(--font-mono); }

/* ============================================================
   Dashboard app shell
   ============================================================ */
.dash-shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; background: var(--bg-soft); }
.dash-shell.collapsed { grid-template-columns: 76px 1fr; }
.dash-side { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; transition: width 0.2s ease; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.dash-side .brand { margin-bottom: 6px; padding: 8px 10px; white-space: nowrap; }
.dash-shell.collapsed .brand span:not(.logo-badge) { display: none; }
.dash-workspace-box { padding: 10px 12px; margin: 10px 0 14px; background: var(--bg-soft); border-radius: 12px; white-space: nowrap; }
.dash-shell.collapsed .dash-workspace-box { display: none; }
.dash-nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); padding: 14px 12px 6px; white-space: nowrap; }
.dash-shell.collapsed .dash-nav-label { display: none; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-dim); white-space: nowrap; }
.dash-nav a svg, .dash-nav a i { width: 18px; height: 18px; flex-shrink: 0; }
.dash-nav a.active { background: var(--gradient-soft); color: var(--blue-dim); font-weight: 700; }
.dash-nav a:hover:not(.active) { background: var(--bg-soft); color: var(--ink); }
.dash-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }

.dash-main { min-width: 0; }
.dash-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 30px; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.dash-search { position: relative; flex: 1; max-width: 360px; }
.dash-search input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--bg-soft); font-size: 13.5px; color: var(--ink);
}
.dash-search input:focus { outline: none; border-color: var(--blue); background: var(--surface); }
.dash-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); width: 16px; height: 16px; }
.dash-topbar-right { display: flex; align-items: center; gap: 10px; }
.notif-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 1.5px solid var(--surface); }

.profile-menu { position: relative; }
.profile-btn { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.profile-btn .avatar { width: 26px; height: 26px; }
.profile-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 30;
}
.profile-dropdown.open { display: block; animation: dropIn 0.15s var(--ease) both; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.profile-dropdown a, .profile-dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink-dim); background: none; border: none; text-align: left; cursor: pointer;
}
.profile-dropdown a:hover, .profile-dropdown button:hover { background: var(--bg-soft); color: var(--ink); }
.profile-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

.dash-content { padding: 28px 30px 50px; }
.dash-page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.dash-page-head h1 { font-size: 23px; }
.dash-page-head p { color: var(--ink-dim); font-size: 14px; margin-top: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-xs); }
.stat-card .top-row { display: flex; align-items: center; justify-content: space-between; }
.stat-card .num { font-family: var(--font-display); font-size: 27px; margin-top: 8px; }
.stat-card .label { color: var(--ink-faint); font-size: 12.5px; margin-top: 4px; }
.stat-card .trend { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-full); }
.stat-card .trend.up { background: var(--success-bg); color: var(--success); }

.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.panel-head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { font-size: 15px; }
.panel-body { padding: 8px 20px 16px; }

/* Simple bar chart */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding: 10px 4px; }
.bar-chart .bar { flex: 1; background: var(--gradient-soft); border-radius: 6px 6px 0 0; position: relative; transition: background 0.15s ease; }
.bar-chart .bar:hover { background: var(--gradient); }
.bar-chart .bar .fill { position: absolute; bottom: 0; left: 0; right: 0; background: var(--gradient); border-radius: 6px 6px 0 0; }
.bar-chart-labels { display: flex; justify-content: space-between; padding: 0 4px; font-size: 11px; color: var(--ink-faint); font-family: var(--font-mono); }

@media (max-width: 900px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Data tables
   ============================================================ */
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.table-search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.table-search input { width: 100%; padding: 9px 12px 9px 34px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-soft); font-size: 13.5px; }
.table-search .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-faint); }
.table-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip { padding: 7px 14px; border-radius: var(--radius-full); border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; color: var(--ink-dim); cursor: pointer; transition: all 0.15s ease; }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.data-table thead th { position: sticky; top: 0; background: var(--surface); text-align: left; padding: 12px 20px; color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); color: var(--ink-dim); }
.data-table tbody tr { transition: background 0.12s ease; }
.data-table tbody tr:hover { background: var(--bg-soft); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td.strong { color: var(--ink); font-weight: 600; }
.checkbox { width: 17px; height: 17px; border-radius: 5px; accent-color: var(--blue); }

.table-pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-faint); }
.pagination-btns { display: flex; gap: 6px; }
.pagination-btns button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; color: var(--ink-dim); }
.pagination-btns button:hover:not(:disabled) { background: var(--bg-soft); }
.pagination-btns button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-btns button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============================================================
   Admin panel
   ============================================================ */
.admin-shell { min-height: 100vh; background: var(--bg-soft); }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.admin-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.admin-tabs { display: flex; gap: 4px; padding: 0 28px; border-bottom: 1px solid var(--border); overflow-x: auto; background: var(--surface); }
.admin-tab { padding: 13px 16px; font-size: 13.5px; color: var(--ink-dim); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.admin-tab.active { color: var(--blue-dim); border-bottom-color: var(--blue); font-weight: 700; }
.admin-main { padding: 30px 28px; max-width: 1280px; margin: 0 auto; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 20px; }
.admin-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-xs); }
.admin-stat-card .top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-faint); font-size: 11.5px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; }
.admin-stat-card .num { font-family: var(--font-display); font-size: 26px; margin-top: 10px; }
.admin-stat-card .sub { color: var(--ink-faint); font-size: 12px; margin-top: 4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { text-align: left; padding: 10px 14px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--ink-dim); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td.strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   Legal / static content pages
   ============================================================ */
.legal-shell { max-width: 780px; margin: 0 auto; padding: 60px 28px 100px; }
.legal-shell h1 { font-size: 34px; margin-bottom: 10px; }
.legal-updated { color: var(--ink-faint); font-size: 13.5px; margin-bottom: 40px; }
.legal-shell h2 { font-size: 20px; margin-top: 40px; margin-bottom: 14px; }
.legal-shell p, .legal-shell li { color: var(--ink-dim); font-size: 15px; line-height: 1.75; }
.legal-shell ul { padding-left: 20px; margin: 14px 0; }
.legal-shell li { margin-bottom: 6px; }
.legal-toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 40px; }
.legal-toc a { display: block; padding: 5px 0; font-size: 14px; color: var(--blue-dim); }

/* ============================================================
   Utility / motion
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 50px; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-tag { margin: 0 auto; }
  .hero-stage { height: 340px; margin-top: 10px; }
  .hero-preview { transform: translate(-50%, -50%) rotateY(0) rotateX(0); max-width: 340px; }
  .hero-float-1, .hero-float-2 { display: none; }
  .pillars, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 30px; }
  .feature-row.reverse .feature-copy { order: 0; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 44px 26px; }
  .stat-grid, .stats-row { grid-template-columns: repeat(2, 1fr); }
  .onboard-options, .onboard-options-secondary { grid-template-columns: 1fr; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Expanded sidebar — grouped nav, workspace header, search
   ============================================================ */
.dash-side { padding: 18px 12px; }
.ws-header { display: flex; align-items: center; gap: 10px; padding: 8px 8px 16px; }
.ws-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; overflow: hidden;
}
.ws-icon img { width: 100%; height: 100%; object-fit: cover; }
.ws-header-text { min-width: 0; }
.ws-name-row { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-name-row .verified { color: var(--blue); flex-shrink: 0; width: 14px; height: 14px; }
.ws-name-row .verified.gold { color: #D4A017; }
.ws-verified-label { font-size: 10px; font-weight: 700; color: #D4A017; text-transform: uppercase; letter-spacing: 0.03em; margin-left: 2px; }
.ws-header-text .sub { font-size: 12px; color: var(--ink-faint); }

.dash-shell.collapsed .ws-header-text { display: none; }

.sidebar-search {
  position: relative; margin-bottom: 14px;
}
.sidebar-search input {
  width: 100%; padding: 9px 34px 9px 32px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-soft); font-size: 13px; color: var(--ink);
}
.sidebar-search input:focus { outline: none; border-color: var(--blue); background: var(--surface); }
.sidebar-search .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-faint); }
.sidebar-search .kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint);
  background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 2px 5px;
}
.dash-shell.collapsed .sidebar-search { display: none; }

.dash-nav-group { margin-bottom: 4px; }
.dash-nav-group-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); cursor: pointer; user-select: none;
}
.dash-nav-group-label .chev { width: 13px; height: 13px; transition: transform 0.2s ease; }
.dash-nav-group.collapsed .chev { transform: rotate(-90deg); }
.dash-nav-group.collapsed .dash-nav { display: none; }
.dash-shell.collapsed .dash-nav-group-label span:not(.chev) { display: none; }

.dash-nav a[data-soon] { position: relative; }
.soon-pill {
  margin-left: auto; font-size: 9.5px; font-family: var(--font-mono); text-transform: uppercase;
  padding: 1px 6px; border-radius: var(--radius-full); background: var(--bg-soft); color: var(--ink-faint);
  border: 1px solid var(--border);
}
.dash-shell.collapsed .soon-pill { display: none; }

.dash-side-footer-brand { text-align: center; padding: 12px 0 4px; color: var(--ink-faint); font-size: 11.5px; }
.dash-shell.collapsed .dash-side-footer-brand { display: none; }

/* Admin icon button in topbar */
.admin-icon-btn { color: var(--purple-dim); }
.admin-icon-btn:hover { border-color: var(--purple); background: var(--gradient-soft); }

/* Profile / member detail modal */
.profile-modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-modal-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--gradient); flex-shrink: 0; }
.profile-modal-head .name { font-size: 18px; font-weight: 700; }
.profile-modal-head .role { color: var(--ink-faint); font-size: 13px; font-family: var(--font-mono); }
.profile-modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.profile-modal-stats .box { background: var(--bg-soft); border-radius: 12px; padding: 12px; text-align: center; }
.profile-modal-stats .box .n { font-family: var(--font-display); font-size: 19px; }
.profile-modal-stats .box .l { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }

/* Board (announcements / wall / notebook) */
.board-composer { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; margin-bottom: 20px; background: var(--surface); }
.board-composer textarea {
  width: 100%; min-height: 70px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: var(--font-body); font-size: 14px; color: var(--ink); resize: vertical; margin-bottom: 10px;
}
.board-composer textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(184,134,11,0.14); }
.board-post { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; margin-bottom: 12px; background: var(--surface); }
.board-post-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.board-post-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.board-post-meta { font-size: 12px; color: var(--ink-faint); }
.board-post-body { color: var(--ink-dim); font-size: 14px; line-height: 1.6; white-space: pre-wrap; }

@media (max-width: 900px) {
  .profile-modal-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   Dashboard home widgets — banner, hero, widget grid, heatmap
   ============================================================ */
.home-banner {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--success-bg); border: 1px solid rgba(63,125,69,0.25);
  border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 20px;
}
.home-banner .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gradient); flex-shrink: 0; }
.home-banner-body { flex: 1; font-size: 14px; color: var(--ink); line-height: 1.55; }
.home-banner-meta { font-size: 12.5px; color: var(--ink-dim); margin-top: 6px; }
.home-banner-close { background: none; border: none; cursor: pointer; color: var(--ink-dim); flex-shrink: 0; padding: 2px; }
.home-banner-close:hover { color: var(--ink); }

.home-hero {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 32px; margin-bottom: 22px; display: flex; align-items: center; gap: 22px;
}
.home-hero-watermark {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 180px; height: 180px; opacity: 0.05; pointer-events: none;
}
.home-hero-badge {
  width: 58px; height: 58px; border-radius: 14px; flex-shrink: 0;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 22px; overflow: hidden;
}
.home-hero-badge img { width: 100%; height: 100%; object-fit: cover; }
.home-hero-text .greet { font-size: 14.5px; color: var(--ink-dim); }
.home-hero-text h1 { font-size: 26px; margin-top: 2px; }
.home-hero-text .desc { font-size: 13.5px; color: var(--ink-faint); margin-top: 8px; max-width: 620px; }

.widget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.widget-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.widget-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }
.widget-head i, .widget-head svg { width: 15px; height: 15px; }
.widget-body { padding: 18px; min-height: 120px; }
.widget-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 10px; color: var(--ink-faint); }
.widget-empty i, .widget-empty svg { width: 30px; height: 30px; margin-bottom: 10px; opacity: 0.6; }
.widget-empty .t { font-weight: 700; font-size: 14px; color: var(--ink-dim); }
.widget-empty .s { font-size: 12.5px; margin-top: 3px; }

.heatmap-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; }
.heatmap-cell { aspect-ratio: 1; border-radius: 3px; background: var(--bg-soft); }
.heatmap-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--ink-faint); }
.heatmap-legend .sq { width: 10px; height: 10px; border-radius: 2px; }

.new-member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.new-member-row .when { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); font-family: var(--font-mono); }

.sticky-note-card { background: var(--warn-bg); border: 1px solid rgba(177,98,30,0.25); border-radius: var(--radius-md); padding: 18px; margin-bottom: 18px; }
.sticky-note-card textarea {
  width: 100%; min-height: 60px; border: none; background: transparent; resize: vertical;
  font-family: var(--font-body); font-size: 14px; color: var(--ink); line-height: 1.5;
}
.sticky-note-card textarea:focus { outline: none; }
.sticky-note-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.sticky-note-foot .by { font-size: 11.5px; color: var(--ink-faint); }

@media (max-width: 900px) {
  .widget-grid { grid-template-columns: 1fr; }
  .home-hero { flex-direction: column; align-items: flex-start; }
  .home-hero-watermark { display: none; }
}
