/* ============ DESIGN TOKENS ============ */
:root {
  /* Brand colors */
  --accent: oklch(44.1% 0.147 258.2);
  --accent-strong: oklch(39% 0.159 261.4);
  --cyan: oklch(66% 0.112 200.9);
  --cyan-soft: oklch(94.3% 0.011 243.7);
  --success: oklch(62.7% 0.17 149.2);
  --warning: oklch(76.9% 0.165 70.1);
  --risk: oklch(57.7% 0.215 27.3);
  --warning-soft: color-mix(in oklch, var(--warning), white 86%);
  --risk-soft: color-mix(in oklch, var(--risk), white 90%);
  --ocean: var(--accent);
  --ocean-700: var(--accent-strong);
  --ocean-900: oklch(25.6% 0.064 255.5);
  --teal: var(--cyan);
  --teal-700: color-mix(in oklch, var(--cyan), var(--accent-strong) 28%);
  --sky: var(--cyan-soft);
  --sand: var(--warning-soft);
  --orange: var(--warning);
  --green: var(--success);
  --red: var(--risk);

  /* Neutrals */
  --ink: oklch(25.6% 0.064 255.5);
  --ink-2: color-mix(in oklch, var(--ink), white 18%);
  --muted: oklch(55.9% 0.034 242.4);
  --muted-2: color-mix(in oklch, var(--muted), white 28%);
  --line: oklch(91.9% 0.019 230.7);
  --line-2: color-mix(in oklch, var(--line), white 42%);
  --bg: oklch(97.5% 0.002 145.6);
  --bg-card: oklch(100% 0 0);
  --bg-soft: color-mix(in oklch, var(--cyan-soft), white 54%);

  /* Layout */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-1: 0 1px 3px color-mix(in oklch, var(--ink), transparent 90%);
  --shadow-2: 0 14px 36px -18px color-mix(in oklch, var(--ink), transparent 78%), 0 2px 8px color-mix(in oklch, var(--ink), transparent 94%);
  --shadow-3: 0 22px 70px color-mix(in oklch, var(--ink), transparent 88%);

  /* Type */
  --font-sans: "Sohne", "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Avenir Next", "Source Han Serif SC", "Songti SC", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, color-mix(in oklch, var(--cyan), transparent 88%), transparent 36rem),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  font-size: 15px;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; letter-spacing: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ============ APP SHELL ============ */
.app-root { min-height: 100vh; display: flex; flex-direction: column; }

/* ============ TOP NAV (landing + auth) ============ */
.topnav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: 0;
}
.brand-logo {
  gap: 0;
  min-width: 0;
}
.brand-logo img {
  display: block;
  object-fit: contain;
}
.brand-logo-wide {
  width: 148px;
  height: 43px;
}
.brand-logo-square {
  width: 34px;
  height: 34px;
}
.brand-logo-small .brand-logo-square {
  width: 32px;
  height: 32px;
}
.brand-logo-dark {
  width: max-content;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
}
.brand-logo-dark .brand-logo-wide {
  width: 150px;
  height: 44px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--ocean) 0%, var(--teal) 100%);
  position: relative;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 4px;
  border: 1.2px solid rgba(255,255,255,.4); border-radius: 4px;
}
.brand-zh { color: var(--ink); }
.brand-en { color: var(--muted); font-size: 13px; font-weight: 500; }

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--ink); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  transition: all .15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ocean); color: white;
}
.btn-primary:hover { background: var(--ocean-700); }
.btn-ghost {
  background: transparent; color: var(--ink-2);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--muted-2); }
.btn-teal {
  background: var(--teal); color: white;
}
.btn-teal:hover { background: var(--teal-700); }
.btn-soft {
  background: var(--sky); color: var(--ocean);
}
.btn-soft:hover { background: #DCEEF3; }
.btn-link {
  padding: 6px 0; background: transparent; color: var(--ocean);
  font-weight: 500;
}
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 11px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ============ FORM ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.field-hint { font-size: 12px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
  color: var(--ink);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(18,59,93,0.10);
}
.textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
.input-group { position: relative; }
.input-group .input { padding-left: 38px; }
.input-group .ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted);
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card-pad { padding: 22px; }

/* ============ BADGES / CHIPS ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  font-size: 12px; font-weight: 500;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.badge-teal { background: rgba(22,166,166,.08); color: var(--teal-700); border-color: rgba(22,166,166,.18); }
.badge-ocean { background: rgba(18,59,93,.06); color: var(--ocean); border-color: rgba(18,59,93,.14); }
.badge-orange { background: rgba(245,158,11,.10); color: #B47308; border-color: rgba(245,158,11,.22); }
.badge-red { background: rgba(220,38,38,.08); color: var(--red); border-color: rgba(220,38,38,.18); }
.badge-green { background: rgba(22,163,74,.08); color: var(--green); border-color: rgba(22,163,74,.18); }
.badge-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: white; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
  cursor: pointer; transition: all .12s;
  user-select: none;
}
.chip:hover { border-color: var(--ocean); color: var(--ocean); }
.chip.active {
  background: var(--ocean); color: white; border-color: var(--ocean);
}

/* ============ APP LAYOUT (sidebar + main) ============ */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.sidebar {
  background: white;
  border-right: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { padding: 20px 22px 18px; border-bottom: 1px solid var(--line-2); }
.sidebar-section { padding: 16px 12px 8px; font-size: 11px; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; }
.sidebar-nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .12s;
}
.sidebar-link:hover { background: var(--bg-soft); }
.sidebar-link.active {
  background: var(--sky); color: var(--ocean); font-weight: 600;
}
.sidebar-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-foot {
  padding: 14px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean), var(--teal));
  color: white; display: grid; place-items: center; font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}

.main {
  display: flex; flex-direction: column; min-width: 0;
}
.appbar {
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 30;
}
.appbar-title { font-weight: 600; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.appbar-right { display: flex; align-items: center; gap: 10px; }
.appbar-logo-square {
  display: none;
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.appbar-search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: var(--bg-soft); border-radius: 8px;
  font-size: 13px; color: var(--muted); width: 260px;
  border: 1px solid transparent;
}
.appbar-search:focus-within { border-color: var(--line); background: white; }
.appbar-search input { border: none; background: transparent; outline: none; flex: 1; }

.page { padding: 32px 36px 80px; max-width: 1280px; width: 100%; }
.page-narrow { max-width: 980px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.page-title { font-size: 28px; font-weight: 600; letter-spacing: 0; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ============ MOBILE NAV ============ */
.mobile-menu-btn { display: none; }
.mobile-nav-mask { display: none; }

@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 280px; z-index: 100;
    transform: translateX(-100%); transition: transform .28s ease;
    box-shadow: var(--shadow-3);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-nav-mask.open {
    display: block; position: fixed; inset: 0; background: rgba(15,26,42,.4);
    z-index: 99; backdrop-filter: blur(2px);
  }
  .mobile-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--bg-soft);
  }
  .appbar-logo-square { display: block; }
  .appbar { padding: 0 16px; }
  .appbar-search { display: none; }
  .appbar-title {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .appbar-right .btn-ghost {
    display: none;
  }
  .page { padding: 20px 16px 70px; }
  .topnav { padding: 0 16px; }
  .nav-links { display: none; }
  .page-title { font-size: 22px; }
}

/* ============ HERO / LANDING ============ */
.hero {
  position: relative;
  padding: 70px 32px 90px;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 85% -10%, rgba(22,166,166,0.12), transparent 60%),
    radial-gradient(700px 500px at -5% 30%, rgba(18,59,93,0.06), transparent 60%),
    var(--bg);
}
.hero-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px; border-radius: 999px;
  background: white; border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2); font-weight: 500;
  margin-bottom: 22px;
}
.hero-eyebrow .dot {
  display: inline-flex; padding: 3px 8px; border-radius: 999px;
  background: var(--ocean); color: white; font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
}
.hero h1 {
  font-size: 54px; line-height: 1.05;
  color: var(--ocean-900);
  font-weight: 600;
  letter-spacing: 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--teal);
  background: linear-gradient(120deg, var(--teal) 0%, var(--ocean) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-en {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px; color: var(--ink-2);
  font-weight: 400;
}
.hero-sub {
  margin-top: 24px; font-size: 17px; color: var(--ink-2); line-height: 1.55; max-width: 540px;
}
.hero-ctas { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { margin-top: 28px; display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }

/* Hero mockup */
.hero-mockup {
  position: relative; height: 520px;
}
.mockup-window {
  background: white;
  border-radius: 14px;
  box-shadow: var(--shadow-3);
  border: 1px solid var(--line);
  overflow: hidden;
  position: absolute;
}
.mockup-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: #FAFBFC; border-bottom: 1px solid var(--line-2);
  font-size: 12px; color: var(--muted);
}
.mockup-bar .dot { width: 10px; height: 10px; border-radius: 999px; background: #E5E5E5; }
.mockup-bar .dot.r { background: #FF6B5B; }
.mockup-bar .dot.y { background: #FFC93C; }
.mockup-bar .dot.g { background: #50C878; }

@media (max-width: 1024px) {
  .hero { padding: 48px 24px 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .hero-mockup { height: 420px; max-width: 560px; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .hero-en { font-size: 18px; }
  .hero-sub { font-size: 15px; }
  .hero-mockup { height: 360px; }
}

/* ============ SECTIONS ============ */
section.section { padding: 70px 32px; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-eyebrow {
  font-size: 12px; font-weight: 600; color: var(--teal-700);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}
.section h2 {
  font-size: 36px; font-weight: 600; letter-spacing: 0;
  color: var(--ocean-900); max-width: 720px;
}
.section h2 em { font-style: normal; color: var(--teal); }
.section-sub { margin-top: 12px; color: var(--ink-2); max-width: 620px; font-size: 16px; }

.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 44px;
}
.feature-card {
  background: white; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.feature-card .ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--sky); color: var(--ocean);
  display: grid; place-items: center; margin-bottom: 16px;
}
.feature-card h3 { font-size: 16px; font-weight: 600; }
.feature-card p { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.55; }
.feature-card .meta { margin-top: 14px; font-size: 12px; color: var(--teal-700); font-weight: 500; display: flex; align-items: center; gap: 6px; }

.three-step {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 44px;
}
.step-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px; position: relative;
}
.step-num {
  font-family: var(--font-serif); font-size: 36px; line-height: 1; color: var(--teal);
  font-weight: 600;
}
.step-card h3 { font-size: 17px; font-weight: 600; margin-top: 16px; }
.step-card p { color: var(--muted); margin-top: 6px; font-size: 14px; }

.section-alt { background: white; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.section-dark { background: var(--ocean-900); color: white; }
.section-dark h2 { color: white; }
.section-dark .section-sub { color: rgba(255,255,255,0.7); }

.userseg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.userseg {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px;
  background: white;
}
.userseg .tag { font-size: 11px; font-weight: 600; color: var(--muted-2); letter-spacing: 0.08em; text-transform: uppercase; }
.userseg h3 { font-size: 16px; font-weight: 600; margin-top: 8px; }
.userseg p { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.userseg ul { margin-top: 14px; display: flex; flex-direction: column; gap: 5px; }
.userseg li { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.userseg li::before { content: "—"; color: var(--teal); flex-shrink: 0; }

.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
.faq-item { padding: 20px 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.faq-item h4 { font-size: 15px; font-weight: 600; }
.faq-item p { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.6; }

footer.footer {
  background: var(--ocean-900); color: rgba(255,255,255,0.7);
  padding: 56px 32px 36px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { color: white; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.footer ul { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.footer li a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12.5px; color: rgba(255,255,255,0.5);
  max-width: 1280px; margin-left: auto; margin-right: auto;
}

/* ============ LIVE WORKER STATUS ============ */
.live-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  width: min(420px, calc(100vw - 36px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(18,59,93,0.18);
  border-radius: 10px;
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(12px);
}
.live-dock.busy { border-color: rgba(22,166,166,0.32); }
.live-dock.error { border-color: rgba(220,38,38,0.32); }
.live-dock b {
  display: block;
  font-size: 12px;
  color: var(--ocean);
  line-height: 1.2;
}
.live-dock.error b { color: var(--red); }
.live-dock span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.45;
}
.live-dock button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.live-dock button:hover { background: var(--bg-soft); color: var(--ink); }

.live-dock:not(.error):not(.busy) {
  display: none;
}

@media (max-width: 880px) {
  section.section { padding: 50px 20px; }
  .section h2 { font-size: 26px; }
  .feature-grid, .three-step, .userseg-grid, .faq { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* ============ AUTH ============ */
.auth-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-aside {
  background:
    radial-gradient(700px 500px at 120% -30%, rgba(22,166,166,0.35), transparent 60%),
    radial-gradient(500px 400px at -20% 120%, rgba(245,239,230,0.18), transparent 60%),
    var(--ocean-900);
  color: white;
  padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-aside::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black, transparent 80%);
}
.auth-aside * { position: relative; z-index: 1; }
.auth-aside h2 {
  font-size: 38px; font-weight: 600; color: white;
  margin-top: 30px; max-width: 460px;
}
.auth-aside h2 em { font-style: normal; color: var(--teal); }
.auth-aside .quote {
  margin-top: 22px;
  font-family: var(--font-serif); font-style: italic;
  font-size: 18px; color: rgba(255,255,255,0.8); max-width: 460px;
}
.auth-feature {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 36px;
}
.auth-feature .row {
  display: flex; align-items: center; gap: 12px; font-size: 14px;
  color: rgba(255,255,255,0.85);
}
.auth-feature .row .check {
  width: 22px; height: 22px; border-radius: 999px;
  background: rgba(22,166,166,0.25); color: var(--teal);
  display: grid; place-items: center; flex-shrink: 0;
}
.auth-foot { font-size: 12.5px; color: rgba(255,255,255,0.45); }

.auth-main {
  display: flex; flex-direction: column; padding: 48px 56px;
}
.auth-main-top { display: flex; justify-content: space-between; align-items: center; }
.auth-form-wrap { flex: 1; display: grid; place-items: center; padding: 30px 0; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h3 { font-size: 28px; font-weight: 600; letter-spacing: 0; }
.auth-form p.lead { color: var(--muted); margin-top: 6px; font-size: 14px; }
.auth-form .fields { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted-2); font-size: 12px; margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  background: white;
  transition: background .12s, border-color .12s;
}
.oauth-btn:hover { border-color: var(--muted-2); background: var(--bg-soft); }
.oauth-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.auth-tabs { display: inline-flex; padding: 4px; border-radius: 10px; background: var(--bg-soft); }
.auth-tabs button {
  padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 500;
  color: var(--muted);
}
.auth-tabs button.active { background: white; color: var(--ink); box-shadow: var(--shadow-1); }
.auth-foot-link { font-size: 13px; color: var(--muted); text-align: center; margin-top: 24px; }
.auth-foot-link a { color: var(--ocean); font-weight: 500; }
.check-row {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
}
.check-row input { margin-top: 2px; accent-color: var(--ocean); }

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(220,38,38,.18);
  border-radius: 9px;
  background: rgba(220,38,38,.06);
  color: var(--red);
  font-size: 13px;
  line-height: 1.45;
}
.form-alert.neutral {
  border-color: rgba(18,59,93,.14);
  background: var(--bg-soft);
  color: var(--ink-2);
}
.verify-card-inline {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(18,59,93,.14);
  border-radius: 10px;
  background: var(--bg-soft);
}
.verify-card-inline b,
.verify-card-inline span {
  display: block;
}
.verify-card-inline b {
  font-size: 13px;
}
.verify-card-inline span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.password-meter {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}
.password-meter span {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 99px;
}
.password-meter[data-level="1"] span:nth-child(-n+1),
.password-meter[data-level="2"] span:nth-child(-n+2),
.password-meter[data-level="3"] span:nth-child(-n+3),
.password-meter[data-level="4"] span:nth-child(-n+4) {
  background: var(--teal);
}
.mail-success {
  text-align: center;
  padding: 24px 0;
}
.mail-success-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--sky);
  color: var(--ocean);
}
.mail-steps {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  text-align: left;
}
.mail-steps div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-size: 13px;
}
.mail-steps span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ocean);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { padding: 32px 24px; min-height: 280px; }
  .auth-aside h2 { font-size: 26px; margin-top: 16px; }
  .auth-aside .quote, .auth-feature { display: none; }
  .auth-main { padding: 32px 22px; }
}

@media (max-width: 980px) {
  .company-onboarding-main {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .company-onboarding-copy {
    position: static;
  }
}

/* ============ COMPANY ONBOARDING ============ */
.company-onboarding {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,249,252,.92)),
    var(--bg);
}
.company-onboarding-head {
  height: 70px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255,255,255,.9);
  position: sticky;
  top: 0;
  z-index: 20;
}
.company-onboarding-head > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.company-onboarding-head span,
.company-onboarding-head b {
  display: block;
}
.company-onboarding-head span {
  font-size: 12px;
  color: var(--muted);
}
.company-onboarding-head b {
  font-size: 15px;
  color: var(--ink);
}
.company-onboarding-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 28px 80px;
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 32px;
  align-items: start;
}
.company-onboarding-copy {
  position: sticky;
  top: 102px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.company-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--ocean);
  font-size: 12px;
  font-weight: 700;
}
.company-onboarding-copy h1 {
  margin-top: 22px;
  font-size: 34px;
  font-weight: 650;
  color: var(--ocean-900);
}
.company-onboarding-copy p {
  margin-top: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}
.company-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 26px;
}
.company-proof-grid div {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}
.company-proof-grid b,
.company-proof-grid span {
  display: block;
}
.company-proof-grid b {
  color: var(--ocean);
  font-size: 18px;
}
.company-proof-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.company-profile-form {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-section-title h2 {
  font-size: 22px;
  font-weight: 650;
}
.form-section-title p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.company-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  flex-shrink: 0;
}
.language-toggle button {
  min-width: 68px;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}
.language-toggle button.active {
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.language-toggle.compact button {
  min-width: 38px;
  padding: 5px 8px;
}

/* ============ DASHBOARD ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: white;
}
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em; }
.kpi .val { font-size: 28px; font-weight: 600; margin-top: 6px; letter-spacing: 0; }
.kpi .meta { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-accent .val { color: var(--teal); }
.kpi-warn .val { color: var(--orange); }
.kpi-risk .val { color: var(--red); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-top: 20px; }
.project-list-card { padding: 0; overflow: hidden; }
.project-list-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--line-2);
}
.project-list-head h3 { font-size: 16px; font-weight: 600; }
.project-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.9fr 0.7fr 32px; gap: 16px;
  align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background .12s;
}
.project-row:hover { background: var(--bg-soft); }
.project-row:last-child { border-bottom: none; }
.project-row .pname { font-weight: 600; font-size: 14.5px; }
.project-row .pmeta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.project-row .progress {
  display: flex; flex-direction: column; gap: 4px; min-width: 100px;
}
.progress-bar { height: 5px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--ocean)); border-radius: 999px; }
.progress-label { font-size: 11px; color: var(--muted); }

.dash-side { display: flex; flex-direction: column; gap: 16px; }
.action-mini {
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.action-mini-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: white;
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-1);
}
.activity-item {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2);
  align-items: flex-start;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--teal); margin-top: 6px; flex-shrink: 0; }
.activity-item .text { font-size: 13.5px; line-height: 1.5; }
.activity-item .time { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.plan-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  border: none;
}
.credit-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.credit-mini-grid span {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  color: inherit;
  font-size: 12px;
}
.credit-wallet-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-radius: 12px;
  margin-top: -8px;
}
.credit-rules {
  display: grid;
  gap: 8px;
  align-content: center;
}
.credit-rules span {
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.13);
  font-size: 12px;
}
.credit-package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.credit-package {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.credit-package.featured {
  border-color: rgba(20,184,166,.4);
  box-shadow: 0 12px 30px rgba(20,184,166,.10);
}
.credit-package-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-700);
  font-size: 11px;
  font-weight: 700;
}
.credit-package-tag.secondary {
  background: var(--sky);
  color: var(--ocean);
}
.credit-package-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.credit-package-price {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 760;
  color: var(--ocean);
}
.credit-package-points {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
}
.credit-package-meta {
  min-height: 34px;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.credits-page .settings-sec {
  margin-top: 16px;
}
.credits-page .settings-sec:first-of-type {
  margin-top: 0;
}
.credit-wallet-hero {
  margin-top: 0;
}
.credit-region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.credit-store-grid {
  margin-top: 0;
}
.admin-credit-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.admin-credit-principles h3 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
}
.credit-admin-rules {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.credit-admin-rules span {
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.45;
}
.credit-rule-table {
  display: grid;
  gap: 8px;
}
.credit-rule-head,
.credit-rule-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(120px, .8fr) minmax(90px, .62fr) minmax(90px, .62fr) minmax(70px, .48fr) minmax(78px, .52fr) minmax(92px, .62fr) minmax(78px, .52fr);
  gap: 8px;
  align-items: center;
}
.credit-rule-head {
  padding: 0 2px 4px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
}
.credit-rule-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FBFCFE;
}
.credit-rule-row .input,
.credit-rule-row .select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  font-size: 13px;
}
.credit-rule-id {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.credit-money-input {
  display: flex;
  align-items: center;
  gap: 6px;
}
.credit-money-input span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-width: 28px;
}
.entitlement-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entitlement-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.entitlement-row b {
  display: block;
  font-size: 13.5px;
}
.entitlement-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.welcome-tips {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr auto;
  align-items: stretch;
  gap: 12px;
  margin: -8px 0 20px;
  padding: 14px;
  border: 1px solid rgba(18,59,93,.14);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-1);
}
.welcome-tips-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.welcome-tips-close:hover {
  background: var(--bg-soft);
}
.tip-bubble {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}
.tip-bubble.primary {
  background: var(--ocean);
  border-color: var(--ocean);
  color: white;
}
.tip-bubble b,
.tip-bubble span {
  display: block;
}
.tip-bubble b {
  font-size: 13.5px;
}
.tip-bubble span {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}
.tip-bubble.primary span {
  color: rgba(255,255,255,.76);
}
.tip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 24px;
}
.empty-project-state,
.empty-report-state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 34px 22px;
  color: var(--muted);
}
.empty-project-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--ocean);
  background: var(--sky);
}
.empty-project-state h4,
.empty-report-state h3 {
  color: var(--ink);
  font-size: 16px;
}
.empty-project-state p,
.empty-report-state p {
  max-width: 520px;
  font-size: 13px;
  line-height: 1.6;
}
.empty-mini {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1080px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 880px) {
  .dash-grid { grid-template-columns: 1fr; }
  .project-row { grid-template-columns: 1fr; gap: 6px; padding: 16px; }
  .project-row .progress { width: 100%; }
  .welcome-tips { grid-template-columns: 1fr; }
  .tip-actions { padding-right: 0; justify-content: flex-start; }
}

/* ============ WIZARD ============ */
.project-title-block {
  min-width: 0;
}
.project-title-display-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.project-title-display {
  color: var(--ocean-900);
  font-size: 28px;
  font-weight: 650;
  line-height: 1.22;
  text-align: left;
  min-width: 0;
  max-width: min(780px, 72vw);
  overflow-wrap: anywhere;
}
.project-title-display:hover {
  color: var(--ocean);
}
.title-edit-trigger {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--ocean);
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  flex-shrink: 0;
}
.title-edit-trigger:hover {
  border-color: #B7CEE5;
  background: var(--sky);
}
.project-title-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.project-title-input {
  min-width: min(560px, 68vw);
  max-width: 100%;
  border: 1px solid #B7CEE5;
  border-radius: 12px;
  background: white;
  color: var(--ocean-900);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
  padding: 9px 12px;
  outline: none;
  box-shadow: 0 0 0 4px rgba(20,83,135,.08);
}
.project-title-input:disabled {
  opacity: .72;
}
.project-title-error {
  margin-top: 7px;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
}

.wizard-shell { display: grid; grid-template-columns: 260px 1fr; gap: 32px; margin-top: 4px; position: relative; }
.wizard-steps { display: flex; flex-direction: column; gap: 2px; }
.wizard-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  cursor: pointer; transition: background .12s;
}
.wizard-step:hover { background: white; }
.wizard-step.active { background: white; border: 1px solid var(--line); }
.wizard-step.done .num { background: var(--teal); color: white; }
.wizard-step.active .num { background: var(--ocean); color: white; }
.wizard-step .num {
  width: 26px; height: 26px; border-radius: 999px;
  background: white; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  color: var(--muted); flex-shrink: 0;
  margin-top: 1px;
}
.wizard-step .lbl { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.wizard-step.active .lbl, .wizard-step.done .lbl { color: var(--ink); }
.wizard-step .sublbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wizard-progress-card {
  margin-top: 16px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.wizard-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; min-width: 0; }
.wizard-main { background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.wizard-main h2 { font-size: 22px; font-weight: 600; }
.wizard-main .lead { color: var(--muted); margin-top: 6px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.form-grid .full { grid-column: 1 / -1; }

.wizard-aside {
  background: linear-gradient(180deg, var(--sky), white);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; position: sticky; top: 88px;
}
.wizard-aside h4 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.wizard-aside p { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.55; }
.tip-list { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.tip-list .tip { font-size: 12.5px; color: var(--ink-2); padding: 10px 12px; background: white; border-radius: 8px; border: 1px solid var(--line-2); }
.wizard-assistant-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  height: 48px;
  padding: 0 17px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--ocean), var(--teal-700));
  box-shadow: 0 18px 40px rgba(20,83,135,.22);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
}
.wizard-assistant-fab:hover,
.wizard-assistant-fab.active {
  transform: translateY(-1px);
  box-shadow: 0 20px 46px rgba(20,83,135,.28);
}
.wizard-assistant-float {
  position: fixed;
  right: 24px;
  bottom: 84px;
  z-index: 91;
  width: min(360px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 130px));
  overflow-y: auto;
  background: linear-gradient(180deg, var(--sky), white 42%);
  border: 1px solid #B7CEE5;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(15,23,42,.20);
}
.wizard-assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.wizard-assistant-head h4 {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wizard-assistant-float p {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 10px;
  line-height: 1.58;
}

.wizard-actions {
  display: flex; justify-content: space-between; margin-top: 32px;
  padding-top: 24px; border-top: 1px solid var(--line-2);
}

.upload-zone {
  border: 1.5px dashed var(--line); border-radius: 12px;
  padding: 36px 24px; text-align: center;
  background: #FAFBFC;
}
.upload-zone:hover { border-color: var(--teal); background: var(--sky); }
.upload-zone h4 { font-size: 15px; font-weight: 600; }
.upload-zone p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.wizard-upload-zone { cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.wizard-upload-zone.dragging { border-color: var(--ocean); background: #EEF6FF; transform: translateY(-1px); }
.wizard-file-panel { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #FBFCFE; }
.wizard-file-panel h3 { font-size: 14px; font-weight: 700; }
.empty-inline { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; color: var(--muted); font-size: 13px; text-align: center; background: white; }

.file-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: white;
}
.file-row .ico {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--sky); color: var(--ocean);
  font-size: 11px; font-weight: 700;
}
.file-row .name { font-size: 14px; font-weight: 500; }
.file-row .meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.file-remove-btn {
  width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--line); background: white; color: var(--muted);
  display: grid; place-items: center; flex-shrink: 0;
}
.file-remove-btn:hover { color: var(--red); border-color: rgba(220,38,38,.25); background: #FEF2F2; }
.analysis-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.mini-metric { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: white; }
.mini-metric span { display: block; font-size: 11.5px; color: var(--muted); }
.mini-metric b { display: block; margin-top: 4px; font-size: 16px; color: var(--ink); }

.country-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.country-card {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 18px; cursor: pointer; transition: all .15s;
  background: white;
}
.country-card:hover { border-color: var(--teal); }
.country-card.active { border-color: var(--ocean); background: var(--sky); }
.country-card .flag { font-size: 28px; line-height: 1; }
.country-card h4 { font-size: 15px; font-weight: 600; margin-top: 10px; }
.country-card .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.country-card .scores { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.country-card .scores span { font-size: 11px; color: var(--ink-2); }
.country-card .scores b { color: var(--teal-700); }
.country-check { width: 22px; height: 22px; border-radius: 999px; background: var(--ocean); color: white; display: grid; place-items: center; }
.channel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.channel-chip { justify-content: flex-start; padding: 10px 12px; border-radius: 10px; min-height: 42px; }
.goal-title-row { align-items: flex-start; gap: 16px; }
.goal-stack { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.goal-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: white; }
.goal-period { width: 34px; height: 34px; border-radius: 999px; color: white; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.goal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.review-grid { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review-item { padding: 12px 14px; background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 9px; min-width: 0; }
.review-item div { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0; font-weight: 600; }
.review-item b { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink); line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
.report-pipeline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pipeline-step { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: white; }
.pipeline-step > span { width: 24px; height: 24px; border-radius: 999px; background: var(--sky); color: var(--ocean); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.pipeline-step b { font-size: 13.5px; }
.pipeline-step p { margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--muted); }

@media (orientation: portrait), (max-width: 980px) {
  .wizard-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .wizard-steps {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 10px;
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .wizard-step {
    min-width: 154px;
    flex: 0 0 auto;
    background: white;
    border: 1px solid var(--line);
    scroll-snap-align: start;
  }

  .wizard-progress-card {
    min-width: 188px;
    flex: 0 0 auto;
    margin-top: 0;
    scroll-snap-align: start;
  }
}

@media (max-width: 880px) {
  .wizard-shell { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .country-grid { grid-template-columns: 1fr 1fr; }
  .channel-grid { grid-template-columns: 1fr 1fr; }
  .analysis-grid,
  .review-grid,
  .report-pipeline { grid-template-columns: 1fr; }
}

/* ============ REPORT WORKSPACE ============ */
.report-shell {
  display: grid; grid-template-columns: 260px 1fr 320px; gap: 20px;
  margin-top: 4px;
  align-items: start;
}
.report-toc {
  position: sticky; top: 88px;
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 16px; max-height: calc(100vh - 110px); overflow-y: auto;
}
.report-toc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); font-weight: 600; padding: 0 6px; }
.toc-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ink-2); font-size: 13.5px; cursor: pointer;
  margin-top: 2px;
}
.toc-link:hover { background: var(--bg-soft); }
.toc-link.active { background: var(--sky); color: var(--ocean); font-weight: 600; }
.toc-num { font-size: 11px; color: var(--muted-2); width: 18px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.toc-status {
  width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; margin-left: auto;
}
.toc-status.ok { background: var(--green); }
.toc-status.warn { background: var(--orange); }
.toc-status.risk { background: var(--red); }
.toc-status.pend { background: var(--line); }

.report-main {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 0;
}
.report-cover {
  padding: 36px 40px;
  background: linear-gradient(135deg, var(--ocean-900) 0%, var(--ocean) 60%, var(--teal-700) 100%);
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative; overflow: hidden;
}
.report-cover::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 999px;
}
.report-cover::before {
  content: ""; position: absolute; right: 30px; bottom: -80px;
  width: 220px; height: 220px;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 999px;
}
.report-cover .label { font-size: 12px; color: rgba(255,255,255,0.7); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.report-cover h1 {
  font-size: 32px; font-weight: 600; margin-top: 10px; color: white;
  font-family: var(--font-serif);
}
.report-cover .meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: rgba(255,255,255,0.85); }
.report-cover .meta span { display: inline-flex; align-items: center; gap: 6px; }

.report-body { padding: 36px 40px; max-width: 760px; }
.report-section { margin-top: 36px; }
.report-section:first-child { margin-top: 0; }
.section-num {
  font-family: var(--font-serif); font-size: 14px; color: var(--teal-700); font-weight: 600;
  letter-spacing: 0.04em;
}
.report-section h2 {
  font-size: 22px; font-weight: 600; margin-top: 6px; color: var(--ocean-900);
}
.report-section h3 {
  font-size: 16px; font-weight: 600; margin-top: 22px; color: var(--ink);
}
.report-section p {
  margin-top: 12px; line-height: 1.7; color: var(--ink-2);
  font-size: 14.5px;
}
.report-section ul {
  margin-top: 12px; display: flex; flex-direction: column; gap: 6px;
}
.report-section ul li {
  position: relative; padding-left: 18px;
  font-size: 14.5px; line-height: 1.65; color: var(--ink-2);
}
.report-section ul li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 5px; height: 5px; border-radius: 999px; background: var(--teal);
}
.callout {
  margin-top: 16px; padding: 14px 16px;
  background: var(--sand); border-left: 3px solid var(--orange);
  border-radius: 0 8px 8px 0;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}
.callout.risk { background: rgba(220,38,38,0.05); border-color: var(--red); }
.callout.info { background: var(--sky); border-color: var(--teal); }
.callout-title { font-weight: 600; color: var(--ink); margin-bottom: 4px; font-size: 13px; }

.report-table {
  margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.report-table table { width: 100%; border-collapse: collapse; }
.report-table th, .report-table td { padding: 11px 14px; text-align: left; font-size: 13.5px; }
.report-table th { background: var(--bg-soft); font-weight: 600; color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.report-table tr:nth-child(even) td { background: #FBFBFC; }
.report-table td { border-top: 1px solid var(--line-2); color: var(--ink-2); }
.source-box {
  margin-top: 40px;
  padding: 18px;
  background: var(--bg-soft);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.cite { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cite-link { color: var(--teal-700); cursor: pointer; font-weight: 500; }
.report-section sup { color: var(--teal); font-weight: 600; cursor: pointer; }

.report-aside {
  position: sticky; top: 88px;
  display: flex; flex-direction: column; gap: 14px;
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.aside-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px;
}
.aside-card h4 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.aside-card .body { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.aside-card .actions { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.aside-act {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; color: var(--ink-2); font-weight: 500;
  background: white; cursor: pointer; transition: all .12s;
}
.aside-act:hover { border-color: var(--teal); color: var(--teal-700); }
.aside-act svg { width: 14px; height: 14px; }
.section-chat {
  margin-top: 14px;
  border-top: 1px solid var(--line-2);
  padding-top: 14px;
}
.section-chat label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.section-chat-log {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.section-chat-msg {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: white;
}
.section-chat-msg.user {
  background: var(--sky);
  border-color: rgba(20,83,135,.18);
}
.section-chat-msg.assistant {
  background: #FBFCFE;
}
.section-chat-msg .role {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.section-chat-msg .content {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  white-space: pre-wrap;
}
.section-chat-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  background: white;
}
.section-chat-error {
  margin-bottom: 8px;
  color: var(--red);
  font-size: 12px;
  line-height: 1.45;
}
.section-chat-input {
  min-height: 82px;
  font-size: 13px;
  margin-bottom: 8px;
}
.confidence { display: flex; gap: 4px; margin-top: 6px; }
.confidence span { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.confidence span.on { background: var(--teal); }

@media (max-width: 1180px) {
  .report-shell { grid-template-columns: 240px 1fr; }
  .report-aside {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 880px) {
  .report-shell { grid-template-columns: 1fr; }
  .report-toc { position: static; max-height: none; }
  .report-aside { display: flex; flex-direction: column; }
  .report-cover { padding: 24px 22px; }
  .report-cover h1 { font-size: 24px; }
  .report-body { padding: 24px 22px; }
}

/* ============ SPECIAL REPORTS ============ */
.special-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.special-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  cursor: pointer;
}
.special-card:hover { border-color: var(--teal); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.special-card .ico {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--sand); color: #B47308;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.special-card.tone-teal .ico { background: rgba(22,166,166,0.10); color: var(--teal-700); }
.special-card.tone-blue .ico { background: var(--sky); color: var(--ocean); }
.special-card.tone-red .ico { background: rgba(220,38,38,0.08); color: var(--red); }
.special-card h3 { font-size: 15.5px; font-weight: 600; }
.special-card .desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 6px; }
.special-card .meta { margin-top: 16px; display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); }
.special-card .foot { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  margin: 8px 0 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 980px) { .special-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .special-grid { grid-template-columns: 1fr; } }

/* ============ EXPERT CONFIRMATION ============ */
.expert-list { display: flex; flex-direction: column; gap: 12px; }
.expert-row {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: grid; grid-template-columns: 1fr 220px; gap: 24px;
  align-items: start;
}
.expert-row h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.expert-row p { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.6; }
.expert-row .ai-note {
  margin-top: 12px; padding: 10px 12px; background: var(--bg-soft); border-radius: 8px;
  font-size: 12.5px; color: var(--muted); line-height: 1.55;
}
.expert-row .ai-note b { color: var(--teal-700); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.expert-actions { display: flex; flex-direction: column; gap: 8px; }
.recommended-expert {
  background: var(--sky); padding: 12px; border-radius: 9px;
  font-size: 12.5px; color: var(--ink-2);
}
.recommended-expert b { color: var(--ocean); display: block; margin-bottom: 4px; font-size: 12px; }

@media (max-width: 760px) { .expert-row { grid-template-columns: 1fr; } }

/* ============ SETTINGS ============ */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav button {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  text-align: left; padding: 10px 12px; border-radius: 9px;
  font-size: 14px; color: var(--ink-2); font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.settings-nav button svg { width: 14px; height: 14px; flex: 0 0 auto; }
.settings-nav button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.settings-nav button:hover { background: white; }
.settings-nav button.active { background: white; border: 1px solid var(--line); color: var(--ink); }
.settings-sec { background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.settings-sec + .settings-sec { margin-top: 16px; }
.settings-sec h3 { font-size: 16px; font-weight: 600; }
.settings-sec .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .credit-wallet-card,
  .credit-package-grid,
  .admin-credit-rule-grid {
    grid-template-columns: 1fr;
  }
  .credit-rule-head {
    display: none;
  }
  .credit-rule-row {
    grid-template-columns: 1fr 1fr;
  }
  .credit-rule-row > div:first-child {
    grid-column: 1 / -1;
  }
  .credit-rule-row .btn {
    grid-column: 1 / -1;
  }
}

/* ============ ADMIN USERS ============ */
.users-page .settings-sec {
  margin-top: 16px;
}
.admin-user-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.admin-user-filter-card {
  padding: 18px;
}
.admin-user-filter-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(130px, .72fr));
  gap: 12px;
  align-items: end;
}
.admin-user-list-card {
  padding: 0;
  overflow: hidden;
}
.admin-user-list-head,
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(120px, .62fr) minmax(170px, .82fr) minmax(150px, .72fr) minmax(90px, .42fr);
  gap: 14px;
  align-items: center;
}
.admin-user-list-head {
  padding: 13px 18px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.admin-user-row {
  padding: 16px 18px;
  border-top: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.admin-user-row:hover {
  background: #FBFCFE;
}
.admin-user-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.admin-user-name {
  font-weight: 700;
  color: var(--ink);
}
.admin-user-email,
.admin-user-company,
.admin-user-muted {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.admin-user-email,
.admin-user-company {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 360px;
}
.admin-user-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.admin-user-usage span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 12px;
}
.admin-user-credit {
  color: var(--ocean);
  font-weight: 800;
  font-size: 15px;
}
.admin-user-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
}
.admin-user-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
  gap: 16px;
  align-items: start;
}
.admin-user-profile-top {
  display: flex;
  gap: 16px;
  align-items: center;
}
.admin-user-profile-top h3 {
  font-size: 20px;
  font-weight: 760;
}
.admin-user-badge-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.admin-user-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.admin-user-info {
  padding: 10px 11px;
  border-radius: 10px;
  background: var(--bg-soft);
  min-width: 0;
}
.admin-user-info span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.admin-user-info b {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.admin-user-reset-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
}
.admin-user-reset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.admin-user-reset-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-soft);
}
.admin-user-reset-link span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.admin-user-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 1080px) {
  .admin-user-summary-grid,
  .admin-user-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-user-filter-row,
  .admin-user-detail-hero,
  .admin-user-related-grid {
    grid-template-columns: 1fr;
  }
  .admin-user-list-head {
    display: none;
  }
  .admin-user-row {
    grid-template-columns: 1fr 1fr;
  }
  .admin-user-person {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .admin-user-summary-grid,
  .admin-user-detail-grid,
  .admin-user-row {
    grid-template-columns: 1fr;
  }
  .admin-user-pagination,
  .admin-user-reset-link {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
}

/* ============ AI CHAT BUBBLES (Question flow) ============ */
.ai-flow { display: flex; flex-direction: column; gap: 18px; }
.ai-bubble {
  background: white; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; max-width: 720px;
}
.ai-bubble.from-ai { border-color: var(--line); }
.ai-bubble .who { font-size: 11px; color: var(--teal-700); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.ai-bubble .who .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--teal); }
.ai-bubble p { margin-top: 8px; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.ai-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.user-bubble {
  align-self: flex-end; background: var(--ocean); color: white;
  padding: 12px 16px; border-radius: 14px 14px 4px 14px;
  font-size: 14px; max-width: 60%;
}

/* misc */
.divider { height: 1px; background: var(--line-2); margin: 24px 0; }
.row-flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.col-flex { display: flex; flex-direction: column; gap: 12px; }
.space-between { display: flex; justify-content: space-between; align-items: center; }
.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }

/* ============ PRINT/EXPORT styling for report sections ============ */
.section-ribbon {
  display: inline-block;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(245,158,11,0.1); color: #B47308;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}

/* ============ BUSINESS BLUE UI REFRESH ============ */
:root {
  --ocean: #0B4F8A;
  --ocean-700: #073E70;
  --ocean-900: #062B4D;
  --teal: #1D75BD;
  --teal-700: #155E9F;
  --sky: #EAF4FF;
  --sand: #F1F7FF;
  --orange: #D98A00;
  --green: #168253;
  --red: #C53333;
  --ink: #102033;
  --ink-2: #31445C;
  --muted: #5B6B80;
  --muted-2: #8795A8;
  --line: #DCE6F1;
  --line-2: #EAF0F7;
  --bg: #F6F9FC;
  --bg-card: #FFFFFF;
  --bg-soft: #F0F5FA;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --shadow-1: none;
  --shadow-2: 0 6px 18px rgba(16, 32, 51, 0.07);
  --shadow-3: 0 18px 44px rgba(16, 32, 51, 0.12);
  --font-sans: "Aptos", "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: var(--font-sans);
}

body {
  background: var(--bg);
  letter-spacing: 0;
}

body, h1, h2, h3, h4, h5, p, a, button, input, textarea, select,
.section-eyebrow, .sidebar-section, .report-cover .label, .section-num {
  letter-spacing: 0;
}

.card,
.feature-card,
.step-card,
.userseg,
.faq-item,
.kpi,
.project-list-card,
.wizard-main,
.wizard-aside,
.report-toc,
.report-main,
.aside-card,
.special-card,
.expert-row,
.settings-sec,
.ai-bubble,
.file-row,
.country-card {
  box-shadow: none;
}

.main,
.page,
.card,
.project-list-card,
.wizard-main,
.wizard-body,
.report-shell,
.report-main,
.report-body,
.settings-sec {
  min-width: 0;
}

.topnav,
.appbar {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-color: var(--line);
}

.topnav {
  height: 60px;
}

.brand-mark,
.avatar {
  background: var(--ocean);
  border-radius: 8px;
}

.brand-mark::after {
  display: none;
}

.btn,
.input,
.textarea,
.select,
.chip,
.badge,
.oauth-btn,
.aside-act {
  border-radius: 8px;
}

.btn-primary,
.btn-teal {
  background: var(--ocean);
  color: white;
}

.btn-primary:hover,
.btn-teal:hover {
  background: var(--ocean-700);
}

.btn-ghost,
.oauth-btn {
  background: white;
  border-color: var(--line);
}

.btn-soft {
  background: var(--sky);
  color: var(--ocean);
  border: 1px solid #CFE0F2;
}

.chip.active,
.wizard-step.active .num {
  background: var(--ocean);
  border-color: var(--ocean);
  color: white;
}

.badge-teal,
.badge-ocean {
  background: var(--sky);
  color: var(--ocean);
  border-color: #CFE0F2;
}

.hero {
  background:
    linear-gradient(180deg, #FFFFFF 0%, #F4F8FD 100%);
  padding-top: 54px;
}

.hero h1 {
  color: var(--ocean-900);
  letter-spacing: 0;
}

.hero h1 em {
  color: var(--ocean);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
}

.hero-en {
  font-family: var(--font-sans);
  font-style: normal;
  color: var(--ocean);
  font-weight: 600;
}

.hero-eyebrow,
.mockup-window,
.mockup-bar,
.live-dock {
  box-shadow: none;
}

.mockup-window {
  border-color: #D5E4F2;
}

.mockup-bar {
  background: #F7FAFD;
}

.feature-card .ico,
.special-card .ico,
.file-row .ico {
  border-radius: 8px;
  background: var(--sky);
  color: var(--ocean);
}

.feature-card:hover,
.special-card:hover,
.country-card:hover,
.aside-act:hover {
  transform: none;
  box-shadow: none;
  border-color: #B7CEE5;
}

.section-alt {
  background: #FFFFFF;
}

.section-dark,
.auth-aside,
.report-cover {
  background: var(--ocean-900);
}

.auth-aside::before,
.report-cover::after,
.report-cover::before {
  display: none;
}

.auth-aside h2,
.report-cover h1 {
  font-family: var(--font-sans);
}

.auth-aside h2 em {
  color: #8BC7FF;
}

.report-cover {
  border-radius: 8px 8px 0 0;
}

.report-table {
  overflow-x: auto;
}

.report-table table {
  min-width: 680px;
}

.progress-fill {
  background: var(--ocean);
}

.kpi {
  border-top: 3px solid #CFE0F2;
}

.kpi-accent,
.kpi-warn,
.kpi-risk {
  border-top-color: var(--ocean);
}

.kpi-accent .val,
.kpi-warn .val,
.kpi-risk .val,
.activity-dot,
.section-num,
.report-section sup,
.cite-link,
.section-eyebrow {
  color: var(--ocean);
}

.activity-dot {
  background: var(--ocean);
}

.dash-side .card[style*="linear-gradient"],
.settings-sec div[style*="linear-gradient"] {
  background: var(--ocean) !important;
}

.wizard-step.active {
  background: #FFFFFF;
  border-color: #B7CEE5;
}

.wizard-step.done .num,
.confidence span.on {
  background: var(--ocean);
}

.callout,
.callout.info {
  background: var(--sky);
  border-color: var(--ocean);
}

.callout.risk {
  background: #FFF5F5;
}

@media (max-width: 1024px) {
  .hero {
    padding: 40px 22px 48px;
  }

  .hero-inner {
    gap: 28px;
  }
}

@media (max-width: 880px) {
  .topnav {
    height: 58px;
    padding: 0 14px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .topnav .brand-logo-wide {
    width: 128px;
    height: 37px;
  }

  .brand-en {
    display: none;
  }

  .nav-cta {
    gap: 6px;
  }

  .nav-cta .btn-ghost {
    display: none;
  }

  .nav-cta .btn-primary {
    padding: 8px 12px;
  }

  .topnav .mobile-menu-btn {
    display: none;
  }

  .appbar {
    height: 56px;
    padding: 0 12px;
  }

  .appbar-title {
    min-width: 0;
    max-width: calc(100vw - 205px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .appbar-logo-square {
    display: block;
  }

  .appbar-right {
    gap: 6px;
  }

  .appbar-right .btn-ghost {
    display: none;
  }

  .appbar-right .btn-primary {
    padding: 8px 10px;
  }

  .sidebar {
    width: min(86vw, 320px);
  }

  .page {
    padding: 18px 14px 78px;
  }

  .page-header {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .page-title {
    font-size: 22px;
    line-height: 1.25;
  }

  .page-sub {
    font-size: 13px;
    line-height: 1.55;
  }

  .btn {
    min-height: 40px;
  }

  .input,
  .select {
    min-height: 44px;
  }

  .textarea {
    min-height: 108px;
  }

  .hero {
    padding: 32px 16px 40px;
  }

  .hero h1 {
    font-size: 34px;
    line-height: 1.12;
  }

  .hero-sub {
    margin-top: 18px;
  }

  .hero-ctas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .hero-trust {
    gap: 10px;
    font-size: 12.5px;
  }

  .hero-mockup {
    height: auto;
  }

  .mockup-window {
    position: relative;
    inset: auto !important;
    width: 100%;
    max-height: none;
  }

  .mockup-window > div:not(.mockup-bar) {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }

  .mockup-window > div:not(.mockup-bar) > div:first-child,
  .mockup-window > div:not(.mockup-bar) > div:last-child {
    display: none !important;
  }

  section.section {
    padding: 44px 16px;
  }

  .section h2 {
    font-size: 25px;
    line-height: 1.25;
  }

  .feature-card,
  .step-card,
  .userseg,
  .faq-item,
  .special-card,
  .expert-row,
  .settings-sec {
    padding: 18px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpi {
    padding: 14px;
  }

  .kpi .val {
    font-size: 24px;
  }

  .project-list-head {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
    padding: 16px;
  }

  .project-list-head .row-flex {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .project-row {
    display: block;
    padding: 16px;
  }

  .project-row > div,
  .project-row > button {
    margin-top: 10px;
  }

  .project-row > div:first-child {
    margin-top: 0;
  }

  .project-row .progress {
    min-width: 0;
  }

  .dash-side {
    gap: 12px;
  }

  .wizard-shell {
    gap: 16px;
  }

  .wizard-steps {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    margin: 0 -14px;
    padding-left: 14px;
    scroll-snap-type: x proximity;
  }

  .wizard-step {
    min-width: 142px;
    flex: 0 0 auto;
    background: white;
    border: 1px solid var(--line);
    scroll-snap-align: start;
  }

  .wizard-step .sublbl {
    display: none;
  }

  .wizard-progress-card {
    min-width: 170px;
    flex: 0 0 auto;
    margin-top: 0 !important;
  }

  .project-title-display {
    max-width: calc(100vw - 116px);
    font-size: 23px;
  }

  .project-title-input {
    min-width: 0;
    width: min(100%, calc(100vw - 32px));
    font-size: 21px;
  }

  .project-title-editor {
    align-items: stretch;
  }

  .project-title-editor .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .wizard-main {
    padding: 20px 16px;
  }

  .wizard-body {
    gap: 14px;
  }

  .wizard-aside {
    position: static;
    padding: 16px;
  }

  .wizard-assistant-fab {
    right: 16px;
    bottom: 16px;
    height: 46px;
    padding: 0 14px;
  }

  .wizard-assistant-float {
    right: 16px;
    bottom: 74px;
    padding: 16px;
    max-height: calc(100vh - 112px);
  }

  .wizard-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 24px -16px -20px;
    padding: 12px 16px;
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line);
  }

  .country-grid {
    grid-template-columns: 1fr;
  }

  .report-shell {
    gap: 12px;
  }

  .report-shell > * {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .report-toc {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-height: none;
    padding: 10px;
    border-radius: 8px;
  }

  .report-toc h4,
  .report-toc .divider {
    display: none;
  }

  .toc-link {
    flex: 0 0 auto;
    margin-top: 0;
    background: white;
    border: 1px solid var(--line);
    max-width: 220px;
  }

  .toc-status {
    display: none;
  }

  .report-cover {
    padding: 22px 18px;
  }

  .report-cover .meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .report-body {
    padding: 22px 18px;
  }

  .report-section h2 {
    font-size: 20px;
  }

  .report-section p,
  .report-section ul li {
    font-size: 14px;
  }

  .special-grid {
    gap: 12px;
  }

  .expert-actions {
    gap: 10px;
  }

  .settings-grid {
    gap: 16px;
  }

  .settings-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 0 14px 8px;
  }

  .settings-nav button {
    flex: 0 0 auto;
    width: auto;
    background: white;
    border: 1px solid var(--line);
  }

  .auth-shell {
    min-height: 100vh;
  }

  .auth-aside {
    min-height: auto;
    padding: 24px 20px;
  }

  .auth-main {
    padding: 24px 18px 32px;
  }

  .auth-main-top .brand {
    display: none;
  }

  .verify-card-inline {
    grid-template-columns: 22px 1fr;
  }

  .verify-card-inline .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .company-onboarding-head {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
  }

  .company-onboarding-main {
    padding: 20px 16px 64px;
  }

  .company-onboarding-copy,
  .company-profile-form {
    padding: 18px;
    border-radius: 12px;
  }

  .company-onboarding-copy h1 {
    font-size: 25px;
  }

  .company-proof-grid,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .company-form-actions .btn {
    width: 100%;
  }

  .appbar-right {
    gap: 6px;
  }

  .live-dock:not(.error):not(.busy) {
    display: none;
  }

  .live-dock.error,
  .live-dock.busy {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

@media (max-width: 520px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .row-flex {
    gap: 8px;
  }

  .row-flex .btn,
  .row-flex .chip {
    flex-shrink: 0;
  }

  .page-header > .row-flex {
    width: 100%;
  }

  .page-header > .row-flex .btn {
    flex: 1 1 auto;
  }

  .appbar-title {
    max-width: 38vw;
  }

  .appbar-right .btn-primary {
    padding: 8px 10px;
    font-size: 0;
    gap: 0;
  }

  .appbar-right .btn-primary svg {
    width: 16px;
    height: 16px;
  }

  .welcome-tips {
    padding: 12px;
    margin-top: -4px;
  }

  .tip-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .report-table th,
  .report-table td {
    padding: 10px 12px;
  }

  .user-bubble {
    max-width: 88%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .page-narrow,
  .settings-grid,
  .settings-grid > div,
  .settings-sec {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .settings-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .credit-wallet-card,
  .credit-package-grid,
  .credit-mini-grid,
  .entitlement-row {
    min-width: 0;
  }

  .settings-sec {
    padding: 20px 16px;
  }
}

/* ============ V2 PROJECT + TASK CENTER ============ */
.current-project-button {
  max-width: 240px;
}
.current-project-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-project-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-color: rgba(20,184,166,.28);
  background: linear-gradient(135deg, rgba(240,253,250,.92), #fff 58%);
}
.active-project-card .eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--teal-700);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.active-project-card h3 {
  margin-top: 6px;
  font-size: 19px;
  font-weight: 760;
  color: var(--ink);
}
.active-project-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
}
.project-row.active {
  background: var(--teal-soft);
}
.task-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kpi-green .val { color: var(--success); }
.kpi-ocean .val { color: var(--ocean); }
.kpi-orange .val { color: var(--orange); }
.kpi-red .val { color: var(--red); }
.task-filter-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
}
.task-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.task-title {
  font-size: 16px;
  font-weight: 720;
  color: var(--ink);
}
.task-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.task-criteria {
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
}
.field-label,
.task-actions label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.task-notes {
  min-height: 92px;
}
.task-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.task-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--ink-2);
}
.task-ai-note {
  margin-top: 14px;
}
.task-ai-note p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}
.task-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.task-ai-actions span {
  padding: 5px 8px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
}
.task-actions {
  display: flex;
  flex-direction: column;
}
.task-message {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .active-project-card,
  .task-title-row {
    flex-direction: column;
    align-items: stretch;
  }
  .task-summary-grid,
  .task-filter-card,
  .task-card {
    grid-template-columns: 1fr;
  }
  .current-project-button {
    max-width: 44vw;
  }
}
