:root {
  --bg: #f7fbfc;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --text: #080b1f;
  --muted: #667085;
  --line: rgba(15, 23, 42, 0.11);
  --cyan: #08bed9;
  --teal: #15d6b4;
  --ink: #070821;
  --green: #20c997;
  --pink: #f5b5e8;
  --shadow: 0 24px 80px rgba(17, 64, 96, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 13%, rgba(14, 205, 221, 0.18), transparent 28rem),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 34%, #eefaf8 100%);
  font-family: "Inter", "Noto Sans SC", system-ui, sans-serif;
}

body.dark {
  --bg: #0d111c;
  --surface: rgba(18, 25, 39, 0.78);
  --surface-solid: #141b2a;
  --text: #f8fbff;
  --muted: #a7b1c2;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  background:
    radial-gradient(circle at 52% 9%, rgba(14, 205, 221, 0.2), transparent 28rem),
    linear-gradient(180deg, #0a0e18 0%, #101727 50%, #0a1618 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(22px);
}

body.dark .site-header {
  background: rgba(10, 14, 24, 0.74);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand span span {
  color: var(--cyan);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--cyan);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  color: #22273a;
  border-radius: 999px;
  font-weight: 700;
}

body.dark .main-nav a {
  color: #e7ebf4;
}

.main-nav a.active,
.trial-link {
  color: #008aa2;
  background: rgba(7, 190, 217, 0.13);
  border: 1px solid rgba(7, 190, 217, 0.22);
}

.trial-link b {
  padding: 2px 7px;
  color: white;
  background: var(--cyan);
  border-radius: 999px;
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn,
.login-btn,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.icon-btn {
  width: 42px;
  color: var(--text);
  background: transparent;
}

.login-btn {
  padding: 0 24px;
  color: #fff;
  background: var(--ink);
}

body.dark .login-btn {
  background: #eff6ff;
  color: #0c1220;
}

.primary-btn {
  min-width: 174px;
  padding: 0 26px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), #079fd0);
  box-shadow: 0 16px 35px rgba(8, 190, 217, 0.28);
}

.secondary-btn {
  min-width: 156px;
  padding: 0 22px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
}

body.dark .secondary-btn {
  background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.secondary-btn:hover,
.login-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.menu-btn {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 780px;
  padding: 116px clamp(20px, 5vw, 72px) 76px;
}

.halo {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(20px);
}

.halo-a {
  width: 560px;
  height: 560px;
  left: 50%;
  top: 80px;
  transform: translateX(-50%);
  background: rgba(10, 200, 219, 0.12);
}

.halo-b {
  width: 360px;
  height: 360px;
  right: 8%;
  bottom: 10%;
  background: rgba(245, 181, 232, 0.16);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 8px 14px;
  color: #058fa3;
  background: rgba(8, 190, 217, 0.12);
  border: 1px solid rgba(8, 190, 217, 0.18);
  border-radius: 999px;
  font-weight: 800;
}

.eyebrow span {
  width: 10px;
  height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--cyan);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
}

h1 span {
  color: var(--cyan);
}

h2 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-subtitle {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
}

.quote {
  color: #7c8495;
  font-size: 20px;
  font-style: italic;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 10px 17px;
  color: #068ba0;
  background: rgba(227, 250, 253, 0.86);
  border: 1px solid rgba(8, 190, 217, 0.2);
  border-radius: 999px;
  font-weight: 800;
}

.credit-pill b {
  padding: 2px 8px;
  color: white;
  background: var(--cyan);
  border-radius: 999px;
  font-size: 12px;
}

.product-stage {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 70px auto 0;
}

.browser-card,
.lab-panel,
.upload-simulator,
.compare-table,
.faq-list details,
.feature-grid article,
.marquee article,
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.browser-card {
  overflow: hidden;
  border-radius: 8px;
}

.browser-top {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red { background: #ff6375; }
.yellow { background: #ffc947; }
.green { background: #2dd36f; }

.url-chip {
  margin: 0 auto;
  padding: 6px 12px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  border-radius: 999px;
}

.app-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 28px;
}

.doc-types,
.preview-pane {
  padding: 24px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-types p {
  color: var(--muted);
  font-weight: 800;
}

.doc-types button {
  width: 100%;
  margin-top: 10px;
  padding: 13px 14px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-types button.selected {
  color: #047f96;
  background: rgba(8, 190, 217, 0.11);
  border-color: rgba(8, 190, 217, 0.24);
}

.pane-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-weight: 800;
}

.pane-head strong {
  color: var(--green);
}

.skeleton {
  height: 14px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(8, 190, 217, 0.16), rgba(8, 190, 217, 0.04));
  border-radius: 999px;
}

.skeleton.wide { width: 95%; }
.skeleton.short { width: 62%; }

.progress-wrap {
  display: grid;
  gap: 8px;
  margin: 24px 0;
  color: var(--muted);
  font-weight: 700;
}

.progress-wrap div {
  overflow: hidden;
  height: 8px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
}

.progress-wrap i {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--teal));
  border-radius: inherit;
}

.mini-actions,
.tag-row,
.lab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mini-actions button,
.panel-title button,
.tag-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  color: #057f93;
  background: rgba(8, 190, 217, 0.1);
  border: 1px solid rgba(8, 190, 217, 0.16);
  border-radius: 999px;
  font-weight: 800;
}

.floating {
  position: absolute;
  z-index: 2;
}

.metric-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 12px;
  min-width: 144px;
  padding: 14px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card.left {
  left: -74px;
  bottom: 78px;
}

.metric-card.right {
  right: -54px;
  top: 54px;
}

.metric-card small {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  grid-column: 2;
}

.metric-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: white;
  background: var(--cyan);
  border-radius: 8px;
}

.metric-icon.green {
  background: var(--green);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  color: var(--muted);
  border-block: 1px solid var(--line);
}

.trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.split-section,
.agent-section,
.compare-section,
.testimonial-section,
.faq-section,
.cta-section,
.ai-lab {
  padding: 92px clamp(20px, 6vw, 84px);
}

.split-section,
.agent-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}

.rich-copy {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #048da2;
  font-weight: 900;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading > p:last-child,
.agent-copy > p,
.cta-section > p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.lab-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

.lab-panel {
  min-height: 460px;
  padding: 24px;
  border-radius: 8px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-title span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

textarea {
  width: 100%;
  min-height: 286px;
  resize: vertical;
  padding: 18px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.7;
  outline: none;
}

textarea:focus,
input:focus {
  border-color: rgba(8, 190, 217, 0.55);
  box-shadow: 0 0 0 4px rgba(8, 190, 217, 0.12);
}

.small {
  min-height: 40px;
  min-width: auto;
  padding: 0 16px;
}

.result-panel {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  align-content: start;
}

.score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
}

.score-ring svg {
  width: 150px;
  height: 150px;
  transform: rotate(-90deg);
}

.score-ring circle {
  fill: none;
  stroke-width: 12;
  stroke: rgba(148, 163, 184, 0.18);
}

.score-ring circle:last-child {
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.score-ring div {
  position: absolute;
  display: grid;
  justify-items: center;
}

#scoreValue {
  font-size: 34px;
  font-weight: 900;
}

.result-copy p,
.output-box p {
  color: var(--muted);
  line-height: 1.7;
}

.output-box {
  grid-column: 1 / -1;
  min-height: 140px;
  padding: 18px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.check-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.check-list i {
  color: var(--teal);
}

.upload-simulator {
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 30px;
  border-radius: 8px;
}

.upload-simulator.dragging {
  border-color: rgba(8, 190, 217, 0.7);
  background: rgba(8, 190, 217, 0.1);
}

.upload-idle {
  display: grid;
  justify-items: center;
  text-align: center;
  color: var(--muted);
}

.upload-idle > i {
  width: 64px;
  height: 64px;
  color: var(--cyan);
}

.upload-active {
  display: none;
  width: 100%;
}

.upload-simulator.has-file .upload-idle {
  display: none;
}

.upload-simulator.has-file .upload-active {
  display: grid;
  gap: 22px;
}

.file-chip,
.generation-list p {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.steps span {
  padding: 10px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.steps span.done {
  color: #047f96;
  background: rgba(8, 190, 217, 0.12);
}

.generation-list {
  display: grid;
  gap: 12px;
}

.generation-list i {
  color: var(--green);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 clamp(20px, 6vw, 84px) 92px;
}

.feature-grid article {
  min-height: 218px;
  padding: 28px;
  border-radius: 8px;
}

.feature-grid i {
  width: 34px;
  height: 34px;
  color: var(--cyan);
}

.feature-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.compare-table {
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
}

.row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row span {
  display: flex;
  align-items: center;
  padding: 18px 22px;
  color: var(--muted);
  font-weight: 700;
}

.row span:first-child,
.row span:last-child {
  color: var(--text);
  font-weight: 900;
}

.row.head {
  background: rgba(8, 190, 217, 0.12);
}

.marquee {
  overflow: hidden;
}

.marquee-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: 16px;
  animation: slide 24s linear infinite;
}

.marquee article {
  min-height: 150px;
  padding: 22px;
  border-radius: 8px;
}

.marquee p {
  color: var(--muted);
  line-height: 1.7;
}

@keyframes slide {
  0%, 20% { transform: translateX(0); }
  50%, 70% { transform: translateX(-22%); }
  100% { transform: translateX(0); }
}

.faq-list {
  display: grid;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-list details {
  padding: 20px 24px;
  border-radius: 8px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.cta-section {
  display: grid;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(8, 190, 217, 0.13), rgba(21, 214, 180, 0.11)),
    rgba(255, 255, 255, 0.2);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 34px clamp(20px, 6vw, 84px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer .brand {
  font-size: 24px;
  color: var(--text);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(4, 9, 18, 0.56);
}

.modal.open {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 32px;
  border-radius: 8px;
}

.modal-card label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 800;
}

.modal-card input {
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
}

.full {
  width: 100%;
  margin-top: 22px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  transform: translate(-50%, 16px);
  opacity: 0;
  padding: 12px 18px;
  color: white;
  background: #071225;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 920px) {
  .site-header {
    gap: 14px;
  }

  .main-nav {
    position: fixed;
    inset: 64px 14px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: var(--surface-solid);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .header-actions {
    margin-left: auto;
  }

  .menu-btn {
    display: inline-flex;
  }

  .hero {
    padding-top: 72px;
  }

  .app-grid,
  .split-section,
  .agent-section,
  .lab-shell,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .result-panel {
    justify-items: center;
  }

  .result-copy,
  .output-box {
    width: 100%;
  }

  .floating {
    display: none;
  }

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

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

  .row span {
    border-bottom: 1px solid var(--line);
  }

  .row span:last-child {
    border-bottom: 0;
  }

  .marquee-track {
    grid-template-columns: 1fr;
    animation: none;
  }
}

@media (max-width: 600px) {
  .brand {
    font-size: 23px;
  }

  .login-btn {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-actions,
  .lab-controls {
    width: 100%;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .credit-pill {
    width: 100%;
    justify-content: center;
  }

  .browser-card {
    margin-inline: -12px;
  }

  .app-grid {
    padding: 16px;
  }

  .doc-types,
  .preview-pane,
  .lab-panel,
  .upload-simulator {
    padding: 18px;
  }

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

.dashboard-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 2%, rgba(8, 190, 217, 0.12), transparent 24rem),
    linear-gradient(180deg, #f6fbfc, #eef7f7);
}

.dash-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.dash-brand {
  font-size: 25px;
}

.dash-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  color: var(--muted);
  border-radius: 8px;
  font-weight: 900;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.dash-nav a.active,
.dash-nav a:hover {
  color: #047f96;
  background: rgba(8, 190, 217, 0.12);
}

.quota-card {
  margin-top: auto;
  padding: 18px;
  background: linear-gradient(135deg, rgba(8, 190, 217, 0.14), rgba(21, 214, 180, 0.1));
  border: 1px solid rgba(8, 190, 217, 0.22);
  border-radius: 8px;
}

.quota-card span,
.quota-card small {
  color: var(--muted);
  font-weight: 800;
}

.quota-card strong {
  display: block;
  margin: 8px 0 12px;
  font-size: 30px;
}

.quota-bar {
  overflow: hidden;
  height: 9px;
  margin-bottom: 10px;
  background: rgba(8, 190, 217, 0.15);
  border-radius: 999px;
}

.quota-bar i {
  display: block;
  width: 87%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--teal));
  border-radius: inherit;
}

.dash-main {
  min-width: 0;
  padding: 26px clamp(18px, 4vw, 44px) 54px;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.dash-topbar p {
  margin-bottom: 2px;
  color: var(--muted);
  font-weight: 800;
}

.dash-topbar h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

.dash-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pwa-install-btn {
  white-space: nowrap;
}

.pwa-install-btn[hidden] {
  display: none;
}

.pwa-update-prompt {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2600;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, calc(100vw - 32px));
  padding: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(8, 190, 217, 0.32);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
}

.pwa-update-prompt div {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.pwa-update-prompt b {
  font-size: 15px;
}

.pwa-update-prompt span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

body.auth-pending .pwa-update-prompt {
  display: none;
}

@media (max-width: 720px) {
  .pwa-update-prompt {
    right: 16px;
    bottom: 16px;
    flex-wrap: wrap;
  }
}

.sync-status {
  min-width: 86px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.sync-status.saving {
  color: #a16207;
  background: #fef3c7;
}

.sync-status.saved {
  color: #047857;
  background: #d1fae5;
}

.sync-status.error {
  color: #b91c1c;
  background: #fee2e2;
}

.dash-menu {
  display: none;
}

.dash-hero-panel,
.dash-card,
.dash-stats article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.dash-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
}

.dash-hero-panel h2 {
  max-width: 760px;
  margin-bottom: 14px;
}

.dash-hero-panel p:not(.section-kicker) {
  max-width: 690px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.dash-upload {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-solid);
  border: 1px dashed rgba(8, 190, 217, 0.42);
  border-radius: 8px;
}

.dash-upload i {
  width: 58px;
  height: 58px;
  color: var(--cyan);
}

.dash-upload strong {
  color: var(--text);
  font-size: 22px;
}

.dash-upload.dragging,
.dash-upload.has-file {
  background: rgba(8, 190, 217, 0.1);
  border-style: solid;
}

.folder-library-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.folder-library-strip div {
  display: grid;
  gap: 4px;
}

.folder-library-strip span {
  color: var(--muted);
  font-weight: 800;
}

.folder-upload {
  min-height: 180px;
  margin: 12px 0;
}

.folder-library-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.folder-item div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.folder-item b,
.folder-item span,
.folder-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-item span,
.folder-item small {
  color: var(--muted);
  font-weight: 800;
}

.folder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.folder-file-list {
  display: grid;
  gap: 8px;
  max-height: 48vh;
  overflow: auto;
  margin: 14px 0;
}

.folder-file-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.folder-file-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-share-panel {
  padding: 18px;
}

.resource-share-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.shared-info-board {
  display: grid;
  gap: 12px;
  max-height: 72vh;
  overflow: auto;
  padding-right: 4px;
}

.shared-info-note {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--note-bg, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.shared-info-title,
.shared-info-content {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

.shared-info-title {
  min-height: 38px;
  padding: 0 10px;
}

.shared-info-content {
  min-height: 136px;
  padding: 10px;
  resize: vertical;
  line-height: 1.7;
  font-weight: 650;
}

.shared-info-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shared-info-foot > div {
  display: flex;
  gap: 8px;
}

.case-user-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 12px;
}

.case-user-strip button {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.case-user-strip button span {
  color: var(--muted);
  font-size: 12px;
}

.case-user-strip button.active {
  color: #047f96;
  background: rgba(8, 190, 217, 0.12);
  border-color: rgba(8, 190, 217, 0.38);
}

@media (max-width: 1100px) {
  .resource-share-layout {
    grid-template-columns: 1fr;
  }
}

.visa-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 18px;
}

.visa-subtabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.visa-subtabs button.active {
  color: #047f96;
  background: rgba(8, 190, 217, 0.12);
  border-color: rgba(8, 190, 217, 0.4);
}

.family-template-panel {
  padding: 18px;
}

.family-template-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
}

.family-template-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: min(680px, 66vh);
  overflow: auto;
  padding-right: 4px;
}

.family-template-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.family-template-file.active {
  border-color: rgba(8, 190, 217, 0.55);
  box-shadow: 0 12px 34px rgba(8, 190, 217, 0.14);
}

.family-template-file > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  text-align: left;
}

.family-template-file span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.family-template-file b,
.family-template-file em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-template-file b {
  font-size: 14px;
}

.family-template-file em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.family-template-file > div {
  display: inline-flex;
  gap: 4px;
}

.family-template-preview {
  min-height: 560px;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.family-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.family-preview-head div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.family-preview-head b,
.family-preview-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-preview-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.family-preview-frame {
  width: 100%;
  height: min(620px, 68vh);
  border: 0;
  background: #fff;
}

.family-preview-canvas {
  min-height: min(620px, 68vh);
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 18px;
  text-align: center;
}

.family-preview-canvas.image {
  background: #f8fafc;
}

.family-preview-canvas img {
  max-width: 100%;
  max-height: min(600px, 64vh);
  object-fit: contain;
  border-radius: 8px;
}

.family-preview-canvas.unsupported svg {
  width: 56px;
  height: 56px;
  color: #047f96;
}

.family-preview-canvas.unsupported p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.family-preview-text {
  height: min(620px, 68vh);
  margin: 0;
  overflow: auto;
  padding: 16px;
  color: var(--text);
  background: #fff;
  white-space: pre-wrap;
  word-break: break-word;
}

.family-legacy-doc-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #075766;
  background: #e7f8fb;
  border-bottom: 1px solid #cceff6;
  font-weight: 900;
}

.family-word-preview,
.family-sheet-preview {
  height: min(620px, 68vh);
  overflow: auto;
  padding: 28px;
  background: #fff;
  color: #111827;
}

.family-word-preview.fallback {
  line-height: 1.75;
}

.family-word-preview.native {
  padding: 0;
  background: #e9eef5;
  color: #111827;
}

.docx-preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #075766;
  background: #e7f8fb;
  border-bottom: 1px solid #cceff6;
  font-size: 13px;
  font-weight: 900;
}

.docx-native-canvas {
  min-width: 100%;
  min-height: calc(min(620px, 68vh) - 42px);
  overflow: visible;
  padding: 18px 18px 26px;
}

.family-word-preview.native .docx-wrapper {
  padding: 0 !important;
  background: transparent !important;
}

.family-word-preview.native .docx {
  margin: 0 auto 18px !important;
  background: #fff !important;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.18);
}

.family-word-preview.native table {
  table-layout: fixed;
}

.family-word-preview.native img {
  max-width: none;
}

.family-word-preview.fallback p,
.family-word-preview.fallback ul,
.family-word-preview.fallback ol,
.family-word-preview.fallback table {
  margin: 0 0 12px;
}

.family-word-preview.fallback table,
.family-sheet-preview table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.family-word-preview.fallback td,
.family-word-preview.fallback th,
.family-sheet-preview td,
.family-sheet-preview th {
  padding: 8px 10px;
  border: 1px solid #d8e1ec;
  vertical-align: top;
  white-space: pre-wrap;
}

.family-sheet-preview th {
  position: sticky;
  top: 0;
  background: #e7f8fb;
  color: #075766;
  z-index: 1;
}

.family-sheet-meta {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -28px -28px 14px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #d8e1ec;
  color: #516070;
  font-weight: 900;
}

.family-preview-canvas.loading {
  color: var(--muted);
}

.preview-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(8, 190, 217, 0.18);
  border-top-color: #08bed9;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.case-library-panel {
  padding: 18px;
}

.case-library-wrap {
  margin-top: 14px;
  max-height: min(650px, 68vh);
}

.case-library-table th,
.case-library-table td {
  min-width: 130px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.script-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.script-note {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.script-pin {
  display: none;
}

.script-note-head,
.script-note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.script-note-head {
  align-items: flex-start;
}

.script-note-head b {
  color: var(--text);
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.script-note p {
  flex: 1;
  overflow: hidden;
  color: var(--text);
  line-height: 1.7;
}

.script-note-foot span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.modal-textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  resize: vertical;
}

.script-note-head > div {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
}

.script-style-controls,
.feature-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.feature-toggle,
.inbox-item,
.reminder-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feature-toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
  font-weight: 900;
}

.feature-access-list {
  display: grid;
  gap: 10px;
}

.sidebar-config-editor {
  min-height: 220px;
  font-family: "Consolas", "SFMono-Regular", monospace;
  line-height: 1.7;
}

.inbox-btn {
  position: relative;
}

.inbox-btn span,
.update-btn span {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  color: #fff;
  background: #e11d48;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.inbox-list,
.reminder-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.reminder-row {
  width: 100%;
  text-align: left;
}

.inbox-item.system {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
}

.script-note.dragging {
  opacity: 0.45;
  outline: 2px dashed #0891b2;
}

.script-note-head {
  user-select: none;
}

.script-drag-handle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: grab;
}

.script-drag-handle:active {
  cursor: grabbing;
}

.script-drag-handle:hover {
  background: rgba(8, 190, 217, 0.12);
  color: #047f96;
}

.script-note-head b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.script-note-body {
  display: grid;
  gap: 8px;
  word-break: break-word;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.script-note-body img,
.script-rich-editor img {
  max-width: 100%;
  max-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
}

.script-rich-editor {
  min-height: 170px;
  overflow: auto;
  outline: none;
  white-space: pre-wrap;
}

.script-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.calendar-grid button.muted-day {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
}

.performance-panel {
  padding: 18px;
}

.performance-tabs {
  margin-bottom: 14px;
}

.performance-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.performance-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface-solid);
}

.performance-table th,
.performance-table td {
  padding: 13px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.performance-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #04586a;
  background: #dff7fb;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.performance-table th small {
  display: block;
  margin-top: 3px;
  color: #047f96;
  font-size: 11px;
}

.performance-table th:first-child,
.performance-table td:first-child,
.performance-table th:last-child,
.performance-table td:last-child {
  text-align: left;
}

.performance-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--cyan);
}

.performance-table strong {
  color: #047f96;
  font-size: 18px;
}

.commission-table-wrap {
  max-height: calc(100vh - 350px);
}

.commission-table {
  min-width: 2600px;
}

.commission-search-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.commission-search-panel input {
  width: min(520px, 100%);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-solid);
  font-weight: 800;
}

.commission-search-results {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.commission-search-results button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(8, 145, 178, 0.3);
  border-radius: 999px;
  padding: 8px 12px;
  color: #075985;
  background: #ecfeff;
  font-weight: 900;
  cursor: pointer;
}

.flash-row {
  animation: flash-row 1.6s ease-out;
}

@keyframes flash-row {
  0%, 45% { background: #fef3c7; }
  100% { background: transparent; }
}

.writing-completion-wrap {
  max-height: calc(100vh - 340px);
}

.writing-completion-table {
  min-width: 1180px;
}

.writing-completion-table th,
.writing-completion-table td {
  padding: 12px 16px;
  white-space: nowrap;
}

.writing-completion-table td:first-child,
.writing-completion-table th:first-child {
  min-width: 160px;
  text-align: left;
}

.commission-input {
  width: 64px;
  min-height: 34px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font-weight: 900;
}

.commission-select {
  min-width: 104px;
  min-height: 34px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.commission-input.money {
  width: 78px;
}

.commission-detail {
  min-width: 260px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: left !important;
}

.manual-commission {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 560px;
  text-align: left;
}

.manual-commission label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.commission-note-input {
  min-height: 34px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-weight: 700;
}

.ps-direction-table {
  min-width: 760px;
}

.communication-panel {
  display: grid;
  gap: 14px;
}

.communication-table {
  min-width: 880px;
}

.communication-table .student-link b {
  color: #047f96;
  font-size: 16px;
}

.communication-script-output {
  width: 100%;
  min-height: min(62vh, 620px);
  resize: vertical;
  padding: 16px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 800 14px/1.9 var(--font);
  white-space: pre-wrap;
}

.customer-template-grid {
  display: grid;
  gap: 14px;
}

.customer-template-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.customer-template-grid textarea {
  min-height: 160px;
}

.customer-template-grid textarea.long-template {
  min-height: 260px;
}

.feature-access-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(260px, 1fr);
  gap: 10px;
  width: 100%;
  align-items: center;
}

.feature-access-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.feature-users-input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.inbox-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plain-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.notice-banner {
  position: fixed;
  top: 86px;
  right: 28px;
  z-index: 80;
  width: min(560px, calc(100vw - 56px));
  margin: 0;
  pointer-events: none;
}

.notice-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(14, 116, 144, 0.34);
  border-left: 6px solid #0891b2;
  border-radius: 8px;
  background: rgba(240, 253, 250, 0.98);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  pointer-events: auto;
  animation: notice-pop 0.22s ease-out;
}

@keyframes notice-pop {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notice-banner-card > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notice-banner-card span {
  display: grid;
  min-width: 0;
}

.notice-banner-card em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-detail {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  line-height: 1.8;
  white-space: pre-wrap;
}

.inbox-item-meta,
.inbox-footer,
.table-export-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.inbox-footer,
.table-export-row {
  margin: 12px 0;
}

.inbox-item-meta span {
  color: var(--muted);
  font-size: 12px;
}

.university-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) 1fr;
  gap: 18px;
}

.university-list {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 170px);
  overflow: auto;
}

.university-list input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.university-list button {
  width: 100%;
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
  padding: 10px 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.university-list button.active {
  border-color: var(--cyan);
  background: rgba(8, 145, 178, 0.1);
}

.university-list span,
.university-record small {
  color: var(--muted);
  font-size: 12px;
}

.university-detail {
  min-height: 520px;
}

.university-tips {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(8, 145, 178, 0.24);
  border-radius: 8px;
  background: rgba(8, 145, 178, 0.08);
  color: var(--muted);
  line-height: 1.6;
}

.university-tips b {
  flex: 0 0 auto;
  color: #047f96;
}

.university-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.university-counts span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(8, 145, 178, 0.2);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.08);
  color: #047f96;
  font-weight: 900;
  font-size: 12px;
}

.resource-search {
  width: 100%;
  min-height: 42px;
  margin: 8px 0 16px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.tb-city-list,
.tb-city {
  display: grid;
  gap: 16px;
}

.tb-city h4 {
  margin: 0;
  font-size: 18px;
}

.tb-city h4 span {
  color: var(--muted);
  font-size: 13px;
}

.tb-clinic-grid,
.atas-code-grid,
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.tb-clinic-card pre {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  line-height: 1.55;
}

.atas-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 8px;
  background: rgba(8, 145, 178, 0.06);
}

.atas-summary p {
  margin: 0;
  line-height: 1.7;
}

.section-title.compact {
  margin: 22px 0 12px;
  padding: 0;
  border-radius: 0;
  font-size: 18px;
}

.atas-code-grid article,
.workflow-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.atas-code-grid b {
  color: #047f96;
  font-size: 18px;
}

.atas-code-grid em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.workflow-grid span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #047f96;
  background: rgba(8, 145, 178, 0.12);
  font-weight: 900;
}

.workflow-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.university-sections {
  display: grid;
  gap: 16px;
}

.university-sections article {
  display: grid;
  gap: 10px;
}

.university-sections h4 {
  margin: 0;
  font-size: 18px;
}

.university-record {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.62);
}

.university-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.university-record p {
  display: grid;
  grid-template-columns: minmax(98px, 140px) 1fr;
  gap: 10px;
  margin: 0;
  line-height: 1.55;
}

.university-record p span {
  color: #047f96;
  font-weight: 900;
}

.university-record p em {
  min-width: 0;
  font-style: normal;
  word-break: break-word;
}

.deadline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(8, 145, 178, 0.2);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.08);
  color: #047f96;
  font-size: 12px;
  font-weight: 900;
}

.deadline-pill.urgent {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(254, 243, 199, 0.9);
  color: #92400e;
}

.university-record a,
.university-links a {
  color: #007c91;
  font-weight: 900;
  text-decoration: none;
}

.university-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.university-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(8, 145, 178, 0.24);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.08);
  font-size: 12px;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-table {
  min-width: 1120px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-explorer {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.file-explorer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.file-explorer-toolbar input {
  min-width: min(420px, 100%);
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.explorer-grid {
  display: grid;
  gap: 12px;
}

.explorer-folder {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.explorer-folder-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.explorer-folder-head svg {
  color: #047f96;
}

.explorer-folder-head div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.explorer-folder-head b,
.explorer-folder-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-folder-head span,
.file-explorer-toolbar span {
  color: var(--muted);
  font-weight: 800;
}

.explorer-files {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.explorer-files button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.explorer-files span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
}

.calendar-card,
.todo-list-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.calendar-grid b,
.calendar-grid button,
.calendar-grid span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 900;
}

.calendar-grid button {
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
}

.calendar-grid button.today {
  color: #04586a;
  background: #dff7fb;
  border-color: rgba(8, 190, 217, 0.45);
}

.calendar-grid button.selected {
  outline: 2px solid #08bed9;
  outline-offset: 2px;
}

.calendar-grid button small {
  display: block;
  min-width: 18px;
  margin-top: 2px;
  border-radius: 999px;
  color: #fff;
  background: #047f96;
  font-size: 10px;
}

.todo-list-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.todo-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.todo-add-row input {
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

.todo-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.todo-item.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.tag.danger {
  color: #b91c1c;
  background: #fee2e2;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.dash-stats article {
  padding: 20px;
}

.dash-stats span,
.dash-stats small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.dash-stats strong {
  display: block;
  margin: 8px 0;
  font-size: 34px;
  line-height: 1;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.dash-card {
  padding: 24px;
}

.dash-card.wide {
  grid-column: span 1;
}

.dash-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.dash-card h3 {
  margin-bottom: 0;
  font-size: 25px;
}

.dash-card .section-kicker {
  margin-bottom: 10px;
  padding: 6px 10px;
  font-size: 13px;
}

.doc-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.doc-choice-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.doc-choice-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.generated-list,
.profile-list,
.task-table {
  display: grid;
  gap: 10px;
}

.generated-list p,
.profile-list p,
.task-table div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.generated-list p {
  justify-content: flex-start;
  font-weight: 900;
}

.generated-list span,
.profile-list span,
.task-table em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.generated-list i {
  color: var(--green);
}

.dash-card textarea {
  min-height: 172px;
  margin-bottom: 12px;
}

.checker-result {
  min-height: 78px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 14px;
  color: var(--muted);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.checker-result strong {
  color: #047f96;
  font-size: 22px;
}

.profile-list p {
  align-items: start;
  flex-direction: column;
}

.task-table b {
  color: #047f96;
}

.client-profile-grid {
  display: grid;
  gap: 18px;
}

.student-profile-card {
  padding: 22px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.student-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.student-profile-head h3 {
  margin: 10px 0 6px;
  font-size: 28px;
}

.student-profile-head p {
  color: var(--muted);
  font-weight: 800;
}

.profile-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-sections section {
  padding: 16px;
  background: rgba(8, 190, 217, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-sections h4 {
  margin: 0 0 12px;
  font-size: 17px;
}

.profile-sections dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-sections dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
}

.profile-sections dt {
  color: var(--muted);
  font-weight: 900;
}

.profile-sections dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.profile-sections ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
}

.client-parse-result {
  margin: 14px 0;
}

.parse-state {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-solid);
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.parse-state.done {
  color: #047f96;
  background: rgba(8, 190, 217, 0.1);
  border-style: solid;
}

.parsed-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.parsed-preview div {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.parsed-preview b {
  color: var(--text);
}

.parsed-preview span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.dash-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dash-nav small {
  margin: 14px 8px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dash-sidebar.collapsed {
  width: 84px;
  padding-inline: 16px;
}

.dash-sidebar.collapsed .dash-brand span:last-child,
.dash-sidebar.collapsed .dash-nav small,
.dash-sidebar.collapsed .dash-nav a {
  font-size: 0;
}

.dash-sidebar.collapsed .dash-nav a {
  justify-content: center;
}

.crumbs {
  color: var(--muted);
  font-weight: 800;
}

.dash-search,
.avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.dash-search kbd {
  padding: 2px 7px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.14);
  border-radius: 7px;
  font: inherit;
}

.avatar-btn {
  width: 46px;
  padding: 3px;
}

.avatar-btn img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 0 24px;
}

.page-title h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 52px);
}

.page-title p,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 64px;
}

.account-pills span,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  color: #057f93;
  background: rgba(8, 190, 217, 0.12);
  border-radius: 999px;
  font-weight: 800;
}

.section-title {
  margin: 28px 0 12px;
  font-size: 27px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.quick-card {
  min-height: 156px;
  padding: 22px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quick-card.horizontal {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}

.quick-card i,
.dash-card > i {
  color: var(--cyan);
}

.quick-card h3 {
  margin: 14px 0 6px;
  font-size: 20px;
}

.quick-card p,
.quick-card small {
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.two-col {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.timeline {
  display: grid;
  gap: 18px;
  max-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

.timeline div {
  padding-left: 18px;
  border-left: 2px solid rgba(8, 190, 217, 0.25);
}

.timeline time {
  display: block;
  color: #0593a8;
  font-weight: 900;
}

.empty-box {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-solid);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.tabs,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tabs button,
.segmented button,
.mini-link {
  min-height: 36px;
  padding: 0 13px;
  color: var(--muted);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.tabs button.active,
.segmented button.active {
  color: #047f96;
  background: rgba(8, 190, 217, 0.12);
}

.mini-link {
  min-height: 28px;
  padding: 2px 8px;
  color: #047f96;
  background: rgba(8, 190, 217, 0.1);
  border: 0;
  border-radius: 999px;
}

.writer-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 108px);
}

.writer-config,
.editor-panel,
.humanize-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.writer-config {
  align-self: start;
  display: grid;
  gap: 14px;
}

.writer-config h2 {
  margin-bottom: 4px;
  font-size: 28px;
}

.writer-config label,
.dash-modal label,
.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.writer-config input,
.writer-config select,
.dash-modal input,
.dash-modal select,
.form-grid input,
.search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.writer-config textarea {
  min-height: 94px;
}

.switch-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  color: var(--text) !important;
}

.switch-row input {
  width: 42px;
  min-height: 24px;
  accent-color: var(--cyan);
}

.number-pills {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.number-pills button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  font-weight: 900;
}

.outline-box {
  padding: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.editor-panel {
  min-width: 0;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.editor-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-editor {
  min-height: 560px;
  background: #fff;
  font-size: 16px;
}

body.dark .doc-editor {
  background: #101827;
}

.editor-status {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.humanize-card {
  position: relative;
}

.local-humanizer {
  display: grid;
  gap: 16px;
}

.humanize-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.humanize-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.humanize-toolbar select {
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.humanize-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.humanize-pane {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-weight: 900;
}

.humanize-input {
  width: 100%;
  min-height: 420px;
  padding: 16px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  resize: vertical;
  line-height: 1.75;
  font: 600 15px/1.75 "Noto Sans SC", Inter, sans-serif;
}

.humanize-input:focus {
  border-color: rgba(8, 190, 217, 0.7);
  box-shadow: 0 0 0 4px rgba(8, 190, 217, 0.12);
}

.humanize-input[readonly] {
  background: rgba(255, 255, 255, 0.78);
}

.humanize-side-tool {
  align-items: center;
  background: rgba(231, 249, 253, 0.82);
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px;
}

.humanize-side-tool strong,
.humanize-side-tool small {
  display: block;
}

.humanize-side-tool small {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 4px;
}

.humanize-side-tool [data-action="runOpenSourceHumanize"] {
  display: none;
}

.humanize-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.humanize-actions.compact {
  margin-top: 0;
}

.checker-result ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 800;
}

.warm {
  background: #ffc56a !important;
  color: #fff !important;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.price-card {
  padding: 20px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.price-card.featured {
  border-color: rgba(8, 190, 217, 0.45);
  box-shadow: 0 18px 45px rgba(8, 190, 217, 0.13);
}

.price-card strong {
  display: block;
  margin: 14px 0;
  font-size: 32px;
}

.price-card p {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

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

.dash-modal {
  max-height: min(760px, 92vh);
  overflow: auto;
}

.dash-modal.wide-modal {
  width: min(1180px, calc(100vw - 40px));
  max-height: min(860px, 94vh);
}

.writing-completion-detail-modal {
  display: grid;
  gap: 16px;
}

.writing-completion-detail-modal .writing-completion-wrap {
  max-height: min(620px, 66vh);
  overflow: auto;
}

.dash-modal h2 {
  font-size: 28px;
}

.dash-modal .dash-upload {
  min-height: 190px;
  margin: 16px 0;
}

.command-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  max-height: 360px;
  overflow: auto;
}

.command-list button,
.avatar-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.command-list button:hover,
.avatar-menu button:hover {
  background: rgba(8, 190, 217, 0.1);
}

.popover {
  display: none;
  position: fixed;
  top: 58px;
  right: 24px;
  z-index: 45;
}

.popover.open {
  display: block;
}

.avatar-menu {
  width: 330px;
  padding: 18px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.avatar-menu p {
  color: var(--muted);
}

.qr-demo,
.video-demo {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 220px;
  margin: 14px 0;
  color: var(--muted);
  background: var(--surface-solid);
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.qr-demo i,
.video-demo i {
  width: 64px;
  height: 64px;
  color: var(--cyan);
}

.compact {
  margin-top: 24px;
  padding-block: 58px;
  border-radius: 8px;
}

.summary-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-kpis article {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-kpis span {
  color: var(--muted);
  font-weight: 900;
}

.summary-kpis strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.summary-panel {
  padding: 18px;
}

.offer-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.offer-ai-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.offer-ai-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.offer-ai-toolbar select {
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.offer-summary-card {
  display: grid;
  gap: 12px;
  min-height: 580px;
}

.offer-summary-input,
.offer-summary-output {
  width: 100%;
  min-height: 460px;
  resize: vertical;
  padding: 16px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 800 14px/1.75 var(--font);
}

.offer-summary-output {
  background: rgba(255, 255, 255, 0.72);
  white-space: pre-wrap;
}

.summary-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.summary-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-tools input,
.summary-tools select {
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.summary-tools input {
  min-width: min(320px, 100%);
}

.formula-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  color: #047f96;
  background: rgba(8, 190, 217, 0.1);
  border-radius: 8px;
  font-weight: 800;
}

.excel-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.excel-sheet-tabs,
.excel-tools,
.excel-style-tools,
.excel-formula-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.excel-sheet-tabs button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.excel-sheet-tabs button.active {
  color: #04586a;
  background: #dff7fb;
  border-color: rgba(8, 190, 217, 0.45);
}

.excel-style-tools label,
.excel-formula-bar {
  min-height: 38px;
  padding: 0 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.excel-style-tools input[type="number"] {
  width: 62px;
  margin-left: 6px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-weight: 900;
}

.excel-style-tools input[type="color"] {
  width: 30px;
  height: 28px;
  margin-left: 6px;
  padding: 0;
  background: transparent;
  border: 0;
}

.excel-formula-bar {
  display: grid;
  grid-template-columns: 70px minmax(220px, 1fr);
  width: 100%;
}

.excel-formula-bar span {
  color: #047f96;
}

.excel-formula-bar input {
  width: 100%;
  min-height: 34px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
}

.excel-grid-wrap {
  overflow: auto;
  max-height: calc(100vh - 420px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.excel-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #fff;
}

.excel-grid th,
.excel-grid td {
  border-right: 1px solid #d8dee8;
  border-bottom: 1px solid #d8dee8;
}

.excel-grid .corner-cell,
.excel-grid .col-head,
.excel-grid .row-head {
  position: sticky;
  z-index: 3;
  color: #475569;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.excel-grid .corner-cell {
  left: 0;
  top: 0;
  width: 46px;
  min-width: 46px;
  z-index: 5;
}

.excel-grid .col-head {
  top: 0;
  height: 30px;
}

.excel-grid .row-head {
  left: 0;
  width: 46px;
  min-width: 46px;
  height: 30px;
}

.excel-grid td {
  min-width: 96px;
  height: 30px;
  padding: 0;
  background: #fff;
}

.excel-grid td.selected {
  outline: 2px solid #08bed9;
  outline-offset: -2px;
}

.excel-grid td input {
  width: 100%;
  height: 100%;
  min-height: 30px;
  padding: 0 6px;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
}

body.dark .excel-grid {
  background: #0f172a;
}

body.dark .excel-grid td {
  background: #111827;
  border-color: #334155;
}

body.dark .excel-grid .corner-cell,
body.dark .excel-grid .col-head,
body.dark .excel-grid .row-head {
  color: #cbd5e1;
  background: #1f2937;
}

.summary-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 360px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface-solid);
}

.summary-table th,
.summary-table td {
  min-width: 126px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 10px;
  color: #04586a;
  text-align: left;
  background: #dff7fb;
  font-size: 13px;
  white-space: nowrap;
}

body.dark .summary-table th {
  color: #a8f3ff;
  background: #123241;
}

.summary-table td input {
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  font-weight: 700;
}

.summary-table td input:focus {
  background: rgba(8, 190, 217, 0.12);
  box-shadow: inset 0 0 0 2px rgba(8, 190, 217, 0.35);
}

.summary-table .formula-cell input {
  color: #047f96;
  background: rgba(8, 190, 217, 0.08);
  font-weight: 900;
}

.chatgpt-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 18%, rgba(8, 190, 217, 0.18), transparent 26rem),
    rgba(247, 251, 252, 0.94);
  backdrop-filter: blur(18px);
}

body.auth-pending .dash-sidebar,
body.auth-pending .dash-main {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.dark .chatgpt-gate {
  background:
    radial-gradient(circle at 50% 18%, rgba(8, 190, 217, 0.18), transparent 26rem),
    rgba(9, 13, 22, 0.94);
}

.chatgpt-gate-card {
  width: min(620px, 100%);
  padding: 36px;
  text-align: center;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.gate-logo {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  margin-bottom: 18px;
  padding: 0 16px;
  color: #fff;
  background: #101827;
  border-radius: 999px;
  font-weight: 900;
}

.chatgpt-gate-card h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 6vw, 54px);
}

.chatgpt-gate-card p {
  color: var(--muted);
  line-height: 1.8;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 14px;
}

.chatgpt-gate-card small {
  color: var(--muted);
  font-weight: 800;
}

.teacher-login-card {
  text-align: left;
}

.teacher-login-card h1,
.teacher-login-card > p,
.teacher-login-card .gate-logo,
.teacher-login-card small {
  text-align: center;
}

.teacher-login-card label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 900;
}

.teacher-login-card input {
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.teacher-login-card input:focus {
  border-color: rgba(8, 190, 217, 0.55);
  box-shadow: 0 0 0 4px rgba(8, 190, 217, 0.12);
}

.secondary-btn.danger-soft {
  color: #b42318;
  border-color: rgba(244, 63, 94, 0.28);
  background: rgba(254, 242, 242, 0.82);
}

@media (max-width: 1180px) {
  .quick-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .writer-layout,
  .humanize-layout,
  .offer-summary-layout,
  .family-template-layout,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-title,
  .editor-toolbar,
  .dash-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-grid,
  .pricing-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .dash-search {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .dash-search kbd {
    display: none;
  }

  .doc-editor,
  .humanize-input {
    min-height: 360px;
  }
}

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

  .dash-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 280px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .dash-sidebar.open {
    transform: translateX(0);
  }

  .dash-menu {
    display: inline-flex;
  }

  .dash-hero-panel,
  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dash-main {
    padding-inline: 14px;
  }

  .dash-topbar {
    align-items: flex-start;
  }

  .dash-actions {
    display: none;
  }

  .dash-stats,
  .doc-choice-grid,
  .profile-sections,
  .parsed-preview,
  .summary-kpis {
    grid-template-columns: 1fr;
  }

  .dash-card-head {
    display: grid;
  }

  .generated-list p,
  .task-table div {
    align-items: flex-start;
    flex-direction: column;
  }
}
