:root {
  --black: #050505;
  --ink: #141414;
  --muted: rgba(5, 5, 5, 0.58);
  --line: rgba(5, 5, 5, 0.12);
  --line-strong: rgba(5, 5, 5, 0.2);
  --white: #ffffff;
  --blue: #006ee6;
  --blue-soft: #eef6ff;
  --blue-line: rgba(0, 110, 230, 0.24);
  --red: #d70015;
  --red-soft: #fff2f4;
  --glass: rgba(255, 255, 255, 0.78);
  --dark-glass: rgba(5, 18, 34, 0.72);
  --shadow: 0 18px 46px rgba(5, 22, 44, 0.1);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(0, 110, 230, 0.16), transparent 32%),
    linear-gradient(180deg, #061426 0%, #f4f9ff 34%, #f8fbff 100%);
  color: var(--black);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
  overflow: clip;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 284px;
  height: 420px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 20, 38, 0.92), rgba(6, 20, 38, 0.35), rgba(6, 20, 38, 0)),
    url("./assets/iaaa-hero-bg.png") center top / cover no-repeat;
  opacity: 0.16;
  z-index: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(5, 12, 24, 0.96), rgba(4, 19, 38, 0.94)),
    url("./assets/iaaa-hero-bg.png") 45% top / cover no-repeat;
  backdrop-filter: blur(18px);
  overflow: auto;
  color: var(--white);
  z-index: 2;
}

.brand {
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.brand-title {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.18;
  font-weight: 760;
  color: var(--white);
}

.brand-subtitle {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.nav-block {
  padding: 16px 0 0;
}

.nav-label {
  padding: 0 8px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar .nav-label {
  color: rgba(255, 255, 255, 0.48);
}

.nav-button,
.section-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  padding: 10px 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 620;
}

.sidebar .nav-button,
.sidebar .section-button {
  color: rgba(255, 255, 255, 0.82);
}

.nav-button svg,
.section-button svg,
.button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.1;
  flex: 0 0 auto;
}

.nav-button:hover,
.section-button:hover {
  background: var(--blue-soft);
}

.sidebar .nav-button:hover,
.sidebar .section-button:hover {
  background: rgba(0, 110, 230, 0.18);
}

.nav-button.active,
.section-button.active {
  color: var(--white);
  background: var(--black);
}

.sidebar .nav-button.active,
.sidebar .section-button.active {
  background: var(--blue);
}

.section-button {
  min-height: 38px;
  padding-left: 12px;
  font-size: 13px;
}

.main {
  position: relative;
  min-width: 0;
  padding: 24px clamp(18px, 3vw, 42px) 44px;
  z-index: 1;
}

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

.topbar-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.05;
  font-weight: 780;
}

.topbar-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.button,
.icon-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(5, 5, 5, 0.04);
}

.button.primary {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.button.blue {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.button.light {
  border-color: rgba(255, 255, 255, 0.82);
  background: var(--white);
  color: var(--black);
}

.button.glass {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.button.danger {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.icon-button {
  width: 40px;
  padding: 0;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
}

.page-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.hero-panel {
  position: relative;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #061426 url("./assets/iaaa-hero-bg.png") center center / cover no-repeat;
  color: var(--white);
  box-shadow: 0 34px 90px rgba(0, 18, 44, 0.34);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 10, 22, 0.96) 0%, rgba(3, 10, 22, 0.82) 34%, rgba(3, 10, 22, 0.18) 72%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08) 45%, rgba(0, 0, 0, 0.52));
}

.hero-content,
.hero-metrics {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 0.52fr);
  gap: clamp(18px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 5vw, 62px);
}

.hero-copy {
  max-width: 680px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 110, 230, 0.18);
  color: rgba(255, 255, 255, 0.86);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 760;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 22px 0 0;
  font-size: clamp(38px, 4.2vw, 54px);
  line-height: 1.04;
  font-weight: 790;
}

.hero-copy h1 span {
  display: block;
  white-space: nowrap;
}

.hero-copy p {
  max-width: 640px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-case {
  align-self: end;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(2, 12, 26, 0.62);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.hero-case-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-case-head span,
.hero-case-grid span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 720;
}

.hero-case-head strong {
  font-size: 13px;
}

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

.hero-case-grid div {
  min-width: 0;
}

.hero-case-grid strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.hero-case-line {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border-radius: var(--radius);
  background: rgba(215, 0, 21, 0.14);
  color: rgba(255, 255, 255, 0.82);
  padding: 11px;
  font-size: 12px;
  line-height: 1.45;
}

.hero-case-line svg {
  width: 16px;
  height: 16px;
  color: var(--red);
  flex: 0 0 auto;
}

.red-text {
  color: #ff6b78;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(2, 12, 26, 0.56);
  backdrop-filter: blur(18px);
}

.hero-metric {
  min-height: 112px;
  padding: 22px clamp(16px, 3vw, 28px);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-metric:last-child {
  border-right: 0;
}

.hero-metric strong {
  display: block;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  font-weight: 790;
}

.hero-metric span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 720;
}

.module-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.module-card {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--black);
  padding: 16px;
  text-align: left;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
}

.module-card svg {
  width: 24px;
  height: 24px;
  color: var(--blue);
  flex: 0 0 auto;
}

.module-card strong,
.module-card em {
  display: block;
  font-style: normal;
}

.module-card strong {
  font-size: 16px;
  font-weight: 760;
}

.module-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.clean-panel {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.clean-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.clean-panel-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.clean-panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.clean-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.clean-step {
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 14px;
}

.clean-step span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 790;
}

.clean-step strong,
.clean-step em {
  display: block;
  font-style: normal;
}

.clean-step strong {
  margin-top: 12px;
  font-size: 15px;
}

.clean-step em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel,
.card,
.metric-card,
.case-card,
.field {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel {
  padding: 18px;
}

.panel.compact {
  padding: 14px;
}

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

.panel-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 760;
}

.panel-caption {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.metric-card {
  padding: 16px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.metric-value {
  margin-top: 12px;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1;
  font-weight: 790;
}

.metric-foot {
  margin-top: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 720;
}

.metric-foot.red {
  color: var(--red);
}

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

.workflow-step {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.step-index {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  font-weight: 760;
}

.workflow-step strong {
  display: block;
  margin-top: 12px;
  font-size: 14px;
}

.workflow-step span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ai-console {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 16px;
  align-items: stretch;
}

.ai-upload-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(3, 10, 22, 0.94), rgba(3, 10, 22, 0.54)),
    url("./assets/iaaa-hero-bg.png") center center / cover no-repeat;
  color: var(--white);
  box-shadow: 0 22px 70px rgba(0, 18, 44, 0.22);
  padding: 18px;
}

.ai-upload-panel .panel-caption {
  color: rgba(255, 255, 255, 0.68);
}

.ai-upload-panel .upload-zone {
  min-height: 280px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  backdrop-filter: blur(14px);
}

.ai-upload-panel .upload-zone:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ai-upload-panel .upload-icon {
  background: var(--blue);
}

.ai-upload-panel .upload-copy {
  color: rgba(255, 255, 255, 0.66);
}

.ai-signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ai-signal {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
  backdrop-filter: blur(14px);
}

.ai-signal strong,
.ai-signal span {
  display: block;
}

.ai-signal strong {
  font-size: 30px;
  line-height: 1;
}

.ai-signal span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 720;
}

.ai-file-panel {
  min-height: 100%;
}

.compact-table-panel {
  background: rgba(255, 255, 255, 0.88);
}

.crf-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.crf-subnav {
  position: sticky;
  top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.crf-stage {
  min-width: 0;
}

.crf-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 110, 230, 0.12), transparent 44%),
    rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.crf-stage-head .hero-kicker {
  border-color: rgba(0, 110, 230, 0.2);
  background: var(--blue-soft);
  color: var(--blue);
}

.crf-stage-head h2 {
  margin: 14px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.crf-stage-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.section-nav-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.section-status {
  margin-left: auto;
  color: inherit;
  font-size: 12px;
  opacity: 0.72;
}

.form-section {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.form-section.active-form-section {
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.field {
  min-height: 104px;
  padding: 12px;
  box-shadow: none;
}

.field.full {
  grid-column: 1 / -1;
}

.field.error {
  border-color: var(--red);
  background: var(--red-soft);
}

.field.warning {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.field-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}

.required {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 11px;
  font-weight: 780;
}

.field.error .required {
  color: var(--red);
}

.field-control {
  position: relative;
  margin-top: 10px;
}

.field input,
.field select,
.field textarea,
.filter-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  padding: 8px 10px;
  outline: none;
}

.field textarea {
  min-height: 74px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-line);
}

.field-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.field-note.red {
  color: var(--red);
  font-weight: 720;
}

.tag-row,
.chip-row,
.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.chip,
.status-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.tag.blue,
.chip.active,
.status-pill.blue {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.tag.red,
.status-pill.red {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.chip {
  cursor: pointer;
}

.upload-zone {
  position: relative;
  min-height: 238px;
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--blue);
  border-radius: var(--radius);
  background: var(--blue-soft);
  padding: 28px;
  text-align: center;
}

.upload-zone.dragover {
  background: var(--white);
  box-shadow: 0 0 0 4px var(--blue-line);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  margin-bottom: 14px;
}

.upload-icon svg {
  width: 25px;
  height: 25px;
}

.upload-title {
  margin: 0;
  font-size: 18px;
  font-weight: 760;
}

.upload-copy {
  max-width: 520px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.file-list,
.issue-list,
.case-list,
.timeline-list {
  display: grid;
  gap: 10px;
}

.file-item,
.issue-item,
.timeline-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 12px;
}

.file-thumb {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  font-size: 11px;
  font-weight: 780;
}

.file-main,
.issue-main {
  min-width: 0;
}

.file-name,
.issue-title,
.case-title {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 760;
}

.file-meta,
.issue-meta,
.case-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.pipeline-node {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 12px;
}

.pipeline-node strong {
  display: block;
  font-size: 14px;
}

.pipeline-node span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.08);
}

.progress > span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: var(--blue);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.35;
}

th {
  color: var(--muted);
  font-weight: 760;
  background: #fbfdff;
}

tr:last-child td {
  border-bottom: 0;
}

.bar-table {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: var(--blue);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.media-card {
  min-height: 198px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.scan-thumb {
  position: relative;
  min-height: 126px;
  background:
    radial-gradient(circle at 50% 52%, rgba(255,255,255,0.95) 0 11%, transparent 12%),
    radial-gradient(circle at 49% 50%, rgba(0,110,230,0.22) 0 23%, transparent 24%),
    radial-gradient(circle at 50% 52%, rgba(5,5,5,0.12) 0 34%, transparent 35%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.24) 0 2px, transparent 2px 12px),
    #050505;
}

.scan-thumb:after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 50%;
  height: 2px;
  background: var(--red);
  transform: translateY(-50%);
}

.media-body {
  padding: 12px;
}

.media-body strong {
  display: block;
  font-size: 14px;
}

.media-body span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.arch-card {
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 14px;
}

.arch-card strong {
  display: block;
  font-size: 15px;
}

.arch-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.arch-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.callout {
  border: 1px solid var(--blue-line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue-soft);
  padding: 14px;
}

.callout.red {
  border-color: rgba(215, 0, 21, 0.28);
  border-left-color: var(--red);
  background: var(--red-soft);
}

.callout strong {
  display: block;
  font-size: 14px;
}

.callout p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.lockline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

  .clean-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fields-grid,
  .media-grid,
  .architecture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-console {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .app-shell::before {
    inset: 0;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero-panel {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-case {
    align-self: auto;
  }

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

  .hero-metric:nth-child(2) {
    border-right: 0;
  }

  .nav-block {
    display: grid;
    gap: 8px;
  }

  .nav-list,
  .section-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .crf-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .crf-subnav {
    position: static;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 18px 12px 34px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .metric-grid,
  .workflow,
  .module-strip,
  .clean-flow,
  .fields-grid,
  .media-grid,
  .architecture-grid,
  .ocr-pipeline,
  .split,
  .nav-list,
  .section-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-content {
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .hero-copy h1 span {
    white-space: normal;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-signal-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-metric {
    min-height: 86px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero-metric:last-child {
    border-bottom: 0;
  }

  .clean-panel-head {
    flex-direction: column;
  }

  .file-item,
  .issue-item,
  .timeline-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .file-item .button,
  .issue-item .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
