@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --bg: #eef3f9;
  --bg-accent: #dde8f5;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --border: rgba(21, 49, 90, 0.12);
  --border-strong: rgba(21, 49, 90, 0.2);
  --text: #17263f;
  --muted: #5b6d89;
  --brand: #10356e;
  --brand-soft: #d8e6fb;
  --brand-deep: #0b2448;
  --success: #1d7b54;
  --success-soft: #dff5ea;
  --warning: #8b5a18;
  --warning-soft: #fff1dd;
  --danger: #b63c3c;
  --danger-soft: #fde7e6;
  --shadow-lg: 0 18px 50px rgba(12, 30, 60, 0.12);
  --shadow-sm: 0 10px 24px rgba(12, 30, 60, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 53, 110, 0.09), transparent 32%),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.35;
}

.app-shell {
  position: relative;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 28px 18px 120px;
}

.hero-panel,
.form-section,
.notice-banner,
.report-summary {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}

.hero-panel {
  border-radius: 32px;
  padding: 26px;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.hero-auth-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(16, 53, 110, 0.14), transparent 70%);
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-logo {
  width: 132px;
  max-width: 36%;
  height: auto;
  object-fit: contain;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--brand-deep);
}

.hero-copy p {
  margin: 14px 0 0;
  max-width: 68ch;
  line-height: 1.6;
  color: var(--muted);
}

.template-header-strip {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(16, 53, 110, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 246, 253, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.template-header-strip__media {
  display: grid;
  gap: 12px;
}

.template-header-visual {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(16, 53, 110, 0.08);
}

.template-header-strip__copy {
  display: grid;
  gap: 4px;
}

.template-header-strip__copy strong {
  color: var(--brand-deep);
}

.template-header-strip__copy span,
.template-header-strip__copy small {
  color: var(--muted);
  line-height: 1.5;
}

.hero-metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 24px;
}

.hero-metrics article {
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 243, 253, 0.92));
  border: 1px solid rgba(16, 53, 110, 0.1);
}

.hero-metrics strong,
.report-summary strong,
.reading-summary strong {
  display: block;
  font-size: 1rem;
  color: var(--brand-deep);
}

.hero-metrics span,
.report-summary span,
.reading-summary span {
  display: block;
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}

.notice-banner,
.report-summary,
.form-section {
  margin-top: 18px;
  border-radius: var(--radius-xl);
}

.notice-banner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
}

.notice-banner strong,
.summary-grid strong {
  font-size: 1rem;
}

.notice-banner p,
.summary-note {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.notice-banner.is-success {
  background: linear-gradient(180deg, var(--success-soft), rgba(255, 255, 255, 0.95));
}

.notice-banner.is-danger {
  background: linear-gradient(180deg, var(--danger-soft), rgba(255, 255, 255, 0.95));
}

.notice-banner.is-warning {
  background: linear-gradient(180deg, var(--warning-soft), rgba(255, 255, 255, 0.95));
}

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

.report-summary {
  padding: 20px;
}

.summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.summary-grid article {
  padding: 16px;
  border-radius: var(--radius-md);
  background: #f6f9fd;
  border: 1px solid var(--border);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill.is-success {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.is-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pill.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.is-info {
  background: #e8f1ff;
  color: var(--brand);
}

.status-pill.is-neutral {
  background: #eef3f9;
  color: var(--muted);
}

.format-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 53, 110, 0.08);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 53, 110, 0.08);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.format-directory {
  margin-top: 18px;
}

.platform-layout,
.workspace-layout {
  --workspace-sidebar-width: clamp(280px, 24vw, 360px);
  display: grid;
  gap: 18px;
  margin-top: 18px;
  grid-template-columns: minmax(0, var(--workspace-sidebar-width)) minmax(0, 1fr);
  align-items: start;
}

.platform-sidebar,
.workspace-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 18px;
  align-self: start;
}

.workspace-sidebar {
  max-height: calc(100dvh - 36px);
  overflow: hidden;
}

.workspace-sidebar-scroll {
  display: grid;
  gap: 18px;
  align-content: start;
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.workspace-sidebar-scroll::-webkit-scrollbar {
  width: 10px;
}

.workspace-sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-sidebar-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 67, 117, 0.22);
}

.platform-main,
.workspace-main {
  min-width: 0;
}

.workspace-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.workspace-card--toolbar {
  margin-bottom: 18px;
}

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

.workspace-card-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-deep);
}

.workspace-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 53, 110, 0.08);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meta-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(21, 49, 90, 0.08);
}

.meta-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.meta-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-list dd {
  margin: 6px 0 0;
  color: var(--brand-deep);
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(16, 53, 110, 0.08);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(16, 53, 110, 0.08);
}

.meta-tag--button {
  cursor: pointer;
  font: inherit;
}

.meta-tag--button.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.metric-stack {
  display: grid;
  gap: 12px;
}

.metric-stack article {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 244, 253, 0.92));
}

.metric-stack strong {
  display: block;
  color: var(--brand-deep);
  font-size: 1.35rem;
}

.metric-stack span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.resource-nav,
.section-nav,
.activity-list {
  display: grid;
  gap: 10px;
}

.resource-link,
.section-nav-link,
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 53, 110, 0.08);
  background: #f7faff;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.resource-link {
  cursor: pointer;
}

.resource-link:hover,
.resource-link.is-active,
.section-nav-link:hover,
.section-nav-link.is-active,
.activity-item:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 53, 110, 0.22);
  background: #eef5ff;
  box-shadow: 0 10px 22px rgba(16, 53, 110, 0.08);
}

.resource-link,
.section-nav-link span,
.activity-item strong {
  font-weight: 700;
}

.section-nav-link strong,
.activity-item small {
  flex-shrink: 0;
}

.activity-item {
  align-items: start;
}

.activity-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.resource-toolbar {
  display: grid;
  gap: 16px;
}

.resource-search {
  margin: 0;
}

.format-group {
  margin-top: 20px;
}

.format-group-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.format-group-header h3 {
  margin: 6px 0 0;
  font-size: 1.25rem;
  color: var(--brand-deep);
}

.format-group-header p {
  margin: 8px 0 0;
  max-width: 78ch;
  color: var(--muted);
  line-height: 1.55;
}

.format-group-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 53, 110, 0.08);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.format-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #edf3fb;
  border: 1px solid rgba(16, 53, 110, 0.1);
  color: var(--brand-deep);
  font-size: 0.84rem;
  font-weight: 800;
}

.format-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.format-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.format-card-header,
.format-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.format-card h3 {
  margin: 16px 0 10px;
  font-size: 1.15rem;
  color: var(--brand-deep);
}

.format-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.format-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.format-card-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f3f7fd;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.format-card-footer {
  margin-top: 18px;
  align-items: end;
}

.format-card-footer small {
  color: var(--muted);
}

.report-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
}

.form-section {
  padding: 22px;
}

.form-section--dense {
  padding-bottom: 18px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
}

.section-heading p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.55;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid.two-wide {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field-grid.three-wide {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.compact span {
  font-size: 0.76rem;
}

.field span {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--brand-deep);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text);
  padding: 14px 14px;
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field input[readonly] {
  background: #f3f7fc;
  color: var(--muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(16, 53, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(16, 53, 110, 0.08);
}

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

.field select {
  appearance: none;
  padding-right: 46px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(23, 38, 63, 0.7) 50%),
    linear-gradient(135deg, rgba(23, 38, 63, 0.7) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field-error {
  color: var(--danger);
  font-size: 0.82rem;
}

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

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice-chip {
  position: relative;
}

.choice-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #f7f9fd;
  color: var(--muted);
  transition: all 180ms ease;
}

.choice-chip input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(16, 53, 110, 0.18);
}

.reading-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 16px;
}

.reading-summary article {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: #f4f8fd;
  border: 1px solid var(--border);
}

.reading-cards {
  display: grid;
  gap: 16px;
}

.reading-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  border: 1px solid var(--border);
}

.reading-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.reading-card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--brand-deep);
}

.reading-card-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.reading-card-header strong {
  font-size: 1.35rem;
  color: var(--brand);
}

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

.upload-grid,
.signature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.upload-card,
.signature-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #f5f8fd);
  border: 1px solid var(--border);
  padding: 16px;
}

.upload-card.wide {
  margin-bottom: 16px;
}

.upload-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(16, 53, 110, 0.24);
  background:
    linear-gradient(135deg, rgba(16, 53, 110, 0.04), transparent),
    #f8fbff;
  overflow: hidden;
  color: var(--muted);
  text-align: center;
  padding: 14px;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.signature-pad {
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: #fff;
  overflow: hidden;
}

.signature-pad canvas {
  display: block;
  width: 100%;
  height: 180px;
  touch-action: none;
  background:
    linear-gradient(180deg, transparent 0, transparent calc(100% - 2px), rgba(16, 53, 110, 0.08) calc(100% - 2px)),
    linear-gradient(180deg, rgba(16, 53, 110, 0.02), rgba(16, 53, 110, 0.01));
}

.signature-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.signature-clear {
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
}

.sticky-actions,
.form-actions {
  position: sticky;
  bottom: 18px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 18px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(16, 53, 110, 0.14);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}

.template-sheet-shell {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f7faff);
  overflow: hidden;
}

.template-sheet-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #eff4fb;
  color: var(--brand-deep);
}

.template-sheet-caption strong,
.template-sheet-caption span {
  display: block;
}

.template-sheet-caption span {
  margin-top: 4px;
  color: var(--muted);
}

.template-slot-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.template-slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(16, 53, 110, 0.12);
}

.template-slot-pill strong,
.template-slot-pill small {
  display: inline;
}

.template-slot-pill small {
  color: var(--muted);
}

.template-slot-stats--panel {
  justify-content: start;
}

.template-table-wrap {
  overflow: auto;
  padding: 18px;
}

.template-table {
  border-collapse: collapse;
  table-layout: fixed;
  min-width: max-content;
  width: auto;
  background: #fff;
}

.template-table td {
  position: relative;
  padding: 4px;
}

.template-table td.is-editable-cell {
  background-image: linear-gradient(180deg, rgba(16, 53, 110, 0.03), rgba(16, 53, 110, 0.01));
}

.template-cell-text {
  white-space: pre-wrap;
  line-height: 1.35;
}

.template-input,
.template-textarea {
  width: 100%;
  border: 1px solid rgba(16, 53, 110, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  line-height: 1.35;
}

.template-input:focus,
.template-textarea:focus {
  outline: none;
  border-color: rgba(16, 53, 110, 0.44);
  box-shadow: 0 0 0 3px rgba(16, 53, 110, 0.08);
}

.template-textarea {
  resize: vertical;
}

.template-upload {
  display: grid;
  gap: 10px;
}

.template-slot-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(16, 53, 110, 0.08);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.template-upload input[type="file"] {
  width: 100%;
}

.template-preview {
  min-height: 120px;
  margin-top: 0;
}

.template-signature .signature-pad {
  margin-top: 0;
}

.template-signature .signature-pad canvas {
  height: 130px;
}

.auth-panel {
  max-width: 560px;
  margin-inline: auto;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
}

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

.structured-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #f5f8fd);
  border: 1px solid var(--border);
}

.structured-field.is-wide {
  grid-column: 1 / -1;
}

.structured-field.is-compact {
  justify-content: space-between;
}

.structured-field-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.structured-field-header strong {
  display: block;
  color: var(--brand-deep);
  font-size: 1rem;
}

.structured-field-header span,
.structured-field-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.field-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.structured-input,
.structured-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text);
  padding: 14px 14px;
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.structured-input:focus,
.structured-textarea:focus {
  outline: none;
  border-color: rgba(16, 53, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(16, 53, 110, 0.08);
}

.structured-textarea {
  min-height: 160px;
  resize: vertical;
}

.structured-upload,
.structured-signature {
  display: grid;
  gap: 12px;
}

.structured-preview {
  min-height: 220px;
}

.structured-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: #fff;
  cursor: pointer;
}

.structured-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.structured-check span {
  color: var(--text);
  font-weight: 600;
}

.template-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(16, 53, 110, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

.template-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.template-check span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(16, 53, 110, 0.34);
  color: transparent;
  font-weight: 900;
}

.template-check input:checked + span {
  color: var(--brand);
  background: rgba(16, 53, 110, 0.08);
}

.draft-status {
  font-size: 0.92rem;
  color: var(--muted);
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  border: 0;
  padding: 14px 20px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, #184a97 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(16, 53, 110, 0.22);
}

.btn-secondary {
  background: #edf3fb;
  color: var(--brand-deep);
  border: 1px solid rgba(16, 53, 110, 0.08);
}

.btn-danger {
  background: linear-gradient(135deg, #c53d3d 0%, #a62626 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(165, 38, 38, 0.2);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.signature-clear:hover {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (min-width: 768px) {
  .app-shell {
    padding-inline: 22px;
  }

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

@media (max-width: 767px) {
  .app-shell {
    padding: 18px 14px 110px;
  }

  .hero-panel,
  .form-section,
  .notice-banner,
  .report-summary,
  .sticky-actions,
  .form-actions {
    border-radius: 24px;
  }

  .hero-header,
  .notice-banner,
  .sticky-actions,
  .form-actions,
  .hero-actions,
  .hero-auth-meta,
  .format-card-footer,
  .format-group-header,
  .template-sheet-caption,
  .workspace-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .platform-layout,
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .platform-sidebar,
  .workspace-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .workspace-sidebar-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .hero-logo {
    max-width: 46%;
  }

  .action-row,
  .notice-actions {
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    flex: 1 1 0;
  }

  .template-slot-stats {
    justify-content: start;
  }

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

.control-change-card {
  border-top: 4px solid var(--brand);
}

.control-change-form {
  margin-top: 0;
}

.control-justification-field textarea {
  min-height: 112px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.control-change-assurance {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 67, 117, 0.15);
  border-radius: var(--radius-md);
  background: rgba(226, 239, 251, 0.55);
  color: var(--brand-deep);
}

.control-change-assurance strong {
  flex: 0 0 auto;
}

.control-change-assurance span {
  color: var(--muted);
  line-height: 1.45;
}

.control-table--audit {
  min-width: 1080px;
}

.control-table--audit td {
  vertical-align: top;
}

.control-audit-card time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--brand-deep);
}

.control-audit-diff {
  display: grid;
  gap: 7px;
  min-width: 280px;
}

.control-audit-diff span {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(90px, 1fr) auto minmax(90px, 1fr);
  align-items: start;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f5f8fc;
  color: var(--text);
  line-height: 1.35;
}

.control-audit-diff i {
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
}

.control-danger-zone {
  border-color: rgba(180, 35, 35, 0.2);
  background: linear-gradient(135deg, rgba(255, 249, 247, 0.98), rgba(255, 255, 255, 0.98));
}

.control-danger-zone summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--danger);
}

.control-danger-zone__body {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
  gap: 24px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(180, 35, 35, 0.15);
}

.control-danger-zone__body p {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 767px) {
  .control-change-assurance {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-danger-zone__body {
    grid-template-columns: 1fr;
  }

  .control-audit-diff span {
    grid-template-columns: 1fr;
  }

  .control-audit-diff i {
    transform: rotate(90deg);
    width: fit-content;
  }
}

/* Engineering integration */
.control-metric-grid--engineering {
  margin-bottom: 18px;
}

.engineering-toolbar {
  margin-bottom: 18px;
}

.engineering-toolbar .workspace-card-header > div {
  min-width: 0;
}

.engineering-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(220px, 0.7fr) auto;
  gap: 14px;
  align-items: end;
}

.engineering-filter-actions,
.engineering-row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.engineering-filter-actions {
  margin: 0;
}

.engineering-table-card {
  min-width: 0;
}

.engineering-table-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
}

.control-table--engineering {
  min-width: 1320px;
}

.control-table--engineering th:nth-child(1) { width: 16%; }
.control-table--engineering th:nth-child(2) { width: 19%; }
.control-table--engineering th:nth-child(3) { width: 14%; }
.control-table--engineering th:nth-child(4) { width: 13%; }

.engineering-progress {
  display: grid;
  gap: 8px;
  min-width: 140px;
}

.engineering-progress__label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.engineering-progress__label strong {
  color: var(--brand-deep);
}

.engineering-progress__label span {
  color: var(--muted);
  font-size: 0.76rem;
}

.engineering-progress__track {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef7;
}

.engineering-progress__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1c8f67, #31ac7e);
}

.engineering-row-actions {
  min-width: 180px;
}

.engineering-review-form {
  margin: 0;
}

.engineering-explorer-card { min-width: 0; }
.engineering-explorer { display: grid; gap: 14px; }
.engineering-order { overflow: hidden; border: 1px solid #d8e2ee; border-radius: 18px; background: #fff; }
.engineering-order > summary { min-height: 86px; display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; cursor: pointer; list-style: none; background: linear-gradient(110deg,#f8fbff,#edf4fc); }
.engineering-order > summary::-webkit-details-marker { display: none; }
.engineering-order > summary > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.engineering-order > summary small { color: var(--brand); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.engineering-order > summary strong { overflow-wrap: anywhere; color: var(--brand-deep); font-size: 1.1rem; }
.engineering-order > summary em { overflow: hidden; color: var(--muted); font-size: .78rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.engineering-order > summary b { padding: 8px 11px; color: var(--brand-deep); font-size: .76rem; background: #fff; border: 1px solid #d7e2ef; border-radius: 999px; }
.engineering-folder { width: 42px; height: 34px; position: relative; background: #d9e9fc; border: 1px solid #aac7e7; border-radius: 7px; }
.engineering-folder::before { position: absolute; top: -7px; left: 3px; width: 18px; height: 8px; content: ""; background: #bed8f5; border: 1px solid #aac7e7; border-bottom: 0; border-radius: 5px 5px 0 0; }
.engineering-serial-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,480px),1fr)); gap: 14px; padding: 15px; border-top: 1px solid #d8e2ee; }
.engineering-serial { min-width: 0; padding: 16px; background: #fbfcfe; border: 1px solid #dce5ef; border-radius: 15px; }
.engineering-serial > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.engineering-serial > header small { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.engineering-serial h3 { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--brand-deep); font-size: 1rem; }
.engineering-form-list { display: grid; gap: 10px; }
.engineering-form-item { min-width: 0; padding: 14px; background: #fff; border: 1px solid #dce5ef; border-radius: 13px; }
.engineering-form-title,.engineering-form-meta,.engineering-document-actions,.engineering-decision-form > div { display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.engineering-form-title > span:first-child { min-width: 0; display: grid; gap: 2px; }
.engineering-form-title strong,.engineering-form-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.engineering-form-title small,.engineering-form-meta { color: var(--muted); font-size: .72rem; }
.engineering-form-item > p { margin: 8px 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.engineering-document-actions { justify-content: flex-start; margin-top: 11px; }
.engineering-document-actions .btn-secondary { min-height: 36px; padding: 8px 11px; font-size: .73rem; }
.engineering-decision-form { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e1e8f0; }
.engineering-decision-form label { display: grid; gap: 5px; color: var(--brand-deep); font-size: .76rem; font-weight: 700; }
.engineering-decision-form textarea { width: 100%; resize: vertical; }
.engineering-decision-form > div { justify-content: flex-end; }
.engineering-decision-result { display: grid; gap: 3px; margin-top: 12px; padding: 11px; border: 1px solid; border-radius: 10px; }
.engineering-decision-result.is-approved { color: #116344; background: #ecf9f3; border-color: #b8dfcf; }
.engineering-decision-result.is-rejected { color: #8c2f2f; background: #fff0f0; border-color: #edc4c4; }
.engineering-decision-result span,.engineering-decision-result p,.engineering-decision-result small { margin: 0; font-size: .72rem; line-height: 1.45; }
.engineering-release-link { width: 100%; margin-top: 12px; text-align: center; }
.format-card.is-locked { background: linear-gradient(145deg,#f7f9fc,#eef2f6); border-style: dashed; }
.btn-primary.is-disabled { cursor: not-allowed; opacity: .52; filter: grayscale(.35); }

@media (max-width: 1180px) {
  .engineering-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .engineering-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .engineering-filter-grid {
    grid-template-columns: 1fr;
  }

  .engineering-filter-actions {
    grid-column: auto;
    width: 100%;
  }

  .engineering-filter-actions .btn-primary,
  .engineering-filter-actions .btn-secondary {
    flex: 1 1 100%;
    width: 100%;
  }

  .engineering-table-wrap {
    max-height: 70vh;
  }

  .engineering-order > summary { grid-template-columns: 36px minmax(0,1fr); padding: 14px; }
  .engineering-order > summary > b { grid-column: 2; justify-self: start; }
  .engineering-folder { width: 34px; height: 28px; }
  .engineering-serial-grid { grid-template-columns: minmax(0,1fr); padding: 9px; }
  .engineering-serial { padding: 12px; }
  .engineering-serial > header { align-items: flex-start; flex-direction: column; }
  .engineering-decision-form > div .btn-primary,.engineering-decision-form > div .btn-secondary { width: 100%; }
}

@media (max-width: 1080px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .workspace-sidebar-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

.app-shell--control {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.control-center {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

.control-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  gap: 18px;
  min-height: 100vh;
  padding: 24px 18px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #11315f 0%, #143a73 48%, #0d2141 100%);
  color: #fff;
}

.control-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.control-brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  padding: 8px;
}

.control-brand strong,
.control-sidebar-card strong {
  display: block;
}

.control-brand span,
.control-sidebar-card p {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
}

.control-sidebar-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.control-sidebar-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-sidebar-button {
  width: 100%;
}

.control-nav {
  display: grid;
  gap: 10px;
}

.control-nav-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.control-nav-link strong {
  font-size: 0.98rem;
}

.control-nav-link span {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.45;
  font-size: 0.84rem;
}

.control-nav-link:hover,
.control-nav-link.is-active {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(66, 122, 211, 0.92), rgba(31, 71, 143, 0.95));
  box-shadow: 0 18px 30px rgba(5, 18, 39, 0.26);
}

.control-nav-link.is-active span,
.control-nav-link:hover span {
  color: rgba(255, 255, 255, 0.82);
}

.control-mini-metrics,
.control-sidebar-list {
  display: grid;
  gap: 10px;
}

.control-mini-metrics article,
.control-sidebar-list article {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.control-mini-metrics span,
.control-sidebar-list span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.45;
}

.control-main {
  min-width: 0;
  padding: 28px 28px 42px;
}

.control-topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.control-topbar-copy h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: var(--brand-deep);
}

.control-topbar-copy p {
  margin: 12px 0 0;
  max-width: 76ch;
  color: var(--muted);
  line-height: 1.6;
}

.control-topbar-search {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: min(460px, 100%);
  padding: 12px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.control-topbar-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
}

.control-topbar-search input:focus {
  outline: none;
}

.control-metric-grid,
.control-grid-three,
.control-card-grid,
.control-grid-two,
.control-content-grid {
  display: grid;
  gap: 18px;
}

.control-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.control-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.control-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.control-card-grid {
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 18px;
}

.control-content-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  margin-top: 18px;
  align-items: start;
}

.control-content-grid--full {
  grid-template-columns: 1fr;
}

.control-metric-card,
.control-summary-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
}

.control-metric-card {
  padding: 22px;
}

.control-metric-card::after,
.control-summary-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(16, 53, 110, 0.08);
}

.control-metric-card span,
.control-summary-card span,
.control-bar-row span,
.control-detail-stack h3,
.control-empty-state p {
  color: var(--muted);
}

.control-metric-card strong {
  display: block;
  margin-top: 14px;
  font-size: 2.2rem;
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--brand-deep);
}

.control-metric-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.control-metric-card.is-warning {
  border-left: 5px solid var(--warning);
}

.control-metric-card.is-danger {
  border-left: 5px solid var(--danger);
}

.control-metric-card.is-success {
  border-left: 5px solid var(--success);
}

.control-bar-cluster,
.control-detail-stack {
  display: grid;
  gap: 14px;
}

.control-bar-row {
  display: grid;
  gap: 10px;
}

.control-bar-row strong {
  display: block;
  color: var(--brand-deep);
}

.control-bar-track {
  width: 100%;
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebf1f8;
}

.control-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #1f5bb7, #143a73);
}

.control-bar-fill.tone-success {
  background: linear-gradient(135deg, #1d7b54, #0e5d3f);
}

.control-bar-fill.tone-danger {
  background: linear-gradient(135deg, #c44a4a, #922f2f);
}

.control-bar-fill.tone-warning {
  background: linear-gradient(135deg, #c9841b, #8b5a18);
}

.control-bar-fill.tone-info {
  background: linear-gradient(135deg, #2f6cd1, #184a97);
}

.control-bar-fill.tone-neutral {
  background: linear-gradient(135deg, #5f748f, #33465f);
}

.control-summary-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
}

.control-summary-head,
.control-summary-actions,
.control-summary-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.control-summary-head strong {
  font-size: 1.12rem;
  color: var(--brand-deep);
}

.control-summary-head span {
  display: block;
  margin-top: 4px;
}

.control-summary-stats span {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f3f7fd;
  font-size: 0.82rem;
}

.control-summary-actions .btn-primary,
.control-summary-actions .btn-secondary {
  flex: 1 1 0;
}

.control-summary-actions {
  margin-top: 4px;
}

.control-filter-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.control-table-card,
.control-detail-card {
  min-width: 0;
}

.control-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(21, 49, 90, 0.08);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.control-table-wrap--wide {
  max-width: 100%;
  scrollbar-gutter: stable both-edges;
}

.control-table-wrap--wide::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.control-table-wrap--wide::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 67, 117, 0.22);
}

.control-table-wrap--wide::-webkit-scrollbar-track {
  background: rgba(228, 236, 246, 0.72);
}

.control-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  background: #fff;
}

.control-table--orders {
  min-width: 1220px;
}

.control-table--serials {
  min-width: 1360px;
}

.control-table--checklist,
.control-table--quick-checklist {
  min-width: 1520px;
}

.control-table th,
.control-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(21, 49, 90, 0.08);
  vertical-align: top;
  text-align: left;
}

.control-table thead th {
  position: sticky;
  top: 0;
  background: #f5f9fe;
  color: var(--brand-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1;
}

.control-table-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.control-table-meta strong {
  color: var(--brand-deep);
}

.control-table-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.control-row-link {
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
}

.control-row-link:hover {
  text-decoration: underline;
}

.evidence-chip {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3fa;
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.evidence-chip.is-ready {
  background: rgba(32, 121, 80, 0.12);
  color: #0e5d3f;
}

.table-warning-text {
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.control-inline-action {
  white-space: nowrap;
}

.control-empty-state {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 4px 0;
}

.control-empty-state strong,
.control-detail-stack h3 {
  margin: 0;
  color: var(--brand-deep);
}

.activity-item--static {
  cursor: default;
}

.activity-item--static:hover {
  transform: none;
}

.control-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.control-checklist-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.field-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.control-file-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.control-file-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.control-file-card img,
.control-file-card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: #eef3fa;
}

.control-file-card__placeholder {
  display: grid;
  place-items: center;
  color: var(--brand-deep);
  font-weight: 700;
}

.control-file-card strong {
  display: block;
  color: var(--brand-deep);
}

.control-file-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.control-access-card {
  gap: 18px;
}

.control-checklist-access {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1.5fr) minmax(220px, 1fr) minmax(240px, 1.2fr) auto;
  align-items: end;
}

.control-empty-state-card {
  min-height: 100%;
}

.control-metric-grid--session {
  margin-top: 0;
}

.control-guidance-list {
  display: grid;
  gap: 14px;
}

.control-guidance-list article {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(21, 49, 90, 0.08);
  border-radius: 18px;
  background: #f8fbff;
}

.control-guidance-list strong {
  color: var(--brand-deep);
}

.control-guidance-list span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.control-checklist-card .control-table-wrap {
  border: 1px solid rgba(21, 49, 90, 0.08);
}

.control-table--quick-checklist {
  min-width: 1420px;
}

.control-group-row td {
  padding: 16px;
  background: #eef5fd;
  border-bottom: 1px solid rgba(21, 49, 90, 0.08);
}

.control-group-row strong {
  display: block;
  color: var(--brand-deep);
  font-size: 0.92rem;
}

.control-group-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.control-check-cell {
  min-width: 120px;
}

.control-quick-form {
  display: inline-flex;
}

.check-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-deep);
  cursor: pointer;
}

.check-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.check-toggle.is-readonly {
  opacity: 0.7;
  cursor: default;
}

.quick-file-field {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(21, 49, 90, 0.26);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.quick-file-field:hover {
  border-color: rgba(21, 49, 90, 0.45);
  background: rgba(21, 49, 90, 0.04);
}

.quick-file-input {
  width: 100%;
  max-width: 240px;
  font-size: 0.78rem;
}

.control-detail-card--stacked {
  display: grid;
  gap: 22px;
}

.control-advanced-panel {
  padding: 18px;
  border: 1px solid rgba(21, 49, 90, 0.08);
  border-radius: 20px;
  background: #f8fbff;
}

.control-advanced-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--brand-deep);
}

.control-advanced-panel[open] summary {
  margin-bottom: 18px;
}

@media (max-width: 1360px) {
  .control-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .control-grid-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .control-center {
    grid-template-columns: 1fr;
  }

  .control-sidebar {
    position: static;
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .control-main {
    padding: 20px 16px 32px;
  }

  .control-topbar,
  .control-topbar-search,
  .control-summary-head,
  .control-summary-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .control-topbar-search {
    width: 100%;
    min-width: 0;
  }

  .control-metric-grid,
  .control-grid-two,
  .control-content-grid {
    grid-template-columns: 1fr;
  }

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

  .control-checklist-access {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .control-sidebar {
    padding: 18px 14px;
  }

  .control-main {
    padding: 18px 14px 28px;
  }

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

  .control-card-grid {
    grid-template-columns: 1fr;
  }

  .control-checklist-grid {
    grid-template-columns: 1fr;
  }

  .control-table--quick-checklist {
    min-width: 0;
  }

  .control-table--quick-checklist thead {
    display: none;
  }

  .control-table--quick-checklist,
  .control-table--quick-checklist tbody,
  .control-table--quick-checklist tr,
  .control-table--quick-checklist td {
    display: block;
    width: 100%;
  }

  .control-table--quick-checklist tr {
    padding: 14px;
    border-bottom: 1px solid rgba(21, 49, 90, 0.08);
  }

  .control-table--quick-checklist td {
    padding: 8px 0;
    border: 0;
  }

  .control-table--quick-checklist td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .control-group-row,
  .control-group-row td {
    display: block;
  }

  .control-group-row td::before {
    display: none;
  }

  .control-summary-actions .btn-primary,
  .control-summary-actions .btn-secondary,
  .control-topbar-search .btn-primary {
    width: 100%;
  }
}

:root {
  --bg: #e5ebf2;
  --bg-accent: #cfd9e7;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --border: rgba(20, 38, 68, 0.1);
  --border-strong: rgba(20, 38, 68, 0.18);
  --text: #132238;
  --muted: #61748f;
  --brand: #0f4375;
  --brand-soft: #d9e8f7;
  --brand-deep: #091b31;
  --success: #1c8f67;
  --success-soft: #def8ee;
  --warning: #af6a11;
  --warning-soft: #fff0d7;
  --danger: #d14b46;
  --danger-soft: #ffe4e1;
  --shadow-lg: 0 28px 60px rgba(11, 26, 48, 0.16);
  --shadow-sm: 0 14px 32px rgba(11, 26, 48, 0.08);
}

body {
  font-family: "IBM Plex Sans", "Segoe UI Variable", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(18, 66, 114, 0.12), transparent 30%),
    radial-gradient(circle at right 10% top 15%, rgba(49, 152, 139, 0.08), transparent 24%),
    linear-gradient(180deg, #f2f6fb 0%, #e6ecf3 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.42;
}

h1,
h2,
h3,
.control-brand strong,
.workspace-card-header h2,
.control-topbar-copy h1,
.section-heading h2,
.hero-copy h1,
.login-copy-block h1 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
}

.app-shell--auth {
  width: min(100%, 1360px);
  padding: 34px 22px 70px;
}

.auth-hero {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-hero::after {
  display: none;
}

.login-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  align-items: stretch;
}

.login-showcase,
.auth-panel--manager {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
}

.login-showcase {
  display: grid;
  align-content: space-between;
  gap: 24px;
  min-height: 760px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 34%),
    radial-gradient(circle at right top, rgba(66, 199, 179, 0.18), transparent 30%),
    linear-gradient(180deg, #0d1f39 0%, #12345e 55%, #0a1830 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 60px rgba(7, 18, 34, 0.28);
}

.login-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 92%);
}

.login-brandline,
.login-rail article,
.login-feature-grid article,
.control-session-panel {
  position: relative;
  z-index: 1;
}

.login-brandline {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-brandline-logo {
  width: 82px;
  max-width: none;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.14);
}

.login-brandline strong {
  display: block;
  font-size: 1.12rem;
}

.login-brandline span,
.login-copy-block p,
.login-feature-grid span,
.login-rail span {
  color: rgba(255, 255, 255, 0.76);
}

.login-copy-block h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.9rem, 5vw, 4.7rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.login-copy-block p {
  max-width: 56ch;
  margin: 18px 0 0;
  line-height: 1.7;
  font-size: 1rem;
}

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

.login-feature-grid article,
.login-rail article {
  padding: 18px 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.login-feature-grid strong,
.login-rail strong {
  display: block;
  color: #fff;
  font-size: 0.98rem;
}

.login-feature-grid span,
.login-rail span {
  display: block;
  margin-top: 8px;
  line-height: 1.55;
  font-size: 0.88rem;
}

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

.auth-panel--manager {
  display: grid;
  align-content: start;
  gap: 22px;
  max-width: none;
  padding: 34px 30px 28px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 253, 0.94));
  box-shadow: var(--shadow-lg);
}

.auth-mobile-brand {
  display: none;
}

.auth-heading {
  margin-bottom: 0;
}

.login-notice-stack {
  display: grid;
  gap: 14px;
}

.login-notice-stack .notice-banner {
  margin-top: 0;
  border-radius: 22px;
}

.auth-form--manager {
  gap: 18px;
}

.field--manager {
  gap: 10px;
}

.field--manager input {
  min-height: 58px;
  padding-inline: 18px;
  border-radius: 18px;
  background: rgba(250, 252, 255, 0.96);
}

.field--manager small {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.82rem;
}

.auth-actions--manager {
  justify-content: stretch;
}

.auth-actions--manager .btn-primary {
  width: 100%;
  min-height: 58px;
}

.auth-footer-note {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(15, 67, 117, 0.08);
  background: linear-gradient(180deg, rgba(221, 236, 250, 0.58), rgba(255, 255, 255, 0.72));
}

.auth-footer-note strong {
  color: var(--brand-deep);
}

.auth-footer-note span {
  color: var(--muted);
  line-height: 1.55;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  border-radius: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #0f4375 0%, #1d77b8 100%);
  box-shadow: 0 18px 34px rgba(15, 67, 117, 0.22);
}

.btn-secondary {
  background: rgba(240, 246, 252, 0.92);
  border: 1px solid rgba(15, 67, 117, 0.08);
}

.btn-danger {
  background: linear-gradient(135deg, #c53d3d 0%, #a62626 100%);
}

.status-pill {
  padding: 8px 13px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-pill.is-success {
  background: linear-gradient(180deg, #e5fbf3, #d5f7e9);
  color: #137956;
  border-color: rgba(19, 121, 86, 0.16);
}

.status-pill.is-warning {
  background: linear-gradient(180deg, #fff4dd, #ffe9c1);
  color: #9d5f0e;
  border-color: rgba(157, 95, 14, 0.16);
}

.status-pill.is-danger {
  background: linear-gradient(180deg, #ffeae7, #ffd9d4);
  color: #c13d37;
  border-color: rgba(193, 61, 55, 0.16);
}

.status-pill.is-neutral {
  background: linear-gradient(180deg, #eef3f8, #e6edf4);
  color: #5e728d;
  border-color: rgba(94, 114, 141, 0.12);
}

.control-center {
  --control-sidebar-width: 306px;
  grid-template-columns: var(--control-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.18));
}

.control-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  gap: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 20% 0%, rgba(69, 197, 178, 0.16), transparent 24%),
    linear-gradient(180deg, #0d203b 0%, #12355f 52%, #0a172c 100%);
}

.control-sidebar-scroll {
  display: grid;
  gap: 20px;
  align-content: start;
  height: 100%;
  overflow-y: auto;
  padding: 24px 18px 30px;
  scrollbar-gutter: stable;
}

.control-sidebar-scroll::-webkit-scrollbar,
.control-main::-webkit-scrollbar {
  width: 10px;
}

.control-sidebar-scroll::-webkit-scrollbar-track,
.control-main::-webkit-scrollbar-track {
  background: transparent;
}

.control-sidebar-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.control-main::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 67, 117, 0.22);
}

.control-brand,
.control-sidebar-card {
  border-radius: 26px;
}

.control-brand {
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.control-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}

.control-nav-link {
  padding: 16px 18px;
  border-radius: 22px;
}

.control-nav-link strong {
  font-size: 0.95rem;
}

.control-nav-link span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.control-main {
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 30px 36px;
  scrollbar-gutter: stable;
}

.control-topbar {
  align-items: stretch;
}

.control-topbar-copy {
  display: grid;
  gap: 14px;
}

.control-topbar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-topbar-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 67, 117, 0.07);
  border: 1px solid rgba(15, 67, 117, 0.08);
  color: var(--brand-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.control-topbar-badge.is-strong {
  background: linear-gradient(135deg, rgba(15, 67, 117, 0.14), rgba(42, 125, 184, 0.14));
}

.control-topbar-tools {
  display: grid;
  gap: 10px;
  align-content: start;
  width: min(100%, 420px);
  min-width: min(340px, 100%);
  justify-self: end;
}

.control-topbar-search {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 22px;
  border: 1px solid rgba(20, 38, 68, 0.08);
  box-shadow: 0 16px 30px rgba(11, 26, 48, 0.08);
}

.control-session-panel {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(20, 38, 68, 0.08);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-sm);
}

.control-session-panel strong {
  color: var(--brand-deep);
}

.control-session-panel span {
  color: var(--muted);
  font-size: 0.84rem;
}

.workspace-card,
.control-metric-card,
.control-summary-card,
.format-card {
  border-color: rgba(20, 38, 68, 0.08);
  border-radius: 28px;
}

.workspace-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 253, 0.92));
}

.workspace-card-header {
  margin-bottom: 18px;
}

.workspace-kicker {
  background: rgba(15, 67, 117, 0.08);
  color: var(--brand);
}

.control-access-card {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 252, 0.94)),
    radial-gradient(circle at right top, rgba(63, 170, 157, 0.08), transparent 24%);
}

.control-checklist-access {
  grid-template-columns:
    minmax(240px, 1.35fr)
    minmax(230px, 1.1fr)
    minmax(210px, 0.9fr)
    minmax(230px, 1fr)
    minmax(220px, 1.1fr)
    auto;
}

.control-checklist-access .field select,
.control-checklist-access .field input {
  min-height: 56px;
  border-radius: 18px;
  background: rgba(249, 252, 255, 0.98);
}

.control-metric-card {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 253, 0.92));
}

.control-ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(320px, 0.66fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.control-ops-main,
.control-ops-sidebar {
  min-width: 0;
}

.control-ops-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 24px;
}

.control-order-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.control-order-stack > * {
  min-width: 0;
}

.control-session-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-progress-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 67, 117, 0.06), rgba(255, 255, 255, 0.5));
  border: 1px solid rgba(15, 67, 117, 0.08);
}

.control-progress-card strong {
  display: block;
  color: var(--brand-deep);
  font-size: 1.6rem;
}

.control-progress-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.control-checklist-card {
  padding-bottom: 16px;
}

.control-table-card {
  overflow: hidden;
}

.control-table-wrap {
  border-radius: 24px;
}

.control-table {
  background: rgba(255, 255, 255, 0.94);
}

.control-table thead th {
  background: linear-gradient(180deg, #eef4fb, #e7eff8);
  border-bottom: 1px solid rgba(20, 38, 68, 0.08);
}

.control-table tbody tr {
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.control-table tbody tr:hover {
  background: rgba(240, 247, 255, 0.84);
}

.control-table tbody tr.is-selected {
  background: rgba(220, 241, 255, 0.72);
  box-shadow: inset 4px 0 0 #1d77b8;
}

.control-table tbody tr[data-row-status="cerrado"] {
  background: rgba(238, 251, 245, 0.64);
}

.control-group-row td {
  padding: 18px 20px;
  background: linear-gradient(180deg, #ebf4ff, #e5effb);
}

.control-check-cell {
  min-width: 138px;
}

.control-quick-form {
  display: inline-flex;
}

.check-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.check-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 67, 117, 0.16);
  background: linear-gradient(180deg, #ffffff, #f0f5fb);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.check-toggle input:checked + span {
  color: #fff;
  border-color: rgba(21, 121, 90, 0.22);
  background: linear-gradient(135deg, #17996f, #0f7654);
  box-shadow: 0 16px 28px rgba(15, 118, 84, 0.2);
}

.check-toggle:hover span {
  transform: translateY(-1px);
}

.check-toggle.is-readonly span {
  opacity: 0.78;
}

.quick-file-field {
  min-height: 40px;
  padding: 10px 14px;
  border-style: solid;
  background: linear-gradient(180deg, #f8fbff, #eef5fd);
}

.quick-file-input {
  margin-top: 6px;
}

.evidence-chip {
  background: linear-gradient(180deg, #edf3f9, #e5edf6);
}

.evidence-chip.is-ready {
  background: linear-gradient(180deg, #def8ee, #cff4e4);
}

.control-detail-card,
.control-session-card {
  box-shadow: 0 18px 38px rgba(11, 26, 48, 0.08);
}

.control-detail-card--stacked {
  padding: 22px;
}

.control-advanced-panel {
  background: linear-gradient(180deg, rgba(236, 244, 252, 0.82), rgba(255, 255, 255, 0.9));
}

.control-file-card {
  border-radius: 20px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.control-file-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(11, 26, 48, 0.12);
}

.activity-item--static {
  border-radius: 18px;
}

@media (max-width: 1180px) {
  .login-shell,
  .control-ops-layout {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    min-height: auto;
  }

  .control-ops-sidebar {
    position: static;
  }

  .control-center {
    height: auto;
    overflow: visible;
  }

  .control-sidebar {
    position: static;
    height: auto;
    min-height: auto;
  }

  .control-sidebar-scroll {
    height: auto;
    overflow: visible;
    padding: 22px 18px 24px;
  }

  .control-main {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
}

@media (max-width: 980px) {
  .login-feature-grid,
  .login-rail,
  .control-session-summary {
    grid-template-columns: 1fr;
  }

  .control-topbar-tools {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .app-shell--auth {
    padding: 18px 14px 48px;
  }

  .login-showcase,
  .auth-panel--manager {
    padding: 22px 18px;
    border-radius: 26px;
  }

  .login-copy-block h1 {
    max-width: none;
    font-size: clamp(2.2rem, 11vw, 3rem);
  }

  .control-topbar-badges {
    width: 100%;
  }

  .control-topbar-badge {
    width: 100%;
    justify-content: center;
  }

  .control-sidebar-scroll {
    padding: 18px 14px 20px;
  }
}

.control-topbar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  justify-content: flex-end;
}

.control-logout-button {
  min-width: 136px;
  justify-content: center;
  white-space: nowrap;
}

.control-order-toolbar,
.control-order-overview,
.control-session-card--top {
  display: grid;
  gap: 18px;
}

.control-order-access {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.control-order-access--filters {
  grid-template-columns: minmax(320px, 1.3fr) minmax(260px, 1fr) auto;
}

.control-order-access--stacked {
  grid-template-columns: 1fr;
}

.control-order-access--projects {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.control-order-access--projects > * {
  min-width: 0;
}

.control-project-manager,
.control-template-stack {
  display: grid;
  gap: 18px;
}

.control-order-toolbar-summary {
  margin-top: -2px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.control-order-toolbar-summary article {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 108px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 67, 117, 0.1);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(238, 245, 253, 0.9));
}

.control-order-toolbar-summary strong {
  font-size: 1.55rem;
  color: var(--brand-deep);
}

.control-order-toolbar-summary span {
  color: var(--muted);
  line-height: 1.45;
}

.control-order-access--projects .action-row {
  grid-column: 1 / -1;
  align-self: end;
  justify-content: flex-start;
}

.control-order-toolbar .summary-note,
.control-project-manager .summary-note,
.control-compact-note {
  max-width: 92ch;
}

.control-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.control-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 67, 117, 0.07);
  border: 1px solid rgba(15, 67, 117, 0.08);
  color: var(--brand-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.control-filter-clear {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.control-filter-clear:hover {
  text-decoration: underline;
}

.control-compact-note {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(15, 67, 117, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 253, 0.92)),
    radial-gradient(circle at right top, rgba(69, 197, 178, 0.08), transparent 30%);
}

.control-compact-note strong {
  display: block;
  color: var(--brand-deep);
}

.control-compact-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.control-project-form-grid textarea {
  min-height: 112px;
}

.control-profile-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-profile-choice-group {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.control-profile-choice {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.control-profile-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.control-profile-choice__body {
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(15, 67, 117, 0.12);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(238, 245, 253, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.control-profile-choice__body strong,
.control-profile-choice__body span,
.control-profile-choice__body em,
.control-profile-choice__body i {
  min-width: 0;
}

.control-profile-choice__body strong {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--brand-deep);
  font-size: 0.96rem;
}

.control-profile-choice__body strong small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(29, 143, 103, 0.12);
  color: #0e6d4d;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.control-profile-choice__body span {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.control-profile-choice__body em,
.control-profile-choice__body i {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.control-profile-choice__body i {
  font-size: 0.8rem;
  font-weight: 700;
}

.control-profile-choice:hover .control-profile-choice__body {
  transform: translateY(-1px);
  border-color: rgba(15, 67, 117, 0.2);
  box-shadow: 0 18px 30px rgba(11, 26, 48, 0.08);
}

.control-profile-choice input:checked + .control-profile-choice__body {
  border-color: rgba(30, 98, 165, 0.28);
  background: linear-gradient(180deg, rgba(228, 240, 252, 0.98), rgba(214, 231, 249, 0.94));
  box-shadow:
    inset 0 0 0 2px rgba(30, 98, 165, 0.18),
    0 20px 34px rgba(24, 74, 128, 0.12);
}

.control-inline-warning {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(175, 106, 17, 0.18);
  background: linear-gradient(180deg, #fff6e7, #fff1da);
  color: #935b0d;
  font-size: 0.88rem;
  line-height: 1.5;
}

.control-project-manager-note {
  margin-top: -6px;
}

.control-order-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.control-inline-form {
  display: inline-flex;
}

.control-grid-three--workflow {
  margin-top: 0;
}

.control-step-card {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 252, 0.94)),
    radial-gradient(circle at right top, rgba(63, 170, 157, 0.06), transparent 24%);
}

.control-grid-three--orders {
  margin-top: 18px;
}

.control-report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.control-document-summary {
  margin-bottom: 18px;
}

.control-document-summary article {
  min-height: 108px;
}

.report-detail-shell {
  display: grid;
  gap: 18px;
  width: min(1480px, 100%);
  margin: 0 auto;
}

.report-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.report-detail-hero__copy {
  display: grid;
  gap: 10px;
}

.report-detail-hero__copy h1 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--brand-deep);
}

.report-detail-hero__copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.report-detail-hero__actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.report-detail-summary article {
  min-height: 108px;
}

.report-detail-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  align-items: start;
}

.report-file-pills {
  display: grid;
  gap: 12px;
}

.report-file-pill {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 67, 117, 0.1);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(238, 245, 253, 0.9));
}

.report-file-pill strong {
  color: var(--brand-deep);
}

.report-file-pill span,
.report-file-pill small {
  color: var(--muted);
  line-height: 1.45;
}

.report-preview-frame {
  width: 100%;
  min-height: 78vh;
  border: 1px solid rgba(20, 38, 68, 0.08);
  border-radius: 24px;
  background: #fff;
}

.control-format-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.control-format-shortcut {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(20, 38, 68, 0.08);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(238, 245, 252, 0.92));
}

.control-format-shortcut strong {
  display: block;
  color: var(--brand-deep);
}

.control-format-shortcut span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.resource-toolbar {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: end;
}

.control-library-context {
  display: grid;
  gap: 12px;
}

.control-library-context--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
}

.resource-toolbar--library {
  --library-control-height: 52px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.resource-toolbar--library .field,
.control-library-browser-tools {
  min-width: 0;
}

.resource-toolbar--library .field > span {
  min-height: 20px;
  line-height: 20px;
}

.resource-toolbar--library .field > input,
.resource-toolbar--library .field > select,
.resource-toolbar--library .equipment-multiselect > summary,
.resource-toolbar--library .btn-primary,
.resource-toolbar--library .btn-secondary {
  min-height: var(--library-control-height);
  margin: 0;
  border-radius: 14px;
  box-sizing: border-box;
}

.resource-toolbar--library .field > input,
.resource-toolbar--library .field > select {
  height: var(--library-control-height);
}

.resource-toolbar--library .equipment-multiselect {
  border-radius: 14px;
}

.resource-toolbar--library .equipment-multiselect > summary {
  min-height: calc(var(--library-control-height) - 2px);
  padding: 8px 14px;
}

/* Keep the compact trigger level with the OC; full serials remain in the list. */
.resource-toolbar--library [data-equipment-selection-preview] {
  display: none;
}

.resource-toolbar--library .equipment-multiselect > summary > span:first-child {
  flex: 1;
}

.resource-toolbar--library .equipment-multiselect > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-left: 2px;
  border-right: 2px solid #526b85;
  border-bottom: 2px solid #526b85;
  transform: translateY(-2px) rotate(45deg);
}

.resource-toolbar--library .equipment-multiselect[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

.resource-toolbar--library .equipment-multiselect[open] {
  position: relative;
  overflow: visible;
  z-index: 5;
}

.resource-toolbar--library .equipment-multiselect-panel {
  position: absolute;
  top: 100%;
  left: -1px;
  right: -1px;
  border: 1px solid #c8d5e3;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 16px 28px rgba(12, 45, 78, 0.14);
}

.control-library-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.control-library-browser-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--border-strong);
}

.resource-toolbar--library .btn-primary,
.resource-toolbar--library .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  padding: 12px 20px;
  line-height: 1.35;
  box-shadow: none;
}

.resource-toolbar .meta-tags {
  grid-column: 1 / -1;
}

.control-oc-workspace {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.control-session-card--top .control-session-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-session-strip {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.control-guidance-list--inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.control-guidance-list--inline article {
  min-height: 100%;
}

.control-table-wrap--checklist {
  max-height: min(72vh, 920px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.control-table-wrap--checklist::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.control-table-wrap--checklist::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 67, 117, 0.22);
}

.control-table-wrap--checklist::-webkit-scrollbar-track {
  background: rgba(228, 236, 246, 0.72);
}

.quick-file-button {
  display: inline-grid;
  gap: 2px;
  width: fit-content;
  min-width: 142px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 67, 117, 0.12);
  background: linear-gradient(135deg, #1e62a5, #184a80);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(24, 74, 128, 0.18);
}

.quick-file-button:hover {
  transform: translateY(-1px);
}

.quick-file-button__title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.quick-file-button small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
}

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

.control-detail-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.evidence-upload-field input[type="file"] {
  width: 100%;
  border: 1px dashed rgba(15, 67, 117, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #eef5fd);
  padding: 10px 12px;
  color: var(--muted);
}

.evidence-upload-field input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1e62a5, #184a80);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1360px) {
  .control-session-card--top .control-session-summary,
  .control-guidance-list--inline,
  .control-order-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-order-access--projects {
    grid-template-columns: 1fr;
  }

  .control-order-access--projects .action-row {
    justify-content: flex-start;
  }

  .report-detail-grid,
  .report-detail-hero {
    grid-template-columns: 1fr;
  }

  .report-detail-hero__actions {
    justify-items: start;
  }
}

@media (max-width: 1180px) {
  .control-order-access,
  .control-session-strip,
  .resource-toolbar,
  .control-topbar-actions,
  .control-library-context--wide,
  .control-detail-stack {
    grid-template-columns: 1fr;
  }

  .control-topbar-actions {
    display: grid;
  }

  .resource-toolbar--library .control-library-context--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-toolbar--library .control-library-context > .btn-primary {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .control-session-card--top .control-session-summary,
  .control-guidance-list--inline,
  .control-order-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .control-order-access,
  .control-library-context--wide,
  .control-session-card--top .control-session-summary,
  .control-guidance-list--inline,
  .control-order-summary-grid,
  .control-detail-stack {
    grid-template-columns: 1fr;
  }

  .control-order-toolbar-summary {
    grid-template-columns: 1fr;
  }

  .control-profile-choice-group {
    grid-template-columns: 1fr;
  }

  .control-order-actions,
  .control-report-actions,
  .control-topbar-actions {
    flex-direction: column;
  }

  .control-topbar-actions {
    display: flex;
  }

  .control-filter-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-preview-frame {
    min-height: 64vh;
  }

  .control-logout-button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .resource-toolbar--library .control-library-context--wide,
  .control-library-browser-tools {
    grid-template-columns: minmax(0, 1fr);
  }

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

/* Explorador documental: OC > serial > registros emitidos. */
.records-toolbar,
.records-explorer {
  min-width: 0;
}

.records-summary {
  margin: 18px 0;
}

.records-filter-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(190px, 0.8fr) minmax(260px, 1.2fr) auto;
  gap: 14px;
  align-items: end;
}

.records-filter-actions {
  flex-wrap: nowrap;
}

.records-explorer {
  display: grid;
  gap: 16px;
}

.records-order,
.records-serial,
.records-classification {
  overflow: hidden;
  border: 1px solid rgba(15, 67, 117, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

.records-order {
  border-radius: 26px;
  box-shadow: 0 20px 52px rgba(20, 52, 86, 0.1);
}

.records-order > summary,
.records-serial > summary,
.records-classification > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.records-order > summary::-webkit-details-marker,
.records-serial > summary::-webkit-details-marker,
.records-classification > summary::-webkit-details-marker {
  display: none;
}

.records-order > summary {
  min-height: 92px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(235, 244, 253, 0.98), rgba(255, 255, 255, 0.98));
}

.records-order[open] > summary {
  border-bottom: 1px solid rgba(15, 67, 117, 0.1);
}

.records-folder-mark {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 34px;
  border-radius: 8px 10px 10px 10px;
  background: linear-gradient(145deg, #2471b8, #124778);
  box-shadow: 0 9px 20px rgba(18, 71, 120, 0.2);
}

.records-folder-mark::before {
  position: absolute;
  top: -7px;
  left: 4px;
  width: 19px;
  height: 10px;
  border-radius: 6px 6px 0 0;
  background: #2471b8;
  content: "";
}

.records-summary-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 4px;
}

.records-summary-copy strong {
  color: var(--ink);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.records-summary-copy small,
.records-serial summary small {
  color: var(--muted);
}

.records-order-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.records-serial {
  border-radius: 20px;
  background: #f8fbff;
}

.records-serial > summary {
  justify-content: space-between;
  padding: 16px 18px;
  color: var(--ink);
}

.records-serial > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.records-document-list {
  display: grid;
  gap: 1px;
  border-top: 1px solid rgba(15, 67, 117, 0.1);
  background: rgba(15, 67, 117, 0.08);
}

.records-document {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(280px, auto);
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: #fff;
}

.records-document-main {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.records-document-main > strong,
.records-document-main > p {
  margin: 0;
  overflow-wrap: anywhere;
}

.records-document-code {
  width: fit-content;
  color: #155487;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.records-document-actions {
  justify-content: flex-end;
}

.records-classification {
  grid-column: 1 / -1;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf0, #fff);
}

.records-classification > summary {
  padding: 12px 16px;
  color: #81521b;
  font-weight: 800;
}

.records-classification-form {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(190px, 0.7fr) minmax(280px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 16px 16px;
}

.records-classification-form textarea {
  min-height: 52px;
}

.records-classification--create {
  border-color: rgba(16, 122, 85, 0.2);
  background: linear-gradient(180deg, #effbf6, #fff);
}

.records-classification--create > summary {
  color: #126746;
}

.records-classification-form--create {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.records-classification-form--create .records-justification-field {
  grid-column: 1 / -2;
}

.document-pending-notice {
  border: 1px solid rgba(190, 119, 31, 0.2);
  box-shadow: 0 16px 36px rgba(125, 78, 19, 0.08);
}

.detected-serial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  width: 100%;
  gap: 10px;
  margin: 12px 0 16px;
}

.detected-serial-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 67, 117, 0.13);
  border-radius: 16px;
  background: linear-gradient(145deg, #f2f8ff, #fff);
  color: var(--ink);
  text-decoration: none;
}

.detected-serial-card:hover {
  border-color: rgba(15, 67, 117, 0.3);
  transform: translateY(-1px);
}

.detected-serial-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.dashboard-operational-empty .action-row {
  justify-content: center;
}

@media (max-width: 1280px) {
  .records-filter-grid,
  .records-classification-form,
  .records-classification-form--create {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .records-search-field,
  .records-justification-field,
  .records-classification-form--create .records-justification-field {
    grid-column: 1 / -1;
  }

  .records-document {
    grid-template-columns: 1fr;
  }

  .records-document-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .records-filter-grid,
  .records-classification-form,
  .records-classification-form--create,
  .records-summary {
    grid-template-columns: 1fr;
  }

  .records-search-field,
  .records-justification-field,
  .records-classification-form--create .records-justification-field {
    grid-column: auto;
  }

  .records-order > summary {
    align-items: flex-start;
    padding: 18px;
  }

  .records-order > summary .workspace-kicker {
    display: none;
  }

  .records-order-body {
    padding: 10px;
  }

  .records-document {
    padding: 15px;
  }

  .records-document-actions,
  .records-filter-actions {
    width: 100%;
  }

  .records-document-actions a,
  .records-filter-actions > * {
    width: 100%;
  }

  .document-pending-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .document-pending-notice .btn-primary {
    width: 100%;
  }
}

/* Production UX: concise navigation, guided contexts and scalable capture forms. */
body {
  font-family: "IBM Plex Sans", "Segoe UI Variable", sans-serif;
}

h1,
h2,
h3,
.control-brand strong,
.control-metric-card strong {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
}

.control-sidebar-scroll {
  gap: 16px;
  padding: 18px 16px 24px;
}

.control-brand {
  padding: 14px;
}

.control-brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 17px;
}

.control-brand span {
  font-size: 0.82rem;
  line-height: 1.35;
}

.control-sidebar-session {
  gap: 5px;
  padding: 13px 15px;
  border-radius: 18px;
}

.control-sidebar-session .control-sidebar-kicker {
  padding: 4px 8px;
  font-size: 0.64rem;
}

.control-sidebar-session p {
  margin: 0;
  font-size: 0.82rem;
}

.control-nav {
  gap: 16px;
}

.control-nav-group {
  display: grid;
  gap: 7px;
}

.control-nav-section {
  display: block;
  padding: 0 10px;
  color: rgba(190, 211, 238, 0.68);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.control-nav-link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
}

.control-nav-link .control-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.control-nav-link .control-nav-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.control-nav-copy strong,
.control-nav-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-nav-copy strong {
  color: inherit;
  font-size: 0.87rem;
}

.control-nav-copy small {
  color: rgba(214, 228, 245, 0.65);
  font-size: 0.7rem;
}

.control-nav-link:hover .control-nav-copy small,
.control-nav-link.is-active .control-nav-copy small {
  color: rgba(255, 255, 255, 0.86);
}

.control-sidebar-summary {
  padding: 14px;
  border-radius: 20px;
}

.control-mini-metrics--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.control-mini-metrics--compact article {
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
}

.control-mini-metrics--compact span {
  margin-top: 2px;
  font-size: 0.7rem;
}

.control-panel-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.control-panel-summary::-webkit-details-marker,
.form-section-summary::-webkit-details-marker {
  display: none;
}

.control-panel-summary > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.control-panel-summary strong {
  color: var(--brand-deep);
  font-size: 1rem;
}

.control-panel-summary small {
  color: var(--muted);
  line-height: 1.4;
}

.control-panel-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d6dac, #154675);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.control-collapsible-body {
  display: grid;
  gap: 18px;
  padding-top: 20px;
  margin-top: 18px;
  border-top: 1px solid rgba(15, 67, 117, 0.1);
}

.control-create-order:not([open]),
.control-stage-activation:not([open]) {
  padding-block: 17px;
}

.control-stage-activation {
  margin-top: 18px;
}

.control-stage-form {
  margin-top: 0;
}

.control-workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 20px;
}

.control-workflow-steps article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(15, 67, 117, 0.1);
  border-radius: 17px;
  background: #f6f9fd;
}

.control-workflow-steps article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #e3ebf5;
  color: #58708d;
  font-weight: 900;
}

.control-workflow-steps article > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.control-workflow-steps strong,
.control-workflow-steps small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-workflow-steps strong {
  color: var(--brand-deep);
  font-size: 0.82rem;
}

.control-workflow-steps small {
  color: var(--muted);
  font-size: 0.7rem;
}

.control-workflow-steps article.is-current {
  border-color: rgba(24, 98, 163, 0.28);
  background: linear-gradient(145deg, #e9f3fe, #f8fbff);
}

.control-workflow-steps article.is-current > span {
  background: #1c65a3;
  color: #fff;
}

.control-workflow-steps article.is-complete > span {
  background: #187b57;
  color: #fff;
}

.control-empty-activation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  width: min(100%, 900px);
  margin-top: 14px;
}

.control-checklist-empty {
  align-items: flex-start;
  text-align: left;
}

.control-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin: 28px 2px 14px;
}

.control-section-heading span {
  color: #1a6b9f;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-section-heading h2 {
  margin: 4px 0 0;
  color: var(--brand-deep);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.control-section-heading > small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: right;
}

.control-section-heading--dashboard {
  margin-top: 4px;
}

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

.control-metric-grid--executive .control-metric-card {
  min-height: 164px;
  padding: 17px 18px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(11, 26, 48, 0.08);
}

.control-metric-grid--executive .control-metric-card > span {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1.3;
  text-transform: uppercase;
}

.control-metric-grid--executive .control-metric-card > span::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1d6dac;
}

.control-metric-grid--executive .control-metric-card strong {
  margin-top: 12px;
  font-size: 1.9rem;
}

.control-metric-grid--executive .control-metric-card small {
  margin-top: 9px;
  font-size: 0.72rem;
  line-height: 1.4;
}

.control-metric-grid--executive .control-metric-card.is-success > span,
.control-metric-grid--executive .control-metric-card.is-success strong {
  color: #147553;
}

.control-metric-grid--executive .control-metric-card.is-success > span::before {
  background: #1b9b6c;
}

.control-metric-grid--executive .control-metric-card.is-warning > span,
.control-metric-grid--executive .control-metric-card.is-warning strong {
  color: #a3620d;
}

.control-metric-grid--executive .control-metric-card.is-warning > span::before {
  background: #e49b29;
}

.control-metric-grid--executive .control-metric-card.is-neutral > span {
  color: #60728b;
}

.control-metric-grid--executive .control-metric-card.is-neutral > span::before {
  background: #8191a6;
}

.control-metric-grid--executive .control-metric-card.is-pdf > span {
  color: #126f77;
}

.control-metric-grid--executive .control-metric-card.is-pdf > span::before {
  background: #1f9b95;
}

.control-metric-grid--executive .control-metric-card.is-info > span::before {
  background: #2d7ec0;
}

.field select,
.structured-input {
  text-overflow: ellipsis;
}

.field select {
  cursor: pointer;
}

.field select option {
  color: #17263f;
  background: #fff;
}

.app-shell:not(.app-shell--control):not(.app-shell--auth) {
  width: min(100%, 1680px);
  padding-inline: clamp(14px, 2.2vw, 34px);
}

.workspace-layout {
  --workspace-sidebar-width: clamp(272px, 20vw, 330px);
  gap: clamp(16px, 2vw, 28px);
}

.form-section--capture {
  padding: 0;
  overflow: hidden;
}

.form-section-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(135deg, rgba(238, 246, 254, 0.95), rgba(255, 255, 255, 0.98));
}

.form-section--capture[open] .form-section-summary {
  border-bottom: 1px solid rgba(16, 53, 110, 0.1);
}

.form-section-summary > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.form-section-summary strong {
  color: var(--brand-deep);
  font-size: 1.05rem;
}

.form-section-summary small {
  color: var(--muted);
  line-height: 1.4;
}

.form-section-capture-body {
  padding: 16px;
}

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

.structured-field {
  gap: 9px;
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fbfe);
}

.structured-field-header {
  align-items: center;
}

.structured-field-header label {
  color: var(--brand-deep);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}

.structured-field-header small {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(16, 53, 110, 0.07);
  color: var(--brand);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.structured-field.is-wide {
  grid-column: 1 / -1;
}

.structured-field[data-field-kind="signature"],
.structured-field[data-field-kind="image"] {
  min-height: 210px;
}

.structured-input {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
}

.structured-textarea {
  min-height: 108px;
  resize: vertical;
}

.structured-check {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
}

.structured-check input {
  width: 42px;
  height: 42px;
  margin: 0;
  accent-color: #187b57;
  cursor: pointer;
}

.structured-check > span {
  display: grid;
  gap: 2px;
  color: var(--brand-deep);
}

.structured-check strong {
  font-size: 0.84rem;
  line-height: 1.35;
}

.structured-check small {
  color: var(--muted);
  font-size: 0.68rem;
}

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

.structured-upload {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.structured-upload-button {
  display: grid;
  place-content: center;
  gap: 4px;
  min-height: 128px;
  padding: 16px;
  border: 1px dashed rgba(18, 88, 147, 0.35);
  border-radius: 15px;
  background: linear-gradient(145deg, #eaf4fe, #f8fbff);
  color: #145487;
  text-align: center;
  cursor: pointer;
}

.structured-upload-button:hover {
  border-color: #1b6ca8;
  transform: translateY(-1px);
}

.structured-upload-button span {
  color: var(--muted);
  font-size: 0.7rem;
}

.structured-preview {
  min-height: 128px;
  margin: 0;
  border-radius: 15px;
}

.capture-progress {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(16, 53, 110, 0.09);
  border-radius: 16px;
  background: #f5f9fe;
}

.capture-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.74rem;
}

.capture-progress > div:first-child strong {
  color: var(--brand-deep);
}

.capture-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8f3;
}

.capture-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b6ca8, #19835d);
  transition: width 180ms ease;
}

@media (max-width: 1180px) {
  .control-center {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .control-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    min-height: 0;
  }

  .control-sidebar-scroll {
    display: flex;
    align-items: center;
    gap: 12px;
    height: auto;
    padding: 10px 14px;
    overflow: hidden;
  }

  .control-brand {
    flex: 0 0 auto;
    padding: 7px;
    border-radius: 15px;
  }

  .control-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .control-brand > div,
  .control-sidebar-session,
  .control-sidebar-summary,
  .control-nav-section {
    display: none;
  }

  .control-nav {
    display: flex;
    flex: 1;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .control-nav-group {
    display: contents;
  }

  .control-nav-link {
    flex: 0 0 auto;
    min-width: 170px;
    background: rgba(255, 255, 255, 0.05);
  }

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

  .control-main {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 22px clamp(16px, 3vw, 28px) 36px;
  }

  .control-topbar,
  .control-topbar-copy,
  .control-topbar-tools,
  .control-topbar-search,
  .control-topbar-actions,
  .control-metric-grid,
  .control-grid-two,
  .control-grid-three,
  .control-content-grid,
  .workspace-card {
    min-width: 0;
    max-width: 100%;
  }

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

  .control-topbar-tools {
    justify-self: stretch;
  }

  .control-metric-grid--executive {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .control-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-section-heading > small {
    text-align: left;
  }

  .control-workflow-steps,
  .control-empty-activation-form {
    grid-template-columns: 1fr;
  }

  .control-workflow-steps article {
    padding-block: 10px;
  }

  .workspace-sidebar .meta-list,
  .workspace-sidebar .meta-tags,
  .workspace-sidebar .metric-stack {
    display: none;
  }

  .workspace-sidebar-scroll {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .section-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .section-nav-link {
    flex: 0 0 min(260px, 82vw);
  }
}

@media (max-width: 767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .control-main {
    padding: 18px 14px 30px;
  }

  .control-topbar-copy h1 {
    font-size: clamp(1.9rem, 10vw, 2.55rem);
    line-height: 1;
  }

  .control-topbar-copy p,
  .workspace-card-header,
  .control-metric-card,
  .control-panel-summary,
  .summary-note {
    overflow-wrap: anywhere;
  }

  .control-topbar-badges {
    width: 100%;
    gap: 7px;
  }

  .control-topbar-badge {
    width: auto;
    min-height: 32px;
    padding: 7px 10px;
    justify-content: flex-start;
    font-size: 0.72rem;
  }

  .control-topbar-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .control-topbar-search input,
  .control-topbar-search button {
    width: 100%;
    max-width: 100%;
  }

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

  .control-logout-button {
    width: 100%;
    min-width: 0;
  }

  .control-metric-grid--executive {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-sidebar-scroll {
    padding: 8px 10px;
  }

  .control-nav-link {
    grid-template-columns: 30px minmax(0, 1fr);
    min-width: 145px;
    padding: 8px 10px;
  }

  .control-nav-link .control-nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .control-nav-copy small {
    display: none;
  }

  .control-panel-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .control-panel-summary .workspace-kicker {
    display: none;
  }

  .form-section-summary {
    align-items: flex-start;
    padding: 15px;
  }

  .form-section-summary .workspace-kicker {
    flex: 0 0 auto;
    font-size: 0.62rem;
  }

  .form-section-capture-body {
    padding: 10px;
  }

  .structured-grid,
  .structured-upload {
    grid-template-columns: 1fr;
  }

  .structured-field {
    padding: 12px;
  }

  .structured-field.is-wide {
    grid-column: auto;
  }

  .structured-upload-button {
    min-height: 82px;
  }

  .capture-progress > div:first-child {
    display: grid;
  }
}

@media (max-width: 560px) {
  .control-metric-grid,
  .control-metric-grid--executive {
    grid-template-columns: minmax(0, 1fr);
  }

  .control-metric-grid--executive .control-metric-card {
    min-height: 0;
  }
}

/* Executive quality view adapted from the approved QA/QC information architecture. */
.control-metric-grid--executive {
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
}

.executive-flow-card,
.executive-overview-grid,
.executive-detail-panel {
  margin-top: 18px;
}

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

.executive-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(16, 53, 110, 0.1);
  border-left: 4px solid #8191a6;
  border-radius: 17px;
  background: linear-gradient(145deg, #f8fbff, #fff);
}

.executive-flow-step.is-success { border-left-color: #18845e; }
.executive-flow-step.is-info { border-left-color: #2677b7; }
.executive-flow-step.is-warning { border-left-color: #d48a1d; }
.executive-flow-step.is-danger { border-left-color: #c74740; }

.executive-flow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #e8eff7;
  color: #183e69;
  font-weight: 900;
}

.executive-flow-step.is-success .executive-flow-number { background: #dcf5eb; color: #147553; }
.executive-flow-step.is-info .executive-flow-number { background: #e1effc; color: #195f98; }
.executive-flow-step.is-warning .executive-flow-number { background: #fff0d4; color: #9b5f0d; }
.executive-flow-step.is-danger .executive-flow-number { background: #ffe5e1; color: #ae3732; }

.executive-flow-step > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.executive-flow-step strong {
  color: var(--brand-deep);
  font-size: 0.9rem;
}

.executive-flow-step small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.executive-flow-step > b {
  max-width: 120px;
  color: var(--brand);
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: right;
}

.executive-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.executive-progress-list,
.executive-alert-list {
  display: grid;
  gap: 9px;
}

.executive-progress-list > article {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.2fr) minmax(82px, auto);
  gap: 13px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(16, 53, 110, 0.08);
}

.executive-progress-list > article:last-child {
  border-bottom: 0;
}

.executive-progress-list > article > div:first-child,
.executive-progress-list > article > div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.executive-progress-list strong,
.executive-progress-list b {
  color: var(--brand-deep);
}

.executive-progress-list span,
.executive-progress-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-progress-list > article > div:last-child {
  justify-items: end;
}

.executive-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e9f2;
}

.executive-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f6fae, #1a8a63);
}

.executive-alert-list > a {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid rgba(16, 53, 110, 0.09);
  border-radius: 15px;
  background: #f8fbff;
  color: inherit;
  text-decoration: none;
}

.executive-alert-list > a:hover {
  border-color: rgba(16, 83, 139, 0.28);
  background: #eef6ff;
}

.executive-alert-list > a > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.executive-alert-list strong {
  color: var(--brand-deep);
  font-size: 0.84rem;
}

.executive-alert-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-alert-list b {
  color: var(--brand);
  font-size: 0.72rem;
}

.executive-alert-indicator {
  width: 9px;
  height: 34px;
  border-radius: 999px;
  background: #8191a6;
}

.executive-alert-indicator.is-success { background: #18845e; }
.executive-alert-indicator.is-info { background: #2677b7; }
.executive-alert-indicator.is-warning { background: #d48a1d; }
.executive-alert-indicator.is-danger { background: #c74740; }

.control-empty-state--compact {
  min-height: 150px;
  padding: 20px;
}

.executive-detail-panel {
  overflow: hidden;
  border: 1px solid rgba(16, 53, 110, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.executive-detail-panel > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.executive-detail-panel > summary::-webkit-details-marker {
  display: none;
}

.executive-detail-panel > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.executive-detail-panel > summary strong {
  color: var(--brand-deep);
}

.executive-detail-panel > summary small {
  color: var(--muted);
}

.executive-detail-panel[open] > summary {
  border-bottom: 1px solid rgba(16, 53, 110, 0.1);
  background: #f4f8fd;
}

.executive-detail-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.executive-detail-body > .workspace-card,
.executive-detail-body > .control-grid-two,
.executive-detail-body > .control-grid-three,
.executive-detail-body > .control-section-heading {
  margin: 0;
}

.section-nav-search {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.section-nav-search > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-nav-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(16, 53, 110, 0.14);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--text);
  font: inherit;
}

.section-nav-search input:focus {
  outline: none;
  border-color: rgba(21, 103, 166, 0.5);
  box-shadow: 0 0 0 3px rgba(21, 103, 166, 0.08);
}

.section-nav-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.section-nav-actions button {
  min-height: 34px;
  border: 1px solid rgba(16, 53, 110, 0.11);
  border-radius: 10px;
  background: #eef5fc;
  color: var(--brand);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.section-nav-actions button:hover {
  border-color: rgba(16, 82, 138, 0.28);
  background: #e3f0fb;
}

.form-section--capture {
  scroll-margin-top: 20px;
}

.form-section--capture:not([open]) {
  box-shadow: none;
}

.form-section--capture:not([open]) .form-section-summary {
  background: linear-gradient(145deg, #f7faff, #fff);
}

.form-section-summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #e7eef7;
  color: var(--brand);
  font-size: 1rem;
  font-weight: 900;
}

.form-section--capture[open] .form-section-summary::after {
  content: "−";
  background: #dcecf9;
}

.form-section-summary .workspace-kicker {
  margin-left: auto;
}

.structured-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
}

.structured-field.is-compact {
  min-height: 70px;
  justify-content: center;
  padding: 10px 12px;
}

.structured-check {
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 44px;
}

.structured-check input {
  width: 40px;
  height: 40px;
}

.structured-check > span {
  align-content: center;
}

.structured-check strong {
  font-size: 0.82rem;
}

.workspace-main .report-form {
  width: 100%;
  min-width: 0;
}

@media (min-width: 1680px) {
  .app-shell:not(.app-shell--control):not(.app-shell--auth) {
    width: min(100%, 1860px);
  }

  .workspace-layout {
    --workspace-sidebar-width: 330px;
  }

  .structured-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  }
}

@media (max-width: 1080px) {
  .executive-flow,
  .executive-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .executive-flow-step {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 13px;
  }

  .executive-flow-number {
    width: 38px;
    height: 38px;
  }

  .executive-flow-step > b {
    grid-column: 2;
    max-width: none;
    text-align: left;
  }

  .executive-progress-list > article {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .executive-progress-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .executive-detail-panel > summary {
    align-items: flex-start;
  }

  .executive-detail-panel > summary .workspace-kicker {
    display: none;
  }

  .executive-detail-body {
    padding: 10px;
  }

  .form-section-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .form-section-summary .workspace-kicker {
    display: none;
  }

  .form-section-summary::after {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Agenda compartida Reportes - Ingenieria */
.control-metric-grid--inspection {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.inspection-workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(560px, 1.28fr);
  gap: 22px;
  align-items: start;
}

.inspection-create-card {
  position: sticky;
  top: 22px;
}

.inspection-create-form .field-grid {
  margin-top: 18px;
}

.inspection-directory-action,
.inspection-retry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  margin-top: 18px;
  border-top: 1px solid rgba(16, 53, 110, 0.1);
}

.inspection-directory-action small {
  color: var(--muted);
  font-weight: 700;
}

.inspection-agenda-column,
.inspection-agenda {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.inspection-filter-bar {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.55fr) auto auto;
}

.inspection-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  padding: 0;
  overflow: hidden;
  border-left: 4px solid #2473b9;
}

.inspection-card.is-overdue {
  border-left-color: #bd6b08;
}

.inspection-card-date {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100%;
  padding: 22px 12px;
  background: linear-gradient(160deg, #eaf3fd 0%, #f7faff 100%);
  color: var(--brand-deep);
  text-align: center;
}

.inspection-card-date strong {
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 0.9;
}

.inspection-card-date span {
  margin-top: 7px;
  color: #1b6098;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.inspection-card-date small {
  margin-top: 10px;
  font-weight: 800;
}

.inspection-card-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 22px 22px 22px 0;
}

.inspection-card-heading,
.inspection-card-delivery,
.inspection-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.inspection-card-heading h3 {
  margin: 7px 0 0;
  color: var(--brand-deep);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

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

.inspection-card-context span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(16, 53, 110, 0.09);
  border-radius: 12px;
  background: #f7faff;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.inspection-card-context strong {
  color: var(--brand-deep);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inspection-card-notes {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}

.inspection-card-delivery {
  justify-content: flex-start;
  align-items: center;
}

.inspection-card-delivery small {
  color: var(--muted);
}

.inspection-card-actions {
  justify-content: flex-start;
  align-items: center;
}

.inspection-card-actions form,
.inspection-card-actions details,
.inspection-card-actions summary {
  margin: 0;
}

.inspection-card-actions summary {
  list-style: none;
  cursor: pointer;
}

.inspection-card-actions summary::-webkit-details-marker {
  display: none;
}

.inspection-history {
  display: grid;
  gap: 9px;
  min-width: min(460px, 76vw);
  max-height: 280px;
  padding: 12px;
  margin-top: 9px;
  overflow: auto;
  border: 1px solid rgba(16, 53, 110, 0.12);
  border-radius: 14px;
  background: #f7faff;
}

.inspection-history article {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(140px, 1fr) auto;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(16, 53, 110, 0.08);
}

.inspection-history article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.inspection-history article p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.inspection-cancel form {
  display: grid;
  gap: 10px;
  width: min(420px, 76vw);
  padding: 14px;
  margin-top: 9px;
  border: 1px solid rgba(179, 48, 48, 0.18);
  border-radius: 14px;
  background: #fff9f8;
}

@media (max-width: 1460px) {
  .control-metric-grid--inspection {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inspection-workspace-grid {
    grid-template-columns: minmax(330px, 0.72fr) minmax(480px, 1.28fr);
  }
}

@media (max-width: 1180px) {
  .inspection-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .inspection-create-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .control-metric-grid--inspection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .control-metric-grid--inspection,
  .inspection-card-context,
  .inspection-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .inspection-card-date {
    grid-template-columns: auto auto auto;
    justify-content: start;
    gap: 8px;
    min-height: 0;
    padding: 13px 16px;
  }

  .inspection-card-date strong,
  .inspection-card-date span,
  .inspection-card-date small {
    margin: 0;
    align-self: baseline;
  }

  .inspection-card-date strong {
    font-size: 1.45rem;
  }

  .inspection-card-main {
    padding: 4px 16px 18px;
  }

  .inspection-directory-action,
  .inspection-retry {
    align-items: stretch;
    flex-direction: column;
  }

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

/* Responsive navigation and compact operational layouts. */
.control-center {
  --control-sidebar-width: clamp(272px, 20vw, 306px);
  grid-template-columns: var(--control-sidebar-width) minmax(0, 1fr);
}

.control-mobile-bar,
.control-drawer-header,
.workspace-mobile-toolbar,
.workspace-drawer-header,
.fat-index-mobile-toolbar,
.fat-index-drawer-header {
  display: none;
}

.responsive-drawer-backdrop {
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 18, 38, 0.58);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.responsive-drawer-backdrop[hidden] {
  display: none !important;
}

body.has-responsive-drawer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 1180px) {
  body.responsive-drawers-ready .control-center {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  body.responsive-drawers-ready .control-mobile-bar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    min-width: 0;
    min-height: 64px;
    padding: 9px clamp(12px, 2.4vw, 22px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(105deg, #0d2444, #123d70);
    box-shadow: 0 12px 28px rgba(5, 19, 38, 0.2);
    color: #fff;
  }

  .control-mobile-bar > img {
    width: 44px;
    height: 44px;
    padding: 6px;
    border-radius: 12px;
    background: #fff;
    object-fit: contain;
  }

  .control-mobile-context {
    display: grid;
    gap: 1px;
    min-width: 0;
  }

  .control-mobile-context small,
  .control-mobile-context strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .control-mobile-context small {
    color: rgba(219, 233, 249, 0.72);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .control-mobile-context strong {
    color: #fff;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    font-size: 0.94rem;
  }

  .control-mobile-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font: 800 0.78rem "IBM Plex Sans", sans-serif;
    cursor: pointer;
  }

  .control-mobile-menu-icon,
  .control-mobile-menu-icon::before,
  .control-mobile-menu-icon::after {
    display: block;
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .control-mobile-menu-icon {
    position: relative;
  }

  .control-mobile-menu-icon::before,
  .control-mobile-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .control-mobile-menu-icon::before { top: -5px; }
  .control-mobile-menu-icon::after { top: 5px; }

  body.responsive-drawers-ready .control-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
  }

  body.responsive-drawers-ready .control-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    display: grid;
    width: min(370px, calc(100vw - 42px));
    min-width: 0;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    transform: translate3d(-104%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    box-shadow: 24px 0 50px rgba(4, 15, 31, 0.28);
    transition: transform 220ms ease, visibility 220ms ease;
  }

  body.responsive-drawers-ready .control-sidebar.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  body.responsive-drawers-ready .control-sidebar-scroll {
    display: grid;
    gap: 14px;
    align-content: start;
    align-items: stretch;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-width: 0;
    max-width: none;
    padding: 14px 14px 28px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  body.responsive-drawers-ready .control-drawer-header {
    position: sticky;
    top: -14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -14px -14px 0;
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 31, 58, 0.97);
  }

  .control-drawer-header > span {
    display: grid;
    gap: 2px;
  }

  .control-drawer-header small {
    color: rgba(210, 228, 247, 0.66);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .control-drawer-header strong { color: #fff; }

  .control-drawer-header button,
  .workspace-drawer-header button,
  .fat-index-drawer-header button {
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
  }

  body.responsive-drawers-ready .control-brand {
    display: flex;
    flex: 0 0 auto;
    padding: 12px;
  }

  body.responsive-drawers-ready .control-brand > div { display: block; }
  body.responsive-drawers-ready .control-sidebar-session,
  body.responsive-drawers-ready .control-sidebar-summary { display: grid; }
  body.responsive-drawers-ready .control-nav-section { display: block; }

  body.responsive-drawers-ready .control-nav {
    display: grid;
    flex: none;
    gap: 15px;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  body.responsive-drawers-ready .control-nav-group {
    display: grid;
    gap: 6px;
  }

  body.responsive-drawers-ready .control-nav-link {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
  }

  body.responsive-drawers-ready .control-nav-copy small { display: block; }

  body.responsive-drawers-ready .control-main {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    overflow: visible;
    padding-top: clamp(18px, 2.8vw, 28px);
  }
}

@media (max-width: 1080px) {
  body.responsive-drawers-ready .workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  body.responsive-drawers-ready .workspace-mobile-toolbar {
    position: sticky;
    top: 8px;
    z-index: 45;
    display: block;
    min-width: 0;
  }

  .workspace-mobile-toolbar > button,
  .fat-index-mobile-toolbar > button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid rgba(17, 67, 112, 0.18);
    border-radius: 16px;
    background: rgba(248, 252, 255, 0.96);
    box-shadow: 0 12px 28px rgba(10, 35, 66, 0.14);
    color: var(--brand-deep);
    text-align: left;
    cursor: pointer;
    backdrop-filter: blur(14px);
  }

  .workspace-mobile-toolbar button > span,
  .fat-index-mobile-toolbar button > span {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .workspace-mobile-toolbar small,
  .fat-index-mobile-toolbar small {
    color: var(--brand);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .workspace-mobile-toolbar strong,
  .fat-index-mobile-toolbar strong {
    overflow: hidden;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-mobile-toolbar b,
  .fat-index-mobile-toolbar b {
    padding: 7px 9px;
    border-radius: 999px;
    background: #e5eef8;
    color: #245177;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  body.responsive-drawers-ready .workspace-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 89;
    display: block;
  }

  body.responsive-drawers-ready .workspace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    display: grid;
    width: min(390px, calc(100vw - 30px));
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-right: 1px solid #d4e0ec;
    background: #edf3f8;
    box-shadow: 24px 0 50px rgba(4, 20, 39, 0.24);
    transform: translate3d(-104%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 220ms ease, visibility 220ms ease;
  }

  body.responsive-drawers-ready .workspace-sidebar.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  body.responsive-drawers-ready .workspace-sidebar-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-content: start;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: 12px 12px 28px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.responsive-drawers-ready .workspace-drawer-header {
    position: sticky;
    top: -12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -12px -12px 0;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: #123b68;
    color: #fff;
  }

  .workspace-drawer-header > span,
  .fat-index-drawer-header > span {
    display: grid;
    gap: 2px;
  }

  .workspace-drawer-header small,
  .fat-index-drawer-header small {
    color: rgba(224, 237, 249, 0.72);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.responsive-drawers-ready .workspace-sidebar .meta-list,
  body.responsive-drawers-ready .workspace-sidebar .meta-tags,
  body.responsive-drawers-ready .workspace-sidebar .metric-stack { display: grid; }

  body.responsive-drawers-ready .workspace-sidebar .section-nav {
    display: grid;
    gap: 7px;
    overflow: visible;
  }

  body.responsive-drawers-ready .workspace-sidebar .section-nav-link {
    width: 100%;
    min-width: 0;
    flex: none;
  }
}

@media (max-width: 980px) {
  body.responsive-drawers-ready .fat-document-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  body.responsive-drawers-ready .fat-index-mobile-toolbar {
    position: sticky;
    top: 8px;
    z-index: 45;
    display: block;
    min-width: 0;
  }

  body.responsive-drawers-ready .fat-index-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 89;
    display: block;
  }

  body.responsive-drawers-ready .fat-section-index {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(390px, calc(100vw - 30px));
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    min-height: 0;
    border: 0;
    border-radius: 0 20px 20px 0;
    background: #f4f8fb;
    box-shadow: 24px 0 50px rgba(4, 20, 39, 0.24);
    transform: translate3d(-104%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 220ms ease, visibility 220ms ease;
  }

  body.responsive-drawers-ready .fat-section-index.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  body.responsive-drawers-ready .fat-index-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    background: #123b68;
    color: #fff;
  }

  body.responsive-drawers-ready .fat-section-index nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

@media (max-width: 820px) {
  .control-table--orders {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
  }

  .control-table--orders thead { display: none; }

  .control-table--orders tbody {
    display: grid;
    gap: 12px;
    width: 100%;
  }

  .control-table--orders tr {
    display: grid;
    width: 100%;
    min-width: 0;
    padding: 5px 12px;
    border: 1px solid #d8e3ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(12, 40, 72, 0.06);
  }

  .control-table--orders td {
    display: grid;
    grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    min-width: 0;
    padding: 11px 0;
    border: 0;
    border-bottom: 1px solid #e5ebf1;
    white-space: normal;
  }

  .control-table--orders td:last-child { border-bottom: 0; }

  .control-table--orders td::before {
    content: attr(data-label);
    color: #58708c;
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.075em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .control-table--orders td[colspan] {
    display: block;
  }

  .control-table--orders td[colspan]::before { display: none; }

  .control-table--orders .control-table-meta,
  .control-table--orders .meta-tags,
  .control-table--orders .action-row,
  .control-table--orders .control-report-actions {
    min-width: 0;
    max-width: 100%;
  }

  .control-table--orders .action-row,
  .control-table--orders .control-report-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .control-table--orders .action-row > *,
  .control-table--orders .control-report-actions > * {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .control-table-card:has(.control-table--orders) .control-table-wrap {
    overflow: visible;
    border-radius: 0;
  }
}

@media (max-width: 720px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  .control-main {
    padding: 14px 10px 28px;
  }

  .control-topbar {
    gap: 12px;
    margin-bottom: 14px;
  }

  .control-topbar-copy {
    gap: 9px;
  }

  .control-topbar-copy h1 {
    font-size: clamp(1.65rem, 8.5vw, 2.2rem);
    line-height: 1.04;
  }

  .control-topbar-copy p { display: none; }

  .control-topbar-badges {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .control-topbar-badges::-webkit-scrollbar { display: none; }

  .control-topbar-badge {
    flex: 0 0 auto;
    width: auto;
    min-height: 30px;
    padding: 6px 9px;
    font-size: 0.68rem;
  }

  .control-topbar-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px;
    border-radius: 16px;
  }

  .control-topbar-search input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .control-topbar-search button {
    width: auto;
    min-width: 86px;
    min-height: 44px;
    padding-inline: 13px;
  }

  .control-topbar-actions {
    display: flex;
    justify-content: flex-end;
  }

  .control-session-panel { display: none; }

  .control-logout-button {
    width: auto;
    min-height: 42px;
  }

  .workspace-card,
  .control-metric-card,
  .format-card,
  .report-summary,
  .form-section {
    border-radius: 19px;
  }

  .workspace-card { padding: 15px; }

  .workspace-card-header {
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 13px;
  }

  .control-section-heading {
    margin: 20px 2px 10px;
  }

  .control-metric-grid--executive {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .control-metric-grid--executive .control-metric-card {
    min-height: 0;
    padding: 13px;
    border-radius: 16px;
  }

  .control-metric-grid--executive .control-metric-card strong {
    margin-top: 8px;
    font-size: 1.55rem;
  }

  .control-metric-grid--executive .control-metric-card small {
    margin-top: 6px;
    line-height: 1.35;
  }

  .notice-banner {
    align-items: stretch;
    flex-direction: column;
    padding: 15px;
    border-radius: 18px;
  }

  .notice-actions,
  .action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .notice-actions > *,
  .action-row > * {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .app-shell:not(.app-shell--control):not(.app-shell--auth) {
    width: 100%;
    padding: 10px 8px 48px;
  }

  .hero-panel {
    padding: 15px;
    border-radius: 20px;
  }

  .hero-actions {
    display: grid;
    gap: 9px;
    align-items: stretch;
    margin-bottom: 14px;
  }

  .hero-auth-meta {
    display: flex;
    width: 100%;
    gap: 7px;
  }

  .hero-auth-meta > * {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
  }

  .hero-header {
    align-items: flex-start;
    gap: 12px;
  }

  .hero-logo {
    flex: 0 0 68px;
    width: 68px;
    max-width: 68px;
  }

  .hero-copy { min-width: 0; }

  .hero-copy h1 {
    font-size: clamp(1.5rem, 7.5vw, 2.05rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .hero-copy p {
    margin-top: 8px;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .hero-metrics { display: none; }

  .template-header-strip {
    margin-top: 14px;
    padding: 10px;
    border-radius: 16px;
  }

  .template-header-visual {
    max-height: 190px;
    border-radius: 12px;
    object-fit: contain;
  }

  .workspace-mobile-toolbar,
  .fat-index-mobile-toolbar {
    top: 6px;
  }

  .form-section-summary {
    padding: 13px;
  }

  .form-section-summary strong { font-size: 0.94rem; }

  .structured-field[data-field-kind="signature"],
  .structured-field[data-field-kind="image"] {
    min-height: 0;
  }

  .signature-pad canvas,
  .fat-signature-pad canvas {
    width: 100%;
    max-width: 100%;
    height: 120px;
  }

  .app-shell--fat {
    width: 100%;
    padding: 8px 7px 48px;
  }

  .fat-page-hero {
    gap: 16px;
    padding: 18px 15px;
    border-radius: 18px;
  }

  .fat-page-hero h1 {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .fat-page-actions,
  .fat-page-actions > * {
    width: 100%;
    text-align: center;
  }

  .fat-technical-table { overflow: visible; }

  .fat-technical-row {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .fat-row-label {
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid #e2e9f0;
    background: #f6f9fc;
  }

  .fat-row-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .fat-control-field {
    width: 100%;
    min-width: 0;
  }

  .fat-check-choice,
  .fat-check-choice span {
    width: 100%;
  }

  .fat-check-choice span { justify-content: center; }

  .fat-section-card > summary {
    gap: 10px;
    padding: 14px 12px;
  }

  .fat-version-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .fat-version-list article > div { grid-column: auto; }

  .fat-version-list article > a {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body.responsive-drawers-ready .control-mobile-bar {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 7px 9px;
  }

  .control-mobile-bar > img {
    width: 40px;
    height: 40px;
  }

  .control-mobile-menu-button {
    min-height: 40px;
    padding-inline: 10px;
  }

  body.responsive-drawers-ready .control-sidebar,
  body.responsive-drawers-ready .workspace-sidebar,
  body.responsive-drawers-ready .fat-section-index {
    width: min(360px, calc(100vw - 32px));
  }

  .control-topbar-search button {
    min-width: 76px;
    padding-inline: 10px;
  }

  .control-table--orders td {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

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

  .fat-document-strip,
  .fat-metric-grid,
  .dashboard-fat-bi__metrics,
  .dashboard-fat-bi__recent {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .control-sidebar,
  .workspace-sidebar,
  .fat-section-index {
    transition: none !important;
  }
}

/* Quality FAT workspace */
.app-shell--fat {
  width: min(100%, 1680px);
  padding: 22px clamp(14px, 2vw, 34px) 80px;
}

.fat-launch-shell,
.fat-form-shell {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.fat-page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid rgba(26, 73, 125, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(115deg, rgba(8, 43, 84, 0.98), rgba(18, 79, 132, 0.94)),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 26%);
  color: #fff;
  box-shadow: 0 22px 48px rgba(12, 44, 78, 0.18);
  overflow: hidden;
}

.fat-page-hero > div:first-child {
  min-width: 0;
}

.fat-page-hero h1 {
  margin: 5px 0 8px;
  font: 700 clamp(2rem, 4vw, 4.2rem)/0.98 "Space Grotesk", sans-serif;
  letter-spacing: -0.05em;
}

.fat-page-hero p {
  max-width: 850px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

.fat-page-hero .workspace-kicker {
  color: #cfe6ff;
}

.fat-page-hero .btn-secondary {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.fat-page-hero .status-pill {
  border-color: rgba(255, 255, 255, 0.2);
}

.fat-page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

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

.fat-metric-grid article,
.fat-document-strip article {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid rgba(22, 61, 105, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(14, 41, 74, 0.07);
}

.fat-metric-grid span,
.fat-document-strip span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.fat-metric-grid strong {
  margin: 5px 0;
  color: var(--brand-deep);
  font: 700 2rem/1 "Space Grotesk", sans-serif;
}

.fat-metric-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.fat-launch-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.75fr) minmax(560px, 1.25fr);
  gap: 18px;
  align-items: start;
}

.fat-start-card,
.fat-explorer-card {
  min-width: 0;
  padding: clamp(20px, 2.4vw, 32px);
}

.fat-start-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.fat-ownership-note {
  margin-top: 24px;
  padding: 18px;
  border-left: 4px solid #277a70;
  border-radius: 4px 16px 16px 4px;
  background: #edf8f5;
}

.fat-ownership-note p {
  margin: 6px 0 0;
  color: #41635f;
  line-height: 1.55;
}

.fat-folder-explorer {
  display: grid;
  gap: 10px;
  max-height: 720px;
  padding-right: 6px;
  overflow: auto;
  scrollbar-color: #9fb6ce transparent;
}

.fat-folder-explorer details {
  border: 1px solid #d9e4ee;
  border-radius: 16px;
  background: #f9fbfd;
  overflow: hidden;
}

.fat-folder-explorer summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.fat-folder-explorer summary::-webkit-details-marker,
.fat-section-card > summary::-webkit-details-marker {
  display: none;
}

.fat-folder-explorer summary span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.fat-folder-explorer summary small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fat-folder-explorer summary b {
  color: var(--muted);
  font-size: 0.78rem;
}

.fat-folder-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border-radius: 8px 8px 5px 5px;
  background: #174f88;
  color: #fff;
  font: 700 0.72rem "Space Grotesk", sans-serif;
}

.fat-folder-icon.is-serial {
  background: #5b7897;
}

.fat-folder-serials,
.fat-folder-records {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px 28px;
}

.fat-folder-records article {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(90px, 0.5fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #fff;
}

.fat-folder-records article > div:first-child {
  display: grid;
  min-width: 0;
}

.fat-folder-records article > div:first-child strong,
.fat-folder-records article > div:first-child span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fat-folder-records article > div:first-child span {
  color: var(--muted);
  font-size: 0.78rem;
}

.fat-record-progress {
  height: 8px;
  border-radius: 999px;
  background: #e3ebf4;
  overflow: hidden;
}

.fat-record-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16805d, #45ad88);
  transition: width 240ms ease;
}

.fat-document-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 0.75fr)) minmax(260px, 1.35fr);
  gap: 10px;
}

.fat-document-strip article strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.fat-progress-summary {
  gap: 8px;
}

.fat-progress-summary > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.fat-progress-summary > div:first-child strong {
  color: #167251;
  font: 700 1.45rem "Space Grotesk", sans-serif;
}

.fat-progress-summary small {
  color: var(--muted);
}

.fat-document-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.fat-section-index {
  position: sticky;
  top: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 36px);
  min-width: 0;
  border: 1px solid rgba(20, 59, 103, 0.16);
  border-radius: 22px;
  background: rgba(248, 251, 254, 0.96);
  box-shadow: 0 16px 34px rgba(12, 40, 73, 0.11);
  overflow: hidden;
}

.fat-section-index__header {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-bottom: 1px solid #dbe5ef;
  background: #fff;
}

.fat-section-index__header input {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #cbd9e7;
  border-radius: 11px;
  background: #f8fafc;
}

.fat-section-index nav {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-color: #9db4ca transparent;
}

.fat-section-index nav a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  color: #284966;
  text-decoration: none;
}

.fat-section-index nav a:hover,
.fat-section-index nav a.is-active {
  background: #e4effa;
  color: #103f70;
}

.fat-section-index nav a > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #d9e7f5;
  font: 700 0.72rem "Space Grotesk", sans-serif;
}

.fat-section-index nav a strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fat-section-index nav a b {
  color: #56718c;
  font-size: 0.72rem;
}

.fat-sections-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.fat-section-card {
  min-width: 0;
  padding: 0;
  scroll-margin-top: 18px;
  overflow: hidden;
}

.fat-section-card > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, #f7fafc, #fff);
}

.fat-section-card[open] > summary {
  border-bottom: 1px solid #dce6f0;
}

.fat-section-card > summary h2,
.fat-section-card > summary p {
  margin: 0;
}

.fat-section-card > summary h2 {
  font-size: 1.02rem;
}

.fat-section-card > summary p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

.fat-section-card > summary > strong {
  color: #1b7254;
  font: 700 1rem "Space Grotesk", sans-serif;
}

.fat-section-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #123f70;
  color: #fff;
  font: 700 0.8rem "Space Grotesk", sans-serif;
}

.fat-section-form {
  min-width: 0;
}

.fat-technical-table {
  min-width: 0;
  overflow-x: auto;
}

.fat-technical-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.7fr);
  min-width: 680px;
  border-bottom: 1px solid #e2e9f0;
}

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

.fat-technical-row.is-complete {
  background: rgba(232, 247, 240, 0.42);
}

.fat-technical-row.is-optional {
  background: rgba(247, 249, 251, 0.75);
}

.fat-row-label {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px 16px;
  border-right: 1px solid #e2e9f0;
}

.fat-row-label > span {
  color: #64809a;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fat-row-label strong {
  font-size: 0.84rem;
  line-height: 1.35;
}

.fat-row-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
}

.fat-control-field {
  display: grid;
  flex: 1 1 190px;
  gap: 5px;
  min-width: 150px;
}

.fat-control-field.is-wide {
  flex-basis: 100%;
}

.fat-control-field > span {
  color: #5c7188;
  font-size: 0.72rem;
  font-weight: 700;
}

.fat-control-field input,
.fat-control-field select,
.fat-control-field textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #c9d7e4;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.fat-check-choice {
  position: relative;
  cursor: pointer;
}

.fat-check-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fat-check-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #bfd0df;
  border-radius: 999px;
  background: #f6f9fc;
  color: #385570;
  font-size: 0.8rem;
  font-weight: 800;
  transition: 160ms ease;
}

.fat-check-choice input:checked + span {
  border-color: #16805d;
  background: #def4ea;
  color: #106448;
  box-shadow: inset 0 0 0 1px #16805d;
}

.fat-check-choice input:disabled + span {
  cursor: default;
  opacity: 0.75;
}

.fat-section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid #dfe8f0;
  background: #f7fafc;
}

.fat-section-actions span {
  color: var(--muted);
  font-size: 0.8rem;
}

.fat-section-actions span[data-tone="success"] { color: var(--success); }
.fat-section-actions span[data-tone="error"] { color: var(--danger); }
.fat-section-actions span[data-tone="pending"] { color: var(--warning); }

.fat-signature-section,
.fat-version-section,
.fat-audit-section {
  padding: clamp(18px, 2.2vw, 28px);
  scroll-margin-top: 18px;
}

.fat-signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.fat-signature-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #d6e1eb;
  border-radius: 16px;
  background: #f9fbfd;
}

.fat-signature-card.is-signed {
  border-color: #a9d8c6;
  background: #eef9f5;
}

.fat-signature-card h3 {
  margin: 4px 0 14px;
  font-size: 1rem;
}

.fat-signature-form {
  display: grid;
  gap: 10px;
}

.fat-signature-pad canvas {
  height: 130px;
  touch-action: none;
}

.fat-signed-summary {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
}

.fat-signed-summary span,
.fat-signed-summary small {
  color: var(--muted);
}

.fat-submit-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #b7cde0;
  border-radius: 16px;
  background: linear-gradient(100deg, #eef5fb, #fff);
}

.fat-submit-form p {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--muted);
}

.fat-version-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.fat-version-list article {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe5ee;
  border-radius: 13px;
  background: #f9fbfd;
}

.fat-version-list article > div {
  display: grid;
}

.fat-version-list article span {
  color: var(--muted);
  font-size: 0.8rem;
}

.dashboard-fat-bi {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  border-left: 5px solid #16805d;
}

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

.dashboard-fat-bi__metrics article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 14px;
  background: #eef6f3;
}

.dashboard-fat-bi__metrics span,
.dashboard-fat-bi__recent small {
  color: var(--muted);
  font-size: 0.76rem;
}

.dashboard-fat-bi__metrics strong {
  color: #125f46;
  font: 700 1.45rem "Space Grotesk", sans-serif;
}

.dashboard-fat-bi__recent {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-fat-bi__recent a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #d5e3de;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}

.dashboard-fat-bi__recent a > span {
  display: grid;
  min-width: 0;
}

.dashboard-fat-bi__recent strong,
.dashboard-fat-bi__recent small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-fat-bi__recent b {
  color: #16805d;
}

.fat-module-banner {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 16px;
  padding: 24px;
  border-left: 5px solid #174f88;
}

.fat-module-banner h2,
.fat-module-banner p {
  margin: 4px 0 0;
}

.fat-module-banner p {
  color: var(--muted);
}

.fat-module-banner__metrics {
  display: flex;
  gap: 16px;
}

.fat-module-banner__metrics span {
  display: grid;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.fat-module-banner__metrics strong {
  color: var(--brand);
  font: 700 1.35rem "Space Grotesk", sans-serif;
}

@media (max-width: 1280px) {
  .fat-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fat-document-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fat-progress-summary { grid-column: span 2; }
  .fat-document-workspace { grid-template-columns: 270px minmax(0, 1fr); }
  .dashboard-fat-bi__recent { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .fat-page-hero { align-items: flex-start; flex-direction: column; }
  .fat-page-actions { justify-content: flex-start; }
  .fat-launch-grid { grid-template-columns: minmax(0, 1fr); }
  .fat-document-workspace { grid-template-columns: minmax(0, 1fr); }
  .fat-section-index {
    position: static;
    max-height: 360px;
  }
  .fat-section-index nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fat-signature-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-fat-bi__metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fat-module-banner { grid-template-columns: minmax(0, 1fr); }
  .fat-module-banner__metrics { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .app-shell--fat { padding: 10px 8px 60px; }
  .fat-page-hero { padding: 22px 18px; border-radius: 20px; }
  .fat-page-actions { width: 100%; }
  .fat-page-actions .btn-secondary { flex: 1 1 auto; text-align: center; }
  .fat-metric-grid,
  .fat-document-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fat-progress-summary { grid-column: 1 / -1; }
  .fat-folder-records article { grid-template-columns: minmax(0, 1fr) auto; }
  .fat-folder-records .fat-record-progress { grid-column: 1 / -1; }
  .fat-folder-records article > .status-pill { justify-self: end; }
  .fat-folder-records article > b { display: none; }
  .fat-folder-records article > a { grid-column: 1 / -1; text-align: center; }
  .fat-section-index nav { grid-template-columns: minmax(0, 1fr); }
  .fat-section-card > summary { grid-template-columns: auto minmax(0, 1fr); }
  .fat-section-card > summary > strong { grid-column: 2; }
  .fat-section-actions,
  .fat-submit-form { align-items: stretch; flex-direction: column; }
  .fat-submit-form .btn-primary { width: 100%; }
  .fat-version-list article { grid-template-columns: minmax(0, 1fr) auto; }
  .fat-version-list article > div { grid-column: 1 / -1; }
  .dashboard-fat-bi__metrics,
  .dashboard-fat-bi__recent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .fat-metric-grid,
  .fat-document-strip { grid-template-columns: minmax(0, 1fr); }
  .fat-progress-summary { grid-column: auto; }
  .fat-start-card,
  .fat-explorer-card,
  .fat-signature-section,
  .fat-version-section,
  .fat-audit-section { padding: 16px; }
  .fat-folder-serials,
  .fat-folder-records { padding-left: 8px; }
  .fat-folder-explorer summary { grid-template-columns: auto minmax(0, 1fr); }
  .fat-folder-explorer summary b { display: none; }
  .fat-technical-row { min-width: 600px; }
  .dashboard-fat-bi__metrics,
  .dashboard-fat-bi__recent { grid-template-columns: minmax(0, 1fr); }
  .fat-module-banner__metrics { flex-wrap: wrap; }
}

/* Matrices institucionales: una descripción por requisito y resultados compactos. */
.structured-matrix {
  display: grid;
  gap: 12px;
  width: 100%;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-color: #9eb7ce #edf3f8;
  scrollbar-width: thin;
}

.structured-matrix-row {
  display: grid;
  gap: 12px;
  min-width: 980px;
  padding: 16px;
  border: 1px solid #d7e3ee;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  box-shadow: 0 8px 24px rgba(22, 57, 87, 0.06);
}

.structured-matrix-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2ebf2;
}

.structured-matrix-heading strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}

.structured-matrix-heading span {
  color: var(--muted);
  font-size: 0.74rem;
}

.structured-matrix-controls {
  display: grid;
  grid-template-columns: repeat(7, minmax(78px, 0.7fr)) minmax(220px, 2fr);
  gap: 9px;
  align-items: end;
}

.structured-matrix-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.structured-matrix-field > span {
  color: #33516c;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.structured-matrix-field .structured-input {
  min-height: 44px;
  padding: 9px 10px;
  border-color: #c7d7e5;
  border-radius: 11px;
  background-color: #fff;
  font-size: 0.84rem;
}

.structured-matrix-field select.structured-input {
  color: #123b5e;
  font-weight: 750;
}

.structured-matrix-field .structured-textarea {
  min-height: 44px;
  resize: vertical;
}

@media (max-width: 720px) {
  .structured-matrix {
    overflow: visible;
  }

  .structured-matrix-row {
    min-width: 0;
    padding: 14px;
  }

  .structured-matrix-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .structured-matrix-field.is-observation {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .structured-matrix-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .structured-matrix-field.is-observation {
    grid-column: auto;
  }
}

/* Separación operativa de Calidad y control de vigencia documental. */
.quality-modality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.quality-modality-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-top: 5px solid #1d6fa5;
  color: var(--text);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.quality-modality-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(17, 48, 78, 0.13);
}

.quality-modality-card.is-mechanical { border-top-color: #c27318; }
.quality-modality-card.is-transversal { border-top-color: #16805d; }

.quality-modality-card > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.quality-modality-card > div strong {
  color: var(--brand);
  font: 750 2.25rem "Space Grotesk", sans-serif;
}

.quality-modality-card > div small,
.quality-modality-card dt {
  color: var(--muted);
}

.quality-modality-card dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.quality-modality-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

.quality-modality-card dt,
.quality-modality-card dd {
  margin: 0;
  font-size: 0.82rem;
}

.quality-modality-card dd {
  color: var(--text);
  font-weight: 800;
}

.document-governance-panel {
  margin-top: 24px;
}

.document-governance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.document-governance-item {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid #d8e3ed;
  border-left: 4px solid #71869a;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff 0%, #f5f8fb 100%);
}

.document-governance-item.is-retired { border-left-color: #b83232; }
.document-governance-item.is-under_review,
.document-governance-item.is-pending-source { border-left-color: #c27318; }
.document-governance-item.is-reference { border-left-color: #1d6fa5; }

.document-governance-item > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.document-governance-item p,
.document-governance-item small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.document-governance-item a {
  color: #135c92;
  font-size: 0.82rem;
  font-weight: 800;
}

.upload-card-reference {
  grid-column: 1 / -1;
  border-color: #9fbcd4;
  background: linear-gradient(135deg, #f5faff 0%, #edf5f1 100%);
}

.records-filter-grid {
  grid-template-columns: repeat(3, minmax(170px, 0.8fr)) minmax(240px, 1.2fr) auto;
}

@media (max-width: 1080px) {
  .quality-modality-grid { grid-template-columns: minmax(0, 1fr); }
  .document-governance-grid { grid-template-columns: minmax(0, 1fr); }
  .records-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .records-search-field { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .quality-modality-card,
  .document-governance-item { padding: 16px; }
  .quality-modality-card > div strong { font-size: 1.9rem; }
  .records-filter-grid { grid-template-columns: minmax(0, 1fr); }
  .records-search-field { grid-column: auto; }
}

/* Final responsive hardening for operational workspaces. */
.records-summary article {
  display: grid;
  gap: 5px;
  align-content: start;
}

.records-summary article strong {
  color: var(--brand-deep);
  font-size: 1.15rem;
}

.records-summary article span {
  color: var(--muted);
  line-height: 1.35;
}

.inspection-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 0.55fr) auto;
  gap: 14px;
  align-items: end;
}

.inspection-filter-bar > *,
.inspection-filter-bar .field {
  min-width: 0;
}

.inspection-filter-actions {
  flex-wrap: nowrap;
  margin: 0;
}

.inspection-filter-actions > * {
  min-height: 50px;
}

@media (max-width: 1180px) {
  .control-center {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .control-sidebar,
  .control-sidebar-scroll,
  .control-nav,
  .control-main,
  .control-topbar,
  .control-topbar-copy,
  .control-topbar-tools {
    min-width: 0;
    max-width: 100%;
  }

  .control-sidebar-scroll {
    overflow: hidden;
  }
}

@media (max-width: 820px) {
  .inspection-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspection-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .control-main,
  .control-main > *,
  .control-metric-grid,
  .control-metric-grid--executive {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .control-metric-grid--executive,
  .inspection-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .inspection-filter-actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .inspection-filter-actions > * {
    width: 100%;
  }

  .control-topbar-copy p {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

/* Keep the last cascade layer authoritative across tablet and phone widths. */
@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-panel--manager {
    order: -1;
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .auth-mobile-brand img {
    width: 68px;
    height: 48px;
    padding: 7px;
    border: 1px solid rgba(15, 67, 117, 0.1);
    border-radius: 14px;
    background: #fff;
    object-fit: contain;
  }

  .auth-mobile-brand span {
    display: grid;
    gap: 2px;
  }

  .auth-mobile-brand strong {
    color: var(--brand-deep);
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  }

  .auth-mobile-brand small {
    color: var(--muted);
    font-size: 0.76rem;
  }

  .login-showcase {
    width: 100%;
    max-width: 720px;
    min-height: 0;
    margin-inline: auto;
  }

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

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

  .control-checklist-access {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
  }

  .control-checklist-access > *,
  .control-checklist-access .field,
  .control-checklist-access select,
  .control-checklist-access input {
    width: 100%;
    min-width: 0;
  }

  .control-checklist-access > .action-row {
    grid-column: 1 / -1;
    margin: 0;
  }
}

@media (max-width: 620px) {
  .login-showcase {
    gap: 16px;
    padding: 20px 18px;
  }

  .login-copy-block h1 {
    font-size: clamp(2rem, 10vw, 2.55rem);
    line-height: 0.96;
  }

  .login-copy-block p {
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .login-feature-grid,
  .login-rail {
    display: none;
  }
}

@media (min-width: 621px) and (max-width: 1180px) {
  .control-metric-grid:not(.control-metric-grid--inspection):not(.control-metric-grid--executive) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  body.responsive-drawers-ready .control-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    align-items: start;
  }

  body.responsive-drawers-ready .control-topbar-tools {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }
}

@media (max-width: 820px) {
  .control-main {
    padding: 16px 12px 30px;
  }

  .control-topbar {
    gap: 12px;
    margin-bottom: 14px;
  }

  .control-topbar-copy h1 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    line-height: 1.04;
  }

  .control-topbar-copy p { display: none; }

  .control-topbar-tools {
    width: 100%;
    min-width: 0;
  }

  .control-topbar-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    width: 100%;
    min-width: 0;
    padding: 7px;
    border-radius: 16px;
  }

  .control-topbar-search input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .control-topbar-search button {
    width: auto;
    min-width: 86px;
    min-height: 44px;
    padding-inline: 13px;
  }

  .control-topbar-actions {
    display: flex;
    justify-content: flex-end;
  }

  .control-session-panel { display: none; }

  .control-logout-button {
    width: auto;
    min-width: 0;
    min-height: 42px;
  }

  .control-order-toolbar-summary,
  .records-summary,
  .control-document-summary,
  .control-session-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .control-checklist-access {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-order-toolbar-summary article,
  .records-summary article,
  .control-document-summary article,
  .control-session-summary article {
    min-height: 0;
    padding: 12px;
    border-radius: 15px;
  }

  .control-order-toolbar > .summary-note {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
}

@media (max-width: 520px) {
  .control-checklist-access {
    grid-template-columns: minmax(0, 1fr);
  }

  .control-checklist-access > .action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .control-checklist-access > .action-row > * {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .hero-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
  }

  .hero-auth-meta {
    flex-direction: row;
    align-items: center;
    width: auto;
    max-width: 100%;
  }

  .hero-auth-meta > * {
    flex: 0 1 auto;
  }

  .hero-header {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .hero-logo {
    width: 72px;
    max-width: 72px;
    margin-top: 4px;
  }

  .app-shell--fat {
    width: 100%;
    padding: 8px 7px 48px;
  }

  .fat-page-hero {
    gap: 16px;
    padding: 18px 15px;
    border-radius: 18px;
  }

  .fat-page-hero h1 {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .fat-page-actions,
  .fat-page-actions > * {
    width: 100%;
    text-align: center;
  }

  .fat-technical-table { overflow: visible; }

  .fat-technical-row {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .fat-row-label {
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid #e2e9f0;
    background: #f6f9fc;
  }

  .fat-row-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .fat-control-field {
    width: 100%;
    min-width: 0;
  }

  .fat-check-choice,
  .fat-check-choice span {
    width: 100%;
  }

  .fat-check-choice span { justify-content: center; }

  .fat-section-card > summary {
    gap: 10px;
    padding: 14px 12px;
  }

  .fat-version-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .fat-version-list article > div { grid-column: auto; }

  .fat-version-list article > a {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 340px) {
  .control-order-toolbar-summary,
  .records-summary,
  .control-document-summary,
  .control-session-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .control-mobile-menu-button > span:last-child { display: none; }
}

.context-identity-body {
  display: grid;
  gap: 10px;
  width: 100%;
}

.control-nav-copy strong {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.context-identity-grid > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(139, 90, 24, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.58);
}

.context-identity-grid small {
  color: #806039;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.context-identity-grid b {
  overflow-wrap: anywhere;
  color: var(--brand-deep);
}

.context-identity-grid em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-identity-body > p {
  margin: 0;
  font-size: 0.83rem;
}

@media (max-width: 340px) {
  .context-identity-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Final operational navigation and release workflow */
.module-command-center {
  display: grid;
  grid-template-columns: minmax(210px, 0.52fr) minmax(0, 1.48fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
  margin-bottom: 18px;
  padding: 17px 18px;
  overflow: hidden;
  border: 1px solid rgba(116, 158, 204, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 10%, rgba(76, 151, 220, 0.2), transparent 34%),
    linear-gradient(120deg, #0b2d55 0%, #103e70 58%, #0d345f 100%);
  box-shadow: 0 14px 34px rgba(10, 38, 73, 0.16);
}

.module-command-heading,
.module-command-heading > div,
.module-command-copy {
  display: grid;
  min-width: 0;
}

.module-command-heading {
  gap: 7px;
}

.module-command-heading > div {
  gap: 2px;
}

.module-command-heading span {
  color: #a9caec;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-command-heading h2 {
  margin: 0;
  color: #fff;
  font-family: "Space Grotesk", "Aptos", sans-serif;
  font-size: clamp(1.12rem, 1.45vw, 1.4rem);
  letter-spacing: -0.025em;
}

.module-command-heading p {
  margin: 0;
  color: rgba(228, 239, 251, 0.76);
  font-size: 0.78rem;
  line-height: 1.45;
}

.module-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

.module-command-grid:has(.module-command-link:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-command-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 70px;
  padding: 11px 12px;
  color: #eaf4ff;
  text-decoration: none;
  border: 1px solid rgba(221, 237, 252, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.module-command-link:hover,
.module-command-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(225, 241, 255, 0.5);
  background: rgba(255, 255, 255, 0.14);
}

.module-command-link.is-primary {
  border-color: rgba(108, 224, 177, 0.42);
  background: linear-gradient(135deg, rgba(24, 132, 91, 0.94), rgba(18, 105, 78, 0.96));
}

.module-command-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #cfe5fb;
  font-size: 0.68rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.12);
}

.module-command-copy {
  gap: 3px;
}

.module-command-copy strong,
.module-command-copy small {
  overflow-wrap: anywhere;
}

.module-command-copy strong {
  color: #fff;
  font-size: 0.83rem;
  line-height: 1.2;
}

.module-command-copy small {
  color: rgba(229, 240, 251, 0.72);
  font-size: 0.69rem;
  line-height: 1.3;
}

.module-command-arrow {
  color: #b9d9f8;
  font-size: 1rem;
  font-weight: 800;
}

#purchase-order-query,
#new-purchase-order,
#purchase-order-list,
#import-workbook,
#import-history,
#new-inspection,
#inspection-agenda,
#engineering-review,
#records-query,
#records-explorer,
#document-context,
#format-catalog,
#checklist-access,
#checklist-workspace,
#release-workbench,
#user-editor,
#user-directory {
  scroll-margin-top: 24px;
}

.format-catalog-anchor {
  width: 100%;
  height: 0;
}

.records-explorer-anchor {
  width: 100%;
  height: 0;
}

.is-module-jump-target {
  outline: 3px solid rgba(35, 123, 187, 0.42);
  outline-offset: 3px;
}

.release-workbench {
  min-width: 0;
  margin-bottom: 18px;
  overflow: hidden;
  border-color: rgba(17, 73, 123, 0.16);
  background:
    radial-gradient(circle at 100% 0, rgba(35, 122, 184, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 255, 0.98));
}

.release-workbench-heading {
  align-items: flex-start;
}

.release-workbench-heading > div {
  min-width: 0;
}

.release-workbench-eyebrow,
.release-panel-title > span,
.release-status-heading > div > span {
  display: block;
  margin-bottom: 4px;
  color: #1a6097;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.release-workbench-heading h2,
.release-panel-title h3,
.release-status-heading h3,
.release-empty-state h3 {
  margin: 0;
  color: var(--brand-deep);
}

.release-workbench-heading .summary-note {
  max-width: 78ch;
  margin-top: 7px;
}

.release-workflow-steps {
  margin-top: 17px;
}

.release-workbench-grid {
  display: grid;
  grid-template-columns: minmax(255px, 0.58fr) minmax(0, 1.42fr);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.release-context-form,
.release-status-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(15, 67, 117, 0.12);
  border-radius: 20px;
}

.release-context-form {
  display: grid;
  gap: 14px;
  align-content: start;
  background: #f3f7fc;
}

.release-context-form > .btn-primary {
  width: 100%;
  margin-top: 2px;
}

.release-panel-title {
  display: grid;
  gap: 1px;
}

.release-panel-title h3,
.release-status-heading h3,
.release-empty-state h3 {
  font-size: 1.05rem;
}

.release-inline-notice {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: #704918;
  border: 1px solid rgba(171, 111, 25, 0.2);
  border-radius: 14px;
  background: var(--warning-soft);
}

.release-inline-notice span,
.release-inline-notice a {
  font-size: 0.76rem;
  line-height: 1.4;
}

.release-inline-notice a {
  color: #0d568e;
  font-weight: 800;
}

.release-status-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  background: #fff;
}

.release-status-panel.is-ready {
  border-color: rgba(24, 123, 87, 0.3);
  box-shadow: inset 4px 0 0 #187b57;
}

.release-empty-state {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 100%;
  padding: 18px;
  border: 1px dashed rgba(15, 67, 117, 0.2);
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #eef5fc);
}

.release-empty-state p {
  max-width: 58ch;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.release-status-symbol {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  border-radius: 17px;
  background: linear-gradient(145deg, #17639e, #0d3b6a);
  box-shadow: 0 9px 18px rgba(12, 61, 104, 0.18);
}

.release-status-heading,
.release-version-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.release-status-heading > div {
  min-width: 0;
}

.release-context-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.release-context-summary > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(15, 67, 117, 0.1);
  border-radius: 14px;
  background: #f7fafe;
}

.release-context-summary small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.release-context-summary strong {
  overflow-wrap: anywhere;
  color: var(--brand-deep);
  font-size: 0.82rem;
}

.release-requirement-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.release-requirement-list article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 11px;
  border: 1px solid;
  border-radius: 14px;
}

.release-requirement-list article.is-approved {
  border-color: rgba(24, 123, 87, 0.22);
  background: #eff9f5;
}

.release-requirement-list article.is-pending {
  border-color: rgba(178, 112, 21, 0.22);
  background: #fff8ee;
}

.release-requirement-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 900;
  background: #b06f18;
}

.release-requirement-list .is-approved .release-requirement-mark {
  background: #187b57;
}

.release-requirement-list article > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.release-requirement-list strong,
.release-requirement-list small {
  overflow-wrap: anywhere;
}

.release-requirement-list strong {
  color: var(--brand-deep);
  font-size: 0.78rem;
}

.release-requirement-list small {
  color: var(--muted);
  font-size: 0.68rem;
}

.release-checklist-state {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 14px;
  background: #edf4fb;
}

.release-checklist-state > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.release-checklist-state strong {
  color: var(--brand-deep);
  font-size: 0.8rem;
}

.release-checklist-state span,
.release-checklist-state small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.release-checklist-state small {
  flex: 0 0 auto;
  font-weight: 750;
}

.release-primary-actions {
  margin: 0;
}

.release-version-block {
  display: grid;
  gap: 9px;
  padding-top: 13px;
  border-top: 1px solid rgba(15, 67, 117, 0.1);
}

.release-version-heading strong {
  color: var(--brand-deep);
}

.release-version-heading span,
.release-version-block > p {
  color: var(--muted);
  font-size: 0.72rem;
}

.release-version-block > p {
  margin: 0;
  line-height: 1.45;
}

.release-version-list {
  display: grid;
  gap: 7px;
}

.release-version-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(15, 67, 117, 0.1);
  border-radius: 12px;
  background: #f8fbfe;
}

.release-version-list article > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.release-version-list article strong,
.release-version-list article small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-version-list article strong {
  color: var(--brand-deep);
  font-size: 0.76rem;
}

.release-version-list article small {
  color: var(--muted);
  font-size: 0.66rem;
}

.release-version-list article > a {
  color: #0f5b93;
  font-size: 0.72rem;
  font-weight: 800;
}

.report-version-guidance {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #184b3a;
  border: 1px solid rgba(24, 123, 87, 0.2);
  border-radius: 18px;
  background: linear-gradient(110deg, #eff9f5, #f8fcfa);
}

.report-version-guidance > div {
  min-width: 0;
}

.report-version-guidance strong {
  color: #145a41;
}

.report-version-guidance p,
.report-version-guidance > span {
  margin: 3px 0 0;
  color: #4f6f65;
  font-size: 0.78rem;
  line-height: 1.45;
}

.report-version-guidance > span {
  max-width: 34ch;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.report-detail-shell,
.report-detail-grid,
.report-detail-grid > *,
.report-file-pills,
.report-file-pill {
  min-width: 0;
}

.report-file-pill small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.equipment-multiselect-field {
  min-width: 0;
}

.equipment-multiselect {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #c8d5e3;
  border-radius: 18px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.equipment-multiselect[open] {
  border-color: #4f83b4;
  box-shadow: 0 0 0 4px rgba(31, 103, 165, 0.1), 0 18px 36px rgba(12, 45, 78, 0.12);
}

.equipment-multiselect > summary {
  display: flex;
  min-height: 62px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  color: var(--brand-deep);
  cursor: pointer;
  list-style: none;
}

.equipment-multiselect > summary::-webkit-details-marker {
  display: none;
}

.equipment-multiselect > summary > span:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.equipment-multiselect > summary strong {
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-multiselect > summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-multiselect-count {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: #526b85;
  border-radius: 10px;
  background: #edf3f8;
  font-size: 0.76rem;
  font-weight: 900;
}

.has-selection .equipment-multiselect-count {
  color: #fff;
  background: #167d59;
}

.equipment-multiselect-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #dce5ee;
  background: linear-gradient(180deg, #f8fbfd, #fff);
}

.equipment-multiselect-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfdae6;
  border-radius: 12px;
  background: #fff;
}

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

.equipment-multiselect-actions button {
  min-height: 34px;
  padding: 7px 11px;
  color: #15568c;
  border: 1px solid #bed1e3;
  border-radius: 10px;
  background: #edf5fb;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.equipment-multiselect-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.equipment-multiselect-options {
  display: grid;
  max-height: 270px;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-color: #9fb7ce #eaf0f6;
  scrollbar-width: thin;
}

.equipment-multiselect-option {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-width: 0;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dbe4ed;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.equipment-multiselect-option:hover {
  border-color: #77a1c5;
  background: #f5faff;
}

.equipment-multiselect-option:has(input:checked) {
  border-color: #3a9274;
  background: #edf9f4;
}

.equipment-multiselect-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.equipment-multiselect-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #9eb2c5;
  border-radius: 7px;
  background: #fff;
}

.equipment-multiselect-option input:checked + .equipment-multiselect-check {
  border-color: #167d59;
  background: #167d59;
}

.equipment-multiselect-option input:checked + .equipment-multiselect-check::after {
  width: 9px;
  height: 5px;
  content: '';
  transform: translateY(-1px) rotate(-45deg);
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
}

.equipment-multiselect-option input:focus-visible + .equipment-multiselect-check {
  outline: 3px solid rgba(31, 103, 165, 0.22);
  outline-offset: 2px;
}

.equipment-multiselect-option > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.equipment-multiselect-option strong,
.equipment-multiselect-option small {
  overflow-wrap: anywhere;
}

.equipment-multiselect-option strong {
  color: var(--brand-deep);
  font-size: 0.78rem;
}

.equipment-multiselect-option small {
  color: var(--muted);
  font-size: 0.68rem;
}

.equipment-multiselect-empty {
  margin: 0;
  padding: 12px;
  color: #647991;
  border-radius: 12px;
  background: #eef3f8;
  font-size: 0.76rem;
  line-height: 1.45;
}

.equipment-multiselect-field.has-error .equipment-multiselect,
.equipment-multiselect > summary[aria-invalid="true"] {
  border-color: #d77171;
}

.serial-list-feedback {
  display: flex;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #48637d;
  font-size: 0.72rem;
}

.serial-list-feedback strong {
  color: #126244;
  font-size: 0.88rem;
}

.serial-list-feedback small {
  color: #9a5a08;
  font-weight: 700;
}

.serial-list-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.serial-list-preview span {
  max-width: 100%;
  padding: 5px 8px;
  overflow: hidden;
  color: #15568c;
  border: 1px solid #c7d9e9;
  border-radius: 999px;
  background: #edf5fb;
  font-size: 0.65rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.serial-list-preview span.is-summary {
  color: #126244;
  border-color: #b8dece;
  background: #ecf8f3;
}

.oc-context-ribbon,
.oc-equipment-workspace,
.oc-equipment-card,
.oc-context-ribbon *,
.oc-equipment-workspace * {
  min-width: 0;
}

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

.oc-context-ribbon {
  display: grid;
  gap: 13px;
  margin-bottom: 18px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(18, 71, 119, 0.13);
  border-radius: 22px;
  background:
    linear-gradient(115deg, rgba(240, 247, 253, 0.98), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at right top, rgba(28, 124, 89, 0.12), transparent 32%);
  box-shadow: 0 14px 34px rgba(11, 37, 65, 0.08);
}

.oc-context-ribbon__heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.oc-context-ribbon__heading > div {
  display: grid;
  gap: 4px;
}

.oc-context-ribbon__heading strong {
  overflow-wrap: anywhere;
  color: var(--brand-deep);
  font-size: 1rem;
}

.oc-context-ribbon__heading small {
  color: var(--muted);
  font-size: 0.74rem;
}

.oc-context-ribbon__serials {
  display: grid;
  grid-auto-columns: minmax(190px, 260px);
  grid-auto-flow: column;
  gap: 8px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #93aec7 #e5edf5;
  scrollbar-width: thin;
}

.oc-context-serial {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 2px 9px;
  align-items: center;
  min-height: 60px;
  padding: 9px 11px;
  color: inherit;
  border: 1px solid #d5e1ec;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  text-decoration: none;
}

.oc-context-serial > span {
  display: grid;
  width: 32px;
  height: 32px;
  grid-row: 1 / span 2;
  place-items: center;
  color: #165d95;
  border-radius: 10px;
  background: #e5f0fa;
  font-size: 0.65rem;
  font-weight: 900;
}

.oc-context-serial strong,
.oc-context-serial small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oc-context-serial strong {
  color: var(--brand-deep);
  font-size: 0.76rem;
}

.oc-context-serial small {
  color: var(--muted);
  font-size: 0.64rem;
}

.oc-context-serial:hover,
.oc-context-serial.is-active {
  border-color: #459276;
  background: #edf8f4;
}

.oc-context-serial.is-active > span {
  color: #fff;
  background: #187b57;
}

.oc-context-ribbon__modules {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.oc-context-ribbon__modules a {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: #245c8c;
  border: 1px solid #ccdae7;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.oc-context-ribbon__modules a:hover,
.oc-context-ribbon__modules a.is-current {
  color: #fff;
  border-color: #155d95;
  background: #155d95;
}

.oc-equipment-workspace {
  display: grid;
  gap: 13px;
  padding: 17px;
  border: 1px solid rgba(18, 71, 119, 0.12);
  border-radius: 22px;
  background: linear-gradient(145deg, #f6fafe, #edf4fb);
}

.oc-equipment-workspace__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 18px;
  align-items: end;
}

.oc-equipment-workspace__heading > div {
  display: grid;
  gap: 4px;
}

.oc-equipment-workspace__heading > div > span {
  color: #17679f;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.oc-equipment-workspace__heading h3 {
  margin: 0;
  color: var(--brand-deep);
  font-size: 1.08rem;
}

.oc-equipment-workspace__heading p {
  max-width: 86ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.oc-equipment-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #c6d5e4;
  border-radius: 13px;
  background: #fff;
  font: inherit;
}

.oc-equipment-selection-tools,
.oc-equipment-workspace__footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.oc-equipment-selection-tools > div:first-child,
.oc-equipment-workspace__footer > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 7px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.72rem;
}

.oc-equipment-selection-tools > div:first-child strong {
  color: #14724f;
  font-size: 1rem;
}

.oc-equipment-selection-tools > div:last-child {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.oc-equipment-selection-tools button {
  min-height: 34px;
  padding: 7px 10px;
  color: #165b91;
  border: 1px solid #bfd1e2;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.oc-equipment-selection-tools button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.oc-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
  max-height: min(62vh, 680px);
  overflow: auto;
  padding: 2px 5px 7px 2px;
  overscroll-behavior: contain;
  scrollbar-color: #91acc5 #e4edf5;
  scrollbar-width: thin;
}

.oc-equipment-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 13px;
  border: 1px solid #d4e0eb;
  border-radius: 17px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.oc-equipment-card:hover {
  transform: translateY(-1px);
  border-color: #8caecb;
  box-shadow: 0 12px 24px rgba(15, 60, 99, 0.08);
}

.oc-equipment-card.is-selected {
  border-color: #4a9a7d;
  box-shadow: inset 0 0 0 2px rgba(24, 123, 87, 0.1);
}

.oc-equipment-card__identity {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.oc-equipment-card__identity > a {
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.oc-equipment-card__identity > a strong,
.oc-equipment-card__identity > a span,
.oc-equipment-card__identity > a small {
  overflow-wrap: anywhere;
}

.oc-equipment-card__identity > a strong {
  color: var(--brand-deep);
  font-size: 0.82rem;
}

.oc-equipment-card__identity > a span {
  color: #345d80;
  font-size: 0.72rem;
}

.oc-equipment-card__identity > a small {
  color: var(--muted);
  font-size: 0.64rem;
}

.oc-equipment-card__check {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  cursor: pointer;
}

.oc-equipment-card__check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.oc-equipment-card__check > span[aria-hidden] {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #9db2c5;
  border-radius: 7px;
  background: #fff;
}

.oc-equipment-card__check input:checked + span[aria-hidden] {
  border-color: #187b57;
  background: #187b57;
}

.oc-equipment-card__check input:checked + span[aria-hidden]::after {
  width: 9px;
  height: 5px;
  content: '';
  transform: translateY(-1px) rotate(-45deg);
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
}

.oc-equipment-card__check input:focus-visible + span[aria-hidden] {
  outline: 3px solid rgba(28, 103, 165, 0.22);
  outline-offset: 2px;
}

.oc-equipment-card__metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.oc-equipment-card__metrics span {
  padding: 6px 8px;
  color: #60758d;
  border-radius: 9px;
  background: #edf3f8;
  font-size: 0.65rem;
}

.oc-equipment-card__metrics strong {
  color: var(--brand-deep);
}

.oc-equipment-card__actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.oc-equipment-card__actions a {
  padding: 7px 5px;
  color: #175c91;
  border: 1px solid #cfdeea;
  border-radius: 9px;
  background: #f6fafe;
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.oc-equipment-card__actions a:hover {
  color: #fff;
  border-color: #175c91;
  background: #175c91;
}

.oc-equipment-workspace__footer {
  padding-top: 12px;
  border-top: 1px solid rgba(18, 71, 119, 0.11);
}

.oc-equipment-workspace__footer > div:first-child {
  grid-template-columns: minmax(0, 1fr);
}

.oc-equipment-workspace__footer strong {
  color: var(--brand-deep);
}

.oc-equipment-workspace__footer span {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.oc-equipment-empty {
  margin: 0;
  padding: 14px;
  color: #647991;
  border-radius: 12px;
  background: #e9f0f6;
  text-align: center;
}

.checklist-scope-selector {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.checklist-scope-selector legend {
  margin-bottom: 8px;
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.checklist-scope-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.checklist-scope-modes label,
.checklist-scope-options label {
  display: grid;
  min-width: 0;
  cursor: pointer;
}

.checklist-scope-modes label {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid #d3dfeb;
  border-radius: 12px;
  background: #fff;
}

.checklist-scope-modes label:has(input:checked) {
  border-color: #428f73;
  background: #eef8f4;
}

.checklist-scope-modes span {
  display: grid;
  gap: 2px;
}

.checklist-scope-modes strong {
  color: var(--brand-deep);
  font-size: 0.72rem;
}

.checklist-scope-modes small {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.35;
}

.checklist-scope-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 5px;
  max-height: 176px;
  margin-top: 8px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #d7e2ec;
  border-radius: 12px;
  background: #f7fafd;
}

.checklist-scope-options label {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  background: #fff;
  color: #365d7e;
  font-size: 0.66rem;
}

.checklist-scope-options label:has(input:checked) {
  color: #126344;
  background: #e9f7f1;
}

.checklist-scope-options.is-disabled {
  opacity: 0.5;
}

.control-workflow-steps--open article {
  grid-template-columns: 42px minmax(0, 1fr);
}

.control-workflow-steps--open article > span {
  width: 42px;
  font-size: 0.65rem;
}

.control-workflow-steps--open small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .module-command-center {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-command-heading {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
    align-items: end;
  }

  .release-workbench-grid {
    grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
  }
}

@media (max-width: 820px) {
  .module-command-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .module-command-grid,
  .module-command-grid:has(.module-command-link:nth-child(2):last-child),
  .release-workbench-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-command-link {
    min-height: 62px;
  }

  .release-context-form,
  .release-status-panel {
    padding: 15px;
  }

  .release-context-summary,
  .release-requirement-list {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .oc-equipment-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

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

@media (max-width: 560px) {
  .module-command-center {
    gap: 13px;
    padding: 15px;
    border-radius: 18px;
  }

  .module-command-grid {
    gap: 7px;
  }

  .module-command-link {
    grid-template-columns: 28px minmax(0, 1fr) 16px;
    min-height: 58px;
    padding: 10px;
    border-radius: 14px;
  }

  .module-command-number {
    width: 28px;
    height: 28px;
  }

  .release-workbench-heading,
  .release-status-heading,
  .release-checklist-state,
  .report-version-guidance {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .release-workflow-steps article {
    min-height: 0;
  }

  .release-empty-state {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 14px;
  }

  .release-primary-actions,
  .release-primary-actions > *,
  .release-context-form > .btn-primary {
    width: 100%;
  }

  .release-version-list article {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .release-version-list article > a {
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid rgba(15, 67, 117, 0.09);
  }

  .report-version-guidance > span {
    max-width: none;
  }

  .report-file-pill {
    width: 100%;
    padding: 14px;
  }

  .equipment-multiselect > summary {
    min-height: 58px;
    padding: 10px 12px;
  }

  .equipment-multiselect-options {
    max-height: 230px;
  }

  .equipment-multiselect-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .equipment-multiselect-actions button {
    width: 100%;
  }

  .oc-context-ribbon {
    padding: 13px;
    border-radius: 18px;
  }

  .oc-context-ribbon__heading,
  .oc-equipment-selection-tools,
  .oc-equipment-workspace__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .oc-context-ribbon__heading > .btn-secondary,
  .oc-equipment-workspace__footer .action-row,
  .oc-equipment-workspace__footer .action-row > * {
    width: 100%;
  }

  .oc-context-ribbon__serials {
    grid-auto-columns: minmax(220px, 82vw);
  }

  .oc-equipment-workspace {
    padding: 12px;
    border-radius: 17px;
  }

  .oc-equipment-grid {
    grid-template-columns: minmax(0, 1fr);
    max-height: 68vh;
  }

  .oc-equipment-selection-tools > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oc-equipment-selection-tools button {
    width: 100%;
  }

  .oc-equipment-card__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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