:root {
  --page-bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border-soft: #dfe5ec;
  --text-muted: #5f6b7a;
  --success-soft-bg: #e8f6ed;
  --success-soft-border: #8dc8a1;
  --success-soft-text: #255f3a;
  --info-soft-bg: #e9f3ff;
  --info-soft-text: #1f4e85;
  --secondary-soft-bg: #eceff3;
  --secondary-soft-text: #4b5563;
}

body {
  background-color: var(--page-bg);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.brand-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  white-space: nowrap;
}

.nav-user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.12rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #d8e2ec;
  background-color: #eef3f8;
  color: #334155;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1;
}

.nav-role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.12rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #d9e3ee;
  background-color: #f3f6fa;
  color: #475569;
  font-size: 0.79rem;
  font-weight: 600;
  line-height: 1;
}

.help-tip {
  align-items: center;
  background-color: #edf2f7;
  border: 1px solid #c9d3df;
  border-radius: 999px;
  color: #4a5b70;
  cursor: help;
  display: inline-flex;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  height: 1.15rem;
  justify-content: center;
  line-height: 1;
  margin-left: 0.25rem;
  min-width: 1.15rem;
  padding: 0;
}

.help-tip:hover,
.help-tip:focus {
  background-color: #e2e8f0;
  border-color: #b8c4d3;
  color: #36475c;
}

.help-inline {
  display: inline-flex;
  align-items: center;
}

.login-shell {
  max-width: 460px;
  margin: 1.5rem auto 0;
}

.login-brand-hero {
  padding: 0.25rem 0;
}

.login-brand-logo {
  width: clamp(180px, 42vw, 320px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.08));
}

.login-card {
  padding: 1.1rem 1.1rem 1rem;
}

.subtle-card {
  border-color: var(--border-soft);
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.02);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pill-default {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #dce4ed;
}

.status-pill-draft {
  background-color: #fff4dc;
  color: #7c4a03;
  border-color: #f4d89b;
}

.status-pill-reviewed {
  background-color: #e8f3ff;
  color: #1f4f89;
  border-color: #c7dff8;
}

.status-pill-published {
  background-color: #e7f6ec;
  color: #1f5c37;
  border-color: #bbdfc8;
}

.status-pill-archived {
  background-color: #eef1f5;
  color: #475569;
  border-color: #d5dde7;
}

.admin-page-header h1 {
  letter-spacing: 0.01em;
}

.dashboard-primary-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.current-plan-meta {
  border: 1px solid var(--border-soft);
  background-color: #ffffff;
}

.next-step-note {
  font-size: 0.92rem;
  color: #243447;
  font-weight: 500;
}

.admin-primary-actions .btn {
  min-height: 2.75rem;
}

.kpi-card {
  background-color: #ffffff;
}

.kpi-label {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.kpi-value {
  font-size: 1.85rem;
  line-height: 1.1;
  margin-top: 0.25rem;
}

.admin-table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: 0.7rem;
  background-color: #ffffff;
}

.admin-menu-table {
  margin-bottom: 0;
}

.admin-menu-table thead th {
  border-bottom-color: #e5ebf2;
  font-weight: 600;
  color: #334155;
  background-color: #f9fafb;
  white-space: nowrap;
}

.admin-menu-table tbody td {
  vertical-align: top;
}

.admin-menu-table tbody tr.is-current-row {
  background-color: #f8fbff;
}

.pdf-name {
  display: inline-block;
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.secondary-actions .btn {
  color: #4b5563;
}

.upload-dropzone {
  border: 2px dashed #c9d4e0;
  border-radius: 0.7rem;
  background-color: #f8fafd;
  padding: 1rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.upload-dropzone.is-dragover {
  border-color: #8bb7e8;
  background-color: #edf5ff;
}

.orders-page-header h1 {
  letter-spacing: 0.01em;
}

.users-page-header h1 {
  letter-spacing: 0.01em;
}

.users-table-wrap {
  border: 1px solid #dfe7f0;
  border-radius: 0.65rem;
  background-color: #ffffff;
}

.users-table thead th {
  background-color: #f9fafb;
  border-bottom-color: #e5ebf2;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
}

.users-table tbody td {
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
}

.users-form-card {
  max-width: 920px;
}

.orders-context-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.orders-stat-card {
  border: 1px solid var(--border-soft);
  border-radius: 0.65rem;
  padding: 0.8rem 0.9rem;
  background-color: #ffffff;
}

.orders-stat-label {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.orders-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0.2rem;
  color: #1e293b;
}

.orders-summary-card {
  border-color: #d5e3f4;
}

.orders-table-wrap {
  border: 1px solid #dfe7f0;
  border-radius: 0.65rem;
  background-color: #ffffff;
}

.orders-summary-table thead th,
.orders-recent-table thead th {
  background-color: #f9fafb;
  border-bottom-color: #e5ebf2;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
}

.orders-summary-table tbody td,
.orders-recent-table tbody td {
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
}

.subdued-table-wrap {
  border-color: #e6edf4;
}

.review-page-header h1 {
  letter-spacing: 0.01em;
}

.review-head-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.review-head-meta {
  border: 1px solid var(--border-soft);
  background-color: #ffffff;
}

.review-destructive-divider {
  border-color: #e6ebf2 !important;
}

.review-save-toolbar {
  background-color: #ffffff;
}

.review-hint {
  border-color: #dfe5ec;
  background-color: #f7fafc;
  color: #334155;
}

.review-day-card {
  overflow: hidden;
}

.review-day-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding: 0.95rem 2.3rem 0.95rem 1rem;
  background-color: #f9fbfd;
  border-bottom: 1px solid #e8edf3;
}

.review-day-summary::-webkit-details-marker {
  display: none;
}

.review-day-summary::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.58rem;
  height: 0.58rem;
  border-right: 2px solid #6c757d;
  border-bottom: 2px solid #6c757d;
  transform: translateY(-60%) rotate(-45deg);
  transition: transform 0.15s ease;
}

.review-day-card[open] .review-day-summary::after {
  transform: translateY(-45%) rotate(45deg);
}

.review-day-summary:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.review-day-summary:hover {
  background-color: #f2f6fa;
}

.review-day-title {
  font-size: 1.03rem;
}

.review-day-count {
  font-weight: 600;
  color: #4b5563;
}

.review-day-body {
  background-color: #ffffff;
}

.review-items-table-wrap {
  border: 1px solid #dfe7f0;
  border-radius: 0.65rem;
  background-color: #ffffff;
}

.review-items-table {
  margin-bottom: 0;
}

.review-items-table thead th {
  background-color: #f9fafb;
  border-bottom-color: #e5ebf2;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.review-items-table tbody td {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.review-items-table .form-control-sm,
.review-items-table .form-select-sm {
  min-height: 2rem;
}

.review-items-table .col-category {
  min-width: 190px;
}

.review-items-table .col-title {
  min-width: 240px;
}

.review-items-table .col-description {
  min-width: 260px;
}

.review-items-table .col-price {
  min-width: 105px;
}

.review-items-table .col-allergens {
  min-width: 170px;
}

.review-items-table .col-note {
  min-width: 170px;
}

.review-items-table .col-delete {
  min-width: 95px;
}

.review-delete-cell,
.review-items-table th.col-delete {
  border-left: 1px dashed #d9e1ea;
  background-color: #fbfcfe;
}

.review-row-empty td {
  background-color: #fbfdff;
}

.review-save-footer {
  border-style: solid;
}

.employee-page-header h1 {
  letter-spacing: 0.01em;
}

.identity-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.active-user-badge {
  border: 1px solid #d8e2ec;
  color: #415266;
  font-weight: 600;
}

.week-summary-card .week-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.week-range-pill {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  border: 1px solid #d8e2ec;
  color: #435466;
}

.order-progress {
  height: 0.8rem;
  margin-top: 0.6rem;
  background-color: #e7edf4;
}

.order-progress .progress-bar {
  background-color: #2f7ecf;
  font-size: 0.68rem;
  font-weight: 600;
}

.day-card {
  border-color: var(--border-soft);
  overflow: hidden;
}

.day-accordion-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding: 0.95rem 2.3rem 0.95rem 1rem;
  background-color: #f9fbfd;
}

.day-accordion-summary::-webkit-details-marker {
  display: none;
}

.day-accordion-summary::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.58rem;
  height: 0.58rem;
  border-right: 2px solid #6c757d;
  border-bottom: 2px solid #6c757d;
  transform: translateY(-60%) rotate(-45deg);
  transition: transform 0.15s ease;
}

.day-accordion[open] .day-accordion-summary::after {
  transform: translateY(-45%) rotate(45deg);
}

.day-accordion-summary:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.day-accordion-summary:hover {
  background-color: #f2f6fa;
}

.day-title-wrap {
  display: inline-flex;
  gap: 0.55rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.day-title {
  font-size: 1.04rem;
}

.day-date {
  font-size: 0.95rem;
}

.day-summary-badges .badge {
  min-height: 1.85rem;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}

.text-bg-success-soft {
  background-color: var(--success-soft-bg);
  color: var(--success-soft-text);
}

.text-bg-info-soft {
  background-color: var(--info-soft-bg);
  color: var(--info-soft-text);
}

.text-bg-secondary-soft {
  background-color: var(--secondary-soft-bg);
  color: var(--secondary-soft-text);
}

.weekend-badge {
  background-color: #edf1f5;
  color: #465566;
  font-weight: 600;
}

.day-card-body {
  border-top: 1px solid #e8edf3;
  background-color: #ffffff;
}

.non-orderable-day {
  background-color: #f7f9fc;
}

.selection-group {
  background-color: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 0.65rem;
  padding: 0.9rem;
}

.selection-group-head {
  margin-bottom: 0.65rem;
}

.none-option {
  background-color: #ffffff;
  border: 1px dashed #d4dde7;
  border-radius: 0.55rem;
  position: relative;
  padding: 0;
  overflow: hidden;
}

.none-option::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 0.55rem 0 0 0.55rem;
  background-color: #c2514b;
  transition: width 0.15s ease;
}

.none-option.form-check {
  padding-left: 0;
}

.none-option .none-option-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.none-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0;
  padding: 0.58rem 0.75rem;
  cursor: pointer;
}

.none-selected-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background-color: #f1f4f8;
  color: #6b7a8d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.none-option:has(.none-option-input:checked) {
  background-color: #fdeeee;
  border-color: #efb8b6;
}

.none-option:has(.none-option-input:checked)::before {
  width: 4px;
}

.none-option:has(.none-option-input:checked) .none-option-label {
  color: #7b2c2a;
  font-weight: 600;
}

.none-option:has(.none-option-input:checked) .none-selected-icon {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  background-color: #c2514b;
  color: #ffffff;
}

.none-option:has(.none-option-input:focus-visible) {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.menu-category-badge {
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-category-default {
  background-color: #f1f4f8;
  color: #3e4d5f;
  border-color: #dbe2eb;
}

.badge-category-classic {
  background-color: #eaf1fb;
  color: #35506f;
  border-color: #d6e3f3;
}

.badge-category-choice {
  background-color: #eaf7f4;
  color: #2e5a53;
  border-color: #d1ebe5;
}

.badge-category-wellness {
  background-color: #eef7ee;
  color: #356145;
  border-color: #d7ead8;
}

.badge-category-snack {
  background-color: #f9f2e8;
  color: #73553a;
  border-color: #eadfce;
}

.badge-category-soup {
  background-color: #f1f3f6;
  color: #4a5565;
  border-color: #e2e6ec;
}

.badge-category-dessert {
  background-color: #f4eef8;
  color: #5f4a73;
  border-color: #e6daef;
}

.note-badge {
  background-color: #f4f6f9;
  color: #4a586a;
  border: 1px solid #dce3eb;
  font-weight: 600;
}

.option-card {
  position: relative;
  border: 1px solid #dfe6ee;
  border-radius: 0.55rem;
  background-color: #ffffff;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.option-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 0.55rem 0 0 0.55rem;
  background-color: #3b8f57;
  transition: width 0.15s ease;
}

.option-card:hover {
  border-color: #cfd9e4;
  background-color: #fbfcfe;
}

.option-card-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.option-card-label {
  cursor: pointer;
  padding: 0.7rem 0.8rem;
}

.option-selected-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background-color: #e7edf4;
  color: #5f6f82;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.item-title {
  font-size: 0.97rem;
}

.option-description {
  color: #3a4656;
  line-height: 1.4;
}

.option-allergens {
  color: var(--text-muted) !important;
}

.selection-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.12rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #d5dde7;
  background-color: #f6f8fb;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 600;
}

.selection-pill .pill-selected {
  display: none;
}

.day-accordion .option-card:has(.option-card-input:checked) {
  background-color: #f6fbf7;
  border-color: #b8d8c1;
}

.day-accordion .option-card:has(.option-card-input:checked)::before {
  width: 4px;
}

.day-accordion .option-card:has(.option-card-input:checked) .option-selected-icon {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  background-color: #3b8f57;
  color: #ffffff;
}

.day-accordion .option-card:has(.option-card-input:checked) .selection-pill {
  border-color: #bfd7c7;
  background-color: #ebf5ee;
  color: #2f5a3c;
}

.day-accordion .option-card:has(.option-card-input:checked) .selection-pill .pill-unselected {
  display: none;
}

.day-accordion .option-card:has(.option-card-input:checked) .selection-pill .pill-selected {
  display: inline;
}

.day-accordion .option-card:has(.option-card-input:focus-visible) {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.allergen-help-link {
  margin-left: 0.35rem;
  font-weight: 600;
  text-decoration: none;
}

.allergen-help-link:hover {
  text-decoration: underline;
}

.allergen-legend {
  scroll-margin-top: 1rem;
}

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

@media (max-width: 767px) {
  .admin-table-wrap {
    border-radius: 0.5rem;
  }

  .admin-menu-table {
    min-width: 760px;
  }

  .review-day-summary {
    padding: 0.85rem 2rem 0.85rem 0.85rem;
  }

  .review-items-table {
    min-width: 1060px;
  }

  .orders-summary-table,
  .orders-recent-table {
    min-width: 860px;
  }

  .users-table {
    min-width: 760px;
  }

  .pdf-name {
    max-width: 13rem;
  }

  .day-accordion-summary {
    padding: 0.85rem 2rem 0.85rem 0.85rem;
  }

  .day-summary-badges {
    width: 100%;
  }

  .day-summary-badges .badge {
    min-height: 1.95rem;
  }

  .selection-group {
    padding: 0.75rem;
  }

  .option-card-label {
    padding: 0.68rem 0.72rem;
  }

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

@media (max-width: 576px) {
  .navbar-nav {
    align-items: flex-start;
    row-gap: 0.2rem;
  }

  .nav-user-pill,
  .nav-role-pill {
    min-height: 1.65rem;
    padding: 0.08rem 0.55rem;
    font-size: 0.74rem;
  }

  .navbar-nav .nav-user-pill,
  .navbar-nav .nav-role-pill {
    margin-right: 0.25rem !important;
    margin-bottom: 0.25rem !important;
  }

  .login-shell {
    max-width: 100%;
    margin-top: 0.5rem;
  }

  .login-brand-logo {
    width: clamp(160px, 58vw, 260px);
  }

  .kpi-value {
    font-size: 1.65rem;
  }

  .orders-stat-value {
    font-size: 1.4rem;
  }

  .menu-category-badge {
    font-size: 0.76rem;
  }

  .selection-pill {
    font-size: 0.76rem;
  }

  .week-summary-card .week-summary-metrics {
    width: 100%;
  }
}
