:root {
  --ink: #202223;
  --muted: #68706d;
  --line: #d7ddd8;
  --line-dark: #2c3130;
  --paper: #ffffff;
  --page: #edf0ec;
  --panel: #f8faf7;
  --header: #111615;
  --green: #91d46c;
  --green-soft: #e4f5db;
  --red: #ef6f5e;
  --red-soft: #fde7e3;
  --blue: #2f6ebd;
  --orange: #c94a2f;
  --gray: #eef1ee;
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1220px;
}

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

button {
  border: 0;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: #777f7a;
  background: #eef1ee !important;
}

.planner-table input:disabled,
.planner-table select:disabled,
.planner-table textarea:disabled {
  color: inherit;
  background: transparent !important;
  opacity: 1;
}

.app-shell {
  min-height: 100vh;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(237, 240, 236, 0.9) 260px),
    var(--page);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(29, 38, 34, 0.08);
}

.user-strip {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.user-strip span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf7;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(237, 240, 236, 0.94) 260px),
    var(--page);
}

.login-panel {
  width: min(420px, calc(100vw - 48px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 46px rgba(29, 38, 34, 0.12);
}

.login-panel h1 {
  margin-bottom: 18px;
}

.login-form,
.login-form label {
  display: grid;
  gap: 10px;
}

.login-form label span,
.admin-card label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.login-form input,
.admin-card input,
.admin-card select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  outline: 0;
}

.login-error {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #f0b4aa;
  border-radius: 6px;
  background: var(--red-soft);
  color: #7a3022;
  font-size: 12px;
  font-weight: 800;
}

.login-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
}

.toolbar,
.controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.week-pill,
.tool-button,
.icon-button,
.search-box,
.client-selector,
.station-selector {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}

.week-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #1d2522;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.week-pill span:first-child {
  color: var(--blue);
  font-size: 10px;
  text-transform: uppercase;
}

.client-selector,
.station-selector {
  display: grid;
  grid-template-columns: auto minmax(140px, 220px);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.client-selector span,
.station-selector span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-selector select,
.station-selector select {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.tool-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

.tool-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: #aab3ad;
  background: #f6f8f5;
}

.tool-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.tool-button {
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.tool-button.compact {
  padding: 0 10px;
  font-size: 11px;
  text-transform: uppercase;
}

.tool-button.dark {
  border-color: var(--header);
  background: var(--header);
  color: #ffffff;
}

.tool-button.dark:hover {
  background: #27302d;
}

.icon-button {
  width: 36px;
  padding: 0;
  font-weight: 900;
}

.icon-button.danger {
  min-height: 26px;
  width: 28px;
  border: 1px solid transparent;
  background: #f0f2ef;
  color: #883425;
}

.row-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 4px 0 !important;
}

.mini-action {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf7;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-strip div {
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(29, 38, 34, 0.05);
}

.summary-strip span {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  margin-bottom: 7px;
}

.controls-row {
  justify-content: flex-start;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 440px;
  padding: 0 11px;
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.planner-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 14px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(29, 38, 34, 0.08);
}

.giveaway-layout {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 310px;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.giveaway-layout .planner-table-wrap {
  margin-bottom: 0;
}

.planner-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12px;
}

.planner-table th,
.planner-table td {
  height: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
  vertical-align: middle;
}

.planner-table th:last-child,
.planner-table td:last-child {
  border-right: 0;
}

.planner-table tbody tr:last-child td,
.planner-table tbody tr:last-child th {
  border-bottom: 0;
}

.planner-table th {
  background: var(--header);
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
}

.planner-table .schedule-head th {
  height: 48px;
}

.planner-table .day-head {
  background: #161d1b;
}

.schedule-priority-col {
  width: 88px;
}

.schedule-promotion-col {
  width: 300px;
}

.schedule-status-col {
  width: 96px;
}

.schedule-day-col {
  width: 82px;
}

.schedule-total-col {
  width: 88px;
}

.schedule-production-col {
  width: 136px;
}

.schedule-cut-col {
  width: 100px;
}

.day-head span,
.day-head small {
  display: block;
  line-height: 1.05;
}

.day-head small {
  margin-top: 3px;
  color: #c7d0ca;
  font-size: 10px;
}

.label-col {
  width: 96px;
}

.desc-col {
  width: 320px;
}

.desc-col span,
.desc-col small {
  display: block;
  line-height: 1.05;
}

.desc-col small {
  margin-top: 3px;
  color: #c7d0ca;
  font-size: 10px;
}

.deliverables-head {
  background: var(--orange) !important;
}

.production-head {
  background: var(--blue) !important;
}

.row-label {
  background: #4d5653 !important;
  color: #ffffff;
  text-align: center;
}

.row-label .cell-input {
  text-align: center;
}

.status-action-cell {
  padding: 5px !important;
}

.status-action-cell .status-select {
  border-radius: 5px;
}

.usage-total-row th,
.usage-total-row td {
  border-top: 2px solid #111a17;
}

.usage-total-label,
.usage-total-spacer {
  background: #eef3ef;
  color: #22302c;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.usage-total-cell {
  background: #eef8e9;
  color: #22302c;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.usage-total-cell span {
  display: block;
}

.usage-total-cell span + span {
  margin-top: 3px;
}

.weighted-down {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin: 0 3px;
  border-radius: 999px;
  background: #fff0b8;
  color: #95402e;
  font-size: 10px;
  line-height: 1;
  vertical-align: 1px;
}

.description-cell {
  background: #ffffff;
  padding: 4px 6px !important;
}

.cell-input,
.number-cell input,
.promotion-picker,
.mini-section input,
.notes-panel textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
}

.cell-input {
  min-height: 24px;
  padding: 0 7px;
}

.strong-input {
  display: block;
  color: #202422;
  font-weight: 850;
}

.muted-input {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.code-input {
  color: #195ead;
  font-weight: 900;
  text-align: center;
}

.toggle-cell {
  width: 100%;
  min-height: 33px;
  background: transparent;
  color: inherit;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

.yes-cell {
  background: var(--green-soft);
  color: #1c4d24;
}

.yes-cell .toggle-cell {
  background: var(--green);
}

.hold-cell {
  background: #fff5cc;
  color: #6b4b00;
}

.hold-cell .toggle-cell {
  background: #f2c94c;
}

.blocked-cell {
  background: #fff0b8;
  color: #60470b;
}

.blocked-cell .toggle-cell {
  background: #f2c94c;
}

.no-cell {
  background: var(--red-soft);
  color: #743124;
}

.no-cell .toggle-cell {
  background: var(--red);
}

.blank-day-cell {
  background: var(--gray);
}

.blank-day-cell .toggle-cell {
  color: transparent;
}

.locked-day-cell {
  background: #f1f3f1;
}

.locked-day-cell .toggle-cell {
  color: transparent;
  cursor: not-allowed;
  opacity: 0.55;
}

.number-cell {
  background: #f8faf7;
}

.number-cell input {
  height: 32px;
  padding: 0 9px;
  color: var(--ink);
  font-weight: 800;
}

.readonly-number {
  padding: 0 9px !important;
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.occasions-table .number-cell,
.occasions-table .readonly-number {
  text-align: center;
}

.empty-row {
  height: 54px !important;
  padding: 0 16px !important;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}

.status-select,
.production-select,
.promotion-picker {
  width: 100%;
  min-height: 32px;
  border: 0;
  outline: 0;
  background: transparent;
}

.status-select {
  color: #101010;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.production-select {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.production-select:disabled {
  color: #8a918d;
  background: #eef1ee;
  cursor: not-allowed;
}

.production-select.needed {
  background: #ffd6d0;
  color: #7a3022;
}

.production-select.in-production {
  background: #fff0b8;
  color: #60470b;
}

.production-select.loaded {
  background: #dff3d5;
  color: #1e5425;
}

.production-select.none {
  background: #eef1ee;
  color: #5d6662;
}

.status-select.loaded {
  background: #dff3d5;
  color: #1e5425;
}

.status-select.approved {
  background: #dff3d5;
  color: #1e5425;
}

.status-select.in-production {
  background: #fff0b8;
  color: #60470b;
}

.status-select.needed {
  background: #ffd6d0;
  color: #7a3022;
}

.status-select.hold {
  background: #fff0b8;
  color: #60470b;
}

.occasions-table .section-row th {
  background: var(--header);
}

.occasions-table .section-row th:nth-child(2) {
  background: var(--orange);
}

.occasion-daypart-col {
  width: 190px;
}

.occasion-time-col {
  width: 58px;
}

.occasion-promo-col {
  width: 170px;
}

.occasion-entry-col {
  width: 72px;
}

.occasion-day-col {
  width: 48px;
}

.occasion-quantity-col {
  width: 78px;
}

.occasion-prizing-col {
  width: 92px;
}

.occasions-table .row-label .cell-input {
  padding: 0 8px;
  text-align: left;
}

.occasions-table .row-label {
  text-align: left;
}

.occasion-name-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 4px;
}

.occasion-name-cell.is-readonly {
  grid-template-columns: minmax(0, 1fr);
}

.occasion-name-cell .icon-button.danger {
  min-height: 24px;
  width: 24px;
}

.entry-type-cell {
  padding: 0 6px !important;
  background: #fbfcfa;
  color: #26302c;
  font-size: 11px;
  font-weight: 850;
}

.inactive-occasion-cell {
  background: #eef1ee !important;
  color: #8a918d !important;
}

.weekend-giveaway-panel {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(29, 38, 34, 0.08);
}

.weekend-giveaway-panel h2 {
  margin: 0 -12px;
  padding: 10px 12px;
  background: var(--header);
  color: #ffffff;
}

.weekend-giveaway-panel label {
  display: grid;
  gap: 5px;
}

.weekend-giveaway-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.42fr);
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.weekend-giveaway-row label,
.weekend-giveaway-row input,
.weekend-giveaway-row select {
  min-width: 0;
}

.weekend-giveaway-panel label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.weekend-giveaway-panel textarea {
  min-height: 64px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  resize: vertical;
}

.weekend-giveaway-panel input[type="number"] {
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  font-weight: 850;
}

.time-cell {
  background: #eef1ee;
  color: var(--ink);
  font-weight: 900;
}

.promotion-picker {
  padding: 0 7px;
  color: #2a302d;
  font-weight: 750;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mini-section,
.notes-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(29, 38, 34, 0.05);
}

.mini-section h2,
.notes-panel h2 {
  padding: 9px 10px;
  background: var(--header);
  color: #ffffff;
}

.mini-section table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.mini-section th,
.mini-section td {
  height: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mini-section th:last-child,
.mini-section td:last-child {
  border-right: 0;
}

.mini-section tbody tr:last-child td {
  border-bottom: 0;
}

.mini-section th {
  background: #25302d;
  color: #ffffff;
  font-size: 10px;
  text-transform: uppercase;
}

.mini-section th:first-child {
  width: 55%;
  text-align: left;
  padding-left: 9px;
}

.mini-section input {
  padding: 0 8px;
}

.notes-panel textarea {
  display: block;
  min-height: 136px;
  padding: 10px;
  resize: vertical;
}

.setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
  background: rgba(17, 22, 21, 0.36);
}

.setup-panel {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(17, 22, 21, 0.26);
}

.promotion-search-panel {
  width: min(1060px, calc(100vw - 40px));
}

.admin-panel {
  width: min(1080px, calc(100vw - 40px));
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(480px, 1.25fr);
  gap: 16px;
  padding: 18px;
}

.admin-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 420px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.admin-card h3 {
  color: #1d2421;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

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

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

.admin-client-row.is-inactive {
  opacity: 0.62;
}

.client-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.client-row-actions .mini-action {
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.mini-action.danger-text {
  color: #883425;
}

.admin-list strong {
  overflow-wrap: anywhere;
}

.admin-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-user-card {
  gap: 12px;
}

.admin-user-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.admin-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-toggle-row {
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: #1d2421;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-toggle input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--header);
}

.admin-toggle span {
  color: #1d2421;
  font-size: 12px;
}

.admin-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.assignment-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.assignment-list.is-muted {
  opacity: 0.62;
}

.assignment-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 130px 36px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.assignment-row select {
  border: 0;
  background: transparent;
}

.assignment-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-row .icon-button {
  width: 34px;
  min-height: 34px;
}

.access-add-button {
  justify-self: start;
  width: auto;
}

.selected-user-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f8f5;
}

.selected-user-actions.is-protected {
  border-color: #b9c6bd;
  background: #eef5eb;
}

.selected-user-actions strong,
.selected-user-actions small {
  display: block;
}

.selected-user-actions small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.selected-user-actions > div:last-child {
  display: flex;
  gap: 6px;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.empty-admin {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.setup-header,
.setup-table-header,
.setup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setup-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.setup-header h2 {
  color: var(--ink);
  font-size: 22px;
  text-transform: none;
}

.promotion-search-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.promotion-search-tools label {
  display: grid;
  gap: 6px;
  min-width: 230px;
}

.promotion-search-tools label span,
.promotion-search-tools > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.promotion-search-table-wrap {
  overflow: auto;
  padding: 16px;
}

.promotion-search-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
}

.promotion-search-table th {
  padding: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
}

.promotion-search-table td {
  padding: 10px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.promotion-search-table td strong,
.promotion-search-table td small {
  display: block;
}

.promotion-search-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
}

.promotion-search-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.setup-grid label,
.allocation-panel label {
  display: grid;
  gap: 6px;
}

.setup-grid label span,
.allocation-panel label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.setup-grid .cell-input,
.allocation-panel input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
}

.setup-total-field {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.setup-total-field span {
  grid-column: 1 / -1;
}

.allocation-panel {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 12px;
  align-items: end;
  padding: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9f6;
}

.station-list-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}

.station-profile-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.station-profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.station-profile-row.is-inactive {
  opacity: 0.62;
}

.station-profile-row strong,
.station-profile-row small {
  display: block;
}

.station-profile-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.station-profile-row > div:last-child {
  display: flex;
  gap: 6px;
}

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

.allocation-panel small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.setup-note,
.setup-warning {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 800;
}

.setup-note {
  color: #2d6934;
}

.setup-warning {
  color: #95402e;
}

.setup-table-wrap {
  padding: 16px;
}

.setup-table-header {
  margin-bottom: 10px;
}

.setup-table-header > div {
  display: flex;
  gap: 8px;
}

.setup-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  table-layout: fixed;
  font-size: 12px;
}

.setup-table th,
.setup-table td {
  height: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.setup-table th {
  background: var(--header);
  color: #ffffff;
  font-size: 11px;
  text-transform: uppercase;
}

.setup-table th:last-child,
.setup-table td:last-child {
  width: 44px;
  border-right: 0;
}

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

.setup-select {
  width: 100%;
  min-height: 32px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 8px;
  color: var(--ink);
  font-weight: 750;
}

.setup-actions {
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.promotion-panel {
  width: min(1360px, calc(100vw - 40px));
}

.setup-overlay:has(.promotion-panel) {
  justify-content: center;
}

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

.promotion-form label,
.promotion-form fieldset {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.promotion-form label span,
.promotion-form legend {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.promotion-form fieldset {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
}

.promotion-form legend {
  padding: 0 4px;
}

.promotion-form .cell-input,
.promotion-form input[type="number"],
.framed-select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
}

.promotion-form small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

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

.flight-field {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.flight-field legend {
  grid-column: 1 / -1;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-option {
  display: inline-flex !important;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px !important;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.check-option input {
  margin: 0;
}

.promotion-form .check-option span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.brief-notes {
  min-height: 86px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  resize: vertical;
}

.promotion-window-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f6;
}

.promotion-window-header,
.promotion-window-row {
  display: grid;
  gap: 8px;
  align-items: end;
}

.promotion-window-header {
  grid-template-columns: 1fr auto;
}

.promotion-window-row {
  grid-template-columns: minmax(260px, 1.25fr) minmax(210px, 1fr) minmax(120px, 0.55fr) minmax(145px, 0.7fr) minmax(88px, 0.45fr) minmax(130px, 0.65fr) 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.promotion-window-row input[type="number"] {
  min-width: 0;
  padding: 0 6px;
}

.promotion-window-row fieldset {
  padding: 8px;
}

.promotion-window-row .flight-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.promotion-window-row .icon-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 1180px) {
  .promotion-window-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 36px;
  }

  .promotion-window-row .flight-field {
    grid-column: 1 / -1;
  }
}

.auto-deliverable-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f6;
}

.auto-deliverable-preview div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: 6px;
  background: var(--paper);
}

.auto-deliverable-preview span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.auto-deliverable-preview strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.inventory-panel {
  width: min(760px, calc(100vw - 40px));
}

.inventory-editor-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9f6;
}

.inventory-bulk-tools {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.inventory-bulk-tools label {
  display: grid;
  gap: 4px;
}

.inventory-bulk-tools label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.inventory-bulk-tools input {
  width: 92px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-weight: 850;
}

.inventory-editor-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.inventory-editor-summary strong {
  font-size: 24px;
  line-height: 1;
}

.inventory-grid-wrap {
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding: 16px;
}

.inventory-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  table-layout: fixed;
  font-size: 12px;
}

.inventory-grid th,
.inventory-grid td {
  height: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.inventory-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f5f2;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.inventory-grid th span {
  display: block;
}

.inventory-check-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 5px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
}

.inventory-check-control input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.inventory-grid th .inventory-check-control span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.inventory-grid tbody th {
  left: 0;
  z-index: 2;
  width: 76px;
  padding: 4px;
  background: #fbfcfa;
  text-align: center;
}

.inventory-grid th:first-child {
  width: 76px;
}

.inventory-grid td input[type="number"] {
  width: 100%;
  height: 23px;
  border: 0;
  outline: 0;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
  padding: 0 7px;
}

.inventory-grid td input[type="number"]:focus {
  background: #eaf2ff;
}

.inventory-cell-entry {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 0 6px;
}

.inventory-cell-entry input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.inventory-cell-entry input[type="number"] {
  min-width: 0;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

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

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

  .giveaway-layout,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .setup-grid,
  .allocation-panel,
  .promotion-form {
    grid-template-columns: 1fr;
  }

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

@media print {
  body {
    min-width: 1180px;
  }

  .toolbar,
  .controls-row,
  .row-tools {
    display: none;
  }

  .app-shell {
    padding: 0;
    background: #ffffff;
  }

  .topbar,
  .summary-strip div,
  .planner-table-wrap,
  .mini-section,
  .notes-panel {
    box-shadow: none;
  }
}
