:root {
  --bg: #f4f8fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --text: #1c2940;
  --muted: #61708a;
  --border: rgba(97, 112, 138, 0.16);
  --primary: #1fb6c9;
  --primary-dark: #1292a3;
  --secondary: #bda4f4;
  --accent: #f39158;
  --danger: #d9534f;
  --shadow: 0 18px 55px rgba(24, 40, 72, 0.08);
  --radius: 24px;
}

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(189, 164, 244, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(31, 182, 201, 0.18), transparent 24%),
    radial-gradient(circle at bottom center, rgba(243, 145, 88, 0.16), transparent 28%),
    var(--bg);
  font-family: Inter, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: rgba(244, 248, 251, 0.75);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 220px;
}

.brand__logo {
  width: 72px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 24px rgba(24, 40, 72, 0.16));
}

.brand strong,
.hero-panel h1,
.section-heading h1,
.section-heading h2,
.auth-card h1,
.step-card h2,
.step-card h3,
.empty-state h1,
.empty-state h2,
.delete-card h1 {
  font-family: "Segoe UI Semibold", Inter, sans-serif;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  color: var(--muted);
}

.topnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
}

.topnav a {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
}

.topnav a:hover {
  color: var(--text);
  background: rgba(31, 182, 201, 0.08);
}

.topnav a.topnav__link--active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 26px rgba(31, 182, 201, 0.24);
}

.topnav a.topnav__link--active:hover {
  color: #fff;
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.context-chip,
.user-chip,
.badge-soft,
.badge-brand,
.badge-muted,
.badge-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.context-chip {
  flex-direction: column;
  align-items: flex-start;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
}

.context-chip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.user-chip {
  background: rgba(189, 164, 244, 0.12);
  color: #5f47a5;
}

.page-body__content {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.hero-panel,
.content-section,
.form-card,
.auth-card,
.delete-card,
.management-card,
.table-shell,
.step-card,
.stat-card,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.hero-panel--landing {
  align-items: center;
}

.hero-copy p,
.section-heading p,
.empty-state p,
.delete-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin-bottom: 1rem;
}

.hero-actions,
.form-actions,
.action-cluster,
.table-actions,
.metric-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.metric-inline {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-inline--spaced {
  margin: 1rem 0 1.5rem;
}

.hero-metrics,
.stats-grid,
.step-grid,
.card-grid {
  display: grid;
  gap: 1rem;
}

.hero-metrics,
.step-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.step-card,
.stat-card,
.management-card {
  padding: 1.25rem;
}

.step-card__number {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(31, 182, 201, 0.12);
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 1rem;
}

.step-card p,
.stat-card span,
.muted-text,
.small.text-muted {
  color: var(--muted) !important;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-top: 0.5rem;
}

.content-section {
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.content-section--nested {
  margin-top: 1.5rem;
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading h1,
.section-heading h2 {
  margin-bottom: 0.45rem;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--primary-dark);
}

.btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.75rem 1.2rem;
  border: 0;
}

.btn-brand {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.btn-brand:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), #0d7785);
}

.btn-soft {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-soft:hover,
.btn-danger-soft:hover {
  background: rgba(244, 248, 251, 1);
}

.btn-danger-soft {
  color: var(--danger);
  background: rgba(217, 83, 79, 0.08);
  border: 1px solid rgba(217, 83, 79, 0.18);
}

.auth-shell {
  display: flex;
  justify-content: center;
  padding: 4rem 0;
}

.auth-card {
  width: min(100%, 560px);
  padding: 2rem;
}

.auth-card--wide {
  width: min(100%, 760px);
}

.form-card,
.delete-card {
  padding: 1.75rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field,
.form-field--full {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-control,
.form-select {
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

textarea.form-control {
  min-height: 120px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(31, 182, 201, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(31, 182, 201, 0.14);
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 600;
}

.check-field--large {
  gap: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
}

.check-field--large input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.company-options {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
  padding: 0.35rem 0 0.15rem;
}

.validation-summary {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(217, 83, 79, 0.08);
  color: #9f3d39;
}

.validation-summary:empty {
  display: none;
}

.field-validation-valid {
  display: none;
}

.schedule-week__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.schedule-week__header .eyebrow {
  margin-bottom: 0;
}

.schedule-week__hint {
  margin-bottom: 1rem;
}

.table-shell {
  overflow: hidden;
}

.app-table {
  margin-bottom: 0;
  vertical-align: middle;
}

.app-table thead th {
  padding: 1rem 1.1rem;
  border-bottom-color: var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.app-table tbody td {
  padding: 1rem 1.1rem;
  border-bottom-color: var(--border);
}

.app-table tbody tr:last-child td {
  border-bottom: 0;
}

.management-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.management-card--selected {
  border-color: rgba(31, 182, 201, 0.45);
  box-shadow: 0 20px 55px rgba(31, 182, 201, 0.14);
}

.badge-soft {
  color: #5f47a5;
  background: rgba(189, 164, 244, 0.14);
}

.badge-brand {
  color: #0f7b88;
  background: rgba(31, 182, 201, 0.14);
}

.badge-muted {
  color: var(--muted);
  background: rgba(97, 112, 138, 0.12);
}

.badge-danger {
  color: #9f3d39;
  background: rgba(217, 83, 79, 0.12);
}

.status-banner {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(31, 182, 201, 0.22);
  background: rgba(31, 182, 201, 0.08);
  color: #0f6873;
  font-weight: 700;
}

.menu-programming-toolbar {
  display: flex;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.menu-programming-toolbar .form-field {
  min-width: 200px;
}

.menu-programming-shell {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.menu-programming-hint {
  margin-top: 0.6rem;
  max-width: 760px;
  color: var(--muted);
}

.menu-programming-table {
  min-width: max-content;
}

.menu-programming-table__service-col,
.menu-programming-service {
  position: sticky;
  left: 0;
  min-width: 280px;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.96);
  z-index: 1;
}

.menu-programming-table thead .menu-programming-table__service-col {
  z-index: 2;
}

.menu-programming-day,
.menu-programming-cell {
  min-width: 72px;
  text-align: center;
}

.menu-programming-cell--with-option {
  min-width: 160px;
  vertical-align: top;
}

.menu-programming-day span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.menu-programming-day strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
  color: var(--text);
}

.menu-programming-day--weekend {
  background: rgba(189, 164, 244, 0.08);
}

.menu-programming-cell--disabled {
  background: rgba(97, 112, 138, 0.05);
}

.menu-programming-checkbox {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.menu-programming-checkbox input {
  width: 18px;
  height: 18px;
}

.menu-programming-option {
  margin-top: 0.45rem;
}

.menu-programming-option--hidden {
  display: none;
}

.menu-programming-option__input {
  min-width: 128px;
  padding: 0.45rem 0.5rem;
  font-size: 0.78rem;
  text-align: left;
}

.menu-multiselect {
  position: relative;
  min-width: 156px;
  text-align: left;
}

.menu-multiselect summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.menu-multiselect summary::-webkit-details-marker {
  display: none;
}

.menu-multiselect summary::after {
  content: "v";
  color: var(--muted);
  font-size: 0.75rem;
}

.menu-multiselect[open] summary {
  border-color: rgba(31, 182, 201, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(31, 182, 201, 0.12);
}

.menu-multiselect[open] summary::after {
  content: "^";
}

.menu-multiselect__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 40;
  width: min(320px, 70vw);
  max-height: 230px;
  overflow: auto;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 40, 72, 0.16);
}

.menu-multiselect--floating .menu-multiselect__panel {
  position: fixed;
  top: var(--menu-multiselect-panel-top, auto);
  bottom: var(--menu-multiselect-panel-bottom, auto);
  left: var(--menu-multiselect-panel-left, 1rem);
  z-index: 1050;
  width: var(--menu-multiselect-panel-width, min(320px, 70vw));
  max-height: var(--menu-multiselect-panel-max-height, 230px);
}

.menu-multiselect__option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.25;
  cursor: pointer;
}

.menu-multiselect__option:hover {
  background: rgba(31, 182, 201, 0.08);
}

.menu-multiselect__option input {
  flex: 0 0 auto;
  margin-top: 0.12rem;
}

.general-order-cell {
  min-width: 86px;
  vertical-align: top;
}

.general-order-cell__input {
  width: 72px;
  margin: 0 auto;
  padding: 0.45rem 0.35rem;
  text-align: center;
  font-weight: 800;
}

.general-order-cell__menu {
  margin-top: 0.35rem;
  max-width: 92px;
}

.empty-state {
  padding: 2rem;
  text-align: center;
}

.empty-state--compact {
  padding: 1.25rem;
}

.text-link {
  color: var(--primary-dark);
  font-weight: 700;
}

.mono-text {
  font-family: Consolas, monospace;
  color: var(--muted);
}

@media (max-width: 1199px) {
  .topbar__inner,
  .section-heading,
  .hero-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    overflow-x: auto;
  }

  .menu-programming-table__service-col,
  .menu-programming-service {
    min-width: 240px;
    max-width: 240px;
  }
}

@media (max-width: 767px) {
  .page-body__content {
    padding-top: 1rem;
  }

  .hero-panel,
  .content-section,
  .form-card,
  .auth-card,
  .delete-card {
    padding: 1.25rem;
  }

  .form-grid--two {
    grid-template-columns: 1fr;
  }

  .table-actions {
    justify-content: flex-end;
  }

  .schedule-week__header {
    align-items: stretch;
  }

  .topbar__actions,
  .hero-actions,
  .action-cluster,
  .form-actions {
    width: 100%;
  }

  .btn,
  .btn-sm {
    width: 100%;
    justify-content: center;
  }

  .menu-programming-toolbar .form-field {
    min-width: 100%;
  }
}
