/* ============================================================
   asomer.cn — Apple-inspired design system
   + AutoIND-faithful UI recreation components
   Single brand blue #2563eb. Lato + PingFang SC.
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Apple-inspired palette */
  --c-bg: #fbfbfd;            /* Apple off-white page bg */
  --c-bg-2: #f5f6f8;          /* AutoIND page bg */
  --c-surface: #ffffff;       /* AutoIND card bg */
  --c-surface-2: #fafbfc;
  --c-surface-3: #f5f6f8;
  --c-border: #e5e7eb;        /* AutoIND border */
  --c-border-strong: #d1d5db;
  --c-divider: rgba(0, 0, 0, 0.08);

  /* Text (Apple near-black) */
  --c-text: #1d1d1f;
  --c-text-2: #1d1d1f;
  --c-text-3: #424245;
  --c-text-4: #6e6e73;
  --c-text-5: #86868b;       /* Apple secondary gray */

  /* Brand blue (AutoIND) */
  --c-brand: #2563eb;
  --c-brand-hover: #1d4ed8;
  --c-brand-active: #1e40af;
  --c-brand-soft: rgba(37, 99, 235, 0.10);
  --c-brand-soft-2: rgba(37, 99, 235, 0.16);
  --c-brand-wordmark: #60a5fa;  /* AutoIND "IND" lighter blue */

  /* Status (AutoIND soft) */
  --c-success: #059669;       --c-success-soft: #ecfdf5;
  --c-warning: #b45309;       --c-warning-soft: #fffbeb;
  --c-danger: #b91c1c;        --c-danger-soft: #fef2f2;
  --c-info: #0369a1;          --c-info-soft: #f0f9ff;
  --c-neutral: #6b7280;       --c-neutral-soft: #f3f4f6;

  /* Hero dark canvas */
  --c-hero-bg: #000000;
  --c-hero-bg-2: #0a0a0a;
  --c-hero-text: #f5f5f7;
  --c-hero-text-2: #d1d1d6;
  --c-hero-text-3: #8e8e93;
  --c-hero-border: rgba(255, 255, 255, 0.10);

  /* Radii (Apple) */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;             /* Apple signature card radius */
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-pill: 999px;

  /* Shadows (Apple: very soft) */
  --sh-1: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --sh-2: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --sh-3: 0 12px 40px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.06);
  --sh-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sh-elevated: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
  --sh-hero: 0 30px 80px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(37, 99, 235, 0.18);

  /* Layout */
  --max-w: 1120px;
  --max-w-narrow: 760px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(96px, 12vw, 160px);
  --section-y-sm: clamp(64px, 8vw, 96px);

  /* Motion (Apple) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 200ms;
  --dur: 480ms;
  --dur-slow: 720ms;

  /* Type */
  --font-sans: "Lato", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --c-bg: #000000;
  --c-bg-2: #0a0a0a;
  --c-surface: #161616;
  --c-surface-2: #1c1c1e;
  --c-surface-3: #2c2c2e;
  --c-border: rgba(255, 255, 255, 0.10);
  --c-border-strong: rgba(255, 255, 255, 0.18);
  --c-divider: rgba(255, 255, 255, 0.08);

  --c-text: #ffffff;
  --c-text-2: #f5f5f7;
  --c-text-3: #d1d1d6;
  --c-text-4: #a1a1a6;
  --c-text-5: #8e8e93;

  --c-hero-bg: #000000;
  --c-hero-bg-2: #0a0a0a;
  --c-hero-border: rgba(255, 255, 255, 0.10);

  --c-success-soft: rgba(5, 150, 105, 0.16);
  --c-warning-soft: rgba(180, 83, 9, 0.16);
  --c-danger-soft: rgba(185, 28, 28, 0.16);
  --c-info-soft: rgba(3, 105, 161, 0.16);
  --c-neutral-soft: rgba(255, 255, 255, 0.06);

  --sh-1: 0 1px 3px rgba(0, 0, 0, 0.4);
  --sh-2: 0 4px 12px rgba(0, 0, 0, 0.4);
  --sh-3: 0 12px 40px rgba(0, 0, 0, 0.5);
  --sh-elevated: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-theme="dark"] { color-scheme: dark; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum", "cv11";
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--c-brand-soft-2); color: var(--c-text); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: var(--section-y) 0; }
.section-sm { padding: var(--section-y-sm) 0; }

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-brand);
  margin-bottom: 16px;
}
[data-theme="dark"] .eyebrow { color: #60a5fa; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--c-text);
}
h1 {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.08;
}
h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.02em; }
h4 { font-size: 19px; letter-spacing: -0.01em; }

p { margin: 0; color: var(--c-text-3); }
.lead {
  font-size: clamp(19px, 1.5vw, 24px);
  line-height: 1.5;
  color: var(--c-text-3);
  font-weight: 400;
}
.muted { color: var(--c-text-5); }

.section-head { max-width: 760px; margin-bottom: 64px; }
.section-head h2 { margin-top: 16px; }
.section-head p { margin-top: 20px; font-size: 19px; line-height: 1.5; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons (Apple) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 400;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap;
  user-select: none;
  letter-spacing: -0.01em;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--c-brand);
  color: #fff;
}
.btn-primary:hover { background: var(--c-brand-hover); }
.btn-secondary {
  background: var(--c-surface);
  color: var(--c-text);
  border-color: var(--c-border);
  box-shadow: var(--sh-1);
}
.btn-secondary:hover { background: var(--c-surface-2); border-color: var(--c-border-strong); }
.btn-ghost { color: var(--c-brand); }
.btn-ghost:hover { color: var(--c-brand-hover); }
.btn-lg { height: 50px; padding: 0 28px; font-size: 17px; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: var(--r-pill); }
.btn .icon { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Nav (Apple) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-divider);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--c-text);
}
.nav-brand .logo-mark { width: 26px; height: 26px; }
.nav-brand .logo-text { display: flex; align-items: baseline; gap: 6px; }
.nav-brand .logo-text .sub { font-size: 11px; color: var(--c-text-5); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--c-text-3);
  border-radius: var(--r-pill);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-link:hover { color: var(--c-text); }
.nav-link.active { color: var(--c-brand); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  color: var(--c-text);
}
.nav-toggle:hover { background: var(--c-surface-2); }
.nav-toggle svg { width: 22px; height: 22px; }

.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  color: var(--c-text-3);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.theme-toggle:hover { background: var(--c-surface-2); color: var(--c-text); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-divider);
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gutter) 24px;
    gap: 0;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: 14px; font-size: 17px; border-radius: var(--r-md); }
  .nav-actions .btn-link { display: none; }
}

/* ---------- Logo (AutoIND-faithful) ---------- */
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--c-brand);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.04em;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 7px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 50%);
  pointer-events: none;
}
.logo-mark { position: relative; overflow: hidden; }

/* AutoIND wordmark: "Auto" + "IND" (lighter blue) */
.logo-autoind {
  display: inline-flex;
  align-items: baseline;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: var(--c-text);
}
.logo-autoind .ind { color: var(--c-brand-wordmark); }

/* ---------- Hero (Apple) ---------- */
.hero {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
  text-align: center;
}
.hero .eyebrow { margin-bottom: 24px; }
.hero h1 {
  max-width: 18ch;
  margin: 0 auto;
}
.hero .lead {
  max-width: 60ch;
  margin: 24px auto 0;
}
.hero .btn-row { justify-content: center; margin-top: 40px; }
.hero-visual {
  margin-top: 72px;
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--sh-elevated);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
}

/* ---------- Headline-card band (Apple "story" section) ---------- */
.story {
  text-align: center;
  padding: var(--section-y) 0;
}
.story h2 { max-width: 22ch; margin: 0 auto; }
.story p { max-width: 60ch; margin: 24px auto 0; font-size: 21px; line-height: 1.5; }

/* ---------- Feature rows (Apple alternating) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: clamp(56px, 7vw, 96px) 0;
}
.feature-row.reverse .feature-visual { order: -1; }
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; gap: 40px; padding: 48px 0; }
  .feature-row.reverse .feature-visual { order: 0; }
}
.feature-row + .feature-row { border-top: 1px solid var(--c-divider); }
.feature-content h2 { margin-bottom: 20px; }
.feature-content p { font-size: 18px; line-height: 1.55; }
.feature-list { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.feature-list li {
  display: flex;
  gap: 12px;
  font-size: 16px;
  color: var(--c-text-2);
  line-height: 1.5;
}
.feature-list .check {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  background: var(--c-brand-soft);
  color: var(--c-brand);
  margin-top: 1px;
}
[data-theme="dark"] .feature-list .check { color: #60a5fa; }
.feature-list .check svg { width: 13px; height: 13px; }

.feature-visual {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-2);
  overflow: hidden;
}

/* ---------- Card grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--sh-card);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card-hoverable:hover {
  box-shadow: var(--sh-2);
  transform: translateY(-2px);
  border-color: var(--c-border-strong);
}
.card-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--c-brand-soft);
  color: var(--c-brand);
  margin-bottom: 20px;
}
[data-theme="dark"] .card-icon { color: #60a5fa; }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { font-size: 15px; line-height: 1.55; color: var(--c-text-3); }

/* ---------- Badges / pills (AutoIND-faithful) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r-sm);
  background: var(--c-surface-3);
  color: var(--c-text-3);
  border: 1px solid var(--c-border);
  letter-spacing: 0;
}
.badge-brand { background: var(--c-brand-soft); color: var(--c-brand); border-color: transparent; }
[data-theme="dark"] .badge-brand { color: #60a5fa; }
.badge-success { background: var(--c-success-soft); color: var(--c-success); border-color: transparent; }
.badge-warning { background: var(--c-warning-soft); color: var(--c-warning); border-color: transparent; }
.badge-danger  { background: var(--c-danger-soft);  color: var(--c-danger);  border-color: transparent; }
.badge-info    { background: var(--c-info-soft);    color: var(--c-info);    border-color: transparent; }
.badge-neutral { background: var(--c-neutral-soft); color: var(--c-text-3);  border-color: transparent; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- CTA band (Apple dark) ---------- */
.cta-band {
  position: relative;
  background: var(--c-hero-bg);
  color: var(--c-hero-text);
  border-radius: var(--r-2xl);
  padding: clamp(64px, 9vw, 112px) clamp(28px, 5vw, 80px);
  overflow: hidden;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 500px at 50% 0%, rgba(37, 99, 235, 0.32), transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: var(--c-hero-text); max-width: 18ch; margin: 0 auto; }
.cta-band p { color: var(--c-hero-text-2); margin-top: 20px; max-width: 56ch; margin-left: auto; margin-right: auto; font-size: 19px; }
.cta-band .btn-row { justify-content: center; margin-top: 36px; }
.cta-band .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--c-hero-text);
}
.cta-band .btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--c-divider); }
.faq-item { border-bottom: 1px solid var(--c-divider); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left;
  padding: 24px 0;
  font-size: 19px; font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.faq-q .chev { width: 18px; height: 18px; color: var(--c-text-5); transition: transform var(--dur) var(--ease); flex: 0 0 18px; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur) var(--ease); }
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner { padding-bottom: 24px; font-size: 16px; color: var(--c-text-3); line-height: 1.65; max-width: 80ch; }

/* ---------- Footer (Apple) ---------- */
.footer {
  border-top: 1px solid var(--c-divider);
  background: var(--c-bg);
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .nav-brand { margin-bottom: 16px; }
.footer-brand p { font-size: 14px; max-width: 38ch; color: var(--c-text-4); }
.footer-col h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-5);
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--c-text-3);
  transition: color var(--dur-fast) var(--ease);
}
.footer-col a:hover { color: var(--c-text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--c-divider);
  font-size: 12px; color: var(--c-text-5);
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: var(--c-text-5); }
.footer-bottom a:hover { color: var(--c-text-3); }
.footer-address { font-style: normal; color: var(--c-text-4); margin-top: 8px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Helpers ---------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mb-0 { margin-bottom: 0; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.maxw-narrow { max-width: var(--max-w-narrow); }
.kbd {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  color: var(--c-text-3);
}
.divider { height: 1px; background: var(--c-divider); margin: 0; border: 0; }

/* ============================================================
   AutoIND UI recreation components (faithful to real product)
   Uses real colors / labels / layout from frontend/templates
   ============================================================
*/

/* App frame — mimics AutoIND top header + main canvas */
.app-frame {
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-elevated);
  font-size: 13px;
  color: var(--c-text-2);
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 14px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.app-header-left,
.app-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--c-text-3);
  padding: 4px 8px;
  border-radius: var(--r-sm);
}
.app-back:hover { background: var(--c-surface-2); color: var(--c-text); }
.app-back svg { width: 14px; height: 14px; }
.app-domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-3);
  padding: 0 8px;
}
.app-domain-badge .domain-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r-sm);
  background: var(--c-brand-soft);
  color: var(--c-brand);
  letter-spacing: 0.02em;
}
[data-theme="dark"] .app-domain-badge .domain-pill { color: #60a5fa; }
.app-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
}
.app-header-btn:hover { background: var(--c-surface-2); color: var(--c-text); }
.app-header-btn svg { width: 13px; height: 13px; }
.app-header-btn.primary { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }

.app-body {
  background: var(--c-bg-2);
  padding: 18px;
}
.app-body.tight { padding: 0; }

/* Section title row (e.g. "Lifecycle Progress") */
.app-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.app-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin: 0;
}
.app-section-sub {
  font-size: 12px;
  color: var(--c-text-5);
  margin-top: 2px;
}
.app-section-actions { display: flex; gap: 6px; align-items: center; }

/* Stat tiles (Core Briefing, submission-material stats) */
.app-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.app-stat {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px;
}
.app-stat .label {
  font-size: 11px;
  color: var(--c-text-5);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.app-stat .value {
  font-size: 22px;
  font-weight: 600;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.app-stat .delta {
  font-size: 11px;
  color: var(--c-text-5);
  margin-top: 4px;
}
.app-stat .delta.up { color: var(--c-success); }
.app-stat .delta.warn { color: var(--c-warning); }
@media (max-width: 640px) {
  .app-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Lifecycle Progress ring row */
.app-progress-row {
  display: flex;
  gap: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px;
  flex-wrap: wrap;
}
.app-progress-item {
  flex: 1 1 140px;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-ring {
  position: relative;
  width: 44px; height: 44px;
  flex: 0 0 44px;
}
.app-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.app-ring .track { fill: none; stroke: var(--c-surface-3); stroke-width: 4; }
.app-ring .fill { fill: none; stroke: var(--c-brand); stroke-width: 4; stroke-linecap: round; }
.app-ring.warn .fill { stroke: var(--c-warning); }
.app-ring.danger .fill { stroke: var(--c-danger); }
.app-ring .label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.app-progress-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-progress-meta .name { font-size: 13px; font-weight: 500; color: var(--c-text); }
.app-progress-meta .sub { font-size: 11px; color: var(--c-text-5); }

/* Gantt-style timeline */
.app-gantt {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px;
  overflow: hidden;
}
.app-gantt-header {
  display: grid;
  grid-template-columns: 140px 1fr;
  font-size: 11px;
  color: var(--c-text-5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-divider);
  margin-bottom: 8px;
}
.app-gantt-months {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  font-size: 11px;
  color: var(--c-text-5);
}
.app-gantt-months span { text-align: center; }
.app-gantt-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--c-divider);
  gap: 8px;
}
.app-gantt-row:last-child { border-bottom: 0; }
.app-gantt-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-2);
  display: flex; align-items: center; gap: 6px;
}
.app-gantt-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-brand); }
.app-gantt-bar-track {
  position: relative;
  height: 22px;
  background: var(--c-surface-3);
  border-radius: 4px;
}
.app-gantt-bar {
  position: absolute;
  top: 3px;
  height: 16px;
  border-radius: 8px;
  background: var(--c-brand);
  opacity: 0.85;
  display: flex; align-items: center;
  padding: 0 8px;
  font-size: 10px;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.app-gantt-bar.warn { background: var(--c-warning); }
.app-gantt-bar.done { background: var(--c-success); opacity: 0.7; }
.app-gantt-bar.future { background: var(--c-text-5); opacity: 0.4; }
.app-gantt-today {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--c-danger);
}

/* AI suggestion inbox */
.app-inbox {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.app-inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-divider);
}
.app-inbox-item:last-child { border-bottom: 0; }
.app-inbox-icon {
  width: 28px; height: 28px;
  flex: 0 0 28px;
  border-radius: var(--r-pill);
  background: var(--c-brand-soft);
  color: var(--c-brand);
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .app-inbox-icon { color: #60a5fa; }
.app-inbox-icon svg { width: 14px; height: 14px; }
.app-inbox-icon.unread { background: var(--c-brand); color: #fff; }
.app-inbox-body { flex: 1; min-width: 0; }
.app-inbox-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.app-inbox-meta {
  font-size: 11px;
  color: var(--c-text-5);
}
.app-inbox-snippet {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 4px;
  line-height: 1.4;
}
.app-inbox-actions { display: flex; gap: 6px; }

/* Three-pane extract workspace */
.app-extract {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 0;
  height: 460px;
  background: var(--c-bg-2);
}
@media (max-width: 860px) {
  .app-extract { grid-template-columns: 1fr; height: auto; }
  .app-extract > * { border-right: 0 !important; border-bottom: 1px solid var(--c-border); }
}
.app-extract-pane {
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-width: 0;
}
.app-extract-pane:last-child { border-right: 0; }
.app-pane-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-divider);
}
.app-pane-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app-status-bar {
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-divider);
  font-size: 12px;
  align-items: center;
}
.app-status-item { display: inline-flex; align-items: center; gap: 5px; color: var(--c-text-3); }
.app-status-item .num { color: var(--c-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.app-status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.app-status-item.success { color: var(--c-success); }
.app-status-item.warning { color: var(--c-warning); }
.app-status-item.danger  { color: var(--c-danger); }
.app-status-item.neutral { color: var(--c-text-5); }

.app-field-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.app-field-item {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--c-text-2);
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
  cursor: pointer;
}
.app-field-item:hover { background: var(--c-surface-2); }
.app-field-item.active { background: var(--c-brand-soft); color: var(--c-text); }
.app-field-item .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-field-item .status-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.app-field-item .status-dot.confirmed { background: var(--c-success); }
.app-field-item .status-dot.low      { background: var(--c-warning); }
.app-field-item .status-dot.risk     { background: var(--c-danger); }
.app-field-item .status-dot.rejected { background: var(--c-text-5); }

.app-field-detail { font-size: 12.5px; flex: 1; overflow-y: auto; }
.app-field-detail .field-name {
  font-size: 14px; font-weight: 600;
  color: var(--c-text);
  margin-bottom: 4px;
}
.app-field-detail .field-value {
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-text-2);
  margin: 8px 0 12px;
  word-break: break-all;
}
.app-field-detail .meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.app-field-detail .meta {
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.app-field-detail .meta .k {
  font-size: 10px;
  color: var(--c-text-5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.app-field-detail .meta .v {
  font-size: 12px;
  color: var(--c-text-2);
  font-family: var(--font-mono);
}
.app-field-detail .actions { display: flex; gap: 6px; }

.app-source-view {
  background: var(--c-surface-3);
  border-radius: var(--r-sm);
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  position: relative;
}
.app-source-quote {
  background: var(--c-brand-soft);
  border-left: 3px solid var(--c-brand);
  padding: 10px 12px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--c-text-2);
  margin-bottom: 10px;
}
.app-source-quote strong { color: var(--c-brand); font-weight: 600; }
[data-theme="dark"] .app-source-quote strong { color: #60a5fa; }
.app-source-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 11px;
}
.app-source-meta .cell {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 6px 8px;
}
.app-source-meta .k { color: var(--c-text-5); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.app-source-meta .v { color: var(--c-text-2); font-family: var(--font-mono); margin-top: 2px; }

/* OnlyOffice + side panel (auto-generate-review) */
.app-review {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  height: 480px;
  background: var(--c-bg-2);
}
@media (max-width: 860px) {
  .app-review { grid-template-columns: 1fr; height: auto; }
}
.app-doc-canvas {
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 24px 32px;
  overflow: hidden;
  display: flex; flex-direction: column;
  gap: 8px;
}
.app-doc-line {
  height: 8px;
  background: var(--c-surface-3);
  border-radius: 2px;
}
.app-doc-line.title { height: 14px; width: 60%; background: var(--c-text-2); margin-bottom: 8px; }
.app-doc-line.h2 { height: 11px; width: 40%; background: var(--c-text-3); margin-top: 12px; margin-bottom: 6px; }
.app-doc-line.short { width: 70%; }
.app-doc-line.long { width: 100%; }
.app-doc-line.med { width: 88%; }
.app-doc-line.highlight {
  background: var(--c-brand-soft);
  border-left: 3px solid var(--c-brand);
  height: 32px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  position: relative;
}
.app-doc-line.highlight::after {
  content: "NOAEL: 30 mg/kg/day";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--c-brand);
  font-family: var(--font-mono);
  font-weight: 500;
}

.app-side-panel {
  background: var(--c-surface);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.app-tabs {
  display: flex;
  border-bottom: 1px solid var(--c-divider);
}
.app-tab {
  flex: 1;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-5);
  border-bottom: 2px solid transparent;
  text-align: center;
}
.app-tab.active { color: var(--c-brand); border-bottom-color: var(--c-brand); }
[data-theme="dark"] .app-tab.active { color: #60a5fa; border-bottom-color: #60a5fa; }
.app-tab-body { padding: 14px; flex: 1; overflow-y: auto; }
.app-qa-item {
  background: var(--c-warning-soft);
  border-left: 3px solid var(--c-warning);
  padding: 10px 12px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 8px;
  font-size: 12px;
}
.app-qa-item .qa-title { font-weight: 600; color: var(--c-warning); margin-bottom: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.app-qa-item .qa-desc { color: var(--c-text-2); line-height: 1.45; }
.app-qa-item.info { background: var(--c-info-soft); border-left-color: var(--c-info); }
.app-qa-item.info .qa-title { color: var(--c-info); }
.app-qa-item.success { background: var(--c-success-soft); border-left-color: var(--c-success); }
.app-qa-item.success .qa-title { color: var(--c-success); }

/* Audit log table */
.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.app-table thead {
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
}
.app-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--c-divider);
  color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
}
.app-table td.mono { font-family: var(--font-mono); font-size: 11.5px; }
.app-table tr:hover td { background: var(--c-surface-2); }

/* Translator UI */
.app-translator {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: 480px;
  background: var(--c-bg-2);
}
@media (max-width: 860px) {
  .app-translator { grid-template-columns: 1fr; height: auto; }
}
.app-translator-aside {
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 16px;
}
.app-translator-main {
  background: var(--c-surface);
  display: flex; flex-direction: column;
}
.app-form-row { display: flex; gap: 8px; align-items: end; margin-bottom: 12px; }
.app-form-field { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.app-form-label {
  font-size: 11px;
  color: var(--c-text-5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.app-select,
.app-input {
  height: 32px;
  padding: 0 10px;
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--c-text-2);
  font-family: inherit;
  width: 100%;
}
.app-lang-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 32px;
  color: var(--c-text-5);
  margin-top: 18px;
}
.app-lang-arrow svg { width: 14px; height: 14px; }
.app-mode-tabs {
  display: flex;
  background: var(--c-surface-3);
  border-radius: var(--r-sm);
  padding: 2px;
  margin-bottom: 12px;
  position: relative;
}
.app-mode-tab {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--c-text-3);
  text-align: center;
  border-radius: 5px;
}
.app-mode-tab.active {
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--sh-1);
  font-weight: 500;
}
.app-toggle-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--c-surface-3);
  border-radius: var(--r-sm);
  margin: 12px 0;
}
.app-toggle {
  width: 32px; height: 18px;
  background: var(--c-text-5);
  border-radius: var(--r-pill);
  position: relative;
  flex: 0 0 32px;
  transition: background var(--dur-fast) var(--ease);
}
.app-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.app-toggle.on { background: var(--c-brand); }
.app-toggle.on::after { transform: translateX(14px); }
.app-toggle-copy { font-size: 12px; color: var(--c-text-3); }
.app-toggle-copy .t { font-weight: 500; color: var(--c-text-2); display: block; margin-bottom: 2px; }
.app-toggle-copy .h { font-size: 11px; color: var(--c-text-5); }

.app-preview {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--c-divider);
  overflow: hidden;
}
.app-preview-pane {
  padding: 16px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.6;
  color: var(--c-text-2);
}
.app-preview-pane.right { border-left: 1px solid var(--c-divider); background: var(--c-surface-2); }
.app-preview-pane .label {
  font-size: 10px;
  color: var(--c-text-5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  font-weight: 500;
}
.app-preview-pane p { margin-bottom: 8px; }
.app-term-hit {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 500;
}
[data-theme="dark"] .app-term-hit { color: #60a5fa; }

/* Plotter UI */
.app-plotter {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  height: 480px;
  background: var(--c-bg-2);
}
@media (max-width: 860px) {
  .app-plotter { grid-template-columns: 1fr; height: auto; }
}
.app-plotter-workspace {
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex; flex-direction: column;
}
.app-data-grid {
  flex: 1;
  background: var(--c-surface-3);
  font-family: var(--font-mono);
  font-size: 11px;
  overflow: auto;
  border-bottom: 1px solid var(--c-divider);
}
.app-data-grid table {
  border-collapse: collapse;
  width: 100%;
}
.app-data-grid th,
.app-data-grid td {
  border: 1px solid var(--c-border);
  padding: 4px 8px;
  text-align: right;
  white-space: nowrap;
}
.app-data-grid th {
  background: var(--c-surface-2);
  color: var(--c-text-5);
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 1;
}
.app-data-grid td:first-child,
.app-data-grid th:first-child {
  background: var(--c-surface-2);
  color: var(--c-text-5);
  text-align: center;
}
.app-data-grid td.active {
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.app-plot-output {
  padding: 16px;
  background: var(--c-surface);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 200px;
}
.app-plot-output svg { max-width: 100%; max-height: 100%; }

.app-plotter-aside {
  background: var(--c-surface);
  padding: 14px;
  overflow-y: auto;
}
.app-form-group { margin-bottom: 12px; }
.app-form-group .lbl {
  font-size: 11px;
  color: var(--c-text-5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}

/* Version tree */
.app-version-tree {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px;
}
.app-version-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  position: relative;
  font-size: 12px;
}
.app-version-row + .app-version-row::before {
  content: "";
  position: absolute;
  left: 11px;
  top: -8px;
  height: 16px;
  width: 2px;
  background: var(--c-border);
}
.app-version-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-surface-3);
  border: 2px solid var(--c-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: var(--c-text-5);
  font-weight: 600;
  z-index: 1;
}
.app-version-dot.current { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.app-version-dot.approved { background: var(--c-success-soft); border-color: var(--c-success); color: var(--c-success); }
.app-version-meta .v { font-weight: 500; color: var(--c-text); font-size: 12.5px; }
.app-version-meta .sub { font-size: 11px; color: var(--c-text-5); margin-top: 2px; }
.app-version-actions { display: flex; gap: 6px; }

/* Modal/upload mock */
.app-upload-area {
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--r-md);
  background: var(--c-surface-3);
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--c-text-3);
}
.app-upload-area .icon {
  width: 36px; height: 36px;
  margin: 0 auto 8px;
  color: var(--c-text-5);
}
.app-upload-area .hint { font-size: 11px; color: var(--c-text-5); margin-top: 4px; }

/* Report list (study-report) */
.app-report-list {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.app-report-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-divider);
  font-size: 12px;
}
.app-report-row:last-child { border-bottom: 0; }
.app-report-row:hover { background: var(--c-surface-2); }
.app-report-row .title { font-weight: 500; color: var(--c-text); font-size: 13px; }
.app-report-row .meta { color: var(--c-text-5); font-size: 11px; margin-top: 2px; }
.app-report-row .v { font-variant-numeric: tabular-nums; color: var(--c-text-3); font-size: 11.5px; }

/* Filter row */
.app-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.app-search-box {
  flex: 1;
  display: flex; align-items: center; gap: 6px;
  height: 32px;
  padding: 0 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
}
.app-search-box svg { width: 13px; height: 13px; color: var(--c-text-5); }
.app-search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--c-text);
  font-family: inherit;
}
.app-search-box input::placeholder { color: var(--c-text-5); }

/* Step indicator (Auto Generate 3 steps) */
.app-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-divider);
}
.app-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--c-text-5);
}
.app-step .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-surface-3);
  border: 1px solid var(--c-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-3);
}
.app-step.completed .num { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.app-step.active .num { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.app-step.active { color: var(--c-text); font-weight: 500; }
.app-step-connector {
  flex: 0 0 32px;
  height: 1px;
  background: var(--c-border);
  margin: 0 6px;
}
.app-step-connector.completed { background: var(--c-brand); }

/* Module cards (nonclinical 3 modules) */
.app-module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) { .app-module-grid { grid-template-columns: 1fr; } }
.app-module-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.app-module-icon {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  border-radius: var(--r-sm);
  background: var(--c-brand-soft);
  color: var(--c-brand);
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .app-module-icon { color: #60a5fa; }
.app-module-icon svg { width: 18px; height: 18px; }
.app-module-body .name { font-size: 14px; font-weight: 600; color: var(--c-text); margin-bottom: 2px; }
.app-module-body .code { font-size: 11px; color: var(--c-text-5); font-family: var(--font-mono); }
.app-module-body .progress {
  height: 3px;
  background: var(--c-surface-3);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.app-module-body .progress-bar {
  height: 100%;
  background: var(--c-brand);
  border-radius: 2px;
}
