:root {
  --bg: #f4f0e8;
  --surface: #fffaf2;
  --surface-2: #ebe3d7;
  --ink: #27231f;
  --muted: #6f675e;
  --line: #d9d0c4;
  --line-strong: #b7aa99;
  --copper: #9a5a2c;
  --amber: #c78332;
  --charcoal: #28241f;
  --charcoal-2: #363029;
  --teal: #34656f;
  --green: #2f765f;
  --red: #aa453e;
  --blue: #516a88;
  --shadow: 0 18px 48px rgba(39, 35, 31, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px;
  background: var(--charcoal);
  color: #f6efe5;
}

.brand-block {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(199, 131, 50, 0.55);
  border-radius: 8px;
  background: #3c332b;
  color: #f5c477;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #dca55f;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.15rem;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: #c8bbaa;
  font-size: 0.82rem;
}

.primary-nav {
  display: grid;
  gap: 5px;
}

.nav-button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #e8ded0;
  text-align: left;
}

.nav-button:hover,
.nav-button:focus-visible {
  border-color: rgba(220, 165, 95, 0.35);
  background: #383129;
  outline: none;
}

.nav-button[aria-current="page"] {
  border-color: rgba(220, 165, 95, 0.6);
  background: #44372c;
  color: #fffaf2;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 250, 242, 0.08);
  color: #f2ba72;
  font-size: 0.78rem;
  font-weight: 800;
}

.nav-count {
  min-width: 24px;
  padding: 1px 7px;
  border: 1px solid rgba(255, 250, 242, 0.13);
  border-radius: 999px;
  color: #d4c7b7;
  font-size: 0.72rem;
  text-align: center;
}

.boundary-panel {
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgba(255, 250, 242, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.06);
}

.boundary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 250, 242, 0.1);
  color: #f8f0e5;
  font-size: 0.84rem;
}

.boundary-row:first-of-type {
  border-top: 0;
}

.boundary-row.muted {
  color: #bbaea0;
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 14px;
  max-width: 1480px;
}

.topbar h2 {
  font-size: 1.55rem;
}

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

.primary-button,
.ghost-button,
.quiet-button,
.icon-button,
.table-action,
.chip,
.tab-button {
  min-height: 36px;
  border-radius: 7px;
  font-weight: 760;
}

.primary-button {
  border: 1px solid #7e4824;
  background: var(--copper);
  color: #fffaf2;
  padding: 8px 12px;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #854d27;
  outline: 2px solid rgba(199, 131, 50, 0.28);
  outline-offset: 2px;
}

.ghost-button,
.quiet-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 11px;
}

.ghost-button:hover,
.quiet-button:hover,
.ghost-button:focus-visible,
.quiet-button:focus-visible {
  border-color: var(--copper);
  outline: none;
}

.button-icon {
  margin-right: 6px;
  color: var(--copper);
  font-weight: 900;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  max-width: 1480px;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.status-strip > div {
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
}

.strip-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-strip strong {
  font-size: 1.2rem;
}

.content-host {
  max-width: 1480px;
  margin: 0 auto;
}

.view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.view-grid.reverse {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.35fr);
}

.full-grid {
  display: grid;
  gap: 18px;
}

.band {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(39, 35, 31, 0.07);
}

.band-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.band-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--copper);
}

.section-dot.green {
  background: var(--green);
}

.section-dot.red {
  background: var(--red);
}

.section-dot.blue {
  background: var(--blue);
}

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

.band-body {
  padding: 16px;
}

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

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

.operation-row,
.issue-row,
.shift-row,
.summary-row,
.config-row,
.material-row,
.clearance-row,
.event-row,
.handover-row {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.operation-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.row-main {
  min-width: 0;
}

.row-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.row-title {
  margin: 0;
  font-weight: 820;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.pill,
.status-pill,
.risk-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf5ec;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill {
  border-color: rgba(52, 101, 111, 0.3);
  background: #eef5f4;
  color: var(--teal);
}

.status-pill.amber {
  border-color: rgba(199, 131, 50, 0.32);
  background: #fff4df;
  color: #8b5521;
}

.status-pill.green {
  border-color: rgba(47, 118, 95, 0.3);
  background: #edf7f1;
  color: var(--green);
}

.status-pill.red {
  border-color: rgba(170, 69, 62, 0.3);
  background: #fff0ee;
  color: var(--red);
}

.risk-pill {
  border-color: rgba(170, 69, 62, 0.28);
  background: #fff3f0;
  color: var(--red);
}

.progress-cell {
  display: grid;
  gap: 5px;
  min-width: 110px;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ded2;
}

.progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--copper);
}

.progress-bar.green {
  background: var(--green);
}

.progress-bar.red {
  background: var(--red);
}

.progress-bar.teal {
  background: var(--teal);
}

.floor-map-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.floor-map-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f1e7;
}

.area-list {
  display: grid;
  gap: 8px;
}

.area-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

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

.area-name {
  font-weight: 820;
}

.area-meta {
  color: var(--muted);
  font-size: 0.83rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 8px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 81px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 18px;
  padding: 0 0 16px;
}

.timeline-time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.timeline-content {
  position: relative;
  min-width: 0;
  padding: 0 0 0 15px;
}

.timeline-content::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 4px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--copper);
  box-shadow: 0 0 0 1px var(--copper);
}

.timeline-content.event::before {
  background: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.timeline-content.clean::before {
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.timeline-title {
  margin: 0;
  font-weight: 820;
}

.timeline-note {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.87rem;
}

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

.signal-tile {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.signal-tile strong {
  font-size: 1rem;
}

.signal-value {
  color: var(--muted);
  font-size: 0.84rem;
}

.register-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  max-width: 440px;
  flex: 1 1 280px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
}

.search-box span {
  color: var(--copper);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.8rem;
}

.chip[aria-pressed="true"] {
  border-color: rgba(154, 90, 44, 0.45);
  background: #fff0d8;
  color: #76431f;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

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

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6eee3;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

th button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

tbody tr {
  outline: 0;
}

tbody tr:hover,
tbody tr:focus-visible,
tbody tr.is-selected {
  background: #fff5e7;
}

tbody tr:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(154, 90, 44, 0.35);
}

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

.table-action {
  border: 1px solid var(--line);
  background: #fffaf2;
  color: var(--ink);
  padding: 6px 9px;
  font-size: 0.82rem;
}

.table-action:hover,
.table-action:focus-visible {
  border-color: var(--copper);
  outline: none;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(760px, 100vw);
  height: 100vh;
  overflow-y: auto;
  transform: translateX(105%);
  border-left: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

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

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.96);
  backdrop-filter: blur(10px);
}

.drawer-header h3 {
  font-size: 1.32rem;
}

.drawer-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.drawer-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 0.82rem;
}

.tab-button[aria-selected="true"] {
  border-color: rgba(154, 90, 44, 0.45);
  background: #fff0d8;
  color: #74421e;
}

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

.fact {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 4px;
}

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

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

.module-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.module-panel h4 {
  margin-bottom: 9px;
}

.metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

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

.muted-text {
  color: var(--muted);
}

.summary-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(154, 90, 44, 0.3);
  border-radius: var(--radius);
  background: #fff7e8;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 70px 18px 18px;
  background: rgba(39, 35, 31, 0.35);
}

.command-palette.open {
  display: block;
}

.palette-panel {
  width: min(760px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.palette-search {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.palette-search span {
  display: grid;
  place-items: center;
  color: var(--copper);
  font-weight: 900;
}

.palette-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 1rem;
  outline: none;
}

.palette-results {
  display: grid;
  max-height: 440px;
  overflow-y: auto;
  padding: 7px;
}

.palette-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.palette-option:hover,
.palette-option:focus-visible,
.palette-option[aria-selected="true"] {
  border-color: rgba(154, 90, 44, 0.33);
  background: #fff2df;
  outline: none;
}

.palette-option small {
  color: var(--muted);
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid rgba(154, 90, 44, 0.35);
  border-radius: var(--radius);
  background: #fff7e8;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 16px;
  }

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

  .boundary-panel {
    display: none;
  }

  .workspace {
    padding: 16px;
  }

  .view-grid,
  .view-grid.reverse,
  .briefing-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .drawer {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    border-left: 0;
  }

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

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions > button {
    flex: 1 1 180px;
  }

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

  .status-strip,
  .control-grid,
  .module-grid,
  .module-grid.three,
  .drawer-grid {
    grid-template-columns: 1fr;
  }

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

  .timeline::before {
    left: 73px;
  }

  .timeline-item {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
  }

  .search-box {
    min-width: 0;
    flex-basis: 100%;
  }
}

@media (max-width: 430px) {
  .workspace {
    padding: 12px;
  }

  .sidebar {
    padding: 12px;
  }

  .brand-block {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .primary-nav {
    grid-template-columns: 1fr;
  }

  .nav-button {
    min-height: 38px;
  }

  .band-header,
  .band-body,
  .drawer-header,
  .drawer-body {
    padding: 12px;
  }

  .status-strip > div {
    padding: 10px 11px;
  }

  .command-palette {
    padding: 48px 10px 10px;
  }

  .drawer-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .tab-button {
    flex: 1 1 112px;
  }
}

/* Render-matched Foundry Command Center theme */
:root {
  --bg: #05090b;
  --surface: #0a1115;
  --surface-2: #0d161b;
  --surface-3: #111b21;
  --ink: #f4f0e8;
  --muted: #8c9498;
  --muted-2: #687176;
  --line: rgba(210, 222, 226, 0.08);
  --line-strong: rgba(220, 151, 68, 0.24);
  --copper: #d28431;
  --amber: #f0a23a;
  --green: #70b85f;
  --red: #e05b39;
  --yellow: #e7a83b;
  --purple: #a678d7;
  --blue: #4d97cc;
  --charcoal: #070d10;
  --charcoal-2: #0b1418;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

body {
  background:
    radial-gradient(circle at 72% 4%, rgba(210, 132, 49, 0.08), transparent 26%),
    linear-gradient(135deg, #05090b 0%, #071014 50%, #05090b 100%);
  color: var(--ink);
  font-size: 14px;
}

.app-shell {
  grid-template-columns: 288px minmax(0, 1fr);
  background: rgba(3, 8, 10, 0.92);
}

.sidebar {
  gap: 20px;
  padding: 18px 16px 16px;
  background:
    linear-gradient(180deg, rgba(8, 16, 20, 0.98), rgba(5, 10, 12, 0.98)),
    radial-gradient(circle at 0 0, rgba(210, 132, 49, 0.15), transparent 30%);
  border-right: 1px solid rgba(210, 222, 226, 0.08);
  color: #f3eee6;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand-block {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 0 2px 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 2px solid var(--copper);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(210, 132, 49, 0.16), transparent 48%),
    rgba(8, 14, 17, 0.92);
  box-shadow: 0 0 0 1px rgba(210, 132, 49, 0.12), 0 12px 30px rgba(210, 132, 49, 0.12);
  color: var(--copper);
  font-size: 1.38rem;
  font-weight: 900;
}

.brand-logo {
  display: block;
  width: 214px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(210, 132, 49, 0.11));
}

h1 {
  color: #f4efe7;
  font-size: 1.82rem;
  font-weight: 860;
  line-height: 1;
  letter-spacing: 0.18em;
}

.brand-subtitle {
  margin-top: 5px;
  color: var(--copper);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  gap: 12px;
}

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

.nav-group-label {
  margin: 4px 0 5px;
  color: #687176;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-button {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #c8ced1;
  font-weight: 710;
}

.nav-button:hover,
.nav-button:focus-visible {
  border-color: rgba(210, 132, 49, 0.2);
  background: rgba(255, 255, 255, 0.035);
}

.nav-button[aria-current="page"] {
  border-color: rgba(210, 132, 49, 0.42);
  background:
    linear-gradient(90deg, rgba(210, 132, 49, 0.16), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
  color: var(--amber);
  box-shadow: inset 2px 0 0 var(--copper);
}

.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: #9da7ab;
  font-size: 0.7rem;
}

.nav-button[aria-current="page"] .nav-icon {
  background: rgba(210, 132, 49, 0.16);
  color: var(--copper);
}

.nav-count {
  min-width: 24px;
  padding: 1px 7px;
  border-color: rgba(210, 222, 226, 0.1);
  background: rgba(255, 255, 255, 0.028);
  color: #aeb6ba;
}

.boundary-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(210, 222, 226, 0.08);
  background:
    linear-gradient(180deg, rgba(18, 29, 34, 0.9), rgba(10, 17, 20, 0.92));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.boundary-panel .eyebrow {
  color: var(--copper);
}

.boundary-row {
  padding: 8px 0;
  border-top-color: rgba(210, 222, 226, 0.07);
  color: #cfd6d8;
}

.boundary-row strong {
  color: #a5afb3;
  font-weight: 760;
}

.sidebar-profile {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(210, 222, 226, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8f561f, #c78332);
  color: #fff4e5;
  font-size: 0.82rem;
  font-weight: 900;
}

.sidebar-profile strong,
.topbar-user strong {
  display: block;
  color: #f5f0e8;
  font-weight: 820;
}

.sidebar-profile span,
.topbar-user span {
  color: #8e989d;
  font-size: 0.78rem;
}

.workspace {
  padding: 0 22px 14px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  max-width: none;
  margin: 0 -22px 18px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(210, 222, 226, 0.08);
  background: rgba(5, 10, 12, 0.86);
  backdrop-filter: blur(18px);
}

.topbar-greeting h2 {
  color: #f5f1eb;
  font-size: 1.42rem;
  font-weight: 820;
}

.topbar-greeting p {
  margin: 6px 0 0;
  color: #929ca0;
  font-size: 0.94rem;
  font-weight: 620;
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(260px, 350px) 38px 38px 38px auto auto;
  align-items: center;
  gap: 12px;
}

.command-search-button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(210, 222, 226, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.028);
  color: #737f85;
  text-align: left;
}

.command-search-button span {
  color: #b8c0c4;
  font-size: 0.78rem;
  font-weight: 820;
}

.command-search-button strong {
  color: #7f898e;
  font-size: 0.84rem;
  font-weight: 700;
}

.top-icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #a9b2b6;
  font-weight: 900;
}

.top-icon-button svg,
.primary-button svg,
.svg-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.top-icon-button:hover,
.top-icon-button:focus-visible {
  border-color: rgba(210, 132, 49, 0.2);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.top-icon-button.has-badge::after {
  content: "12";
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--copper);
  color: #fff3e2;
  font-size: 0.62rem;
  font-weight: 900;
}

.topbar-user {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 148px;
  padding-left: 12px;
  border-left: 1px solid rgba(210, 222, 226, 0.09);
}

.primary-button {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border-color: rgba(210, 132, 49, 0.42);
  background: rgba(210, 132, 49, 0.08);
  color: var(--copper);
  box-shadow: inset 0 0 0 1px rgba(210, 132, 49, 0.04);
}

.primary-button svg {
  width: 18px;
  height: 18px;
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: rgba(210, 132, 49, 0.72);
  background: rgba(210, 132, 49, 0.14);
}

.content-host {
  max-width: none;
}

.command-dashboard {
  display: grid;
  gap: 16px;
}

.command-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card,
.command-panel,
.industrial-status-strip,
.band,
.module-panel,
.operation-row,
.issue-row,
.shift-row,
.summary-row,
.config-row,
.material-row,
.clearance-row,
.event-row,
.handover-row,
.fact {
  border: 1px solid rgba(210, 222, 226, 0.08);
  background:
    linear-gradient(180deg, rgba(17, 27, 33, 0.92), rgba(8, 15, 18, 0.94));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.kpi-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 116px;
  padding: 20px;
  border-radius: 8px;
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 950;
}

.kpi-icon .svg-icon {
  width: 24px;
  height: 24px;
}

.kpi-card strong {
  display: block;
  margin: 7px 0 4px;
  color: #f5f0e8;
  font-size: 1.54rem;
  line-height: 1;
}

.kpi-card span {
  color: #a0aaae;
  font-size: 0.86rem;
}

.panel-kicker {
  margin: 0;
  color: #d8dde0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.kpi-good .kpi-icon,
.kpi-good strong {
  color: var(--green);
}

.kpi-warning .kpi-icon,
.kpi-warning strong,
.kpi-amber .kpi-icon,
.kpi-amber strong {
  color: var(--amber);
}

.kpi-blocker .kpi-icon {
  color: var(--red);
}

.kpi-info .kpi-icon {
  color: #6fb3dc;
}

.command-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.55fr);
  grid-template-areas:
    "hero alerts"
    "floor events"
    "bottom events";
  gap: 16px;
  align-items: stretch;
}

.command-panel {
  min-width: 0;
  border-radius: 8px;
}

.current-batch-panel {
  grid-area: hero;
  min-height: 348px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 54%, rgba(96, 134, 148, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(13, 23, 28, 0.98), rgba(6, 12, 15, 0.98));
}

.critical-alerts-panel {
  grid-area: alerts;
}

.floor-state-panel {
  grid-area: floor;
}

.manufacturing-events-panel {
  grid-area: events;
  display: flex;
  flex-direction: column;
}

.command-bottom-grid {
  grid-area: bottom;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 16px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 0;
}

.panel-heading.compact {
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(210, 222, 226, 0.07);
}

.panel-heading h3 {
  margin-top: 20px;
  color: #f5f0e8;
  font-size: 1.42rem;
  font-weight: 820;
}

.panel-heading h3 span {
  color: #98a2a6;
  font-weight: 700;
}

.panel-subtitle {
  margin: 6px 0 0;
  color: #e7ebed;
  font-size: 1.18rem;
  font-weight: 760;
}

.outline-action,
.text-action,
.log-event-button {
  border-radius: 7px;
  color: var(--copper);
  font-weight: 820;
}

.outline-action {
  align-self: flex-start;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid rgba(210, 132, 49, 0.42);
  background: rgba(210, 132, 49, 0.06);
}

.text-action {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
}

.batch-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: end;
  padding: 24px 20px 20px;
}

.batch-hero-copy {
  display: grid;
  gap: 24px;
}

.batch-progress-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) minmax(240px, 1fr) 64px;
  gap: 22px;
  align-items: end;
}

.batch-progress-grid span,
.batch-facts span {
  display: block;
  margin-bottom: 7px;
  color: #99a3a8;
  font-size: 0.8rem;
  font-weight: 740;
}

.batch-progress-grid strong {
  display: block;
  color: var(--copper);
  font-size: 1rem;
}

.batch-progress-grid em,
.batch-facts em {
  display: block;
  margin-top: 8px;
  color: #a6b0b4;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 700;
}

.hero-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(210, 222, 226, 0.1);
}

.hero-progress span {
  display: block;
  height: 100%;
  margin: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d27b2e, #f0a23a);
  box-shadow: 0 0 18px rgba(210, 132, 49, 0.26);
}

.hero-percent {
  color: #f4efe8 !important;
  font-size: 1.12rem !important;
}

.batch-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(210, 222, 226, 0.08);
}

.batch-facts strong {
  display: block;
  color: #f4efe8;
  font-size: 1rem;
}

.equipment-hero {
  align-self: stretch;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: end center;
  min-height: 248px;
  overflow: hidden;
  border-radius: 7px;
  background:
    radial-gradient(ellipse at 52% 82%, rgba(202, 133, 67, 0.16), transparent 36%),
    radial-gradient(ellipse at 50% 68%, rgba(179, 202, 211, 0.15), transparent 28%),
    linear-gradient(180deg, rgba(7, 14, 17, 0), rgba(7, 14, 17, 0.34));
}

.equipment-hero::before,
.equipment-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.equipment-hero::before {
  z-index: 0;
  background:
    radial-gradient(ellipse at 52% 70%, rgba(216, 226, 229, 0.13), transparent 27%),
    radial-gradient(ellipse at 50% 99%, rgba(86, 116, 130, 0.34), transparent 36%);
  filter: blur(1px);
}

.equipment-hero::after {
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(6, 12, 15, 0.32), transparent 18%, transparent 82%, rgba(6, 12, 15, 0.46)),
    linear-gradient(180deg, rgba(6, 12, 15, 0.16), transparent 45%, rgba(6, 12, 15, 0.34));
}

.equipment-hero img {
  position: relative;
  z-index: 2;
  display: block;
  width: min(100%, 310px);
  height: auto;
  mix-blend-mode: screen;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 46%, rgba(0, 0, 0, 0.84) 62%, rgba(0, 0, 0, 0.34) 78%, transparent 94%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 46%, rgba(0, 0, 0, 0.84) 62%, rgba(0, 0, 0, 0.34) 78%, transparent 94%);
  filter:
    brightness(1.12)
    contrast(1.1)
    saturate(0.92)
    drop-shadow(0 30px 38px rgba(0, 0, 0, 0.62))
    drop-shadow(0 0 34px rgba(153, 187, 199, 0.14));
}

.alert-list {
  display: grid;
  padding: 8px 20px 14px;
}

.alert-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid rgba(210, 222, 226, 0.07);
}

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

.alert-icon,
.floor-icon,
.status-icon,
.handover-icon {
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 950;
}

.alert-icon {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.04);
}

.alert-icon .svg-icon {
  width: 21px;
  height: 21px;
}

.floor-icon .svg-icon {
  width: 18px;
  height: 18px;
}

.handover-icon .svg-icon {
  width: 17px;
  height: 17px;
}

.alert-item strong,
.feed-item strong,
.compact-timeline-row strong,
.handover-item strong {
  color: #e9edef;
  font-size: 0.95rem;
}

.alert-item span:not(.alert-icon),
.feed-item span,
.compact-timeline-row span,
.compact-timeline-row em {
  display: block;
  margin-top: 3px;
  color: #99a3a8;
  font-style: normal;
}

.alert-item time {
  color: var(--copper);
  font-weight: 800;
  white-space: nowrap;
}

.tone-blocker .alert-icon,
.tone-blocker time,
.state-hold em {
  color: var(--red);
}

.tone-warning .alert-icon,
.tone-warning time,
.state-warning em,
.state-constrained em {
  color: var(--yellow);
}

.tone-cleaning .alert-icon,
.tone-cleaning time {
  color: var(--purple);
}

.tone-info .alert-icon,
.tone-info time {
  color: #6fb3dc;
}

.floor-tile-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px 10px;
}

.floor-tile-grid.expanded {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding-bottom: 20px;
}

.floor-tile {
  min-width: 0;
  min-height: 118px;
  padding: 13px;
  border: 1px solid rgba(210, 222, 226, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.floor-tile-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}

.floor-icon {
  width: 24px;
  height: 24px;
  color: inherit;
  font-size: 0.68rem;
}

.floor-tile em {
  display: block;
  margin-bottom: 9px;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.floor-tile span,
.floor-tile small {
  display: block;
  color: #9aa4a8;
  font-size: 0.82rem;
}

.floor-tile small {
  margin-top: 6px;
}

.state-running {
  border-color: rgba(112, 184, 95, 0.26);
  color: var(--green);
}

.state-constrained,
.state-warning {
  border-color: rgba(231, 168, 59, 0.28);
  color: var(--yellow);
}

.state-hold {
  border-color: rgba(224, 91, 57, 0.28);
  color: var(--red);
}

.floor-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 6px 20px 14px;
  color: #909a9f;
  font-size: 0.82rem;
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.legend-running {
  color: var(--green);
}

.legend-constrained,
.legend-maintenance {
  color: var(--yellow);
}

.legend-hold {
  color: var(--red);
}

.legend-cleaning {
  color: var(--purple);
}

.legend-available {
  color: var(--blue);
}

.event-feed {
  position: relative;
  display: grid;
  gap: 0;
  flex: 1;
  padding: 16px 20px 10px;
}

.event-feed::before {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 54px;
  left: 99px;
  width: 1px;
  background: rgba(112, 184, 95, 0.34);
}

.feed-item {
  position: relative;
  display: grid;
  grid-template-columns: 52px 30px minmax(0, 1fr);
  gap: 12px;
  min-height: 64px;
  align-items: start;
  border-bottom: 1px solid rgba(210, 222, 226, 0.06);
}

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

.feed-item time {
  color: #a7b0b4;
  font-weight: 760;
}

.feed-node,
.timeline-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid currentColor;
}

.tone-good .feed-node,
.tone-good .timeline-node {
  color: var(--green);
  background: rgba(112, 184, 95, 0.18);
}

.tone-warning .feed-node,
.tone-warning .timeline-node {
  color: var(--yellow);
  background: rgba(231, 168, 59, 0.16);
}

.tone-info .feed-node,
.tone-info .timeline-node {
  color: var(--blue);
  background: rgba(77, 151, 204, 0.16);
}

.tone-neutral .timeline-node {
  color: #8d979c;
}

.log-event-button {
  margin: 14px 20px 20px;
  min-height: 48px;
  border: 1px solid rgba(210, 132, 49, 0.42);
  background: rgba(210, 132, 49, 0.04);
}

.production-timeline-panel,
.handover-panel {
  min-height: 260px;
}

.compact-timeline {
  display: grid;
  padding: 4px 20px 16px;
}

.compact-timeline-row {
  display: grid;
  grid-template-columns: 54px 24px minmax(160px, 1.15fr) minmax(120px, 0.7fr) minmax(100px, 0.55fr);
  gap: 10px;
  align-items: center;
  min-height: 37px;
  border-bottom: 1px solid rgba(210, 222, 226, 0.06);
}

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

.compact-timeline-row time {
  color: #a6b0b4;
}

.compact-timeline-row .timeline-node {
  width: 16px;
  height: 16px;
}

.compact-timeline-row em {
  color: var(--copper);
  text-align: right;
}

.handover-list {
  display: grid;
  padding: 4px 20px 16px;
}

.handover-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid rgba(210, 222, 226, 0.06);
}

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

.handover-item > span {
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 950;
}

.handover-icon {
  width: 24px;
  height: 24px;
  background: rgba(210, 132, 49, 0.06);
}

.count-badge {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #a75d22;
  color: #fff2df;
  font-style: normal;
  font-weight: 900;
}

.count-info {
  background: #3f7dae;
}

.industrial-status-strip {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1fr) minmax(210px, 1fr) minmax(180px, 0.9fr) minmax(260px, 1.35fr);
  gap: 1px;
  overflow: hidden;
  min-height: 92px;
  border-radius: 8px;
  background: rgba(210, 222, 226, 0.08);
}

.industrial-status-strip section {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(17, 27, 33, 0.94), rgba(9, 16, 19, 0.95));
}

.industrial-status-strip p {
  margin: 0 0 5px;
  color: #7f898e;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.industrial-status-strip strong {
  display: block;
  color: #f0f4f5;
  font-size: 0.98rem;
}

.industrial-status-strip small {
  display: block;
  margin-top: 3px;
  color: #8b959a;
}

.status-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
}

.status-icon .svg-icon {
  width: 22px;
  height: 22px;
}

.status-good {
  color: var(--green);
}

.status-warning {
  color: var(--amber);
}

.status-neutral {
  color: #d7dee0;
}

.connected-systems {
  grid-template-columns: 46px minmax(0, 1fr) !important;
}

.system-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: #59626c;
  color: #f4f0e8;
  font-size: 0.68rem;
  font-weight: 920;
}

.system-badge::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(112, 184, 95, 0.45);
}

.system-amber,
.system-orange {
  background: #ba6b24;
}

.system-yellow {
  background: #a87f2d;
}

.system-blue {
  background: #3e6ea0;
}

.system-green {
  background: #3f806f;
}

.system-red {
  background: #a84f36;
}

.system-purple {
  background: #6b55a3;
}

.band-header,
.drawer-header {
  border-bottom-color: rgba(210, 222, 226, 0.08);
}

.band,
.drawer,
.palette-panel {
  background: var(--surface);
  color: var(--ink);
}

.table-wrap {
  border-color: rgba(210, 222, 226, 0.08);
  background: var(--surface);
}

th {
  background: #111b21;
  color: #9aa4a8;
}

td {
  border-bottom-color: rgba(210, 222, 226, 0.07);
  color: #dbe1e3;
}

tbody tr:hover,
tbody tr:focus-visible,
tbody tr.is-selected {
  background: rgba(210, 132, 49, 0.08);
}

.search-box,
.ghost-button,
.quiet-button,
.icon-button,
.table-action,
.chip,
.tab-button {
  border-color: rgba(210, 222, 226, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: #e4e8ea;
}

.status-pill,
.pill,
.risk-pill {
  border-color: rgba(210, 222, 226, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: #aeb7bb;
}

.status-pill.green {
  color: var(--green);
  background: rgba(112, 184, 95, 0.12);
}

.status-pill.amber {
  color: var(--amber);
  background: rgba(231, 168, 59, 0.12);
}

.status-pill.red,
.risk-pill {
  color: var(--red);
  background: rgba(224, 91, 57, 0.12);
}

.progress-track {
  background: rgba(210, 222, 226, 0.1);
}

.progress-bar {
  background: var(--copper);
}

.drawer {
  border-left-color: rgba(210, 222, 226, 0.1);
}

.drawer-header {
  background: rgba(8, 15, 18, 0.96);
}

.fact span,
.row-kicker,
.muted-text,
.timeline-note,
.area-meta,
.signal-value {
  color: #8d979c;
}

.fact strong,
.row-title,
.timeline-title,
.area-name,
.module-panel h4 {
  color: #f1f4f5;
}

.palette-search {
  border-bottom-color: rgba(210, 222, 226, 0.08);
}

.palette-option {
  color: #e7ebed;
}

.palette-option small {
  color: #8d979c;
}

.palette-option:hover,
.palette-option:focus-visible,
.palette-option[aria-selected="true"] {
  border-color: rgba(210, 132, 49, 0.26);
  background: rgba(210, 132, 49, 0.1);
}

.toast {
  border-color: rgba(210, 132, 49, 0.36);
  background: #111b21;
  color: #f5f0e8;
}

.domain-workspace {
  display: grid;
  gap: 16px;
}

.domain-hero-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 22%, rgba(210, 132, 49, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(13, 23, 28, 0.98), rgba(6, 12, 15, 0.98));
}

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

.execution-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.domain-metric {
  min-width: 0;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(210, 222, 226, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 27, 33, 0.92), rgba(8, 15, 18, 0.94));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.domain-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: #f5f0e8;
  font-size: 1.15rem;
}

.domain-metric span {
  color: #99a3a8;
  font-size: 0.82rem;
}

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

.metric-amber strong,
.metric-copper strong {
  color: var(--copper);
}

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

.execution-split {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr) minmax(280px, 0.95fr);
  gap: 12px;
  margin-top: 14px;
}

.operation-stack.tight {
  gap: 8px;
}

.metric-list {
  display: grid;
  gap: 0;
}

.metric-list.compact .metric-row {
  padding: 5px 0;
}

.metric-row span {
  color: #8d979c;
  font-size: 0.78rem;
  font-weight: 760;
}

.metric-row strong {
  color: #f1f4f5;
  text-align: right;
}

.instruction-grid,
.cleaning-grid,
.calculation-grid,
.signal-board,
.expanded-floor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.expanded-floor-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px;
}

.instruction-card,
.cleaning-card,
.calculation-card,
.signal-card,
.area-state-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(210, 222, 226, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.instruction-card h4,
.cleaning-card h4,
.calculation-card h4,
.signal-card h4,
.area-state-card h4 {
  margin: 10px 0 8px;
  color: #f1f4f5;
  font-size: 1rem;
}

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

.step-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.step-chips.spacious {
  margin-top: 16px;
}

.step-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(210, 132, 49, 0.2);
  border-radius: 999px;
  background: rgba(210, 132, 49, 0.07);
  color: #d9a15a;
  font-size: 0.75rem;
  font-weight: 820;
}

.calc-flow {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.calc-flow div {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(210, 222, 226, 0.07);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
}

.calc-flow span {
  color: #8d979c;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.calc-flow strong {
  color: #f1f4f5;
  font-size: 0.86rem;
}

.expanded-floor-panel {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.area-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.area-card-head strong {
  color: #f5f0e8;
  font-size: 1rem;
}

.area-card-head span {
  color: var(--copper);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.area-state-card.state-running {
  border-color: rgba(112, 184, 95, 0.24);
}

.area-state-card.state-constrained,
.area-state-card.state-warning,
.area-state-card.state-cleaning {
  border-color: rgba(231, 168, 59, 0.26);
}

.area-state-card.state-hold {
  border-color: rgba(224, 91, 57, 0.28);
}

.area-state-card.state-available {
  border-color: rgba(77, 151, 204, 0.24);
}

.signal-card {
  position: relative;
  overflow: hidden;
}

.signal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #8d979c;
}

.signal-green::before {
  background: var(--green);
}

.signal-amber::before {
  background: var(--amber);
}

.signal-red::before {
  background: var(--red);
}

.rich-timeline {
  max-width: 980px;
}

@media (max-width: 1180px) {
  .command-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .execution-summary-grid,
  .expanded-floor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .instruction-grid,
  .cleaning-grid,
  .calculation-grid,
  .signal-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .industrial-status-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .boundary-panel,
  .sidebar-profile {
    display: none;
  }

  .topbar {
    position: relative;
  }

  .topbar-actions {
    grid-template-columns: minmax(240px, 1fr) repeat(3, 38px) auto;
  }

  .topbar-user {
    display: none;
  }

  .command-main-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "alerts"
      "floor"
      "events"
      "bottom";
  }

  .manufacturing-events-panel {
    min-height: 420px;
  }

  .domain-metric-grid,
  .execution-split,
  .template-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .topbar-actions {
    grid-template-columns: minmax(0, 1fr) repeat(3, 38px);
  }

  .topbar-actions .primary-button {
    grid-column: 1 / -1;
  }

  .command-kpi-strip,
  .command-bottom-grid,
  .batch-hero-body,
  .batch-progress-grid,
  .batch-facts,
  .industrial-status-strip,
  .execution-summary-grid,
  .instruction-grid,
  .cleaning-grid,
  .calculation-grid,
  .signal-board,
  .expanded-floor-grid {
    grid-template-columns: 1fr;
  }

  .equipment-hero {
    min-height: 210px;
    place-items: center;
  }

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

  .compact-timeline-row {
    grid-template-columns: 52px 24px minmax(0, 1fr);
  }

  .compact-timeline-row span,
  .compact-timeline-row em {
    grid-column: 3;
    text-align: left;
  }
}

@media (max-width: 540px) {
  .workspace {
    padding: 0 12px 12px;
  }

  .topbar {
    margin: 0 -12px 14px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .primary-nav,
  .topbar-actions,
  .floor-tile-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions .top-icon-button {
    display: none;
  }

  .command-search-button {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .kpi-card {
    min-height: 96px;
    padding: 16px;
  }

  .panel-heading,
  .panel-heading.compact,
  .batch-hero-body,
  .alert-list,
  .floor-tile-grid,
  .event-feed,
  .compact-timeline,
  .handover-list {
    padding-left: 14px;
    padding-right: 14px;
  }

  .alert-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .alert-item time {
    grid-column: 2;
  }

  .event-feed::before {
    left: 84px;
  }

  .feed-item {
    grid-template-columns: 46px 24px minmax(0, 1fr);
  }

  .industrial-status-strip section {
    padding: 14px;
  }
}

/* Desktop proportion tightening against the supplied render */
@media (min-width: 1241px) {
  .app-shell {
    grid-template-columns: 208px minmax(0, 1fr);
  }

  .sidebar {
    padding: 14px 10px 12px;
  }

  .brand-block {
    padding: 0 0 9px;
  }

  .brand-logo {
    width: 190px;
  }

  h1 {
    font-size: 1.45rem;
    letter-spacing: 0.13em;
  }

  .brand-subtitle {
    font-size: 0.58rem;
  }

  .workspace {
    padding: 0 14px 0;
  }

  .topbar {
    min-height: 62px;
    margin: 0 -14px 12px;
    padding: 0 14px 0 24px;
  }

  .topbar-greeting h2 {
    font-size: 1.16rem;
  }

  .topbar-greeting p {
    margin-top: 3px;
    font-size: 0.8rem;
  }

  .topbar-actions {
    grid-template-columns: minmax(248px, 330px) 34px 34px 34px auto auto;
    gap: 9px;
  }

  .command-search-button,
  .primary-button {
    min-height: 38px;
  }

  .top-icon-button {
    width: 34px;
    height: 34px;
  }

  .command-dashboard {
    gap: 12px;
  }

  .command-kpi-strip {
    gap: 10px;
  }

  .kpi-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    height: 104px;
    min-height: 0;
    padding: 14px 15px;
  }

  .kpi-icon {
    width: 36px;
    height: 36px;
  }

  .kpi-card strong {
    margin: 5px 0 4px;
    font-size: 1.24rem;
  }

  .kpi-card span {
    font-size: 0.76rem;
  }

  .panel-kicker {
    font-size: 0.69rem;
  }

  .command-main-grid {
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 12px;
  }

  .current-batch-panel,
  .critical-alerts-panel {
    height: 276px;
    min-height: 276px;
  }

  .panel-heading {
    padding: 14px 16px 0;
  }

  .panel-heading.compact {
    padding: 13px 16px 9px;
  }

  .panel-heading h3 {
    margin-top: 16px;
    font-size: 1.1rem;
  }

  .panel-subtitle {
    margin-top: 5px;
    font-size: 0.96rem;
  }

  .outline-action {
    min-height: 34px;
    padding: 6px 12px;
  }

  .batch-hero-body {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
    padding: 16px 16px 12px;
  }

  .batch-hero-copy {
    gap: 15px;
  }

  .batch-progress-grid {
    grid-template-columns: minmax(132px, 0.54fr) minmax(200px, 1fr) 50px;
    gap: 15px;
  }

  .batch-progress-grid strong {
    white-space: nowrap;
  }

  .batch-progress-grid span,
  .batch-facts span {
    margin-bottom: 4px;
    font-size: 0.71rem;
  }

  .batch-progress-grid em {
    margin-top: 6px;
    font-size: 0.71rem;
  }

  .batch-facts {
    grid-template-columns: minmax(110px, 1.35fr) repeat(2, minmax(0, 1fr)) minmax(58px, 0.72fr);
    gap: 10px;
    padding-top: 12px;
  }

  .batch-facts strong {
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .equipment-hero {
    min-height: 188px;
    margin-top: -82px;
    place-items: start center;
  }

  .equipment-hero img {
    width: 340px;
  }

  .alert-list {
    padding: 5px 16px 10px;
  }

  .alert-item {
    min-height: 51px;
  }

  .floor-state-panel {
    height: 202px;
    min-height: 202px;
    overflow: hidden;
  }

  .floor-tile-grid {
    gap: 7px;
    padding: 10px 16px 7px;
  }

  .floor-tile {
    height: 92px;
    min-height: 92px;
    overflow: hidden;
    padding: 8px 9px;
  }

  .floor-tile-head {
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 5px;
    margin-bottom: 3px;
  }

  .floor-icon {
    width: 18px;
    height: 18px;
  }

  .floor-icon .svg-icon {
    width: 16px;
    height: 16px;
  }

  .floor-tile-head strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
  }

  .floor-tile em {
    margin-bottom: 3px;
    line-height: 1;
    font-size: 0.68rem;
  }

  .floor-tile span,
  .floor-tile small {
    line-height: 1.1;
    font-size: 0.66rem;
  }

  .floor-tile small {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .floor-legend {
    gap: 16px;
    padding: 4px 16px 10px;
  }

  .production-timeline-panel,
  .handover-panel {
    height: 208px;
    min-height: 208px;
    overflow: hidden;
  }

  .event-feed {
    padding: 12px 16px 7px;
  }

  .feed-item {
    min-height: 53px;
  }

  .compact-timeline {
    padding: 2px 16px 12px;
  }

  .compact-timeline-row {
    min-height: 28px;
  }

  .compact-timeline-row strong,
  .compact-timeline-row span,
  .compact-timeline-row em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .handover-list {
    padding: 2px 16px 12px;
  }

  .handover-item {
    min-height: 29px;
  }

  .log-event-button {
    min-height: 40px;
    margin: 10px 16px 16px;
  }

  .industrial-status-strip {
    min-height: 76px;
  }

  .industrial-status-strip section {
    padding: 10px 14px;
  }
}
