:root {
  --bg: #eeeeeb;
  --bg-soft: rgba(255, 255, 255, 0.94);
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: rgba(0, 0, 0, 0.13);
  --line-strong: rgba(0, 0, 0, 0.25);
  --text: #171717;
  --muted: #65655f;
  --brand: #fbb800;
  --brand-deep: #6b4e00;
  --olive: #fbb800;
  --olive-soft: #fff0aa;
  --danger: #c04633;
  --danger-soft: #f6ddd8;
  --success: #2f7c5e;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.1);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --display: "Gotham", "Avenir Next", "Montserrat", "Segoe UI", Arial, sans-serif;
  --body: "Gotham", "Avenir Next", "Montserrat", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(251, 184, 0, 0.2), transparent 28%),
    linear-gradient(135deg, #f3f3f0 0%, #e8e8e4 100%);
  color: var(--text);
  font-family: var(--body);
}

body {
  position: relative;
  overflow-x: auto;
}

body.is-auth-only {
  overflow: hidden;
}

.background-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.background-glow-a {
  top: -6rem;
  left: -3rem;
  width: 20rem;
  height: 20rem;
  background: rgba(251, 184, 0, 0.22);
}

.background-glow-b {
  bottom: 3rem;
  right: -3rem;
  width: 18rem;
  height: 18rem;
  background: rgba(0, 0, 0, 0.08);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1rem;
  min-height: 100vh;
  padding: 1rem;
}

.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.auth-card {
  width: min(520px, 100%);
  display: grid;
  gap: 1rem;
  padding: 1.7rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  border-top: 7px solid var(--brand);
  background: #ffffff;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 2rem;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
}

.auth-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.auth-feedback {
  margin: 0;
}

.sidebar,
.main-content {
  backdrop-filter: blur(18px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  border-color: #000000;
  border-top: 7px solid var(--brand);
  background: #000000;
  color: #ffffff;
}

.main-content {
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  padding: 0.85rem 0.2rem 0.35rem;
}

.brand-logo {
  display: block;
  width: min(100%, 210px);
  height: auto;
  object-fit: contain;
}

.brand-logo-primary {
  width: 190px;
}

.brand-logo-dark {
  width: 210px;
  margin-bottom: 0.9rem;
}

.auth-back-link {
  display: inline-flex;
  width: fit-content;
  color: #4f3b00;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.auth-back-link:hover,
.auth-back-link:focus-visible {
  color: #000000;
  text-decoration: underline;
}

.brand h1,
.topbar h2,
.section-title,
.card-title,
.modal-header h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand h1 {
  font-size: 2rem;
  line-height: 1.02;
  color: #ffffff;
}

.brand p {
  color: rgba(255, 255, 255, 0.68);
}

.brand p,
.eyebrow,
.brand-kicker,
.form-help,
.metric-label,
.table-subtext,
.muted {
  color: var(--muted);
}

.auth-card .brand-kicker {
  color: #735500;
}

.sidebar .brand p {
  color: rgba(255, 255, 255, 0.68);
}

.brand-kicker,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
}

.platform-back-link {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #000000;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.platform-back-link:hover,
.platform-back-link:focus-visible {
  background: #ffffff;
  color: #000000;
  text-decoration: none;
}

.nav {
  display: grid;
  gap: 0.4rem;
}

.platform-nav { display: grid; gap: 6px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.05); }
.platform-nav-label { margin-bottom: 3px; color: var(--brand); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.platform-nav-link { display: block; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); color: #ffffff; font-weight: 800; text-decoration: none; }
.platform-nav-link:hover, .platform-nav-link:focus-visible, .platform-nav-link.is-current { border-color: var(--brand); background: var(--brand); color: #000000; outline: none; }

.nav-button {
  border: 1px solid transparent;
  background: transparent;
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav-button:hover,
.nav-button:focus-visible {
  background: var(--brand);
  border-color: var(--brand);
  color: #000000;
  transform: translateX(2px);
}

.nav-button.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #000000;
}

.sidebar-card,
.content-card,
.metric-card,
.chart-card,
.table-card,
.hero-card,
.empty-state {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  min-width: 0;
}

.sidebar-card {
  padding: 1rem;
}

.sidebar .brand-kicker,
.sidebar .eyebrow {
  color: var(--brand);
}

.sidebar .inline-note,
.sidebar .section-text,
.sidebar .metric-label,
.sidebar .muted {
  color: rgba(255, 255, 255, 0.66);
}

.sidebar .sidebar-card,
.sidebar .metric-card {
  border-color: rgba(251, 184, 0, 0.28);
  background: #111111;
  color: #ffffff;
  box-shadow: none;
}

.sidebar .metrics-grid {
  grid-template-columns: 1fr;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.main-content > .topbar .eyebrow {
  padding-left: 8px;
  border-left: 4px solid var(--brand);
  color: #5b4300;
}

.topbar-actions,
.modal-actions,
.filters-row,
.tab-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.platform-return-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #000000;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.platform-return-button:hover,
.platform-return-button:focus-visible {
  border-color: #000000;
  background: #000000;
  color: #ffffff;
}

.view-panel {
  display: grid;
  gap: 1rem;
  animation: reveal 260ms ease;
  min-width: 0;
}

.mode-badge {
  align-self: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  padding: 0.72rem 0.95rem;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.user-chip {
  align-self: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  padding: 0.72rem 0.95rem;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-badge.is-read-only {
  background: rgba(192, 70, 51, 0.1);
  border-color: rgba(192, 70, 51, 0.2);
  color: var(--danger);
}

.mode-badge.is-public {
  background: rgba(251, 184, 0, 0.18);
  border-color: rgba(107, 78, 0, 0.26);
  color: #5b4300;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.primary-button,
.ghost-button,
.chip,
.tab-button,
.mini-button {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.05rem;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button:disabled,
.ghost-button:disabled,
.chip:disabled,
.tab-button:disabled,
.mini-button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.primary-button {
  border: 1px solid var(--brand);
  color: #000000;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(251, 184, 0, 0.24);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-1px);
  border-color: #000000;
  background: #000000;
  color: #ffffff;
}

.ghost-button,
.tab-button,
.chip,
.mini-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
}

.danger-button {
  border-color: rgba(192, 70, 51, 0.28);
  color: var(--danger);
  background: rgba(246, 221, 216, 0.58);
}

.tab-button.is-active,
.chip.is-active {
  background: rgba(251, 184, 0, 0.24);
  border-color: rgba(107, 78, 0, 0.35);
}

.hero-grid,
.metrics-grid,
.charts-grid,
.table-grid,
.split-layout,
.insights-grid {
  display: grid;
  gap: 1rem;
}

.hero-grid {
  grid-template-columns: 1.4fr 1fr;
}

.hero-card {
  padding: 1.3rem;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -20% auto;
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle, rgba(251, 184, 0, 0.2), transparent 60%);
}

.hero-summary {
  display: grid;
  gap: 0.7rem;
}

.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-card {
  padding: 1rem;
}

.metric-value {
  font-family: var(--display);
  font-size: 2rem;
  margin-top: 0.35rem;
}

.chart-card,
.table-card,
.content-card {
  padding: 1rem;
}

.charts-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.chart-shell {
  display: grid;
  gap: 0.65rem;
}

.chart {
  width: 100%;
  min-height: 260px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(
      to top,
      rgba(0, 0, 0, 0.04),
      rgba(0, 0, 0, 0.04) 1px,
      transparent 1px,
      transparent 48px
    );
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.6rem;
}

.table-wrap {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.launch-table-wrap {
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.launch-table-wrap thead th {
  top: 0;
  z-index: 4;
  box-shadow: 0 2px 0 rgba(107, 78, 0, 0.18);
}

.launch-table-wrap thead th.sticky-col {
  z-index: 6;
}

.print-launch-sheet {
  display: none;
}

.print-launch-heading h1 {
  margin: 0.25rem 0 0;
  font-family: var(--display);
  font-size: 1.35rem;
}

.print-launch-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.print-launch-table th,
.print-launch-table td {
  word-break: normal;
  white-space: nowrap;
  text-align: center;
}

.print-launch-table .print-col-name {
  min-width: 90px;
  white-space: normal;
  text-align: left;
}

.table-scrollbar {
  position: sticky;
  top: 0.6rem;
  z-index: 4;
  display: grid;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.8rem 0.7rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.table-scrollbar-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.table-scrollbar-range {
  width: 100%;
  margin: 0;
  accent-color: var(--brand);
  cursor: ew-resize;
}

table {
  width: max-content;
  min-width: max(100%, 720px);
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.65);
}

th,
td {
  padding: 0.8rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff1b8;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

th.sticky-col {
  left: 0;
  z-index: 5;
}

td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 10px 0 16px rgba(0, 0, 0, 0.04);
}

tbody tr:hover {
  background: rgba(251, 184, 0, 0.08);
}

tbody tr:hover td.sticky-col {
  background: #fffaf0;
}

.status-pill,
.score-pill,
.warning-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill.is-active,
.score-pill.score-good {
  background: rgba(47, 124, 94, 0.12);
  color: #256b50;
}

.status-pill.is-inactive,
.score-pill.score-low {
  background: rgba(192, 70, 51, 0.12);
  color: #933527;
}

.score-pill.score-mid,
.warning-pill {
  background: rgba(251, 184, 0, 0.18);
  color: var(--brand-deep);
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field span {
  font-size: 0.86rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0.78rem 0.9rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(251, 184, 0, 0.22);
}

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

.field-inline {
  align-content: end;
}

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

.modal {
  border: none;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(720px, calc(100vw - 2rem));
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-footer {
  margin-top: 1.1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.section-title {
  font-size: 1.55rem;
}

.section-text {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.split-layout {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
}

.insights-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.legend-list,
.stack-list,
.audit-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-item,
.stack-item,
.audit-item {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.legend-item strong,
.stack-item strong,
.audit-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

.stack-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-top: 0.55rem;
}

.stack-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fbb800, #ffd85e);
}

.heatmap {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.heatmap-grid {
  display: grid;
  gap: 0.35rem;
  width: max-content;
  min-width: 860px;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 260px repeat(13, minmax(56px, 1fr));
  gap: 0.35rem;
}

.heatmap-cell {
  display: grid;
  place-items: center;
  min-height: 3rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 700;
}

.heatmap-cell.is-name {
  justify-items: start;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.9);
}

.heatmap-cell.is-header {
  background: rgba(251, 184, 0, 0.2);
  color: #5b4300;
}

.heatmap-cell.is-pending {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
}

.heatmap-cell.is-out {
  color: rgba(109, 98, 85, 0.55);
  background: rgba(255, 255, 255, 0.28);
}

.heatmap-score {
  color: #132419;
}

.banner,
.warning-banner {
  border-radius: 18px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(107, 78, 0, 0.24);
  background: rgba(251, 184, 0, 0.14);
  color: var(--brand-deep);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 2rem;
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  font-family: var(--display);
}

.inline-note {
  font-size: 0.84rem;
  color: var(--muted);
}

.inline-note[data-tone="pending"] {
  color: var(--brand-deep);
  font-weight: 700;
}

.inline-note[data-tone="success"] {
  color: #256b50;
  font-weight: 700;
}

.inline-note[data-tone="error"] {
  color: #933527;
  font-weight: 700;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
}

.toolbar-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
}

.kpi-input {
  min-width: 92px;
}

.attachments-cell {
  min-width: 280px;
  max-width: 360px;
}

.justification-cell {
  min-width: 300px;
  max-width: 390px;
}

.justification-input {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.68rem 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
}

.justification-input:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(251, 184, 0, 0.22);
}

.justification-read {
  padding: 0.72rem;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: rgba(251, 184, 0, 0.1);
  color: #403b2e;
  line-height: 1.45;
  white-space: normal;
}

.history-actions-cell {
  min-width: 120px;
  vertical-align: top;
}

.history-button {
  border-color: rgba(107, 78, 0, 0.3);
  background: rgba(251, 184, 0, 0.16);
  font-weight: 700;
}

.attachment-list,
.attachment-form {
  display: grid;
  gap: 0.5rem;
}

.attachment-form {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.attachment-item {
  display: grid;
  gap: 0.45rem;
  padding: 0.58rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
}

.attachment-note-input,
.attachment-file-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font: inherit;
}

.attachment-file-input {
  font-size: 0.82rem;
}

.cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.history-modal-card {
  width: min(820px, calc(100vw - 2rem));
  max-height: min(82vh, 860px);
  overflow-y: auto;
}

.justification-modal-card {
  width: min(580px, calc(100vw - 2rem));
}

.justification-modal-field {
  margin-top: 1.1rem;
}

.justification-modal-field textarea {
  min-height: 130px;
}

.justification-modal-footer {
  align-items: center;
}

.kpi-history-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.kpi-history-entry {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 14px;
  background: #ffffff;
}

.history-entry-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
}

.history-justification span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-justification p {
  margin: 0;
  line-height: 1.5;
}

.history-change-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-change-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.history-change-list span {
  color: var(--muted);
}

.history-empty-state {
  min-height: 180px;
}

.mini-button {
  padding: 0.55rem 0.8rem;
  font-size: 0.84rem;
}

.pill-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.align-right {
  text-align: right;
}

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

  .sidebar {
    position: static;
  }

  .hero-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 0.9rem;
  }

  .auth-shell {
    padding: 0.9rem;
  }

  .main-content,
  .sidebar,
  .auth-card {
    padding: 1rem;
    border-radius: 24px;
  }

  .topbar,
  .modal-header,
  .modal-footer,
  .section-header,
  .toolbar {
    flex-direction: column;
  }

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

@media print {
  @page {
    size: landscape;
    margin: 10mm;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .background-glow,
  .auth-shell,
  .sidebar,
  .topbar,
  .topbar-actions,
  .warning-banner,
  .table-scrollbar,
  .launch-toolbar,
  .launch-role-switcher,
  .launch-settings-card,
  .launch-rate-card,
  .launch-table-card,
  #refresh-button,
  #sign-out-button,
  #open-employee-dialog {
    display: none !important;
  }

  .app-shell {
    display: block;
    padding: 0;
    min-height: auto;
  }

  .main-content,
  .content-card,
  .table-card,
  .chart-card,
  .metric-card {
    background: #ffffff;
    border: 1px solid #d5d5d5;
    box-shadow: none;
  }

  .table-wrap {
    overflow: visible;
    border: none;
  }

  .launch-table-wrap {
    max-height: none;
  }

  .print-launch-sheet {
    display: block;
  }

  .print-launch-sheet .eyebrow {
    color: #4a4a4a;
  }

  .print-launch-table {
    font-size: 8px;
  }

  .print-launch-table th,
  .print-launch-table td {
    padding: 0.18rem 0.22rem;
    border: 1px solid #d5d5d5;
  }

  th,
  td,
  th.sticky-col,
  td.sticky-col {
    position: static;
    background: #ffffff;
    box-shadow: none;
  }
}
