:root {
  --maxw: 1080px;

  /* Raw brand tokens (MVC Aligned) */
  --mvc-navy: #0F1B2D;
  --mvc-gold: #B08B57;
  --mvc-slate: #4D5B73;
  --mvc-paper-stone: #DFD9CE;
  --mvc-warm-paper: #F7F5F1;

  /* Semantic color tokens */
  --color-page-bg: var(--mvc-warm-paper);
  --color-surface: #ffffff;
  --color-surface-soft: #fbf9f6;
  --color-text: var(--mvc-navy);
  --color-text-muted: var(--mvc-slate);
  --color-line: rgba(15, 27, 45, 0.16);

  /* Accent: gold background with navy text (a11y). */
  --color-accent: var(--mvc-gold);
  --color-accent-hover: #9a7748;
  --color-accent-border: #8c6f42;
  --color-accent-soft: #f3ede6;
  --color-on-accent: var(--mvc-navy);

  /* Action/link color (navy). */
  --color-action: var(--mvc-navy);
  --color-action-hover: #0b1422;
  --color-action-soft: rgba(15, 27, 45, 0.08);

  /* Focus ring: navy + gold */
  --focus-ring: 0 0 0 2px rgba(15, 27, 45, 0.32),
                0 0 0 5px rgba(176, 139, 87, 0.35);

  /* Legacy semantic aliases (kept to reduce churn) */
  --bg: var(--color-page-bg);
  --surface: var(--color-surface);
  --surface-soft: var(--color-surface-soft);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-line);
  --brand: var(--color-action);
  --brand-strong: var(--color-action-hover);
  --brand-soft: var(--color-action-soft);
  --ok: #1b7a1b;
  --ok-soft: #e9f7ea;
  --warn: #b88200;
  --warn-soft: #fff8e1;
  --danger: #b00020;
  --danger-soft: #fde7ea;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --table-head-bg-from: #f1ede7;
  --table-head-bg-to: #e7e1d7;
  --table-head-border: #9aa3b2;
  /* Admin tables: keep zebra rows clearly visible even without hover */
  --table-row-odd: #ffffff;
  --table-row-even: #f4f0ea;
  --table-row-hover: #ebe5dc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: var(--text);
}

a {
  color: var(--color-action);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-action-hover);
}

a:focus-visible {
  outline: none;
  border-radius: 6px;
  box-shadow: var(--focus-ring);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px;
}

header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  background: var(--surface);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.nav-main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.nav-link,
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  color: #1f2937;
  padding: 6px 10px;
  border-radius: 999px;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    text-decoration-color 0.15s ease;
}

.nav-link:hover,
.nav-links a:hover,
.nav-link:focus-visible,
.nav-links a:focus-visible {
  color: var(--color-action);
  background-color: var(--color-action-soft);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  outline: none;
}

.nav-link-active,
.nav-link[aria-current="page"] {
  color: var(--color-action-hover);
  background-color: #eee8df;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  box-shadow: 0 0 0 1px rgba(15, 27, 45, 0.18);
}

.lang {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.nav-right {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-user {
  font-size: 12px;
  color: var(--muted);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout {
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.nav-logout:hover,
.nav-logout:focus-visible {
  border-color: var(--color-action);
  background: var(--color-action-soft);
  color: var(--color-action-hover);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  outline: none;
}

.is-hidden {
  display: none !important;
}

.lang a {
  padding: 2px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #6b7280;
  opacity: 0.8;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lang a[aria-current="page"] {
  border-color: var(--color-action);
  color: var(--color-action);
  font-weight: 700;
  background: var(--color-action-soft);
  box-shadow: 0 0 0 1px rgba(15, 27, 45, 0.18);
}

.lang a:hover,
.lang a:focus-visible {
  border-color: var(--color-action);
  color: var(--color-action-hover);
  background: #f0ebe4;
  outline: none;
}

.nav-toggle {
  display: none;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 8px 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-icon {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
  box-shadow: 0 6px 0 0 #111827, 0 -6px 0 0 #111827;
}

.hero h1 {
  margin: 14px 0 8px 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.hero p {
  margin: 0 0 10px 0;
  max-width: 74ch;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

@media (min-width: 900px) {
  .grid3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

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

ul, ol { padding-left: 22px; }
ol li { margin-bottom: 6px; }

form {
  display: grid;
  gap: 14px;
}

.form-field,
label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #1f2937;
  letter-spacing: 0.01em;
}

.form-input,
input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fdfdff;
  color: var(--text);
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease;
}

.form-input:hover,
input:hover,
textarea:hover,
select:hover {
  border-color: #c1cbe0;
  background-color: #f7f9ff;
}

.form-input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-action);
  box-shadow: var(--focus-ring);
  background-color: #fbf9f6;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

button {
  appearance: none;
  border: 1px solid var(--color-accent-border);
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

button:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-action);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* -------------------------------------------------------------------------
   GRSR questionnaire stepper (tabs)
   ------------------------------------------------------------------------- */

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stepper-step {
  /* Override default button styles for tab-like appearance */
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--mvc-warm-paper);
  color: var(--mvc-slate);
  white-space: nowrap;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    transform 0.05s ease;
}

.stepper-step:hover {
  background: var(--color-accent-soft);
  border-color: rgba(15, 27, 45, 0.22);
  color: var(--mvc-navy);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.stepper-step:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.stepper-step.is-active {
  background: var(--mvc-navy);
  border-color: rgba(15, 27, 45, 0.72);
  color: var(--mvc-warm-paper);
}

.stepper-step.is-active:hover {
  background: var(--color-action-hover);
  border-color: rgba(15, 27, 45, 0.82);
  color: var(--mvc-warm-paper);
}

.stepper-step[disabled] {
  opacity: 0.7;
}

.field-help {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.notice {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-soft);
}

.notice.warn {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.notice.success {
  border-color: var(--ok);
  background: var(--ok-soft);
}

.notice.error {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-accent-border);
  text-decoration: none;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    transform 0.05s ease;
}

button.btn {
  color: var(--color-on-accent);
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-accent-hover);
  border-color: var(--color-action);
  color: var(--color-on-accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  outline: none;
}

.btn:active {
  background: var(--color-accent-hover);
  border-color: var(--color-action);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Secondary / outline button (neutral surface) */
.btn-secondary,
.btn.secondary {
  background: var(--surface);
  color: var(--color-action);
  border-color: var(--color-action);
}

/* Hover: warm highlight (gold-tinted) while keeping navy text for contrast */
.btn-secondary:hover,
.btn.secondary:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-border);
  color: var(--color-action-hover);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

/* Focus: use the shared focus ring for a11y (navy + gold) */
.btn-secondary:focus-visible,
.btn.secondary:focus-visible {
  outline: none;
  background: var(--color-accent-soft);
  border-color: var(--color-accent-border);
  color: var(--color-action-hover);
  box-shadow: var(--focus-ring);
}

.btn-secondary:active,
.btn.secondary:active {
  background: #eadfd2;
  border-color: var(--color-accent-border);
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.12);
  transform: translateY(1px);
}

/* Subtle / ghost button */
.btn-ghost {
  background: transparent;
  color: var(--color-action);
  border-color: transparent;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--color-accent-soft);
  border-color: rgba(176, 139, 87, 0.35);
  color: var(--color-action-hover);
}

.btn-ghost:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-ghost:active {
  background: #eadfd2;
  border-color: rgba(176, 139, 87, 0.4);
  transform: translateY(1px);
}

/* Destructive button */
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background: #930015;
  border-color: #7b0011;
}

.btn-danger:active {
  background: #7b0011;
  border-color: #5f000d;
}

/* Small size variant (.btn-sm) */
.btn.small,
.btn-sm {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
}

.actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.actions-center {
  justify-content: center;
}

.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 14px; }
.mt-lg { margin-top: 18px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1;
  gap: 6px;
}

.badge-none {
  background: #f5f5f5;
}

.badge-pending {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.badge-paid {
  border-color: var(--ok);
  background: var(--ok-soft);
}

.badge-expired {
  border-color: #9ca3af;
  background: #f3f4f6;
}

.schedule-shell {
  display: grid;
  grid-template-columns: 280px minmax(320px, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.schedule-context,
.schedule-calendar,
.schedule-slots {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.month-grid-title {
  font-weight: 700;
  margin-bottom: 10px;
}

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

.calendar-day {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.calendar-day.is-selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-strong);
}

.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-btn {
  min-width: 92px;
}

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

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

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
}

.status-pill.pending {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.status-pill.paid {
  border-color: var(--ok);
  background: var(--ok-soft);
}

.status-pill.expired {
  border-color: #9ca3af;
  background: #f3f4f6;
}

.mv-table-wrap {
  border: 1px solid #d7e3f6;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
}

.mv-table,
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
}

.mv-table th,
.mv-table td,
.table th,
.table td {
  padding: 11px 10px;
  border-bottom: 1px solid #d7e3f6;
  text-align: left;
  vertical-align: top;
}

.mv-table th,
.table th {
  font-size: 13px;
  color: var(--mvc-navy);
  background: linear-gradient(180deg, var(--table-head-bg-from) 0%, var(--table-head-bg-to) 100%);
  border-bottom: 2px dotted var(--table-head-border);
}

.mv-table thead th:not(:last-child),
.table thead th:not(:last-child) {
  border-right: 1px dotted #b4c6eb;
}

.mv-table tbody tr:nth-child(odd) td,
.table tbody tr:nth-child(odd) td {
  background: var(--table-row-odd);
}

.mv-table tbody tr:nth-child(even) td,
.table tbody tr:nth-child(even) td {
  background: var(--table-row-even);
}

.mv-table tbody tr:hover td,
.table tbody tr.table-row-hover td,
.table tbody tr:hover td.table-row-hover {
  background: var(--table-row-hover);
}

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


.mv-form-panel,
.mv-detail-box {
  border: 1px solid #d7e3f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7ff 100%);
  padding: 14px;
}

.mv-filter-panel {
  margin-bottom: 14px;
}

.mv-form-grid,
.mv-filter-grid,
.mv-detail-stack {
  display: grid;
  gap: 12px;
}

.mv-form-grid,
.mv-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

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

.mv-form-grid--availability {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.mv-filter-grid > .small,
.mv-filter-grid > .mv-filter-total,
.mv-filter-grid > div {
  display: flex;
  align-items: flex-end;
  min-height: 100%;
}

.mv-form-panel label,
.mv-detail-box label,
.mv-filter-grid label {
  font-weight: 600;
}

.mv-textarea-block textarea,
.mv-detail-box textarea,
.mv-form-panel textarea {
  min-height: 96px;
}

.mv-checklist {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 14px;
  border: 1px dashed #b7c8e8;
  border-radius: 12px;
  background: #fff;
}

.mv-checklist label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
}

.mv-checklist input[type="checkbox"],
.mv-checklist input[type="radio"] {
  width: auto;
  margin: 0;
}

.mv-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.mv-inline-actions--end {
  justify-content: flex-end;
}

.mv-detail-section,
#mv-order-detail-card details {
  border: 1px solid #d7e3f6;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.mv-detail-section > summary,
#mv-order-detail-card details > summary,
.mv-inline-actions > details > summary {
  cursor: pointer;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
  border-bottom: 1px dotted #b7c8e8;
}

.mv-detail-section-body {
  padding-top: 0;
}

#admin-order-summary,
#admin-order-audit-list,
#admin-order-outbox-list,
#admin-strategy-unified-summary,
#admin-strategy-history,
#admin-strategy-annotations,
#admin-strategy-documents,
#order-detail-history,
#order-detail-roadmap,
#order-detail-current {
  border: 1px solid #d7e3f6;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
}

#order-detail-current {
  margin-bottom: 10px;
}

#mv-order-detail-card > h3,
#admin-order-detail-dialog h4 {
  margin-bottom: 8px;
}

#mv-order-detail-card ul,
#admin-order-detail-dialog .small ul {
  margin: 0;
}

@media (max-width: 760px) {
  .mv-form-grid,
  .mv-filter-grid,
  .mv-form-grid--wide,
  .mv-form-grid--availability {
    grid-template-columns: 1fr;
  }
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

@media (max-width: 760px) {
  .nav {
    gap: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-main {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    gap: 10px;
    flex-wrap: wrap;
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
  }

  .nav-user {
    max-width: 58vw;
  }

  /* Collapsed by default on small screens; expanded when nav--open is set. */
  .nav:not(.nav--open) .nav-links,
  .nav:not(.nav--open) .nav-right {
    display: none;
  }
}


.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}


.calendar-months-wrap {
  display: grid;
  gap: 16px;
}

.calendar-month-block {
  display: grid;
  gap: 10px;
}

.calendar-weekdays,
.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday-row > div {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: capitalize;
}

.calendar-cell.filler {
  visibility: hidden;
  pointer-events: none;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: capitalize;
}

.month-grid-real {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-cell {
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 8px;
  text-align: left;
  font: inherit;
}

.calendar-cell.available {
  cursor: pointer;
  background: #fff;
}

.calendar-cell.available:hover,
.calendar-cell.available:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 60, 136, 0.14);
  outline: none;
}

.calendar-cell.disabled,
.calendar-cell:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #f8fafc;
}

.calendar-cell.is-current {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.calendar-cell.is-selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-strong);
}

.calendar-cell.is-blocked-day {
  background: #f8fafc;
  color: var(--muted);
  border-style: dashed;
}

.calendar-cell-day {
  font-size: 1rem;
  font-weight: 700;
}

.slot-list.vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-row {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  text-align: left;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.slot-row.is-current {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.slot-row.is-selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-strong);
}

.slot-row.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
  color: var(--muted);
}

.slot-row.is-blocked {
  /* Default (end-user) view: blocked slots appear as a softer, disabled grey. */
  border-style: dashed;
  background: #f8fafc;
  color: var(--muted);
}

.calendar-cell.is-current,
.calendar-cell.is-current:disabled,
.calendar-cell.is-current.disabled {
  background: var(--ok) !important;
  color: #fff !important;
  border-color: var(--ok) !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
  opacity: 1 !important;
}

.slot-row.is-current,
.slot-row.is-current:disabled,
.slot-row.is-current.is-disabled,
.slot-row.is-current[disabled] {
  background: var(--ok) !important;
  color: #fff !important;
  border-color: var(--ok) !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
  opacity: 1 !important;
}

.slot-row.is-current *,
.calendar-cell.is-current * {
  color: #fff !important;
}

.selected-day-label,
.selected-time-label {
  margin-bottom: 8px;
  color: var(--text);
}


.admin-order-detail-page {
  margin-top: 18px;
}

.admin-fulfillment-stack {
  display: grid;
  gap: 12px;
  align-items: start;
}

.admin-strategy-action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-section-toggle > summary {
  cursor: pointer;
  list-style: none;
}

.admin-section-toggle > summary::-webkit-details-marker {
  display: none;
}

.admin-calendar-shell .calendar-cell.is-current,
.admin-calendar-shell .calendar-cell.is-current:disabled,
.admin-calendar-shell .calendar-cell.is-current.disabled,
.admin-calendar-shell .slot-row.is-current,
.admin-calendar-shell .slot-row.is-current:disabled,
.admin-calendar-shell .slot-row.is-current.is-disabled,
.admin-calendar-shell .slot-row.is-current[disabled] {
  background: #7c3aed !important;
  border-color: #6d28d9 !important;
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16) !important;
  opacity: 1 !important;
}

.admin-calendar-shell .calendar-cell.is-current *,
.admin-calendar-shell .slot-row.is-current * {
  color: #fff !important;
}

/* Admin calendar: keep blocked slots/days highlighted in red. */
.admin-calendar-shell .slot-row.is-blocked {
  border-style: dashed;
  background: #fef2f2;
  color: #991b1b;
}

.admin-calendar-shell .calendar-cell.is-blocked-day {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}


.admin-section-toggle {
  border-top: 1px solid #ddd;
}

.admin-section-toggle > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #dbe2f1;
  border-radius: 12px;
  background: #f5f8ff;
  color: #183153;
}

.admin-section-toggle > summary::before {
  content: '▸';
  font-size: 14px;
  line-height: 1;
  color: #3558a5;
  transition: transform 0.16s ease;
}

.admin-section-toggle[open] > summary::before {
  transform: rotate(90deg);
}

.admin-section-toggle > summary strong {
  color: inherit;
}

.admin-section-toggle > summary:hover {
  background: #eef4ff;
}

.admin-section-toggle[open] > summary {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.admin-section-toggle > div {
  margin-left: 2px;
}


.admin-calendar-footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.admin-calendar-footer-actions .btn {
  min-width: 180px;
}


.legacy-admin-action-bar {
  display: none !important;
}
