:root {
  --ink: #061831;
  --ink-2: #0b2748;
  --ink-3: #0e3158;
  --paper: #f3f1eb;
  --paper-2: #faf9f5;
  --white: #ffffff;
  --muted: #617083;
  --orange: #ff5b19;
  --amber: #f2b43d;
  --teal: #21a6a1;
  --mint: #9adbd0;
  --blue: #4f8ef7;
  --line: rgba(6, 24, 49, 0.14);
  --line-light: rgba(255, 255, 255, 0.12);
  --line-lighter: rgba(255, 255, 255, 0.07);
  --display: "Space Grotesk", sans-serif;
  --body: "Manrope", sans-serif;
  color-scheme: light;
}

/* Daily Log */
.daily-log-heading {
  align-items: flex-end;
}

.daily-log-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.daily-log-controls label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-log-controls select,
.daily-log-controls input,
.daily-log-review-panel textarea {
  border: 1px solid var(--line-light);
  border-radius: 5px;
  background: var(--ink-2);
  color: var(--white);
  font: inherit;
}

.daily-log-controls select,
.daily-log-controls input {
  min-width: 175px;
  height: 42px;
  padding: 0 12px;
}

.daily-log-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.daily-log-empty strong {
  color: var(--white);
  font-size: 19px;
}

.daily-log-empty span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.daily-log-content {
  display: grid;
  gap: 16px;
}

.daily-log-status-row,
.daily-log-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-log-status-row > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.daily-log-status-row strong {
  color: var(--white);
  font-size: 15px;
}

.daily-log-status-row small,
.daily-log-review-actions small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.daily-log-status {
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 999px;
  padding: 5px 9px;
  color: #f5a623;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-log-status.is-finalized {
  border-color: rgba(32, 190, 180, 0.4);
  color: var(--mint);
}

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

.daily-log-metrics article {
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line-light);
  border-radius: 6px;
  background: var(--ink-2);
}

.daily-log-metrics span,
.daily-log-metrics small {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.daily-log-metrics strong {
  display: block;
  margin: 9px 0 5px;
  color: var(--white);
  font-size: 30px;
}

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

.daily-log-summary-panel,
.daily-log-exception-panel,
.daily-log-activity-panel,
.daily-log-review-panel {
  padding: 22px;
}

.daily-log-summary-panel > p {
  margin: 18px 0 0;
  color: var(--white);
  font-size: 14px;
  line-height: 1.7;
}

.daily-log-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line-light);
  background: var(--line-light);
}

.daily-log-readiness article {
  display: grid;
  gap: 6px;
  min-height: 98px;
  padding: 15px;
  background: var(--ink-2);
}

.daily-log-readiness span,
.daily-log-readiness small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
}

.daily-log-readiness span {
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-log-readiness strong {
  align-self: end;
  color: var(--white);
  font-size: 17px;
}

.daily-log-exception-panel ol {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.daily-log-exception-panel li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-left: 2px solid #f5a623;
  background: rgba(245, 166, 35, 0.06);
}

.daily-log-exception-panel li.is-high,
.daily-log-exception-panel li.is-critical {
  border-left-color: var(--orange);
  background: rgba(255, 91, 25, 0.07);
}

.daily-log-exception-panel li b {
  color: var(--orange);
  font-size: 9px;
  text-transform: uppercase;
}

.daily-log-exception-panel li span {
  color: var(--white);
  font-size: 11px;
  line-height: 1.45;
}

.daily-log-exception-panel li > div {
  display: grid;
  gap: 6px;
}

.daily-log-exception-panel li > div small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  line-height: 1.5;
}

.daily-log-exception-panel li > small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  white-space: nowrap;
}

.daily-log-records {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.daily-record {
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  background: rgba(6, 24, 49, 0.28);
}

.daily-record.is-high,
.daily-record.is-critical {
  border-left-color: var(--orange);
}

.daily-record > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  color: var(--white);
  cursor: pointer;
  list-style: none;
}

.daily-record > summary::-webkit-details-marker {
  display: none;
}

.daily-record > summary::after {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 1px solid rgba(255, 255, 255, 0.68);
  border-bottom: 1px solid rgba(255, 255, 255, 0.68);
  content: "";
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.daily-record[open] > summary::after {
  transform: rotate(225deg);
}

.daily-record > summary > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.daily-record > summary > div:first-child > b {
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(79, 142, 247, 0.12);
  color: #8db5ff;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-record.is-high > summary > div:first-child > b,
.daily-record.is-critical > summary > div:first-child > b {
  background: rgba(255, 91, 25, 0.12);
  color: #ff8f73;
}

.daily-record > summary > div:first-child > span,
.daily-record > summary strong,
.daily-record > summary small {
  display: block;
  min-width: 0;
}

.daily-record > summary strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-record > summary small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
}

.daily-record > summary > div:last-of-type {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.daily-record > summary > div:last-of-type span {
  padding: 5px 8px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 8px;
  white-space: nowrap;
}

.daily-record-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-light);
}

.daily-record-body > section {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.daily-record-body > section:nth-child(2n) {
  border-right: 0;
}

.daily-record-body > section > span {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.daily-record-body > section > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--white);
  font-size: 13px;
  text-transform: capitalize;
}

.daily-record-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  line-height: 1.65;
}

.daily-record-body dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
  margin: 14px 0 0;
}

.daily-record-body dl div {
  min-width: 0;
}

.daily-record-body dt,
.daily-record-body dd {
  margin: 0;
}

.daily-record-body dt {
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
  text-transform: uppercase;
}

.daily-record-body dd {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--white);
  font-size: 9px;
}

.daily-record-body ul {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding-left: 15px;
  color: #ffc2b3;
  font-size: 9px;
}

.daily-record-next-action {
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 2px solid var(--teal);
  background: rgba(33, 166, 161, 0.08);
}

.daily-record-next-action b {
  display: block;
  margin-bottom: 5px;
  color: var(--mint);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-record-body section > small {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  line-height: 1.5;
}

.daily-record-body > footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
}

.daily-record-body > footer small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
}

.daily-record-empty {
  margin: 0;
  padding: 24px;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.daily-log-review-prompts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.daily-log-review-prompts span {
  padding: 9px 10px;
  border: 1px solid var(--line-light);
  color: rgba(255, 255, 255, 0.6);
  font-size: 8px;
  line-height: 1.4;
}

.daily-log-audit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid var(--line-light);
  background: var(--line-light);
}

.daily-log-audit-grid > div {
  padding: 11px 12px;
  background: var(--ink-2);
}

.daily-log-audit-grid dt,
.daily-log-audit-grid dd {
  margin: 0;
}

.daily-log-audit-grid dt {
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
  text-transform: uppercase;
}

.daily-log-audit-grid dd {
  margin-top: 5px;
  color: var(--white);
  font-size: 9px;
  line-height: 1.45;
}

.daily-log-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
}

.daily-log-table th,
.daily-log-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--line-light);
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  text-align: left;
  vertical-align: top;
}

.daily-log-table th {
  border-top: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-log-table td:first-child strong,
.daily-log-table td:first-child small {
  display: block;
}

.daily-log-table td:first-child strong {
  color: var(--white);
  font-size: 11px;
}

.daily-log-table td:first-child small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.45);
}

.daily-log-review-panel textarea {
  width: 100%;
  min-height: 125px;
  margin-top: 15px;
  padding: 14px;
  resize: vertical;
  line-height: 1.6;
}

.daily-log-review-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.daily-log-review-actions small {
  margin-right: auto;
}

@media (max-width: 980px) {
  .daily-log-heading,
  .daily-log-controls,
  .daily-log-status-row,
  .daily-log-review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-log-controls select,
  .daily-log-controls input {
    width: 100%;
  }

  .daily-log-metrics,
  .daily-log-grid,
  .daily-log-readiness,
  .daily-log-review-prompts,
  .daily-log-audit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .daily-log-grid {
    grid-template-columns: 1fr;
  }

  .daily-log-review-actions small {
    margin-right: 0;
  }

  .daily-record > summary,
  .daily-record-body > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-record > summary > div:last-of-type {
    flex-wrap: wrap;
    margin-left: 0;
  }

  .daily-record-body {
    grid-template-columns: 1fr;
  }

  .daily-record-body > section {
    border-right: 0;
  }
}

@media (max-width: 620px) {
  .daily-log-metrics,
  .daily-log-readiness,
  .daily-log-review-prompts,
  .daily-log-audit-grid {
    grid-template-columns: 1fr;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

body.requires-session:not(.session-ready) {
  visibility: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

img,
svg {
  display: block;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

::selection {
  color: var(--white);
  background: var(--orange);
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--orange);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-brand-logo {
  display: block;
  width: 156px;
  max-width: 100%;
  height: auto;
}

.auth-header .app-brand-logo,
.app-brand-sidebar .app-brand-logo {
  filter: invert(1);
}

.auth-page {
  --ink: #111;
  --ink-2: #242424;
  --paper: #f5f5f3;
  --paper-2: #fafaf8;
  --muted: #626262;
  --orange: #111;
  --amber: #aaa;
  --teal: #626262;
  --mint: #ddd;
  --display: Arial, Helvetica, sans-serif;
  --body: Arial, Helvetica, sans-serif;
}

.auth-page .auth-shell { filter: none; }
.auth-page .auth-story-copy h1,
.auth-page .auth-form-heading h2 { font-weight: 400; letter-spacing: -.045em; }
.auth-page .auth-header { background: transparent; }
@media (max-width: 760px) {
  .auth-page .auth-header { background: #111; }
}

/* Brand layer only; authentication and operational status styles remain intact. */
.auth-page .auth-story-image { filter: var(--brand-photo-filter); opacity: .6; }
.auth-page .auth-story-overlay { background: linear-gradient(180deg, #10151c66, #10151ce8); }
.auth-page .auth-story-grid { display: none; }
.auth-page .auth-story-copy h1 { font-size: clamp(48px, 5vw, 80px); line-height: 1; }
.auth-page .auth-story-copy h1 span { color: var(--accent); }
.auth-page .auth-story-copy .app-eyebrow { color: var(--accent); }
.auth-page .auth-story-copy .app-eyebrow > span { background: var(--accent); box-shadow: none; }
.auth-page .auth-form-panel { background: #fafaf9; }
.auth-page .auth-step { color: #626a75; }
.auth-page .auth-step span { color: var(--accent-text); }
.auth-page .auth-step { gap: 12px; }
.auth-page .auth-step::after { order: 1; margin: 0; }
.auth-page .auth-step span { order: 2; }
.auth-page .app-eyebrow { font-weight: 500; }
.auth-page .auth-form-heading h2 { font-size: clamp(36px, 3.2vw, 50px); }
.auth-page .auth-form-heading > p:last-child { font-size: 14px; }
.auth-page .auth-form-heading .app-eyebrow-dark { color: var(--accent-text); }
.auth-page .auth-form-heading .app-eyebrow > span { background: var(--accent-text); }
.auth-page .demo-access-note { background: var(--accent-soft); border-color: var(--accent); font-size: 11px; }
.auth-page .demo-access-note strong { font-size: 11px; }
.auth-page .text-button { color: var(--accent-text); font-weight: 500; font-size: 12px; }
.auth-page .back-link { font-weight: 400; font-size: 12px; }
.auth-page .back-link:hover { color: var(--accent-text); }
.auth-page .field-control input { font-size: 14px; font-weight: 400; }
.auth-page .field-control:focus-within { border-color: var(--accent-focus); color: var(--accent-text); box-shadow: 0 0 0 3px #a8c5ff40; }
.auth-page .field-group.has-error .field-control { border-color: #c83d3d; box-shadow: 0 0 0 3px #c83d3d15; }
.auth-page .field-error, .auth-page .auth-status { font-size: 11px; }
.auth-page .check-field { font-size: 12px; font-weight: 400; }
.auth-page .check-field input:checked + span { background: var(--accent); border-color: var(--accent-focus); }
.auth-page .check-field svg { color: var(--accent-ink); }
.auth-page .check-field input:focus-visible + span { outline: 2px solid var(--accent-focus); outline-offset: 3px; box-shadow: none; }
.auth-page .auth-live-card { background: #10151ccc; box-shadow: none; border-color: #a8c5ff45; }
.auth-page .auth-live-head span i { background: var(--accent); box-shadow: none; animation: none; }
.auth-page .auth-live-flow .is-current { color: var(--accent); }
.auth-page .auth-live-flow .is-current b { border-color: var(--accent); color: var(--accent); background: #a8c5ff1a; box-shadow: none; }
:is(.auth-page, .workspace-page) ::selection { color: var(--accent-ink); background: var(--accent); }
:is(.auth-page, .workspace-page) :is(.primary-action, .compact-action) { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); box-shadow: none; font-weight: 500; }
:is(.auth-page, .workspace-page) :is(.primary-action, .compact-action):is(:hover, :focus-visible) { color: var(--accent-ink); background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: none; }
.auth-page .primary-action { border-radius: 999px; font-size: 13px; }
.auth-page .primary-action:disabled { color: #596a80; background: #dce4ef; border-color: #dce4ef; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-page .primary-action.is-loading::before { border-color: #14243c30; border-top-color: var(--accent-ink); }
.auth-page :is(a, button):focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 4px; }
.auth-page .auth-header .app-brand:focus-visible { outline-color: var(--accent); }
.workspace-page .sidebar-nav > button.is-active { color: var(--accent); background: #a8c5ff14; }
.workspace-page .sidebar-nav > button.is-active svg { color: var(--accent); }
.workspace-page .sidebar-nav > button::before { background: var(--accent); }
.workspace-page .settings-nav button.is-active { border-left-color: var(--accent); color: var(--accent); }
.workspace-page .full-order-tabs button.is-active::after { background: var(--accent); }
.workspace-page .filter-chips button.is-active { background: #a8c5ff20; color: var(--accent); border-color: #a8c5ff60; }
.workspace-page .mobile-app-nav button.is-active { color: var(--accent); }
.workspace-page :is(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1020px) and (min-width: 761px) {
  .auth-page .auth-story-copy h1 { font-size: 48px; }
}
@media (max-width: 760px) {
  .auth-page .auth-story-copy h1 { font-size: 40px; }
  .auth-page .auth-header { background: #10151c; }
  .auth-page .back-link { color: var(--accent); }
  .auth-page .back-link:hover { color: #fff; }
  .auth-page .auth-header a:focus-visible { outline-color: var(--accent); }
  .auth-page .auth-form-heading h2 { font-size: 36px; }
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.app-brand-mark {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  transition: transform 220ms ease;
}

.app-brand:hover .app-brand-mark,
.app-brand:focus-visible .app-brand-mark {
  transform: translateY(-2px) rotate(-5deg);
}

.app-brand-name {
  display: grid;
  gap: 3px;
  line-height: 1;
}

.app-brand-name strong {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.02em;
}

.app-brand-name span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.app-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.app-eyebrow > span {
  width: 18px;
  height: 1px;
  background: var(--orange);
}

.app-eyebrow-dark {
  color: var(--muted);
}

/* Sign in */

.auth-page {
  overflow-x: hidden;
  background: var(--paper);
}

.auth-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 84px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 68px);
  pointer-events: none;
}

.auth-header > * {
  pointer-events: auto;
}

.auth-header .app-brand {
  color: var(--white);
}

.auth-header .app-brand-mark {
  background: rgba(6, 24, 49, 0.8);
}

.back-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  color: #37465a;
  font-size: 11px;
  font-weight: 800;
  transition: color 180ms ease;
}

.back-link svg {
  width: 17px;
  height: 17px;
  transition: transform 180ms ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--orange);
  outline: 0;
}

.back-link:hover svg,
.back-link:focus-visible svg {
  transform: translateX(-3px);
}

.auth-shell {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 56%) minmax(440px, 44%);
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 720px;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  padding: 126px clamp(40px, 6vw, 104px) clamp(46px, 7vh, 78px);
  color: var(--white);
  background: var(--ink);
}

.auth-story-image,
.auth-story-overlay,
.auth-story-grid {
  position: absolute;
  inset: 0;
}

.auth-story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.68;
  filter: saturate(0.86) contrast(1.06);
}

.auth-story-overlay {
  background:
    linear-gradient(180deg, rgba(4, 18, 38, 0.35) 0%, rgba(4, 18, 38, 0.08) 34%, rgba(4, 18, 38, 0.94) 100%),
    linear-gradient(90deg, rgba(4, 18, 38, 0.16), rgba(4, 18, 38, 0.52));
}

.auth-story-grid {
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), black 62%, transparent);
}

.auth-story-copy,
.auth-live-card {
  position: relative;
  z-index: 2;
}

.auth-story-copy {
  max-width: 660px;
}

.auth-story-copy h1 {
  max-width: 620px;
  margin: 18px 0 18px;
  font-family: var(--display);
  font-size: clamp(46px, 5vw, 80px);
  line-height: 0.97;
  letter-spacing: -0.055em;
}

.auth-story-copy > p:last-child {
  max-width: 570px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.75;
}

.auth-live-card {
  width: min(100%, 700px);
  margin-top: clamp(34px, 5vh, 58px);
  padding: 20px 22px 18px;
  background: rgba(7, 27, 52, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 6px;
  box-shadow: 0 22px 58px rgba(0, 8, 24, 0.32);
  backdrop-filter: blur(18px) saturate(115%);
}

.auth-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-live-head span,
.auth-live-head strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.auth-live-head span {
  color: rgba(255, 255, 255, 0.56);
}

.auth-live-head span i {
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(33, 166, 161, 0.13);
  animation: livePulse 2.2s ease-in-out infinite;
}

.auth-live-head strong {
  color: rgba(255, 255, 255, 0.82);
}

.auth-live-flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 22px 0;
}

.auth-live-flow > i {
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.auth-live-flow span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-live-flow span b {
  display: grid;
  width: 25px;
  aspect-ratio: 1;
  place-items: center;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 8px;
}

.auth-live-flow .is-complete {
  color: var(--mint);
}

.auth-live-flow .is-complete b {
  color: var(--ink);
  background: var(--mint);
  border-color: var(--mint);
}

.auth-live-flow .is-current {
  color: var(--white);
}

.auth-live-flow .is-current b {
  color: var(--white);
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 91, 25, 0.13);
}

.auth-live-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-live-meta span {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
  padding-top: 15px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-live-meta strong {
  color: var(--white);
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.auth-form-panel {
  position: relative;
  display: flex;
  min-height: 720px;
  flex-direction: column;
  justify-content: center;
  padding: 112px clamp(42px, 5.6vw, 96px) 78px;
  background:
    linear-gradient(90deg, rgba(6, 24, 49, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 72px 100%;
}

.auth-form-wrap {
  width: min(100%, 470px);
  margin: auto;
}

.auth-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 clamp(52px, 8vh, 88px);
  color: #8190a0;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.auth-step::after {
  height: 1px;
  flex: 1;
  margin: 0 14px;
  background: var(--line);
  content: "";
}

.auth-step span {
  color: var(--orange);
}

.auth-form-heading h2 {
  max-width: 450px;
  margin: 15px 0 13px;
  font-family: var(--display);
  font-size: clamp(34px, 3vw, 49px);
  line-height: 1.02;
  letter-spacing: -0.052em;
}

.auth-form-heading > p:last-child {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 20px;
  margin-top: 38px;
}

.demo-access-note {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  color: #526277;
  background: rgba(242, 180, 61, 0.09);
  border-left: 2px solid var(--amber);
  font-size: 9px;
  line-height: 1.55;
}

.demo-access-note strong {
  color: #37475c;
  font-size: 9px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group > label,
.field-label-row label,
.report-form > label > span,
.settings-form-grid label > span {
  color: #445469;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-button {
  padding: 0;
  color: var(--orange);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.text-button:hover,
.text-button:focus-visible {
  text-decoration: underline;
  outline: 0;
}

.field-control {
  position: relative;
  display: flex;
  min-height: 54px;
  align-items: center;
  color: #7a8999;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(6, 24, 49, 0.18);
  border-radius: 4px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.field-control:focus-within {
  color: var(--orange);
  background: var(--white);
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 91, 25, 0.1);
}

.field-control > svg {
  width: 18px;
  height: 18px;
  margin-left: 16px;
  flex: 0 0 auto;
}

.field-control input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  font-weight: 600;
}

.field-control input::placeholder,
.table-search input::placeholder,
.topbar-search input::placeholder {
  color: #66768a;
  font-weight: 500;
}

.field-group.has-error .field-control {
  border-color: #e34747;
  box-shadow: 0 0 0 3px rgba(227, 71, 71, 0.08);
}

.field-error {
  min-height: 13px;
  color: #c83d3d;
  font-size: 9px;
  font-weight: 700;
}

.password-toggle {
  display: grid;
  width: 48px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  color: #748295;
  background: transparent;
  cursor: pointer;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-closed {
  display: block;
}

.check-field {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  color: #536276;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

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

.check-field > span {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  background: var(--white);
  border: 1px solid rgba(6, 24, 49, 0.22);
  border-radius: 3px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.check-field svg {
  width: 12px;
  opacity: 0;
  color: var(--white);
  stroke-width: 2.2;
}

.check-field input:checked + span {
  background: var(--orange);
  border-color: var(--orange);
}

.check-field input:checked + span svg {
  opacity: 1;
}

.check-field input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(255, 91, 25, 0.15);
}

.auth-status {
  min-height: 17px;
  margin: -7px 0 -5px;
  color: #c83d3d;
  font-size: 10px;
  font-weight: 700;
}

.auth-status.is-success {
  color: #137d78;
}

.primary-action,
.secondary-action,
.compact-action,
.secondary-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 800;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.primary-action {
  min-height: 54px;
  gap: 12px;
  padding: 0 20px;
  color: var(--white);
  background: var(--orange);
  border: 1px solid var(--orange);
  box-shadow: 0 14px 32px rgba(255, 91, 25, 0.2);
  font-size: 11px;
  letter-spacing: 0.025em;
}

.primary-action svg {
  width: 18px;
}

.primary-action:hover,
.primary-action:focus-visible,
.compact-action:hover,
.compact-action:focus-visible {
  background: #ff6c2f;
  outline: 0;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(255, 91, 25, 0.26);
}

.primary-action.is-loading {
  cursor: wait;
  opacity: 0.78;
  pointer-events: none;
}

.primary-action.is-loading::before {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

.primary-action.is-loading svg {
  display: none;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #8895a4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.form-divider::before,
.form-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.secondary-action {
  min-height: 52px;
  gap: 10px;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(6, 24, 49, 0.2);
  font-size: 10px;
  letter-spacing: 0.025em;
}

.secondary-action > svg {
  width: 17px;
  margin-left: auto;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(6, 24, 49, 0.36);
  outline: 0;
}

.demo-indicator {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(33, 166, 161, 0.13);
}

.prototype-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 28px;
  padding: 13px 14px;
  color: #657489;
  background: rgba(6, 24, 49, 0.035);
  border-left: 2px solid var(--teal);
}

.prototype-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--teal);
}

.prototype-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.prototype-note strong {
  display: block;
  margin-bottom: 1px;
  color: #34445a;
  font-size: 9px;
}

.auth-footer {
  position: absolute;
  right: clamp(42px, 5.6vw, 96px);
  bottom: 26px;
  left: clamp(42px, 5.6vw, 96px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #647387;
  font-size: 9px;
  font-weight: 700;
}

.auth-footer nav {
  display: flex;
  gap: 17px;
}

.auth-footer a:hover,
.auth-footer a:focus-visible {
  color: var(--orange);
  outline: 0;
}

/* Workspace shell */

.workspace-page {
  min-height: 100svh;
  color: rgba(255, 255, 255, 0.86);
  background: var(--ink);
}

.workspace-shell {
  min-height: 100svh;
}

.workspace-sidebar {
  position: fixed;
  z-index: 80;
  inset: 0 auto 0 0;
  display: flex;
  width: 246px;
  overflow-y: auto;
  flex-direction: column;
  padding: 24px 16px 16px;
  color: rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 10% 15%, rgba(33, 166, 161, 0.08), transparent 25%),
    #04172e;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-top {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
}

.app-brand-sidebar {
  color: var(--white);
}

.app-brand-sidebar .app-brand-mark {
  width: 38px;
  background: var(--orange);
  border-color: var(--orange);
}

.sidebar-close {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  cursor: pointer;
}

.sidebar-close svg {
  width: 19px;
}

.workspace-picker {
  display: grid;
  width: 100%;
  min-height: 64px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 27px 0 26px;
  padding: 9px 10px;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 5px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.workspace-picker:hover,
.workspace-picker:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  outline: 0;
}

.workspace-logo {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--ink);
  background: var(--mint);
  border-radius: 4px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
}

.workspace-picker > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.workspace-picker small,
.workspace-picker strong {
  line-height: 1;
}

.workspace-picker small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.workspace-picker strong {
  font-size: 11px;
  font-weight: 800;
}

.workspace-picker > svg {
  width: 16px;
  color: rgba(255, 255, 255, 0.4);
}

.sidebar-nav {
  display: grid;
  gap: 4px;
}

.sidebar-nav > p {
  margin: 15px 12px 8px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar-nav > p:first-child {
  margin-top: 0;
}

.sidebar-nav > button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.48);
  text-align: left;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease;
}

.sidebar-nav > button::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -16px;
  width: 2px;
  background: var(--orange);
  content: "";
  opacity: 0;
}

.sidebar-nav > button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.6;
}

.sidebar-nav > button:hover,
.sidebar-nav > button:focus-visible,
.sidebar-nav > button.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.065);
  outline: 0;
}

.sidebar-nav > button.is-active svg {
  color: var(--orange);
}

.sidebar-nav > button.is-active::before {
  opacity: 1;
}

.nav-count {
  display: grid;
  min-width: 23px;
  height: 18px;
  margin-left: auto;
  padding: 0 5px;
  place-items: center;
  color: var(--white);
  background: rgba(255, 91, 25, 0.22);
  border: 1px solid rgba(255, 91, 25, 0.28);
  border-radius: 9px;
  font-family: var(--display);
  font-size: 8px;
}

.sidebar-status {
  margin-top: auto;
  padding: 18px 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mint);
  font-size: 8px;
  font-weight: 800;
}

.system-status span,
.live-pill span,
.panel-live i,
.online-state i,
.site-state i {
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(33, 166, 161, 0.12);
}

.sidebar-status p {
  margin: 8px 0 0 15px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 7px;
}

.sidebar-status p strong {
  color: rgba(255, 255, 255, 0.46);
}

.sidebar-user {
  display: grid;
  width: 100%;
  min-height: 57px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  color: var(--white);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  cursor: pointer;
}

.user-avatar,
.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(145deg, var(--orange), #c83f08);
}

.sidebar-user > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.sidebar-user strong,
.sidebar-user small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  font-size: 9px;
}

.sidebar-user small {
  color: rgba(255, 255, 255, 0.36);
  font-size: 7px;
}

.sidebar-user > svg {
  width: 17px;
  color: rgba(255, 255, 255, 0.36);
}

.workspace-stage {
  min-height: 100svh;
  margin-left: 246px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 95% 0%, rgba(79, 142, 247, 0.06), transparent 25%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #071b34;
  background-size: auto, 72px 72px, 72px 72px, auto;
}

.workspace-topbar {
  position: sticky;
  z-index: 60;
  top: 0;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 2.6vw, 42px);
  background: rgba(5, 24, 47, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px) saturate(125%);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-title span,
.topbar-title strong {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-title span {
  color: rgba(255, 255, 255, 0.3);
}

.topbar-title span::after {
  margin-left: 9px;
  color: rgba(255, 255, 255, 0.18);
  content: "/";
}

.topbar-title strong {
  color: rgba(255, 255, 255, 0.76);
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
}

.menu-button svg {
  width: 20px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-search {
  display: flex;
  width: min(30vw, 330px);
  height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 13px;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 4px;
  transition: background 160ms ease, border-color 160ms ease;
}

.topbar-search:focus-within {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.topbar-search svg,
.table-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.topbar-search input,
.table-search input {
  width: 100%;
  min-width: 0;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 10px;
  font-weight: 600;
}

.topbar-search kbd {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  font: 8px var(--body);
}

.live-pill {
  display: inline-flex;
  height: 31px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--mint);
  background: rgba(33, 166, 161, 0.08);
  border: 1px solid rgba(33, 166, 161, 0.16);
  border-radius: 15px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.live-pill span {
  width: 6px;
  height: 6px;
  animation: livePulse 2.2s ease-in-out infinite;
}

.icon-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 4px;
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
}

.notification-button > span {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: var(--white);
  background: var(--orange);
  border: 2px solid #071b34;
  border-radius: 50%;
  font-size: 7px;
  font-weight: 800;
}

.notification-panel,
.profile-menu {
  position: absolute;
  z-index: 90;
  right: clamp(20px, 2.6vw, 42px);
  top: 62px;
  width: 330px;
  padding: 7px;
  background: #0a2546;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  box-shadow: 0 22px 55px rgba(0, 8, 24, 0.46);
}

.popover-head {
  display: flex;
  height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.popover-head strong {
  font-size: 10px;
}

.popover-head button {
  padding: 0;
  color: var(--orange);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.notification-item {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 9px;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item > span {
  display: grid;
  gap: 4px;
}

.notification-item strong {
  font-size: 9px;
}

.notification-item small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
}

.priority-dot {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
}

.priority-high {
  color: #ff8150;
}

.priority-high.priority-dot,
.priority-high > i,
.site-state.state-critical i {
  background: var(--orange);
}

.priority-amber {
  color: var(--amber);
}

.priority-amber.priority-dot,
.priority-amber > i,
.state-attention i,
.away-state i {
  background: var(--amber);
}

.priority-teal {
  color: var(--teal);
}

.priority-teal.priority-dot {
  background: var(--teal);
}

.priority-blue {
  color: var(--blue);
}

.priority-blue.priority-dot,
.priority-blue > i {
  background: var(--blue);
}

.profile-menu {
  position: fixed;
  right: 16px;
  bottom: 80px;
  top: auto;
  left: 16px;
  width: 214px;
}

.profile-menu button,
.profile-menu a {
  display: flex;
  width: 100%;
  min-height: 39px;
  align-items: center;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border-radius: 3px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.profile-menu button:hover,
.profile-menu a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.workspace-main {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: clamp(28px, 3.1vw, 50px) clamp(20px, 2.6vw, 42px) 64px;
}

.app-view[hidden] {
  display: none;
}

.app-view {
  min-width: 0;
}

.app-view.is-active {
  animation: viewEnter 260ms ease both;
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.view-heading h1 {
  margin: 12px 0 8px;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(30px, 3vw, 45px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.view-heading > div:first-child > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
}

.view-heading-compact {
  align-items: center;
  margin-bottom: 34px;
}

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

.site-select {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.site-select svg {
  width: 16px;
}

.site-select select {
  min-width: 112px;
  color: rgba(255, 255, 255, 0.78);
  background: #0a2546;
  border: 0;
  outline: 0;
  font-size: 9px;
  font-weight: 700;
}

.compact-action,
.secondary-compact {
  min-height: 42px;
  gap: 8px;
  padding: 0 16px;
  font-size: 9px;
  letter-spacing: 0.02em;
}

.compact-action {
  color: var(--white);
  background: var(--orange);
  border: 1px solid var(--orange);
}

.compact-action svg,
.secondary-compact svg {
  width: 16px;
}

.secondary-compact {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.secondary-compact:hover,
.secondary-compact:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  outline: 0;
}

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

.metric-card,
.panel,
.signal-table-card,
.team-table-card,
.settings-card,
.site-card,
.analytics-metrics article {
  background: rgba(11, 39, 72, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  box-shadow: 0 18px 44px rgba(0, 8, 24, 0.1);
}

.metric-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  padding: 19px 20px 16px;
}

.metric-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--metric-color);
  content: "";
  opacity: 0.9;
}

.metric-accent-orange {
  --metric-color: var(--orange);
}

.metric-accent-amber {
  --metric-color: var(--amber);
}

.metric-accent-blue {
  --metric-color: var(--blue);
}

.metric-accent-teal {
  --metric-color: var(--teal);
}

.metric-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card-head svg {
  width: 18px;
  height: 18px;
  color: var(--metric-color);
}

.metric-card > strong {
  display: block;
  margin-top: 17px;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(30px, 2.6vw, 40px);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.metric-card > strong span {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 16px;
}

.metric-card p {
  margin: 11px 0 17px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
}

.trend-down {
  color: var(--mint);
  font-weight: 800;
}

.trend-up {
  color: var(--amber);
  font-weight: 800;
}

.metric-card > i {
  position: absolute;
  right: 20px;
  bottom: 15px;
  left: 20px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.metric-card > i::after {
  display: block;
  width: var(--progress);
  height: 100%;
  background: var(--metric-color);
  content: "";
  opacity: 0.75;
}

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

.panel {
  min-width: 0;
  padding: 20px;
}

.volume-panel,
.queue-panel {
  grid-column: span 8;
}

.health-panel,
.activity-panel {
  grid-column: span 4;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading > div:first-child {
  display: grid;
  gap: 6px;
}

.panel-kicker {
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-heading h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: -0.025em;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.33);
  font-size: 7px;
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.legend-current {
  background: var(--orange);
}

.legend-previous {
  background: rgba(255, 255, 255, 0.14);
}

.legend-target {
  border-top: 1px dashed var(--teal);
  border-radius: 0 !important;
}

.chart-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.chart-summary > strong {
  color: var(--white);
  font-family: var(--display);
  font-size: 31px;
  line-height: 1;
}

.chart-summary > span {
  color: rgba(255, 255, 255, 0.3);
  font-size: 7px;
  line-height: 1.45;
}

.chart-summary b {
  color: var(--mint);
}

.bar-chart {
  position: relative;
  display: grid;
  height: 165px;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  margin-top: 18px;
}

.chart-y-axis {
  display: flex;
  height: 140px;
  flex-direction: column;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.22);
  font-size: 7px;
}

.chart-grid-lines {
  position: absolute;
  top: 2px;
  right: 0;
  left: 34px;
  display: flex;
  height: 140px;
  flex-direction: column;
  justify-content: space-between;
}

.chart-grid-lines i {
  height: 1px;
  background: rgba(255, 255, 255, 0.055);
}

.chart-bars {
  position: relative;
  z-index: 2;
  display: grid;
  height: 160px;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(8px, 1.4vw, 18px);
}

.chart-bars > div {
  position: relative;
  display: flex;
  height: 140px;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.chart-bars > div > span,
.chart-bars > div > i {
  width: min(12px, 34%);
  height: var(--bar);
  border-radius: 2px 2px 0 0;
}

.chart-bars > div > span {
  background: linear-gradient(180deg, #ff7741, var(--orange));
}

.chart-bars > div > i {
  background: rgba(255, 255, 255, 0.11);
}

.chart-bars small {
  position: absolute;
  top: calc(100% + 8px);
  color: rgba(255, 255, 255, 0.25);
  font-size: 7px;
  font-style: normal;
}

.panel-menu {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: rgba(255, 255, 255, 0.32);
  background: transparent;
  cursor: pointer;
}

.panel-menu svg {
  width: 17px;
}

.health-donut-wrap {
  display: grid;
  min-height: 168px;
  place-items: center;
}

.health-donut {
  position: relative;
  display: grid;
  width: 132px;
  aspect-ratio: 1;
  place-items: center;
  background: conic-gradient(var(--teal) 0 87%, var(--amber) 87% 100%);
  border-radius: 50%;
  transform: rotate(-90deg);
}

.health-donut::before {
  position: absolute;
  inset: 15px;
  background: #0b2748;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.health-donut span {
  position: relative;
  display: grid;
  gap: 2px;
  color: rgba(255, 255, 255, 0.32);
  text-align: center;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(90deg);
}

.health-donut strong {
  color: var(--white);
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: -0.05em;
}

.health-legend {
  display: grid;
  gap: 10px;
  margin-top: 3px;
}

.health-legend div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
}

.health-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.health-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.health-legend strong {
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
}

.panel-link {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  padding: 10px 0 0;
  color: rgba(255, 255, 255, 0.48);
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.panel-link:hover,
.panel-link:focus-visible {
  color: var(--orange);
  outline: 0;
}

.panel-link svg {
  width: 15px;
}

.panel-link-top {
  width: auto;
  min-height: auto;
  margin: 0;
  padding: 0;
  gap: 8px;
  border: 0;
}

.queue-panel,
.activity-panel {
  min-height: 322px;
}

.queue-list {
  display: grid;
  margin: 15px -20px -20px;
}

.queue-item {
  display: grid;
  min-height: 77px;
  grid-template-columns: 58px minmax(170px, 1.4fr) 62px minmax(110px, 0.8fr) 64px 18px;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: background 160ms ease;
}

.queue-item:hover,
.queue-item:focus-visible {
  background: rgba(255, 255, 255, 0.035);
  outline: 0;
}

.queue-priority,
.table-priority {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.queue-priority i,
.table-priority i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.queue-copy,
.queue-owner > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.queue-copy strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-copy small,
.queue-owner small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.54);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-evidence {
  color: rgba(255, 255, 255, 0.35);
  font-size: 7px;
}

.queue-evidence i {
  font-style: normal;
}

.queue-owner,
.owner-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 27px;
  height: 27px;
}

.avatar-orange {
  background: #b94d25;
}

.avatar-teal {
  background: #167d79;
}

.avatar-blue {
  background: #315f9f;
}

.avatar-purple {
  background: #665492;
}

.queue-owner > span {
  font-size: 8px;
}

.queue-time {
  color: rgba(255, 255, 255, 0.29);
  font-size: 7px;
  text-align: right;
}

.queue-arrow {
  width: 14px;
  color: rgba(255, 255, 255, 0.23);
}

.panel-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mint);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-live i {
  width: 6px;
  height: 6px;
}

.activity-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.activity-list::before {
  position: absolute;
  top: 23px;
  bottom: 23px;
  left: 14px;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  content: "";
}

.activity-list li {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 61px;
  grid-template-columns: 29px 1fr auto;
  align-items: center;
  gap: 10px;
}

.activity-list li > i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  background: #0c2b50;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.activity-list li > i svg {
  width: 14px;
}

.activity-resolved > i {
  color: var(--mint);
}

.activity-guidance > i {
  color: var(--blue);
}

.activity-signal > i {
  color: var(--orange);
}

.activity-report > i {
  color: var(--amber);
}

.activity-list li > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.activity-list strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list small,
.activity-list time {
  color: rgba(255, 255, 255, 0.56);
  font-size: 8px;
}

.activity-list time {
  font-style: normal;
}

/* Signals */

.signal-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.table-search {
  display: flex;
  width: min(100%, 340px);
  height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-chips button,
.filter-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.filter-chips button span {
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--display);
}

.filter-chips button:hover,
.filter-chips button:focus-visible,
.filter-chips button.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  outline: 0;
}

.filter-chips button.is-active {
  color: var(--orange);
}

.filter-button {
  min-height: 42px;
  margin-left: auto;
  border-color: rgba(255, 255, 255, 0.1);
}

.filter-button svg {
  width: 15px;
}

.signal-table-card,
.team-table-card {
  overflow: hidden;
}

.table-meta {
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 8px;
  font-weight: 700;
}

.signal-table-wrap {
  overflow-x: auto;
}

.signal-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
}

.signal-table th {
  height: 41px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.58);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signal-table th:first-child,
.signal-table td:first-child {
  width: 25%;
  padding-left: 19px;
}

.signal-table th:nth-child(2) {
  width: 10%;
}

.signal-table th:nth-child(3) {
  width: 14%;
}

.signal-table th:nth-child(4) {
  width: 12%;
}

.signal-table th:nth-child(5) {
  width: 16%;
}

.signal-table th:nth-child(6) {
  width: 10%;
}

.signal-table th:last-child {
  width: 35px;
}

.signal-table td {
  height: 72px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.68);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 9px;
  vertical-align: middle;
}

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

.signal-table tbody tr {
  transition: background 150ms ease;
}

.signal-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.028);
}

.signal-table td > small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 8px;
}

.signal-title-button {
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 0;
  color: rgba(255, 255, 255, 0.84);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.signal-title-button strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-title-button small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
}

.status-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.status-open {
  color: #ff9369;
  background: rgba(255, 91, 25, 0.1);
  border: 1px solid rgba(255, 91, 25, 0.17);
}

.status-progress {
  color: #82aef9;
  background: rgba(79, 142, 247, 0.1);
  border: 1px solid rgba(79, 142, 247, 0.16);
}

.status-resolved {
  color: var(--mint);
  background: rgba(33, 166, 161, 0.1);
  border: 1px solid rgba(33, 166, 161, 0.16);
}

.owner-cell {
  font-size: 8px;
  white-space: nowrap;
}

.row-open {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: rgba(255, 255, 255, 0.3);
  background: transparent;
  cursor: pointer;
}

.row-open:hover,
.row-open:focus-visible {
  color: var(--orange);
  outline: 0;
}

.row-open svg {
  width: 14px;
}

.empty-state {
  margin: 0;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  font-size: 10px;
}

/* Sites */

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

.site-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 22px;
}

.site-card-featured {
  min-height: 320px;
  grid-column: span 2;
  background: linear-gradient(90deg, rgba(11, 39, 72, 0.97) 0%, rgba(11, 39, 72, 0.85) 48%, rgba(11, 39, 72, 0.35) 100%);
}

.site-card-map {
  position: absolute;
  inset: 0 0 0 43%;
  overflow: hidden;
  opacity: 0.55;
  background:
    radial-gradient(circle at 50% 40%, rgba(79, 142, 247, 0.28), transparent 12%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #071a32;
  background-size: auto, 40px 40px, 40px 40px, auto;
  mask-image: linear-gradient(90deg, transparent, black 30%);
}

.site-card-map::before,
.site-card-map::after,
.map-line {
  position: absolute;
  height: 1px;
  background: rgba(79, 142, 247, 0.36);
  content: "";
  transform-origin: left;
}

.site-card-map::before {
  top: 28%;
  left: 10%;
  width: 90%;
  transform: rotate(12deg);
}

.site-card-map::after {
  top: 74%;
  left: 0;
  width: 90%;
  transform: rotate(-16deg);
}

.map-line-a {
  top: 12%;
  left: 42%;
  width: 78%;
  transform: rotate(66deg);
}

.map-line-b {
  top: 83%;
  left: 22%;
  width: 100%;
  transform: rotate(-42deg);
}

.site-card-map i,
.site-card-map b {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 13px;
  height: 13px;
  background: var(--orange);
  border: 3px solid #071a32;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 91, 25, 0.13);
}

.site-card-map b {
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(33, 166, 161, 0.13);
}

.site-card-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.site-monogram {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  background: var(--mint);
  border-radius: 4px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
}

.site-monogram-blue {
  color: var(--white);
  background: var(--blue);
}

.site-monogram-teal {
  color: var(--white);
  background: var(--teal);
}

.site-card-head > div {
  display: grid;
  gap: 3px;
}

.site-card-head small {
  color: rgba(255, 255, 255, 0.28);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-card-head h2 {
  margin: 0;
  color: var(--white);
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.site-card-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.36);
  font-size: 8px;
}

.site-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.state-healthy {
  color: var(--mint);
}

.state-attention {
  color: var(--amber);
}

.state-offline {
  color: rgba(255, 255, 255, 0.32);
}

.state-offline i,
.offline-state i {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.site-card-stats {
  position: relative;
  z-index: 2;
  display: grid;
  max-width: 500px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-card-stats span {
  display: grid;
  gap: 5px;
  padding: 17px 12px 0 0;
  color: rgba(255, 255, 255, 0.31);
  font-size: 7px;
  font-weight: 700;
}

.site-card-stats strong {
  color: var(--white);
  font-family: var(--display);
  font-size: 19px;
}

.site-card-foot {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 20px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-card-foot > span {
  display: flex;
}

.site-card-foot .avatar + .avatar {
  margin-left: -7px;
  border: 2px solid #0b2748;
}

.site-card-foot button,
.site-reconnect {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: rgba(255, 255, 255, 0.54);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.site-card-foot button:hover {
  color: var(--orange);
}

.site-card-foot svg {
  width: 14px;
}

.site-spark {
  height: 68px;
  margin: 28px 0 3px;
}

.site-spark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.spark-fill {
  fill: rgba(79, 142, 247, 0.08);
  stroke: none;
}

.spark-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
}

.spark-fill-teal {
  fill: rgba(33, 166, 161, 0.08);
}

.spark-line-teal {
  stroke: var(--teal);
}

.site-card:not(.site-card-featured) .site-card-stats {
  margin-top: 10px;
}

.site-card-muted {
  background: rgba(9, 31, 59, 0.65);
}

.offline-message {
  display: flex;
  min-height: 90px;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 15px;
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.09);
}

.offline-message svg {
  width: 25px;
}

.offline-message span {
  display: grid;
  gap: 4px;
  font-size: 8px;
}

.offline-message strong {
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
}

.site-reconnect {
  margin-top: 17px;
  color: var(--orange);
}

/* Team */

.team-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 12px;
  margin-bottom: 12px;
}

.shift-panel,
.role-panel {
  min-height: 240px;
}

.coverage-visual {
  display: flex;
  align-items: center;
  gap: 23px;
  margin-top: 29px;
}

.coverage-visual > div {
  display: grid;
  width: 94px;
  aspect-ratio: 1;
  place-items: center;
  background: conic-gradient(
    var(--teal) 0 var(--coverage, 0%),
    rgba(255, 255, 255, 0.07) var(--coverage, 0%) 100%
  );
  border-radius: 50%;
}

.coverage-visual > div > span {
  display: grid;
  width: 72px;
  aspect-ratio: 1;
  place-items: center;
  background: #0b2748;
  border-radius: 50%;
}

.coverage-visual i {
  color: var(--white);
  font-family: var(--display);
  font-size: 19px;
  font-style: normal;
  font-weight: 700;
}

.coverage-visual p {
  max-width: 200px;
  margin: 0;
  color: rgba(255, 255, 255, 0.34);
  font-size: 9px;
  line-height: 1.65;
}

.coverage-visual p strong {
  display: block;
  color: rgba(255, 255, 255, 0.78);
}

.coverage-sites {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 23px;
}

.coverage-sites span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 7px;
}

.coverage-sites i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.coverage-sites strong {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.68);
}

.team-empty-inline {
  grid-column: 1 / -1;
  min-height: 32px;
  justify-content: center;
  padding: 8px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.09);
  border-radius: 4px;
}

.role-list {
  display: grid;
  gap: 24px;
  margin-top: 37px;
}

.role-list > span {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 13px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
}

.role-list > span::after {
  grid-column: 1 / -1;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  content: "";
}

.role-list i {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: var(--role-width);
  height: 3px;
  background: var(--orange);
}

.role-list > span:nth-child(2) i {
  background: var(--blue);
}

.role-list > span:nth-child(3) i {
  background: var(--teal);
}

.role-list > span:nth-child(4) i {
  background: #9b7aea;
}

.role-list b {
  font-weight: 700;
}

.role-list strong {
  color: rgba(255, 255, 255, 0.78);
}

.team-table-card {
  padding: 20px;
}

.small-search {
  width: 240px;
  height: 36px;
}

.member-list {
  display: grid;
  margin: 16px -20px -20px;
}

.team-empty-state {
  margin: 0;
  padding: 32px 20px;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 9px;
  text-align: center;
}

.member-row {
  display: grid;
  min-height: 68px;
  grid-template-columns: minmax(200px, 1.5fr) 1fr 1fr 0.7fr 30px;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 8px;
}

.member-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-person > span {
  display: grid;
  gap: 4px;
}

.member-person strong {
  color: rgba(255, 255, 255, 0.78);
  font-size: 9px;
}

.member-person small {
  color: rgba(255, 255, 255, 0.27);
  font-size: 7px;
}

.online-state,
.away-state,
.offline-state,
.member-record-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 7px;
}

.online-state {
  color: var(--mint);
}

.away-state {
  color: var(--amber);
}

.offline-state {
  color: rgba(255, 255, 255, 0.3);
}

.member-record-state {
  color: rgba(255, 255, 255, 0.42);
}

.online-state i,
.away-state i,
.offline-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.member-row > button {
  color: rgba(255, 255, 255, 0.3);
  background: transparent;
  cursor: pointer;
}

/* Analytics */

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

.analytics-metrics article {
  display: grid;
  min-height: 119px;
  align-content: center;
  gap: 7px;
  padding: 18px;
}

.analytics-metrics span {
  color: rgba(255, 255, 255, 0.32);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.analytics-metrics strong {
  color: var(--white);
  font-family: var(--display);
  font-size: 25px;
  letter-spacing: -0.04em;
}

.analytics-metrics small {
  color: var(--mint);
  font-size: 7px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
  gap: 12px;
}

.trend-panel,
.loop-panel {
  min-height: 415px;
}

.line-chart {
  position: relative;
  height: 300px;
  margin: 35px 8px 0 32px;
}

.line-chart-axis {
  position: absolute;
  top: 0;
  bottom: 34px;
  left: -32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.22);
  font-size: 7px;
}

.line-chart > svg {
  width: 100%;
  height: 250px;
  overflow: visible;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 62px);
}

.target-line {
  fill: none;
  stroke: var(--teal);
  stroke-dasharray: 5 6;
  stroke-width: 1;
  opacity: 0.65;
}

.trend-area {
  fill: url(#analyticsArea);
  stroke: none;
}

.trend-line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.trend-points circle {
  fill: #0b2748;
  stroke: var(--orange);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.line-chart-labels {
  display: flex;
  justify-content: space-between;
  padding-top: 13px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 7px;
}

.loop-stages {
  display: grid;
  gap: 21px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.loop-stages li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 11px;
  padding-bottom: 9px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
}

.loop-stages li::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  content: "";
}

.loop-stages li > i {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  width: var(--stage);
  height: 3px;
  background: var(--orange);
}

.loop-stages span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loop-stages b {
  color: var(--orange);
  font-family: var(--display);
  font-size: 7px;
}

.loop-stages strong {
  color: rgba(255, 255, 255, 0.72);
}

.loop-insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 28px;
  padding: 13px;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(79, 142, 247, 0.06);
  border-left: 2px solid var(--blue);
}

.loop-insight svg {
  width: 18px;
  flex: 0 0 auto;
  color: var(--blue);
}

.loop-insight p {
  margin: 0;
  font-size: 8px;
  line-height: 1.5;
}

.loop-insight strong {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.68);
}

/* Settings */

.settings-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 26px;
}

.settings-nav {
  display: grid;
  height: fit-content;
  gap: 4px;
}

.settings-nav button {
  min-height: 40px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.35);
  text-align: left;
  background: transparent;
  border-left: 2px solid transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.settings-nav button:hover,
.settings-nav button.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--orange);
}

.settings-content {
  display: grid;
  max-width: 900px;
  gap: 12px;
}

.settings-card {
  padding: 22px;
}

.settings-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.settings-card-heading h2 {
  margin: 0 0 5px;
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--display);
  font-size: 15px;
}

.settings-card-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.33);
  font-size: 8px;
}

.workspace-logo-large {
  width: 44px;
  height: 44px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-top: 20px;
}

.settings-form-grid label,
.report-form > label {
  display: grid;
  gap: 7px;
}

.settings-form-grid label > span,
.report-form > label > span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 8px;
}

.settings-form-grid input,
.settings-form-grid select,
.report-form input,
.report-form select,
.report-form textarea {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: 0;
  font-size: 9px;
}

.settings-form-grid select,
.report-form select {
  background-color: #0a2546;
}

.settings-form-grid input:focus,
.settings-form-grid select:focus,
.report-form input:focus,
.report-form select:focus,
.report-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 91, 25, 0.08);
}

.settings-form-grid input:disabled {
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

.setting-toggle-row {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.setting-toggle-row > span {
  display: grid;
  gap: 4px;
}

.setting-toggle-row strong {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
}

.setting-toggle-row small {
  color: rgba(255, 255, 255, 0.31);
  font-size: 8px;
}

.toggle {
  position: relative;
  width: 34px;
  height: 19px;
  flex: 0 0 auto;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle i {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  transition: background 160ms ease;
}

.toggle i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  content: "";
  transition: transform 160ms ease, background 160ms ease;
}

.toggle input:checked + i {
  background: var(--teal);
  border-color: var(--teal);
}

.toggle input:checked + i::after {
  background: var(--white);
  transform: translateX(15px);
}

/* Drawer, modal and toast */

.sidebar-scrim,
.drawer-scrim {
  position: fixed;
  z-index: 75;
  inset: 0;
  background: rgba(0, 8, 23, 0.66);
  border: 0;
  backdrop-filter: blur(2px);
}

.sidebar-scrim {
  display: none;
}

.signal-drawer {
  position: fixed;
  z-index: 130;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 430px);
  overflow-y: auto;
  padding: 27px;
  color: rgba(255, 255, 255, 0.74);
  background: #071d39;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -24px 0 70px rgba(0, 8, 24, 0.42);
  transform: translateX(102%);
  transition: transform 280ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.signal-drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.drawer-head h2 {
  margin: 9px 0 0;
  color: var(--white);
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.drawer-head > button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 3px;
  cursor: pointer;
}

.drawer-head > button svg {
  width: 17px;
}

.drawer-status-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 25px;
}

.quick-order-preview {
  margin-top: 20px;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(79, 142, 247, 0.08), transparent 48%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 2px solid var(--orange);
}

.quick-preview-label {
  color: rgba(255, 255, 255, 0.36);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.quick-order-preview > h3 {
  margin: 9px 0 8px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.025em;
}

.quick-order-preview > p:not(.quick-last-update) {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  line-height: 1.65;
}

.quick-order-preview > dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.quick-order-preview > dl > div {
  display: grid;
  min-height: 58px;
  align-content: center;
  gap: 5px;
  padding: 10px 11px;
  border-right: 1px solid rgba(255, 255, 255, 0.075);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.quick-order-preview > dl > div:nth-child(2n) {
  border-right: 0;
}

.quick-order-preview > dl > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.quick-order-preview dt {
  color: rgba(255, 255, 255, 0.32);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-order-preview dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 9px;
  line-height: 1.35;
}

.quick-readiness {
  margin-top: 18px;
}

.quick-readiness > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  font-weight: 700;
}

.quick-readiness strong {
  color: var(--amber);
  font-family: var(--display);
  font-size: 15px;
}

.quick-readiness > i {
  display: block;
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.075);
}

.quick-readiness > i > b {
  display: block;
  width: 90%;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--amber));
}

.quick-missing {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  margin-top: 13px;
  padding: 11px;
  color: var(--orange);
  background: rgba(255, 91, 25, 0.07);
  border: 1px solid rgba(255, 91, 25, 0.14);
}

.quick-missing > svg {
  width: 18px;
}

.quick-missing > span {
  display: grid;
  gap: 4px;
}

.quick-missing strong {
  color: #ff9b74;
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-missing small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
  line-height: 1.45;
}

.quick-last-update {
  display: grid;
  gap: 4px;
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.quick-last-update span {
  color: rgba(255, 255, 255, 0.3);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-last-update strong {
  color: rgba(255, 255, 255, 0.68);
  font-size: 8px;
}

.drawer-summary {
  margin-top: 26px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.035);
  border-left: 2px solid var(--orange);
}

.drawer-summary small {
  color: rgba(255, 255, 255, 0.3);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer-summary h3 {
  margin: 8px 0 10px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--display);
  font-size: 17px;
}

.drawer-summary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  line-height: 1.7;
}

.drawer-evidence {
  margin-top: 12px;
}

.evidence-placeholder {
  display: grid;
  height: 120px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.26);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size: 28px 28px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.evidence-placeholder svg {
  width: 28px;
}

.evidence-placeholder span {
  font-size: 8px;
  font-weight: 700;
}

.drawer-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.drawer-meta div {
  display: grid;
  min-height: 66px;
  align-content: center;
  gap: 5px;
  padding: 11px 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.drawer-meta div:nth-child(2n) {
  border-right: 0;
}

.drawer-meta div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.drawer-meta dt {
  color: rgba(255, 255, 255, 0.28);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-meta dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 8px;
}

.work-order-thread,
.report-readiness,
.customer-report-card {
  margin-top: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.thread-language {
  color: rgba(255, 255, 255, 0.44);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.thread-list {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.thread-list::before {
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 15px;
  width: 1px;
  background: rgba(255, 255, 255, 0.09);
  content: "";
}

.thread-message {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
}

.thread-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--white);
  background: #9e4522;
  border: 3px solid #0a2546;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 7px;
  font-weight: 700;
}

.thread-message.is-ai .thread-avatar {
  background: var(--teal);
}

.thread-message.is-human .thread-avatar {
  background: var(--blue);
}

.thread-content {
  min-width: 0;
  padding: 11px 12px;
  background: rgba(4, 20, 40, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-left: 2px solid rgba(255, 91, 25, 0.75);
}

.thread-message.is-ai .thread-content {
  background: rgba(33, 166, 161, 0.06);
  border-left-color: var(--teal);
}

.thread-message.is-human .thread-content {
  background: rgba(79, 142, 247, 0.06);
  border-left-color: var(--blue);
}

.thread-message.is-followup .thread-content {
  border-left-color: var(--amber);
}

.thread-content header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.thread-content header strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 8px;
}

.thread-content header > span:not(.reply-type) {
  color: rgba(255, 255, 255, 0.34);
  font-size: 7px;
}

.thread-content header time {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.32);
  font-size: 7px;
}

.reply-type {
  padding: 3px 6px;
  border-radius: 8px;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ai-reply {
  color: var(--mint);
  background: rgba(33, 166, 161, 0.12);
}

.human-reply {
  color: #a8c9ff;
  background: rgba(79, 142, 247, 0.13);
}

.thread-content > p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  line-height: 1.55;
}

.thread-content > small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 7px;
  line-height: 1.45;
}

.thread-content .voice-note-player {
  margin-top: 9px;
}

.thread-attachments {
  display: grid;
  grid-template-columns: repeat(3, 54px) 1fr;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.thread-attachments figure {
  position: relative;
  height: 42px;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

.thread-attachments img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thread-attachments figcaption {
  position: absolute;
  right: 3px;
  bottom: 2px;
  color: var(--white);
  font-size: 6px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.thread-attachments > span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 7px;
}

.thread-event {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: flex-start;
  gap: 10px;
  margin-left: 41px;
  padding: 10px 11px;
  background: rgba(242, 180, 61, 0.08);
  border: 1px solid rgba(242, 180, 61, 0.15);
  border-left: 2px solid var(--amber);
}

.thread-event > svg {
  width: 18px;
  color: var(--amber);
}

.thread-event > div {
  display: grid;
  gap: 4px;
}

.thread-event strong {
  color: #ffd88a;
  font-size: 8px;
}

.thread-event p,
.thread-event time {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 7px;
  line-height: 1.45;
}

.thread-event time {
  color: rgba(255, 255, 255, 0.3);
}

.report-readiness {
  background: linear-gradient(135deg, rgba(242, 180, 61, 0.08), rgba(255, 255, 255, 0.025));
  border-top: 2px solid rgba(242, 180, 61, 0.72);
}

.report-readiness .drawer-section-head > strong {
  color: var(--amber);
  font-family: var(--display);
  font-size: 18px;
}

.readiness-bar {
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.readiness-bar i {
  display: block;
  width: 90%;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--amber));
}

.report-readiness > p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 7px;
}

.report-readiness > p b {
  color: rgba(255, 255, 255, 0.82);
}

.report-readiness > p small {
  color: rgba(255, 255, 255, 0.35);
  font-size: 7px;
}

.missing-requirement {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px;
  background: rgba(255, 91, 25, 0.07);
  border: 1px solid rgba(255, 91, 25, 0.14);
}

.missing-requirement > svg {
  width: 18px;
  color: var(--orange);
}

.missing-requirement > span {
  display: grid;
  gap: 3px;
}

.missing-requirement strong {
  color: #ff9b74;
  font-size: 7px;
  text-transform: uppercase;
}

.missing-requirement small {
  color: rgba(255, 255, 255, 0.57);
  font-size: 7px;
  line-height: 1.4;
}

.missing-requirement button {
  min-height: 28px;
  padding: 0 9px;
  color: var(--white);
  background: var(--orange);
  border-radius: 3px;
  cursor: pointer;
  font-size: 7px;
  font-weight: 800;
}

.customer-report-card {
  background: linear-gradient(135deg, rgba(33, 166, 161, 0.09), rgba(255, 255, 255, 0.025) 48%);
  border-top: 2px solid rgba(33, 166, 161, 0.75);
}

.report-draft-badge {
  padding: 5px 8px;
  color: #9bc3ff;
  background: rgba(79, 142, 247, 0.1);
  border: 1px solid rgba(79, 142, 247, 0.16);
  border-radius: 10px;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-template {
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 7px;
}

.report-template strong {
  margin-left: 5px;
  color: rgba(255, 255, 255, 0.72);
}

.customer-report-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.customer-report-fields > div {
  display: grid;
  min-height: 58px;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.customer-report-fields > div:nth-child(2n) {
  border-right: 0;
}

.customer-report-fields .report-wide {
  grid-column: 1 / -1;
  min-height: 66px;
  border-right: 0;
}

.customer-report-fields > div:last-child {
  border-bottom: 0;
}

.customer-report-fields dt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.customer-report-fields dt i {
  color: var(--mint);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
}

.customer-report-fields dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 8px;
  line-height: 1.45;
}

.customer-report-fields .is-report-missing {
  background: rgba(255, 91, 25, 0.055);
  border-left: 2px solid var(--orange);
}

.customer-report-fields .is-report-missing dt,
.customer-report-fields .is-report-missing dt i {
  color: #ff9b74;
}

.customer-report-fields .is-report-missing dd {
  color: rgba(255, 255, 255, 0.56);
}

.customer-report-fields .is-report-missing.is-complete {
  background: rgba(33, 166, 161, 0.055);
  border-left-color: var(--teal);
}

.customer-report-fields .is-report-missing.is-complete dt,
.customer-report-fields .is-report-missing.is-complete dt i {
  color: var(--mint);
}

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

.report-provenance span {
  display: grid;
  gap: 3px;
  padding: 8px;
  color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.025);
  font-size: 6px;
  text-align: center;
}

.report-provenance strong {
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--display);
  font-size: 10px;
}

/* Full work-order workspace */

.full-work-order-view {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.work-order-back {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.work-order-back svg {
  width: 16px;
}

.work-order-back:hover,
.work-order-back:focus-visible {
  color: var(--white);
  outline: 0;
}

.full-order-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}

.full-order-heading h1 {
  margin: 11px 0 8px;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.full-order-heading > div:first-child > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.full-order-heading .app-eyebrow b {
  color: rgba(255, 255, 255, 0.64);
  font-family: var(--display);
  font-size: 8px;
}

.full-order-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.full-order-tabs {
  display: flex;
  min-height: 50px;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.full-order-tabs button {
  position: relative;
  display: inline-flex;
  min-width: 150px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.46);
  background: transparent;
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.full-order-tabs button > span {
  color: rgba(255, 255, 255, 0.3);
  font-size: 8px;
  font-weight: 700;
}

.full-order-tabs button .tab-alert {
  padding: 4px 7px;
  color: var(--amber);
  background: rgba(242, 180, 61, 0.1);
  border-radius: 10px;
}

.full-order-tabs button.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.075);
}

.full-order-tabs button.is-active::after {
  position: absolute;
  right: 16px;
  bottom: -5px;
  left: 16px;
  height: 2px;
  background: var(--orange);
  content: "";
}

.full-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 340px);
  align-items: start;
  gap: 14px;
}

.full-order-primary,
.full-order-sidebar {
  min-width: 0;
}

.full-order-panel {
  min-width: 0;
  padding: clamp(20px, 2.2vw, 30px);
  background:
    linear-gradient(145deg, rgba(79, 142, 247, 0.045), transparent 40%),
    rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 2px solid rgba(79, 142, 247, 0.52);
}

.full-order-panel[hidden] {
  display: none;
}

[data-incomplete-only][hidden],
[data-missing-requirement][hidden] {
  display: none !important;
}

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

.full-panel-heading > div {
  display: grid;
  gap: 6px;
}

.full-panel-heading > div > span,
.full-side-card > span,
.order-facts > span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.full-panel-heading h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.025em;
}

.full-thread-list {
  gap: 15px;
  margin-top: 24px;
}

.full-thread-list::before {
  top: 30px;
  bottom: 30px;
  left: 18px;
}

.full-thread-list .thread-message {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
}

.full-thread-list .thread-avatar {
  width: 38px;
  height: 38px;
  font-size: 8px;
}

.full-thread-list .thread-content {
  padding: 15px 16px;
}

.full-thread-list .thread-content header {
  gap: 9px;
}

.full-thread-list .thread-content header strong {
  font-size: 10px;
}

.full-thread-list .thread-content header > span:not(.reply-type),
.full-thread-list .thread-content header time {
  font-size: 8px;
}

.full-thread-list .reply-type {
  padding: 4px 7px;
  font-size: 7px;
}

.full-thread-list .thread-content > p {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.62;
}

.full-thread-list .thread-content > small {
  margin-top: 9px;
  font-size: 9px;
  line-height: 1.5;
}

.full-thread-list .voice-note-player {
  max-width: 470px;
  min-height: 54px;
  grid-template-columns: 36px 1fr auto;
  padding: 8px 11px;
}

.full-thread-list .voice-note-player > button {
  width: 34px;
  height: 34px;
}

.full-thread-list .voice-note-player > span {
  font-size: 9px;
}

.full-thread-list .thread-attachments {
  grid-template-columns: repeat(3, minmax(80px, 116px)) minmax(70px, 1fr);
  gap: 8px;
  margin-top: 11px;
}

.full-thread-list .thread-attachments figure {
  height: 72px;
}

.full-thread-list .thread-attachments figcaption,
.full-thread-list .thread-attachments > span {
  font-size: 8px;
}

.full-thread-list .thread-event {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  margin-left: 51px;
  padding: 14px 15px;
}

.full-thread-list .thread-event strong {
  font-size: 10px;
}

.full-thread-list .thread-event p,
.full-thread-list .thread-event time {
  font-size: 9px;
}

.full-reply-box {
  margin-top: 22px;
  padding: 15px;
  background: rgba(4, 20, 40, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.full-reply-box > span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.full-reply-box > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}

.full-reply-box > div > button:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.full-reply-box > div > button:first-child svg {
  width: 16px;
}

.full-reply-box textarea {
  min-height: 54px;
  resize: vertical;
  padding: 11px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.11);
  outline: 0;
  font-size: 11px;
  line-height: 1.45;
}

.full-reply-box textarea:focus {
  border-color: rgba(79, 142, 247, 0.65);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.1);
}

.full-report-fields {
  margin-top: 18px;
}

.full-report-fields > div {
  min-height: 72px;
  gap: 7px;
  padding: 14px;
}

.full-report-fields .report-wide {
  min-height: 80px;
}

.full-report-fields dt {
  font-size: 8px;
}

.full-report-fields dt i {
  font-size: 7px;
}

.full-report-fields dd {
  font-size: 11px;
  line-height: 1.55;
}

.full-order-panel > .translation-block {
  padding: 15px 16px;
}

.full-order-panel > .translation-block p {
  font-size: 11px;
  line-height: 1.6;
}

.full-order-panel > .report-provenance {
  gap: 8px;
  margin-top: 15px;
}

.full-order-panel > .report-provenance span {
  padding: 11px;
  font-size: 8px;
}

.full-order-panel > .report-provenance strong {
  font-size: 13px;
}

.full-order-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  align-self: start;
  gap: 12px;
}

.full-side-card {
  margin: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.full-side-card.report-readiness {
  margin-top: 0;
  padding: 18px;
}

.full-side-card .drawer-section-head h3 {
  font-size: 16px;
}

.full-side-card.report-readiness .drawer-section-head > strong {
  font-size: 22px;
}

.full-side-card.report-readiness > p {
  display: grid;
  gap: 5px;
  font-size: 8px;
}

.full-side-card .missing-requirement {
  grid-template-columns: 24px 1fr;
  padding: 12px;
}

.full-side-card .missing-requirement button {
  grid-column: 2;
  justify-self: start;
}

.order-facts dl {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
}

.order-facts dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.order-facts dl > div:last-child {
  border-bottom: 0;
}

.order-facts dt {
  color: rgba(255, 255, 255, 0.32);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-facts dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  line-height: 1.4;
}

.next-action-card {
  border-top: 2px solid rgba(255, 91, 25, 0.72);
}

.next-action-card h3 {
  margin: 11px 0 8px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--display);
  font-size: 16px;
}

.next-action-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  line-height: 1.55;
}

.next-action-card .compact-action {
  width: 100%;
  margin-top: 14px;
}

.audit-log {
  display: grid;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.audit-log li {
  display: grid;
  min-height: 72px;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.audit-log li:last-child {
  border-bottom: 0;
}

.audit-log li > i {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid #0a2546;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.audit-log li > i.audit-worker { background: var(--orange); }
.audit-log li > i.audit-ai { background: var(--teal); }
.audit-log li > i.audit-human { background: var(--blue); }
.audit-log li > i.audit-warning { background: var(--amber); }

.audit-log li > span {
  display: grid;
  gap: 5px;
}

.audit-log strong {
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
}

.audit-log small,
.audit-log time {
  color: rgba(255, 255, 255, 0.36);
  font-size: 8px;
  line-height: 1.4;
}

/* Readability pass: keep the visual language, increase the reading scale. */

.full-work-order-view {
  max-width: 1320px;
}

.work-order-back {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
}

.full-order-heading > div:first-child > p:last-child {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  line-height: 1.55;
}

.full-order-heading .app-eyebrow,
.full-order-heading .app-eyebrow b {
  font-size: 9px;
}

.full-order-heading-actions .table-priority,
.full-order-heading-actions .status-pill {
  min-height: 28px;
  padding-right: 9px;
  padding-left: 9px;
  font-size: 9px;
}

.full-order-heading-actions .compact-action,
.full-order-heading-actions .secondary-compact {
  min-height: 46px;
  padding-right: 18px;
  padding-left: 18px;
  font-size: 11px;
}

.full-order-tabs {
  min-height: 56px;
  margin-bottom: 18px;
}

.full-order-tabs button {
  min-width: 166px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.full-order-tabs button > span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
}

.full-order-layout {
  grid-template-columns: minmax(0, 1fr) minmax(350px, 360px);
  gap: 20px;
}

.full-order-panel {
  padding: clamp(24px, 2.3vw, 32px);
  background:
    linear-gradient(145deg, rgba(79, 142, 247, 0.065), transparent 42%),
    rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
}

.full-panel-heading > div > span,
.full-side-card > span,
.order-facts > span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
}

.full-panel-heading h2 {
  font-size: 24px;
}

.thread-language {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.full-thread-list {
  gap: 19px;
  margin-top: 27px;
}

.full-thread-list .thread-content {
  padding: 18px 20px;
  border-color: rgba(255, 255, 255, 0.12);
}

.full-thread-list .thread-content header strong {
  font-size: 12px;
}

.full-thread-list .thread-content header > span:not(.reply-type),
.full-thread-list .thread-content header time {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

.full-thread-list .reply-type {
  font-size: 9px;
}

.full-thread-list .thread-content > p {
  max-width: 68ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.65;
}

.full-thread-list .thread-content > small {
  max-width: 72ch;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.55;
}

.full-thread-list .voice-note-player > span,
.full-thread-list .thread-attachments figcaption,
.full-thread-list .thread-attachments > span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.full-thread-list .thread-event {
  padding: 16px 18px;
  border-color: rgba(242, 180, 61, 0.24);
}

.full-thread-list .thread-event strong {
  font-size: 12px;
}

.full-thread-list .thread-event p,
.full-thread-list .thread-event time {
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  line-height: 1.55;
}

.full-reply-box > span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

.full-reply-box textarea {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.full-reply-box .compact-action {
  font-size: 11px;
}

.full-order-panel .report-template {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

.full-order-panel .report-template strong {
  color: rgba(255, 255, 255, 0.82);
}

.full-order-panel > .translation-block > span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
}

.full-order-panel > .translation-block p {
  max-width: 68ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.65;
}

.full-report-fields {
  border-color: rgba(255, 255, 255, 0.12);
}

.full-report-fields > div {
  min-height: 82px;
  padding: 17px;
  border-color: rgba(255, 255, 255, 0.12);
}

.full-report-fields .report-wide {
  min-height: 92px;
}

.full-report-fields dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.full-report-fields dt i {
  font-size: 9px;
}

.full-report-fields dd {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.6;
}

.full-report-fields .report-wide dd {
  max-width: 68ch;
}

.full-order-panel > .report-provenance span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.full-order-panel > .report-provenance strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}

.full-order-sidebar {
  gap: 16px;
}

.full-side-card {
  padding: 21px;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
}

.full-side-card.report-readiness {
  padding: 21px;
}

.full-side-card .drawer-section-head > div > span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 9px;
}

.full-side-card .drawer-section-head h3,
.next-action-card h3 {
  font-size: 18px;
}

.full-side-card.report-readiness > p {
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  line-height: 1.5;
}

.full-side-card.report-readiness > p small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
}

.full-side-card .missing-requirement strong {
  font-size: 9px;
}

.full-side-card .missing-requirement small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  line-height: 1.5;
}

.full-side-card .missing-requirement button {
  min-height: 32px;
  font-size: 9px;
}

.order-facts dl > div {
  grid-template-columns: 100px minmax(0, 1fr);
  padding: 12px 0;
  border-color: rgba(255, 255, 255, 0.1);
}

.order-facts dt {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
}

.order-facts dd {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.5;
}

.next-action-card p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.65;
}

.next-action-card .compact-action {
  min-height: 46px;
  font-size: 11px;
}

.audit-log {
  margin-top: 28px;
}

.audit-log li {
  min-height: 84px;
  border-color: rgba(255, 255, 255, 0.1);
}

.audit-log strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.audit-log small,
.audit-log time {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.5;
}

.field-input-card,
.ai-report-card {
  margin-top: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.ai-report-card {
  background: linear-gradient(135deg, rgba(33, 166, 161, 0.09), rgba(255, 255, 255, 0.025) 46%);
  border-top: 2px solid rgba(33, 166, 161, 0.75);
}

.drawer-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-section-head > div {
  display: grid;
  gap: 5px;
}

.drawer-section-head > div > span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.drawer-section-head h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: -0.02em;
}

.report-source-status,
.ai-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--mint);
  background: rgba(33, 166, 161, 0.1);
  border: 1px solid rgba(33, 166, 161, 0.15);
  border-radius: 11px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-source-status i,
.ai-badge i,
.ai-confidence i {
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

.ai-badge {
  color: #9bc3ff;
  background: rgba(79, 142, 247, 0.1);
  border-color: rgba(79, 142, 247, 0.16);
}

.ai-badge i {
  background: var(--blue);
}

.field-input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 8px;
}

.field-input-meta b {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--display);
  font-weight: 700;
}

.voice-note-player {
  display: grid;
  min-height: 48px;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 7px 9px;
  background: rgba(4, 20, 40, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.voice-note-player > button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--white);
  background: var(--orange);
  border-radius: 50%;
  cursor: pointer;
}

.voice-note-player > button svg {
  width: 14px;
  margin-left: 2px;
  fill: currentColor;
  stroke: none;
}

.voice-wave {
  display: flex;
  height: 22px;
  align-items: center;
  gap: 3px;
}

.voice-wave i {
  width: 3px;
  height: var(--voice-height, 45%);
  background: var(--orange);
  border-radius: 2px;
  opacity: 0.82;
}

.voice-wave i:nth-child(2n) { --voice-height: 78%; }
.voice-wave i:nth-child(3n) { --voice-height: 100%; }
.voice-wave i:nth-child(4n) { --voice-height: 58%; }
.voice-wave i:nth-child(5n) { --voice-height: 28%; }

.voice-note-player.is-playing .voice-wave i {
  animation: voiceWave 650ms ease-in-out infinite alternate;
}

.voice-note-player.is-playing .voice-wave i:nth-child(2n) { animation-delay: 120ms; }
.voice-note-player.is-playing .voice-wave i:nth-child(3n) { animation-delay: 240ms; }

.voice-note-player > span {
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--display);
  font-size: 8px;
}

.original-message {
  margin: 11px 0 0;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.original-message > span,
.translation-block > span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.original-message p,
.translation-block p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-style: italic;
  line-height: 1.55;
}

.field-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 11px;
}

.field-photo-grid figure {
  position: relative;
  height: 66px;
  margin: 0;
  overflow: hidden;
  background: #061831;
}

.field-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.06);
}

.field-photo-grid figcaption {
  position: absolute;
  right: 5px;
  bottom: 4px;
  color: var(--white);
  font-family: var(--display);
  font-size: 7px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

.field-photo-grid > span {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
}

.translation-block {
  margin-top: 14px;
  padding: 12px;
  background: rgba(79, 142, 247, 0.08);
  border-left: 2px solid var(--blue);
}

.translation-block p {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.ai-report-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-report-fields div {
  display: grid;
  min-height: 58px;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-report-fields div:nth-child(2n) {
  border-right: 0;
}

.ai-report-fields div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.ai-report-fields .ai-report-action {
  grid-column: 1 / -1;
  min-height: 68px;
  border-right: 0;
  border-bottom: 0;
}

.ai-report-fields dt {
  color: rgba(255, 255, 255, 0.36);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ai-report-fields dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 8px;
  line-height: 1.4;
}

.ai-confidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 7px;
}

.ai-confidence span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-confidence strong {
  color: var(--mint);
  font-family: var(--display);
  font-size: 8px;
}

.drawer-timeline {
  margin-top: 25px;
}

.drawer-timeline h3 {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--display);
  font-size: 14px;
}

.drawer-timeline ol {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-timeline ol::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 7px;
  width: 1px;
  background: rgba(255, 255, 255, 0.09);
  content: "";
}

.drawer-timeline li {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 55px;
  grid-template-columns: 15px 1fr auto;
  gap: 12px;
  align-items: center;
}

.drawer-timeline li > i {
  width: 15px;
  height: 15px;
  background: #071d39;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.drawer-timeline li.is-complete > i {
  background: var(--teal);
  border-color: var(--teal);
}

.drawer-timeline li.is-current > i {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 91, 25, 0.12);
}

.drawer-timeline li > span {
  display: grid;
  gap: 4px;
}

.drawer-timeline strong {
  color: rgba(255, 255, 255, 0.67);
  font-size: 8px;
}

.drawer-timeline small,
.drawer-timeline time {
  color: rgba(255, 255, 255, 0.28);
  font-size: 7px;
}

.drawer-timeline time {
  font-style: normal;
}

.drawer-actions {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 9px;
  margin-top: 24px;
}

.signal-drawer[data-state="resolved"] .drawer-actions {
  grid-template-columns: 1fr;
}

.signal-drawer .secondary-action {
  color: rgba(255, 255, 255, 0.68);
  border-color: rgba(255, 255, 255, 0.13);
}

.modal-backdrop {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: 20px;
  place-items: center;
  background: rgba(0, 8, 23, 0.76);
  backdrop-filter: blur(5px);
}

.modal-backdrop[hidden] {
  display: none;
}

.report-modal {
  width: min(100%, 610px);
  padding: 25px;
  color: rgba(255, 255, 255, 0.7);
  background: #071d39;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  box-shadow: 0 28px 80px rgba(0, 8, 24, 0.5);
}

.report-form {
  display: grid;
  gap: 16px;
  margin-top: 25px;
}

.report-form .settings-form-grid {
  margin-top: 0;
}

.report-form textarea {
  min-height: 110px;
  padding-top: 11px;
  resize: vertical;
}

.report-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 5px;
}

.report-form-actions .secondary-action,
.report-form-actions .primary-action {
  min-width: 120px;
}

.report-form-actions .secondary-action {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.13);
}

.toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(calc(100% - 48px), 330px);
  min-height: 66px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  color: rgba(255, 255, 255, 0.72);
  background: #0a294c;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  box-shadow: 0 22px 55px rgba(0, 8, 24, 0.48);
  animation: toastIn 220ms ease both;
}

.toast[hidden] {
  display: none;
}

.toast > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--mint);
  background: rgba(33, 166, 161, 0.1);
  border-radius: 50%;
}

.toast svg {
  width: 16px;
}

.toast p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.toast strong {
  color: var(--white);
  font-size: 9px;
}

.toast small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
}

.toast > button {
  color: rgba(255, 255, 255, 0.35);
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}

.mobile-app-nav {
  display: none;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(33, 166, 161, 0.1); }
  50% { opacity: 0.55; box-shadow: 0 0 0 6px rgba(33, 166, 161, 0); }
}

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

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes voiceWave {
  from { transform: scaleY(0.45); }
  to { transform: scaleY(1); }
}

@media (max-width: 1240px) {
  .auth-shell {
    grid-template-columns: minmax(0, 52%) minmax(430px, 48%);
  }

  .auth-story {
    padding-right: 48px;
    padding-left: 48px;
  }

  .auth-live-flow span {
    display: grid;
    justify-items: center;
  }

  .auth-live-flow > i {
    margin-bottom: 17px;
  }

  .workspace-sidebar {
    width: 220px;
  }

  .workspace-stage {
    margin-left: 220px;
  }

  .queue-item {
    grid-template-columns: 56px minmax(150px, 1fr) 55px minmax(95px, 0.7fr) 18px;
  }

  .queue-time {
    display: none;
  }

  .analytics-grid {
    grid-template-columns: 1.3fr 0.7fr;
  }
}

@media (max-width: 1020px) {
  .auth-shell {
    grid-template-columns: 45% 55%;
  }

  .auth-story-copy h1 {
    font-size: clamp(42px, 6vw, 62px);
  }

  .auth-live-flow {
    grid-template-columns: repeat(4, 1fr);
  }

  .auth-live-flow > i {
    display: none;
  }

  .auth-live-meta {
    grid-template-columns: 1fr;
  }

  .auth-live-meta span {
    display: none;
  }

  .auth-live-meta span:first-child {
    display: flex;
  }

  .workspace-sidebar {
    width: 246px;
    transform: translateX(-102%);
    transition: transform 260ms cubic-bezier(0.2, 0.75, 0.2, 1);
  }

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

  .workspace-page.sidebar-open .sidebar-scrim {
    display: block;
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  .workspace-stage {
    margin-left: 0;
  }

  .profile-menu {
    position: fixed;
    z-index: 140;
    right: auto;
    bottom: 18px;
    left: 18px;
    width: 210px;
  }

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

  .volume-panel,
  .queue-panel {
    grid-column: span 7;
  }

  .health-panel,
  .activity-panel {
    grid-column: span 5;
  }

  .queue-item {
    grid-template-columns: 52px minmax(140px, 1fr) minmax(95px, 0.7fr) 18px;
  }

  .queue-evidence {
    display: none;
  }

  .team-layout,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .role-panel {
    min-height: 210px;
  }

  .role-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .member-row {
    grid-template-columns: minmax(190px, 1.3fr) 1fr 0.8fr 30px;
  }

  .member-row > span:nth-child(3) {
    display: none;
  }

  .settings-layout {
    grid-template-columns: 150px 1fr;
  }

  .full-order-layout {
    grid-template-columns: 1fr;
  }

  .full-order-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .full-side-card.report-readiness {
    grid-row: span 2;
  }
}

@media (max-width: 760px) {
  .auth-header {
    position: absolute;
    height: 72px;
    padding: 0 20px;
    background: rgba(4, 20, 40, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .auth-header .app-brand-name span {
    color: rgba(255, 255, 255, 0.5);
  }

  .back-link {
    color: rgba(255, 255, 255, 0.64);
  }

  .auth-shell {
    display: block;
  }

  .auth-story {
    min-height: 305px;
    justify-content: flex-end;
    padding: 110px 20px 34px;
  }

  .auth-story-image {
    opacity: 0.58;
  }

  .auth-story-copy h1 {
    margin: 13px 0 0;
    font-size: 38px;
  }

  .auth-story-copy > p:last-child,
  .auth-live-card {
    display: none;
  }

  .auth-form-panel {
    min-height: auto;
    padding: 48px 20px 98px;
    background-size: 54px 100%;
  }

  .auth-step {
    margin-bottom: 40px;
  }

  .auth-form-heading h2 {
    font-size: 34px;
  }

  .auth-footer {
    right: 20px;
    bottom: 22px;
    left: 20px;
  }

  .auth-footer > span {
    display: none;
  }

  .auth-footer nav {
    width: 100%;
    justify-content: center;
  }

  .workspace-topbar {
    height: 62px;
    padding: 0 14px;
  }

  .topbar-title > div {
    display: grid;
    gap: 2px;
  }

  .topbar-title span::after {
    display: none;
  }

  .topbar-search,
  .live-pill {
    display: none;
  }

  .notification-panel {
    position: fixed;
    top: 58px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .workspace-main {
    padding: 26px 14px 94px;
  }

  .work-order-back {
    margin-bottom: 15px;
  }

  .full-order-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
  }

  .full-order-heading h1 {
    font-size: 33px;
  }

  .full-order-heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .full-order-heading-actions .secondary-compact,
  .full-order-heading-actions .compact-action {
    flex: 1 1 150px;
  }

  .full-order-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .full-order-tabs button {
    min-width: 140px;
    flex: 0 0 auto;
    padding: 0 12px;
  }

  .full-order-panel {
    padding: 18px 15px;
  }

  .full-order-sidebar {
    grid-template-columns: 1fr;
  }

  .full-side-card.report-readiness {
    grid-row: auto;
  }

  .full-thread-list .thread-attachments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .full-thread-list .thread-attachments > span {
    grid-column: 1 / -1;
  }

  .full-reply-box > div {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .full-reply-box .compact-action {
    grid-column: 2;
    justify-self: end;
  }

  .view-heading,
  .view-heading-compact {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
  }

  .view-heading h1 {
    font-size: 33px;
  }

  .view-actions {
    width: 100%;
  }

  .site-select,
  .view-actions .compact-action,
  .view-heading > .compact-action {
    flex: 1;
  }

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

  .metric-card {
    min-height: 137px;
    padding: 17px;
  }

  .metric-card > i {
    right: 17px;
    left: 17px;
  }

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

  .volume-panel,
  .queue-panel,
  .health-panel,
  .activity-panel {
    grid-column: 1;
  }

  .volume-panel {
    overflow: hidden;
  }

  .chart-legend {
    display: none;
  }

  .health-panel {
    min-height: 360px;
  }

  .queue-item {
    min-height: 72px;
    grid-template-columns: 49px minmax(0, 1fr) 18px;
    padding: 0 16px;
  }

  .queue-owner,
  .queue-evidence,
  .queue-time {
    display: none;
  }

  .panel-link-top {
    font-size: 0;
  }

  .panel-link-top svg {
    width: 17px;
  }

  .signal-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .table-search {
    width: 100%;
  }

  .filter-chips {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .filter-chips button {
    flex: 0 0 auto;
  }

  .filter-button {
    display: none;
  }

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

  .site-card-featured {
    min-height: 340px;
    grid-column: 1;
  }

  .site-card-map {
    inset: 43% 0 0;
    mask-image: linear-gradient(180deg, transparent, black 40%);
  }

  .site-card-stats {
    margin-top: 35px;
  }

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

  .coverage-sites {
    grid-template-columns: 1fr;
  }

  .role-list {
    grid-template-columns: 1fr;
  }

  .member-row {
    min-height: 66px;
    grid-template-columns: 1fr auto 24px;
  }

  .member-row > span:nth-child(2),
  .member-row > span:nth-child(3) {
    display: none;
  }

  .small-search {
    display: none;
  }

  .analytics-metrics article {
    min-height: 112px;
  }

  .line-chart {
    height: 250px;
    margin-left: 27px;
  }

  .line-chart > svg {
    height: 200px;
  }

  .settings-layout {
    display: block;
  }

  .settings-nav {
    display: flex;
    overflow-x: auto;
    margin-bottom: 18px;
  }

  .settings-nav button {
    min-width: max-content;
    border-bottom: 2px solid transparent;
    border-left: 0;
  }

  .settings-nav button.is-active {
    border-bottom-color: var(--orange);
  }

  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .setting-toggle-row {
    min-height: 82px;
  }

  .setting-toggle-row small {
    max-width: 250px;
    line-height: 1.4;
  }

  .mobile-app-nav {
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: 69px;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(4, 20, 40, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
  }

  .mobile-app-nav button {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.35);
    background: transparent;
    cursor: pointer;
    font-size: 7px;
    font-weight: 700;
  }

  .mobile-app-nav button svg {
    width: 19px;
    height: 19px;
  }

  .mobile-app-nav button.is-active {
    color: var(--orange);
  }

  .mobile-app-nav button > i {
    position: absolute;
    top: 8px;
    left: 55%;
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    color: var(--white);
    background: var(--orange);
    border: 2px solid #041428;
    border-radius: 50%;
    font-size: 6px;
    font-style: normal;
  }

  .signal-drawer {
    padding: 22px 18px 90px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .report-modal {
    max-height: 92svh;
    overflow-y: auto;
    padding: 22px 18px 28px;
    border-radius: 8px 8px 0 0;
  }

  .report-form-actions .secondary-action,
  .report-form-actions .primary-action {
    min-width: 0;
    flex: 1;
  }

  .toast {
    right: 14px;
    bottom: 82px;
    width: calc(100% - 28px);
  }
}

@media (max-width: 460px) {
  .app-brand-name {
    display: none;
  }

  .auth-story {
    min-height: 275px;
  }

  .auth-story-copy h1 {
    font-size: 34px;
  }

  .auth-form-panel {
    padding-top: 40px;
  }

  .metric-grid,
  .analytics-metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 126px;
  }

  .site-card-head {
    grid-template-columns: auto 1fr;
  }

  .site-state {
    grid-column: 2;
  }

  .drawer-meta {
    grid-template-columns: 1fr;
  }

  .drawer-meta div,
  .drawer-meta div:nth-child(2n),
  .drawer-meta div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

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

  .quick-order-preview > dl {
    grid-template-columns: 1fr;
  }

  .quick-order-preview > dl > div,
  .quick-order-preview > dl > div:nth-child(2n),
  .quick-order-preview > dl > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  }

  .quick-order-preview > dl > div:last-child {
    border-bottom: 0;
  }

  .full-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .full-thread-list .thread-message {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
  }

  .full-thread-list .thread-avatar {
    width: 32px;
    height: 32px;
  }

  .full-thread-list::before {
    left: 15px;
  }

  .full-reply-box > div {
    grid-template-columns: 1fr;
  }

  .full-reply-box > div > button:first-child {
    display: none;
  }

  .full-reply-box .compact-action {
    grid-column: 1;
    justify-self: stretch;
  }

  .thread-content header {
    flex-wrap: wrap;
  }

  .thread-content header time {
    width: 100%;
    margin-left: 0;
  }

  .thread-attachments {
    grid-template-columns: repeat(3, 1fr);
  }

  .thread-attachments > span {
    grid-column: 1 / -1;
  }

  .thread-event {
    margin-left: 0;
  }

  .report-readiness > p {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .missing-requirement {
    grid-template-columns: 24px 1fr;
  }

  .missing-requirement button {
    grid-column: 2;
    justify-self: start;
  }

  .customer-report-fields {
    grid-template-columns: 1fr;
  }

  .customer-report-fields > div,
  .customer-report-fields > div:nth-child(2n),
  .customer-report-fields .report-wide {
    grid-column: 1;
    border-right: 0;
  }

  .report-provenance {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.ai-evidence-review {
  margin: 18px 0;
  border: 1px solid rgba(33, 166, 161, 0.28);
  border-radius: 10px;
  padding: 18px;
  background: rgba(33, 166, 161, 0.05);
}

.ai-evidence-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ai-evidence-heading span,
.ai-evidence-heading strong {
  color: var(--teal);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-evidence-heading h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1rem;
}

.ai-evidence-review > p,
.ai-evidence-review > small {
  display: block;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.ai-fact-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.ai-fact-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper-2);
}

.ai-fact-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-fact-item header strong {
  color: var(--teal);
}

.ai-fact-item p {
  margin: 7px 0 0;
  color: var(--ink);
  line-height: 1.5;
}

.ai-output-recommendations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.ai-output-recommendations > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper-2);
}

.ai-output-recommendations dt {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-output-recommendations dd {
  margin: 7px 0 0;
  color: var(--ink);
  line-height: 1.5;
}

.ai-quality-issues {
  margin-top: 14px;
  border-left: 3px solid var(--orange);
  padding-left: 12px;
}

.ai-quality-issues > strong {
  color: var(--orange);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-quality-issues ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink);
}

.full-order-panel .ai-evidence-review {
  border-color: rgba(33, 166, 161, 0.32);
  background: rgba(33, 166, 161, 0.07);
}

.full-order-panel .ai-evidence-heading span,
.full-order-panel .ai-evidence-heading strong,
.full-order-panel .ai-fact-item header strong {
  color: var(--mint);
}

.full-order-panel .ai-evidence-heading h3,
.full-order-panel .ai-fact-item p,
.full-order-panel .ai-output-recommendations dd,
.full-order-panel .ai-quality-issues ul {
  color: rgba(255, 255, 255, 0.88);
}

.full-order-panel .ai-evidence-review > p,
.full-order-panel .ai-evidence-review > small,
.full-order-panel .ai-fact-item header,
.full-order-panel .ai-output-recommendations dt {
  color: rgba(255, 255, 255, 0.58);
}

.full-order-panel .ai-fact-item,
.full-order-panel .ai-output-recommendations > div {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

.inspection-review {
  margin: 18px 0;
  border: 1px solid rgba(242, 180, 61, 0.38);
  border-radius: 10px;
  padding: 18px;
  background: rgba(242, 180, 61, 0.07);
}

.inspection-review-heading,
.inspection-review-item header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.inspection-review-heading span,
.inspection-review-heading strong,
.inspection-review-item header span {
  color: var(--amber);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.inspection-review-heading h3 {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  text-transform: capitalize;
}

.inspection-review > p,
.inspection-review > small {
  display: block;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
}

.inspection-review-items {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.inspection-review-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.inspection-review-item.is-fail {
  border-left-color: #ff754b;
}

.inspection-review-item header strong,
.inspection-review-item p {
  color: rgba(255, 255, 255, 0.88);
}

.inspection-review-item p,
.inspection-review-item small {
  display: block;
  margin: 7px 0 0;
  line-height: 1.5;
}

.inspection-review-item small {
  color: var(--mint);
}

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

.template-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-process {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  background: rgba(11, 39, 72, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
}

.template-process li {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
}

.template-process li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 9px;
  height: 9px;
  content: "";
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) rotate(45deg);
}

.template-process b {
  display: grid;
  flex: 0 0 26px;
  height: 26px;
  place-items: center;
  color: var(--mint);
  background: rgba(33, 166, 161, 0.1);
  border: 1px solid rgba(33, 166, 161, 0.24);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 9px;
}

.template-process span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.6);
  font-size: 8px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-intake-panel {
  margin-bottom: 12px;
  padding: 17px;
  background: rgba(11, 39, 72, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
}

.template-intake-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.template-intake-head span {
  color: var(--mint);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.template-intake-head h2 {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--display);
  font-size: 15px;
}

.template-intake-head > strong {
  color: var(--amber);
  font-size: 8px;
}

.template-intake-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.template-intake-card {
  min-width: 0;
  padding: 13px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
}

.template-intake-card.is-approved {
  border-left-color: var(--teal);
}

.template-intake-card.is-failed {
  border-left-color: #ff754b;
}

.template-intake-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.template-intake-card header > div {
  min-width: 0;
}

.template-intake-card header strong,
.template-intake-card header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-intake-card header strong {
  color: rgba(255, 255, 255, 0.85);
  font-size: 9px;
}

.template-intake-card header small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 7px;
}

.template-intake-card > p {
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.47);
  font-size: 8px;
  line-height: 1.5;
}

.template-intake-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: var(--amber);
  background: rgba(242, 180, 61, 0.1);
  border-radius: 999px;
  font-size: 6px;
  font-weight: 850;
  text-transform: uppercase;
}

.template-intake-status.is-approved {
  color: var(--mint);
  background: rgba(33, 166, 161, 0.11);
}

.template-intake-status.is-failed {
  color: #ff8f73;
  background: rgba(255, 117, 75, 0.1);
}

.template-intake-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.template-intake-facts span {
  padding: 5px 6px;
  color: rgba(255, 255, 255, 0.43);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 3px;
  font-size: 6px;
}

.template-intake-card details {
  margin-top: 9px;
  color: #ffb38d;
  font-size: 7px;
}

.template-intake-card details ul {
  margin: 7px 0 0;
  padding-left: 16px;
  color: rgba(255, 255, 255, 0.47);
  line-height: 1.5;
}

.template-intake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.template-intake-error-copy {
  color: #ff8f73 !important;
}

.template-metrics article,
.template-library,
.template-detail {
  background: rgba(11, 39, 72, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  box-shadow: 0 18px 44px rgba(0, 8, 24, 0.1);
}

.template-metrics article {
  display: grid;
  min-height: 112px;
  align-content: center;
  padding: 18px 20px;
}

.template-metrics span,
.template-detail-kicker,
.template-builder-head span,
.template-step-index {
  color: var(--mint);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.template-metrics strong {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--display);
  font-size: 27px;
}

.template-metrics small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 8px;
}

.template-center-layout {
  display: grid;
  min-height: 590px;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 12px;
}

.template-library {
  align-self: start;
  padding: 15px;
}

.template-library .table-search {
  width: 100%;
}

.template-list {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.template-loading,
.template-list-empty {
  margin: 0;
  padding: 28px 12px;
  color: rgba(255, 255, 255, 0.34);
  text-align: center;
  font-size: 9px;
}

.template-list-item {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.template-list-item:hover,
.template-list-item.is-active {
  background: rgba(33, 166, 161, 0.08);
  border-color: rgba(33, 166, 161, 0.42);
}

.template-list-item strong {
  color: rgba(255, 255, 255, 0.87);
  font-size: 10px;
}

.template-list-item small {
  grid-column: 1;
  color: rgba(255, 255, 255, 0.35);
  font-size: 8px;
}

.template-status {
  align-self: start;
  padding: 4px 7px;
  color: var(--mint);
  background: rgba(33, 166, 161, 0.11);
  border-radius: 999px;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.template-status.is-draft {
  color: var(--amber);
  background: rgba(242, 180, 61, 0.11);
}

.template-detail {
  min-width: 0;
  padding: clamp(20px, 2.3vw, 31px);
}

.template-empty {
  display: grid;
  min-height: 520px;
  place-content: center;
  justify-items: center;
  color: rgba(255, 255, 255, 0.36);
  text-align: center;
}

.template-empty span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--mint);
  background: rgba(33, 166, 161, 0.09);
  border: 1px solid rgba(33, 166, 161, 0.25);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 15px;
}

.template-empty h2 {
  margin: 18px 0 7px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--display);
  font-size: 19px;
}

.template-empty p {
  max-width: 360px;
  margin: 0;
  line-height: 1.6;
  font-size: 9px;
}

.template-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.template-detail-head h2 {
  margin: 8px 0 6px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 31px);
  letter-spacing: -0.025em;
}

.template-detail-head p {
  max-width: 690px;
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.55;
  font-size: 9px;
}

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

.template-detail-actions button {
  white-space: nowrap;
}

.template-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.template-facts > div {
  min-width: 0;
  padding: 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.template-facts > div:last-child {
  border-right: 0;
}

.template-facts dt {
  color: rgba(255, 255, 255, 0.32);
  font-size: 7px;
  text-transform: uppercase;
}

.template-facts dd {
  margin: 6px 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.75);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-workflow {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.template-workflow-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.template-workflow-heading h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--display);
  font-size: 14px;
}

.template-workflow-heading span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 8px;
}

.template-step-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.template-step-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: rgba(33, 166, 161, 0.09);
  border-radius: 50%;
}

.template-step-copy h4 {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
}

.template-step-copy > p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 8px;
}

.template-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.template-field-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  color: rgba(255, 255, 255, 0.57);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  font-size: 7px;
}

.template-field-chip b {
  color: var(--mint);
  font-weight: 800;
  text-transform: uppercase;
}

.template-field-chip.is-photo {
  border-color: rgba(255, 91, 25, 0.22);
}

.template-field-chip.is-photo b {
  color: #ff8757;
}

.template-editor-modal {
  width: min(100%, 940px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.template-intake-modal {
  width: min(100%, 650px);
}

.template-file-drop {
  display: grid;
  min-height: 148px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(33, 166, 161, 0.05);
  border: 1px dashed rgba(33, 166, 161, 0.42);
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
}

.template-file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.template-file-drop span {
  font-family: var(--display);
  font-size: 14px;
}

.template-file-drop strong {
  max-width: 500px;
  color: var(--mint);
  font-size: 8px;
  font-weight: 650;
}

.template-ai-boundary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  color: rgba(255, 255, 255, 0.43);
  background: rgba(242, 180, 61, 0.06);
  border-left: 3px solid var(--amber);
  font-size: 8px;
}

.template-ai-boundary b {
  color: var(--amber);
}

.template-form .settings-form-grid {
  margin-top: 0;
}

.template-form-wide {
  grid-column: 1 / -1;
}

.template-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 5px;
}

.template-builder-head h3 {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--display);
  font-size: 14px;
}

.template-builder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

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

.template-builder-step {
  padding: 15px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 4px;
}

.template-builder-step-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
  gap: 9px;
}

.template-builder-step input,
.template-builder-field input,
.template-builder-field select {
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 3px;
  outline: 0;
  font-size: 8px;
}

.template-builder-step input:focus,
.template-builder-field input:focus,
.template-builder-field select:focus {
  border-color: var(--orange);
}

.template-builder-field-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.template-builder-field {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(95px, 0.7fr) minmax(150px, 1.4fr) 90px 72px auto;
  align-items: center;
  gap: 7px;
}

.template-builder-field select {
  background-color: #0a2546;
}

.template-builder-field .field-evidence {
  text-align: center;
}

.template-required {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  font-size: 7px;
  font-weight: 800;
}

.template-builder-field .template-required input {
  width: 14px;
  min-height: 14px;
  padding: 0;
  accent-color: var(--orange);
}

.template-remove,
.template-add-field {
  min-height: 34px;
  padding: 0 9px;
  color: rgba(255, 255, 255, 0.43);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 3px;
  cursor: pointer;
  font-size: 7px;
}

.template-remove:hover {
  color: #ff8757;
  border-color: rgba(255, 91, 25, 0.35);
}

.template-add-field {
  margin-top: 9px;
  color: var(--mint);
  border-color: rgba(33, 166, 161, 0.25);
}

.template-form-error {
  margin: 0;
  color: #ff8f73;
  font-size: 9px;
}

.template-assignment-note {
  margin: 0;
  padding: 12px;
  color: rgba(255, 255, 255, 0.47);
  background: rgba(33, 166, 161, 0.07);
  border-left: 3px solid var(--teal);
  line-height: 1.55;
  font-size: 8px;
}

@media (max-width: 1100px) {
  .template-intake-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-center-layout {
    grid-template-columns: 1fr;
  }

  .template-library {
    position: static;
  }

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

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

  .template-facts > div:nth-child(2) {
    border-right: 0;
  }

  .template-facts > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
}

@media (max-width: 700px) {
  .ai-output-recommendations {
    grid-template-columns: 1fr;
  }

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

  .template-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .template-process li:not(:last-child)::after {
    display: none;
  }

  .template-intake-list {
    grid-template-columns: 1fr;
  }

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

  .template-detail-head {
    display: grid;
  }

  .template-detail-actions {
    justify-content: flex-start;
  }

  .template-facts,
  .template-builder-step-head,
  .template-builder-field {
    grid-template-columns: 1fr;
  }

  .template-facts > div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .template-facts > div:last-child {
    border-bottom: 0;
  }

  .template-form-wide {
    grid-column: auto;
  }

  .template-builder-actions {
    justify-content: flex-start;
  }
}
