/* ═══════════════════════════════════════════════
   ADMIN LAYOUT
═══════════════════════════════════════════════ */
[hidden] { display: none !important; }

html { font-size: 15px; }

/* ── Staff portal colour overrides (/{slug}/staff/) ── */
.staff-mode .sidebar                    { background: #0c2340; }
.staff-mode .login-screen               { background: linear-gradient(135deg, #0c2340 0%, #164e63 100%); }
.staff-mode .login-box                  { border-color: rgba(14,165,233,.3); }
.staff-mode .login-box input:focus      { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
.staff-mode .btn--primary               { background: #0ea5e9; color: #fff; }
.staff-mode .btn--primary:hover         { background: #0284c7; }
.staff-mode #dashboard                  { --accent: #0ea5e9; }
.staff-mode .nav-item:hover             { background: rgba(14,165,233,.15); }
.staff-mode .nav-item--active           { background: rgba(14,165,233,.25); color: #7dd3fc; }
.staff-mode .sidebar__header            { border-bottom-color: rgba(14,165,233,.2); }
.staff-mode .sidebar__footer            { border-top-color: rgba(14,165,233,.2); }

.admin-body {
  background: #f3ede6;
  overflow: hidden;
}

/* ── Login / Setup screens ── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown-mid) 100%);
}

.login-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  justify-content: center;
  margin-bottom: .75rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown-dark);
}

.login-logo span { font-size: 1.8rem; }

.login-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-box form {
  display: grid;
  gap: .9rem;
}

.login-box form .field {
  margin-bottom: 0;
}

.login-box form .btn--wide {
  margin-top: .25rem;
}

.login-error {
  color: var(--error);
  font-size: .85rem;
  background: var(--error-bg);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  margin: .1rem 0 0;
}

.login-hint {
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.login-hint a { color: var(--brown-mid); font-weight: 600; text-decoration: none; }
.login-hint a:hover { text-decoration: underline; }

/* ── Dashboard shell ── */
#dashboard {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto 1fr;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns .22s ease;
}

#dashboard[hidden] { display: none; }

#dashboard.sidebar-hidden {
  grid-template-columns: 0 1fr;
}

#dashboard.sidebar-hidden .sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-.65rem);
  visibility: hidden;
}

#dashboard.floor-active .admin-content {
  padding: 1rem;
  overflow: hidden;
}

#dashboard.floor-active #tab-reservations {
  height: calc(100vh - 2rem);
  min-height: 0;
  gap: .75rem;
  overflow: hidden;
}

/* ── Impersonation Banner ── */
.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #7c3aed;
  color: #fff;
  padding: .6rem 1.25rem;
  font-size: .88rem;
  font-weight: 600;
  z-index: 200;
  grid-column: 1 / -1;
}
.impersonation-banner[hidden] { display: none; }
.impersonation-banner .btn {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  white-space: nowrap;
  flex-shrink: 0;
}
.impersonation-banner .btn:hover { background: rgba(255,255,255,.35); }

.global-action-search {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-bottom: .85rem;
}

.global-action-search input {
  width: min(560px, 100%);
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  padding: .6rem .85rem;
}

.global-action-results {
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  z-index: 60;
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.global-action-result {
  display: grid;
  gap: .1rem;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: .7rem .85rem;
  text-align: left;
}

.global-action-result:last-child {
  border-bottom: 0;
}

.global-action-result:hover,
.global-action-result:focus {
  background: #fff7ef;
  outline: none;
}

.global-action-result strong {
  color: var(--brown-dark);
  font-size: .9rem;
}

.global-action-result span {
  color: var(--text-muted);
  font-size: .78rem;
}

.day-close-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: start;
}

.day-close-main,
.day-close-side,
.day-close-panel {
  min-width: 0;
}

.day-close-status,
.day-close-grid,
.day-close-panel,
.day-close-side {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.day-close-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  padding: 1rem;
}

.day-close-status strong,
.day-close-metric strong {
  display: block;
  color: var(--brown-dark);
  font-size: 1.25rem;
  line-height: 1.2;
}

.day-close-guidance {
  margin: .75rem 0 0;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: #1e3a8a;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  padding: .75rem .9rem;
}

.day-close-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  margin-top: .75rem;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  background: #f0fdf4;
  padding: .85rem .9rem;
}

.day-close-start[hidden] {
  display: none;
}

.day-close-start strong,
.day-close-start span {
  display: block;
}

.day-close-start strong {
  color: #14532d;
  font-size: .95rem;
}

.day-close-start span {
  color: #166534;
  font-size: .82rem;
  line-height: 1.35;
  margin-top: .15rem;
}

.day-close-kicker,
.day-close-metric span {
  display: block;
  margin-bottom: .25rem;
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.day-close-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: .85rem;
}

.day-close-metric {
  padding: .95rem;
  border-right: 1px solid var(--border);
}

.day-close-metric:last-child {
  border-right: 0;
}

.day-close-panel {
  margin-top: .85rem;
  padding: 1rem;
}

.day-close-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.day-close-panel__header h3 {
  margin: 0;
  color: var(--brown-dark);
  font-size: 1rem;
}

.day-close-panel__header span {
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 700;
}

.day-close-blockers,
.day-close-history-list {
  display: grid;
  gap: .55rem;
}

.day-close-blocker,
.day-close-history-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fffaf5;
  padding: .7rem;
}

.day-close-blocker strong,
.day-close-history-item strong {
  display: block;
  color: var(--text);
  font-size: .9rem;
}

.day-close-blocker span,
.day-close-history-item span {
  color: var(--text-muted);
  font-size: .8rem;
}

.day-close-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: .75rem;
}

.day-close-side {
  padding: 1rem;
}

.day-close-history-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: .4rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: .74rem;
  font-weight: 800;
  padding: .18rem .5rem;
}

.day-close-history-status--closed {
  background: #ecfdf3;
  color: #177245;
}

.day-close-history-status--no_operation {
  background: #eef2ff;
  color: #4338ca;
}

@media (max-width: 980px) {
  .day-close-layout,
  .day-close-status,
  .day-close-grid {
    grid-template-columns: 1fr;
  }

  .day-close-metric {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .day-close-metric:last-child {
    border-bottom: 0;
  }

  .day-close-actions {
    flex-direction: column;
  }

  .day-close-start {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ── Catalog module ── */
.panel-subtitle {
  margin: .25rem 0 0;
  color: var(--text-muted);
  font-size: .9rem;
}

.catalog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  grid-template-areas:
    "products categories"
    "products library";
  grid-template-rows: auto 1fr;
  gap: 1rem;
  min-height: 0;
  align-items: start;
}

.catalog-shell--products {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "products";
}

.catalog-shell--products .catalog-toolbar {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
}

.catalog-side,
.catalog-main {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.catalog-side {
  padding: 1rem;
}

.catalog-main {
  grid-area: products;
  overflow: hidden;
}

.catalog-side--categories {
  grid-area: categories;
}

.catalog-side__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.catalog-side__header h3,
.catalog-library-card h3 {
  margin: 0;
  color: var(--brown-dark);
  font-size: 1rem;
}

.catalog-side__header span {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .55rem;
}

.catalog-list {
  display: grid;
  gap: .5rem;
}

.catalog-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .45rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem;
  background: #fffaf5;
}

.catalog-list-item.is-muted {
  opacity: .62;
}

.catalog-list-item > button:first-child {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
  min-width: 0;
}

.catalog-list-item strong,
.catalog-list-item span {
  display: block;
}

.catalog-list-item strong {
  color: var(--text);
  font-size: .92rem;
  overflow-wrap: anywhere;
}

.catalog-list-item span {
  color: var(--text-muted);
  font-size: .78rem;
  margin-top: .12rem;
}

.catalog-icon-btn {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--brown-mid);
  cursor: pointer;
  font-size: .74rem;
  font-weight: 700;
  padding: .35rem .5rem;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(130px, 170px);
  gap: .75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.catalog-search,
.inline-create input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem .75rem;
  font: inherit;
  min-width: 0;
}

.catalog-table-wrap {
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.catalog-table td small {
  color: var(--text-muted);
}

.catalog-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .78rem;
  font-weight: 800;
}

.catalog-status--on {
  background: #dcfce7;
  color: #166534;
}

.catalog-status--warn {
  background: #fef3c7;
  color: #92400e;
}

.catalog-status--off {
  background: #fee2e2;
  color: #991b1b;
}

.catalog-side--library {
  grid-area: library;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.catalog-library-card {
  display: grid;
  gap: .75rem;
}

.inline-create {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
}

.catalog-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.catalog-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  font-size: .8rem;
  font-weight: 700;
  padding: .35rem .45rem .35rem .65rem;
}

.catalog-chip.is-muted {
  opacity: .6;
}

.catalog-chip button {
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  border-radius: 999px;
  background: #e5e7eb;
  color: #4b5563;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}

.catalog-empty {
  color: var(--text-muted);
  font-size: .86rem;
  margin: 0;
}

.catalog-product-modal {
  max-width: min(1080px, calc(100vw - 2rem));
  width: min(1080px, calc(100vw - 2rem));
}

.catalog-product-footer {
  align-items: flex-end;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin-top: 1rem;
}

.catalog-product-footer__actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-left: auto;
}

.catalog-product-actions,
.catalog-product-related {
  min-width: 0;
  position: relative;
}

.catalog-product-actions__summary,
.catalog-product-related__summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  list-style: none;
}

.catalog-product-actions__summary::-webkit-details-marker,
.catalog-product-related__summary::-webkit-details-marker {
  display: none;
}

.catalog-product-actions__summary::after,
.catalog-product-related__summary::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  margin-left: .5rem;
}

.catalog-product-actions[open] .catalog-product-actions__summary::after,
.catalog-product-related[open] .catalog-product-related__summary::after {
  transform: rotate(180deg);
}

.catalog-product-actions__panel,
.catalog-product-related__panel {
  background: var(--white);
  border: 1px solid rgba(224,212,196,.9);
  border-radius: 8px;
  bottom: calc(100% + .55rem);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: .4rem;
  left: 0;
  min-width: 190px;
  padding: .4rem;
  position: absolute;
  z-index: 8;
}

.catalog-product-actions__action,
.catalog-product-related__action {
  justify-content: flex-start;
  width: 100%;
}

.catalog-gtin-scanner-modal {
  max-width: 560px;
}

.catalog-product-related-modal {
  max-width: min(820px, calc(100vw - 2rem));
  width: min(820px, calc(100vw - 2rem));
}

.catalog-product-related-modal .field {
  margin: 0 0 1rem;
}

.catalog-product-related-modal .reservations-table {
  min-width: 560px;
}

@media (max-width: 720px) {
  .catalog-product-footer,
  .catalog-product-footer__actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .catalog-product-actions__summary,
  .catalog-product-related__summary,
  .catalog-product-footer__actions .btn {
    justify-content: center;
    width: 100%;
  }

  .catalog-product-actions__panel,
  .catalog-product-related__panel {
    bottom: auto;
    margin-top: .55rem;
    min-width: 0;
    position: static;
    width: 100%;
  }
}

.catalog-bom-modal {
  max-width: min(1180px, calc(100vw - 2rem));
  width: min(1180px, calc(100vw - 2rem));
}

.catalog-boms-modal {
  max-width: min(980px, calc(100vw - 2rem));
  width: min(980px, calc(100vw - 2rem));
}

.catalog-dictionary-modal {
  max-width: min(880px, calc(100vw - 2rem));
  width: min(880px, calc(100vw - 2rem));
}

.catalog-units-modal {
  max-width: min(900px, calc(100vw - 2rem));
  width: min(900px, calc(100vw - 2rem));
}

.catalog-categories-modal {
  max-width: min(1180px, calc(100vw - 2rem));
  width: min(1180px, calc(100vw - 2rem));
}

.catalog-categories-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.catalog-categories-table th:nth-child(1) { width: 16%; }
.catalog-categories-table th:nth-child(2) { width: 28%; }
.catalog-categories-table th:nth-child(3) { width: 70px !important; }
.catalog-categories-table th:nth-child(4) { width: 70px !important; }
.catalog-categories-table th:nth-child(5) { width: 55px !important; }
.catalog-categories-table th:nth-child(6) { width: 138px !important; }
.catalog-categories-table td { padding: .55rem .35rem; }
.catalog-categories-table td:first-child { padding-left: .55rem; }
.catalog-categories-table td:last-child { padding-right: .55rem; white-space: nowrap; }
.catalog-categories-table td .btn { padding-inline: .45rem; }

.catalog-categories-table .field__input {
  width: 100%;
}

.catalog-units-table {
  min-width: 760px;
}

.catalog-units-table .field__input {
  width: 100%;
}

.catalog-dictionary-table {
  min-width: 720px;
}

.catalog-dictionary-table .field__input {
  width: 100%;
}

.catalog-boms-table {
  min-width: 880px;
}

.catalog-bom-table {
  min-width: 980px;
}

.catalog-bom-table .select,
.catalog-bom-table .field__input {
  width: 100%;
}

.catalog-chip--button {
  border: 1px solid var(--border);
  cursor: pointer;
  display: grid;
  gap: .1rem;
  text-align: left;
  width: 100%;
}

.catalog-chip--button span {
  color: var(--text-muted);
  font-size: .78rem;
}

.price-list-modal {
  max-width: min(900px, calc(100vw - 2rem));
  width: min(900px, calc(100vw - 2rem));
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.price-list-modal > .modal__title,
.price-list-modal > .form-grid,
.price-list-modal > .form-actions {
  flex-shrink: 0;
}

#price-list-items-section {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

#price-list-items-section .list-header {
  flex-shrink: 0;
}

.price-list-table-wrapper {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 260px;
  overflow-y: auto;
}

/* ── Payment provider collapsible sections ── */
.payment-section {
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  margin-bottom: .6rem;
  overflow: hidden;
}

.payment-section__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem 1rem;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: .93rem;
  color: var(--brown-dark);
  list-style: none;
  background: var(--cream-light, #faf7f3);
}

.payment-section__summary::-webkit-details-marker { display: none; }

.payment-section__summary::after {
  content: '▾';
  font-size: .8rem;
  color: var(--brown-mid, #9c7047);
  transition: transform .18s ease;
  flex-shrink: 0;
}

.payment-section[open] > .payment-section__summary::after {
  transform: rotate(-180deg);
}

.payment-section__badge {
  font-size: .75rem;
  font-weight: 500;
  padding: .15rem .5rem;
  border-radius: 20px;
  background: #d1fae5;
  color: #065f46;
}

.payment-section__badge:empty { display: none; }

.payment-section__body {
  padding: 1rem 1rem 1.25rem;
  border-top: 1px solid var(--cream-dark);
}

.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  margin-top: .35rem;
}

.toggle-row--inline {
  background: var(--cream-light, #faf7f3);
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  padding: .35rem .65rem;
  min-width: 0;
}

.catalog-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .5rem;
}

.catalog-check {
  display: flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem .65rem;
  background: #fffaf5;
  font-weight: 700;
}

.catalog-prices-local {
  margin-top: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.catalog-price-input {
  width: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem .65rem;
  font: inherit;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 1180px) {
  .catalog-shell {
    grid-template-columns: minmax(0, 1fr) minmax(235px, 280px);
  }
}

@media (max-width: 760px) {
  .catalog-shell,
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .catalog-shell {
    grid-template-areas:
      "products"
      "categories"
      "library";
    gap: .75rem;
  }

  .catalog-shell--products {
    grid-template-areas: "products";
  }
}

/* ── Sidebar ── */
.sidebar {
  grid-row: 2;
  background: var(--brown-dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem 0;
  overflow: hidden auto;
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity .18s ease,
    transform .22s ease,
    visibility .22s ease;
}

.sidebar__header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 .85rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.sidebar__header span:first-child { font-size: 1.6rem; }

.sidebar__tools { display: none; }

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem .75rem;
}

.nav-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.nav-item:hover          { background: rgba(255,255,255,.1); color: var(--white); }
.nav-item--active        { background: rgba(255,255,255,.15); color: var(--white); font-weight: 600; }
.nav-item--link          { display: block; text-decoration: none; }

.sidebar__footer {
  padding: 1rem 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.sidebar-menu-toggle {
  display: none;
}

.sidebar-restore-btn {
  position: fixed;
  top: 1.2rem;
  left: calc(220px - 2.55rem);
  z-index: 240;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 6px;
  background: var(--brown-dark);
  color: rgba(255,255,255,.8);
  box-shadow: var(--shadow-md);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    left .22s ease,
    background .15s ease,
    color .15s ease,
    box-shadow .15s ease;
}

.sidebar-restore-btn:hover {
  color: #fff;
  box-shadow: var(--shadow-lg);
}

#dashboard.sidebar-hidden .sidebar-restore-btn {
  left: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  #dashboard,
  .sidebar,
  .sidebar-restore-btn {
    transition: none;
  }
}

.admin-user {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
}

.btn--sm {
  font-size: .8rem;
  padding: .4rem .9rem;
}

.app-message-modal {
  max-width: 440px;
}

#app-message-modal {
  z-index: 10000;
}

.app-message-modal__text {
  color: var(--brown);
  line-height: 1.5;
  margin: -.5rem 0 1.25rem;
  white-space: pre-wrap;
}

.app-message-fields {
  display: grid;
  gap: .85rem;
  margin: .9rem 0 1rem;
}

.app-message-fields .field {
  display: block;
}

.app-message-fields .field > span {
  display: block;
  margin-bottom: .35rem;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Main content ── */
.admin-content {
  grid-row: 2;
  overflow-y: auto;
  padding: 2rem;
  background: #f3ede6;
}

.admin-content--modal-open {
  overflow: hidden;
}

.tab-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.tab-panel[hidden] { display: none; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--brown-dark);
}

.panel-header__actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

.reservations-toolbar {
  display: grid;
  gap: .55rem;
  padding: .65rem .75rem;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(224,212,196,.85);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.toolbar-row--main {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(170px, 210px) minmax(190px, 230px);
  align-items: center;
}

.toolbar-row--main .toolbar-group {
  display: contents;
}

.toolbar-row--actions {
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
}

.toolbar-group--view {
  justify-content: flex-start;
}

.toolbar-group--refresh {
  justify-content: flex-end;
  margin-left: auto;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.date-filter, .status-filter, .reservation-search {
  font-family: inherit;
  font-size: .82rem;
  min-height: 36px;
  padding: .32rem .7rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.reservation-search { width: 100%; min-width: 240px; cursor: text; }

.reservations-toolbar .btn,
.reservations-toolbar .segmented-control__btn {
  min-height: 32px;
}

.date-filter:focus, .status-filter:focus, .reservation-search:focus {
  border-color: var(--brown-light);
}

.segmented-control {
  display: inline-flex;
  padding: .14rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.segmented-control__btn {
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  padding: .28rem .68rem;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.segmented-control__btn[aria-pressed="true"],
#multi-sort-btn[aria-pressed="true"] {
  background: var(--brown-mid);
  color: #fff;
}

#multi-sort-btn {
  display: none;
}

.columns-menu { position: relative; }

.columns-menu__panel {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  z-index: 40;
  display: grid;
  gap: .4rem;
  width: 230px;
  padding: .75rem;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.columns-menu__item {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-primary);
  font-size: .86rem;
  cursor: pointer;
}

.columns-menu__item input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brown-mid);
}

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: .55rem .9rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border-top: 3px solid var(--brown-light);
}

.stat-card--pending   { border-top-color: #f59e0b; }
.stat-card--confirmed { border-top-color: #10b981; }
.stat-card--inhouse   { border-top-color: #34d399; }
.stat-card--cancelled { border-top-color: #ef4444; }
.stat-card--no-show   { border-top-color: #9ca3af; }
.stat-card--completed { border-top-color: #7c3aed; }

.stat-card[data-filter-status] { cursor: pointer; transition: box-shadow var(--transition), transform var(--transition); }
.stat-card[data-filter-status]:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-card__label { display: block; font-size: .68rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card__value { display: block; font-size: 1.45rem; font-weight: 700; color: var(--brown-dark); line-height: 1.05; }

/* ── Table ── */
.table-wrapper {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  border: 1px solid rgba(224,212,196,.75);
}

.reservations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}

.reservations-table th {
  background: var(--cream);
  color: var(--text-muted);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  width: 100%;
  border: 0 !important;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}

.table-sort-btn:hover,
.table-sort-btn:focus-visible {
  color: var(--brown-mid);
  outline: none;
}

.table-sort-btn--active {
  color: var(--brown-dark);
}

.sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  min-height: 1.1rem;
  border-radius: 999px;
  color: var(--brown-mid);
  font-size: .7rem;
  line-height: 1;
}

.sort-indicator--multi {
  background: var(--cream-dark);
  color: var(--brown-dark);
  font-size: .65rem;
  font-weight: 700;
}

.reservations-table td {
  padding: .65rem .9rem;
  border-top: 1px solid var(--cream-dark);
  vertical-align: middle;
  overflow: hidden;
}

.reservations-table tbody tr:nth-child(even) td { background: #fffaf6; }
.reservations-table tr:hover td { background: #f7efe7; }
.reservations-table tbody tr.reservation-row--grace td { background: #fffbeb; }
.reservations-table tbody tr.reservation-row--grace:hover td { background: #fef3c7; }
.reservations-table tbody tr { height: 60px; }
.reservations-table tbody tr.clickable-row { cursor: pointer; }
.reservations-table tbody tr.clickable-row:hover td { background: #fff4e8; }
.table-actions--inline { display: inline-flex; margin-left: .35rem; vertical-align: middle; }

.reservation-code {
  font-weight: 800;
  color: var(--brown-dark);
  white-space: nowrap;
}

.reservation-code-link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reservation-code-link:hover,
.reservation-code-link:focus-visible {
  color: var(--brown-mid);
  outline: none;
}

.customer-cell {
  display: grid;
  gap: .18rem;
}

.customer-cell strong {
  color: var(--text-primary);
}

.phone-link {
  color: var(--brown-mid);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.phone-link:hover { text-decoration: underline; }

.muted-cell {
  color: var(--text-muted);
}

.status-badge {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge--pending   { background: #fef3c7; color: #92400e; }
.status-badge--confirmed { background: #d1fae5; color: #065f46; }
.status-badge--cancelled { background: #fee2e2; color: #991b1b; }
.status-badge--no_show   { background: #f3f4f6; color: #374151; }
.status-badge--completed { background: #ede9fe; color: #5b21b6; }
.status-badge--deleted   { background: #111827; color: #f9fafb; }

.arrival-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-left: .35rem;
  vertical-align: middle;
  padding: .18rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.arrival-badge--grace {
  background: #fef3c7;
  color: #92400e;
}

.table-actions { display: flex; gap: .3rem; }

.calendar-view {
  display: grid;
  gap: 1rem;
}

.calendar-scope-control[hidden] {
  display: none;
}

.calendar-nav-control {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.calendar-nav-control[hidden] {
  display: none;
}

.calendar-nav-control .btn {
  min-width: 2.1rem;
}

.calendar-range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  background: rgba(255,255,255,.8);
  box-shadow: var(--shadow-sm);
}

.calendar-range-header strong {
  display: block;
  color: var(--brown-dark);
  text-transform: capitalize;
}

.calendar-range-header span {
  color: var(--text-muted);
  font-size: .82rem;
}

.calendar-range-header__side {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-range-grid {
  display: grid;
  gap: 1rem;
}

.calendar-view--week .calendar-range-grid {
  grid-template-columns: repeat(7, minmax(160px, 1fr));
  overflow-x: auto;
  padding-bottom: .25rem;
}

.calendar-view--month .calendar-range-grid {
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: .75rem;
}

.calendar-day {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.calendar-day__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  background: var(--cream);
  color: var(--brown-dark);
  font-weight: 700;
}

.calendar-day__count {
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}

.calendar-list {
  display: grid;
}

.calendar-day--empty {
  opacity: .72;
}

.calendar-day--blank {
  visibility: hidden;
  min-height: 1px;
}

.calendar-empty-day {
  margin: 0;
  padding: .9rem;
  color: var(--text-muted);
  font-size: .82rem;
}

.calendar-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: .75rem;
  align-items: center;
  padding: .7rem .9rem;
  border-top: 1px solid var(--cream-dark);
}

.calendar-item--grace {
  background: #fffbeb;
}

.calendar-item__time {
  font-weight: 700;
  color: var(--brown-mid);
}

.calendar-item__meta {
  color: var(--text-muted);
  font-size: .8rem;
}

.calendar-view--week .calendar-item,
.calendar-view--month .calendar-item {
  grid-template-columns: 1fr;
  gap: .35rem;
  align-items: start;
}

.calendar-view--week .calendar-item .status-badge,
.calendar-view--month .calendar-item .status-badge {
  justify-self: start;
}

.calendar-view--week .calendar-day__header,
.calendar-view--month .calendar-day__header {
  align-items: flex-start;
  flex-direction: column;
  gap: .2rem;
}

.calendar-view--month .calendar-item {
  padding: .55rem .65rem;
}

.calendar-item[draggable="true"] { cursor: grab; }
.calendar-item[draggable="true"]:active,
.calendar-item--dragging { cursor: grabbing; opacity: .6; }
.calendar-day--drag-over {
  outline: 2px dashed var(--brown-mid, #8b5e3c);
  background: #fef6ef;
}

/* ── Bulk selection ── */
.col-check {
  width: 2rem;
  text-align: center;
  padding: .4rem .3rem;
}
.col-check input[type="checkbox"],
.row-checkbox {
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
  accent-color: var(--brown-mid, #8b5e3c);
}
.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  background: #fff8f2;
  border: 1px solid var(--brown-light, #c9a882);
  border-radius: var(--radius, 8px);
  padding: .55rem .85rem;
  margin-bottom: .65rem;
}
.bulk-toolbar__count {
  font-size: .88rem;
  font-weight: 600;
  color: var(--brown-mid, #8b5e3c);
  min-width: 6rem;
}
.bulk-toolbar__status {
  font-size: .88rem;
  min-width: 12rem;
}

/* ── Settings ── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  align-items: start;
}

.settings-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.75rem; }
.settings-card .card__title,
.settings-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--brown-dark);
  margin-bottom: 1.25rem;
}

.settings-card__hint {
  margin: -.7rem 0 1.1rem;
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.45;
}

.settings-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cream-dark);
}

.settings-subtab {
  border: 1px solid var(--cream-dark);
  background: #fffaf6;
  color: var(--brown-mid);
  border-radius: 999px;
  padding: .55rem .9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.settings-subtab:hover {
  border-color: var(--brown-light);
}

.settings-subtab.is-active {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  color: #fff;
}

.settings-pane[hidden] {
  display: none;
}

.settings-subsection {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--cream-dark);
}

.settings-subsection .settings-card__title {
  margin-bottom: 1rem;
}

.test-email-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--cream-dark);
}
.test-email-row .input {
  flex: 1 1 14rem;
  min-width: 0;
}

.settings-preview {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
}

.preview-header {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown-mid));
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.preview-name    { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: #fff; }
.preview-tagline { font-size: .8rem; color: var(--brown-light); margin-top: .15rem; }
.preview-hours   { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: .15rem; }

.preview-link { font-size: .82rem; }

.preview-link { font-size: .82rem; }

/* ── Tables tab ── */
.table-module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: -.15rem 0 1rem;
  padding: .45rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fffaf6;
}

.table-module-tab {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 38px;
  padding: .55rem .85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--brown-mid);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.table-module-tab:hover {
  background: #fff;
  border-color: var(--cream-dark);
}

.table-module-tab.is-active {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  color: #fff;
}

.table-module-tab span {
  min-width: 1.5rem;
  padding: .1rem .4rem;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  color: var(--brown-dark);
  font-size: .78rem;
  text-align: center;
}

.table-module-tab:not(.is-active) span {
  background: #f3e7dc;
}

.table-module-pane[hidden] {
  display: none;
}

.table-section {
  display: grid;
  gap: .85rem;
}

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

.list-header__actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.list-header .settings-card__title {
  margin-bottom: .25rem;
}

.list-header .settings-card__hint {
  margin: 0;
}

.tables-grid {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(460px, 1.05fr);
  gap: 1.25rem;
  align-items: start;
}

.table-config-card {
  min-width: 0;
}

.table-config-card .form-grid {
  gap: .9rem 1rem;
}

.table-config-card .form-actions {
  margin-top: 1.15rem;
}

.settings-form-actions {
  position: fixed;
  bottom: 0;
  left: 220px;
  right: 0;
  background: var(--white);
  padding: .85rem 2rem;
  border-top: 1px solid var(--cream-dark);
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
}

.settings-form-actions .toast {
  flex: 1;
  margin: 0;
}

#dashboard.sidebar-hidden .settings-form-actions {
  left: 0;
}

#tab-settings {
  padding-bottom: 6.5rem;
}

#tab-settings .settings-grid {
  padding-bottom: 0;
}

#password-form .form-actions {
  margin-top: 1rem;
}

.admin-form-modal {
  max-width: 760px;
  max-height: min(86vh, 780px);
  overflow-y: auto;
}

.admin-form-modal.shifts-add-card {
  margin-bottom: 0;
}

.admin-form-modal .settings-card__title {
  margin-bottom: 1.25rem;
}

.table-empty-note {
  margin-top: 1rem;
  padding: .8rem .9rem;
  border: 1px dashed var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fffaf6;
  color: var(--text-muted);
  font-size: .88rem;
}

.table-cards-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: 1rem;
}

.table-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem .85rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fffaf6;
}

.table-mini-card small {
  display: block;
  margin-top: .15rem;
  color: var(--text-muted);
  font-size: .78rem;
}

.table-mini-card__actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
}

.combination-table-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .55rem;
}

.combination-table-choice {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .65rem .75rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fffaf6;
  cursor: pointer;
}

.combination-table-choice input {
  width: auto;
  margin-top: .2rem;
}

.combination-table-choice small {
  display: block;
  color: var(--text-muted);
  font-size: .78rem;
  margin-top: .12rem;
}

.floor-plan-view {
  min-height: calc(100vh - 8rem);
}

#dashboard.floor-active .floor-plan-view {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.floor-dashboard {
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-sm);
}

#dashboard.floor-active .floor-dashboard {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.floor-dashboard__header {
  margin-bottom: .4rem;
}

.floor-dashboard__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

.floor-action-btns {
  display: flex;
  gap: .45rem;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

#floor-edit-toggle {
  min-width: 11.5rem;
  justify-content: center;
}

.floor-dashboard__controls input,
.floor-dashboard__controls select,
.floor-dashboard__controls .btn {
  min-height: 34px;
}

.floor-date-input {
  flex: 0 0 150px;
  width: 150px;
}

.floor-time-input {
  flex: 0 0 104px;
  width: 104px;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: .55rem .7rem;
  background: #fffaf6;
  color: var(--text-main);
}

#floor-area-filter {
  flex: 0 0 160px;
  width: 160px;
  min-width: 0;
}

.floor-object-toolbar {
  display: none;
  grid-template-columns: 160px auto;
  align-items: center;
  gap: .55rem;
  margin-right: auto;
}

.floor-dashboard--editing .floor-object-toolbar {
  display: grid;
}

.floor-object-toolbar input,
.floor-object-toolbar select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: .55rem .7rem;
  background: #fffaf6;
  color: var(--text-main);
}

.floor-object-toolbar .btn {
  min-height: 38px;
  white-space: nowrap;
}

.floor-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-bottom: .4rem;
  color: var(--text-muted);
  font-size: .82rem;
}

.floor-legend span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.floor-dot {
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  display: inline-block;
}

.floor-dot--free { background: #22c55e; }
.floor-dot--pending { background: #f59e0b; }
.floor-dot--seated { background: #2563eb; }
.floor-dot--inhouse { background: #059669; }
.floor-dot--completed { background: #64748b; }
.floor-dot--blocked { background: #111827; }

.floor-board {
  position: relative;
  min-height: 520px;
  height: min(66vh, 680px);
  flex: 1 1 auto;
  overflow: hidden;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(rgba(107,63,31,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107,63,31,.06) 1px, transparent 1px),
    #fffaf6;
  background-size: 40px 40px;
}

#dashboard.floor-active .floor-board {
  height: auto;
  min-height: 0;
}

#dashboard.floor-active.sidebar-hidden .floor-board {
  height: auto;
  min-height: 0;
}

.floor-area-title {
  position: absolute;
  left: 1rem;
  top: .9rem;
  z-index: 1;
  color: var(--text-muted);
  font-weight: 700;
  font-size: .85rem;
  pointer-events: none;
}

.floor-table {
  position: absolute;
  min-width: 72px;
  min-height: 72px;
  border: 2px solid #d9c7b6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(44,26,14,.12);
  padding: .25rem .4rem;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  cursor: pointer;
  user-select: none;
  transform-origin: center;
  z-index: 10;
  overflow: hidden;
  container-type: size;
}

.floor-object {
  position: absolute;
  min-width: 48px;
  min-height: 48px;
  border: 2px dashed #b08a6c;
  background: rgba(255,255,255,.78);
  color: var(--brown-dark);
  box-shadow: 0 8px 22px rgba(44,26,14,.1);
  padding: .45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  font-size: .82rem;
  line-height: 1.2;
  overflow: visible;
  user-select: none;
  z-index: 30;
}

.floor-object--circle {
  border-radius: 999px;
}

.floor-object--square {
  border-radius: 8px;
}

.floor-object--triangle {
  border: none;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}

.floor-object--triangle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.82);
  border: 3px dashed #b08a6c;
  clip-path: polygon(50% 3%, 98% 98%, 2% 98%);
  z-index: -1;
}

.floor-object--triangle .floor-object__label {
  margin-top: 24%;
  max-width: 70%;
}

.floor-object__label {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  padding: .12rem .18rem;
  border-radius: 6px;
}

.floor-dashboard--editing .floor-object__label {
  cursor: text;
}

.floor-dashboard--editing .floor-object__label[contenteditable="true"]:focus {
  outline: 2px solid rgba(107,63,31,.35);
  background: rgba(255,255,255,.9);
  -webkit-line-clamp: unset;
}

.floor-object__delete,
.floor-object__resize {
  display: none;
  position: absolute;
  border: 1px solid var(--cream-dark);
  background: #fff;
  color: var(--brown-dark);
  border-radius: 7px;
  min-width: 26px;
  height: 24px;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 5;
}

.floor-object__delete {
  right: .3rem;
  top: .3rem;
}

.floor-object__resize {
  right: .25rem;
  bottom: .25rem;
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  cursor: nwse-resize;
}

.floor-table--layout {
  cursor: grab;
}

.floor-table--layout:active {
  cursor: grabbing;
}

.floor-table--free {
  border-color: #86efac;
  background: #f0fdf4;
}

.floor-table--pending {
  border-color: #fbbf24;
  background: #fffbeb;
}

.floor-table--seated {
  border-color: #93c5fd;
  background: #eff6ff;
}

.floor-table--inhouse {
  border-color: #34d399;
  background: #ecfdf5;
}

.floor-table--completed {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.floor-table--blocked {
  border-color: #9ca3af;
  background: #f3f4f6;
  opacity: .8;
}

.floor-table__r {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.floor-table__code {
  font-size: clamp(0.62rem, 18cqh, 0.9rem);
  font-weight: 800;
  color: var(--brown-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-table__capacity {
  font-size: clamp(0.52rem, 13cqh, 0.72rem);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-table__status {
  font-size: clamp(0.52rem, 13cqh, 0.72rem);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-table--free .floor-table__status     { color: #15803d; }
.floor-table--pending .floor-table__status  { color: #d97706; }
.floor-table--seated .floor-table__status   { color: #2563eb; }
.floor-table--inhouse .floor-table__status  { color: #059669; }
.floor-table--completed .floor-table__status{ color: #64748b; }
.floor-table--blocked .floor-table__status  { color: #6b7280; }

.floor-table__name {
  font-size: clamp(0.52rem, 13cqh, 0.72rem);
  color: var(--brown-mid);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-table__stay-times {
  font-size: clamp(0.45rem, 11cqh, 0.65rem);
  color: #059669;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: -.01em;
}

.floor-table__stay-bar {
  width: 80%;
  height: 4px;
  background: #d1fae5;
  border-radius: 99px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  padding: 0;
  min-width: 0;
}

.floor-table__stay-fill {
  display: block;
  height: 100%;
  background: #059669;
  border-radius: 99px;
  transition: width .4s ease;
  min-width: 0;
}

.floor-table__resize {
  display: none;
  position: absolute;
  right: .25rem;
  bottom: .25rem;
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  cursor: nwse-resize;
  border: 1px solid var(--cream-dark);
  background: #fff;
  color: var(--brown-dark);
  border-radius: 7px;
  font-size: .72rem;
  font-weight: 800;
}

.floor-dashboard--editing .floor-table__resize,
.floor-dashboard--editing .floor-object__delete,
.floor-dashboard--editing .floor-object__resize {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floor-checkin-menu {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  padding: .5rem .6rem;
  display: flex;
  gap: .4rem;
  align-items: center;
  user-select: none;
  touch-action: none;
}

.qr-checkin-modal {
  max-width: 560px;
}

.qr-scanner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #1f150f;
  border: 1px solid var(--cream-dark);
  aspect-ratio: 4 / 3;
  margin-bottom: .85rem;
}

.qr-scanner__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1f150f;
}

.qr-scanner__frame {
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0,0,0,.24);
  pointer-events: none;
}

.qr-checkin-modal .field-help {
  margin: 0 0 .85rem;
}

.table-wizard-modal {
  max-width: 720px;
}

.wizard-steps {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.wizard-step {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--cream-dark);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
  background: #fffaf6;
}

.wizard-step--active {
  background: var(--brown-dark);
  color: var(--white);
  border-color: var(--brown-dark);
}

.wizard-preview {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fffaf6;
  max-height: 240px;
  overflow: auto;
}

.wizard-preview__chip {
  border: 1px solid var(--cream-dark);
  background: var(--white);
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .85rem;
  font-weight: 600;
}

.wizard-preview__chip--duplicate {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.reservation-table-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem .9rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: var(--cream);
}

.reservation-table-picker strong {
  display: block;
  color: var(--brown-dark);
  font-size: .95rem;
}

.reservation-table-picker small {
  display: block;
  margin-top: .15rem;
  color: var(--text-muted);
  font-size: .78rem;
}

.table-assignment-partial {
  color: #92400e !important;
  font-weight: 800;
}

.table-assignment-complete {
  color: #047857 !important;
  font-weight: 800;
}

.table-assignment-empty {
  color: var(--text-muted) !important;
  font-weight: 700;
}

.table-picker-modal {
  max-width: 840px;
}

.table-picker-summary {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.table-picker-summary span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--cream-dark);
  border-radius: 999px;
  padding: .35rem .65rem;
  background: #fffaf6;
  color: var(--brown-dark);
  font-size: .86rem;
  font-weight: 700;
}

.table-picker-summary #table-picker-reservation-context {
  background: #eef7f5;
  border-color: rgba(15, 118, 110, .28);
  color: #0f5f59;
}

.table-picker-summary #table-picker-reservation-context.table-picker-context--missing {
  background: #fff8e1;
  border-color: #ffe082;
  color: #8a5a00;
}

.table-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
  max-height: 50vh;
  overflow: auto;
  padding: .15rem;
}

.table-choice {
  text-align: left;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fffaf6;
  padding: .85rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.table-choice:hover {
  border-color: var(--brown-light);
  background: var(--white);
}

.table-choice--selected {
  border-color: var(--brown-mid);
  background: #f7efe7;
  box-shadow: 0 0 0 3px rgba(123,75,44,.12);
}

.table-choice--inactive {
  opacity: .55;
  cursor: not-allowed;
}

.table-choice--occupied {
  border-color: #fecaca;
  background: #fff1f2;
  opacity: .82;
  cursor: not-allowed;
}

.table-choice--occupied:not(:disabled) {
  cursor: pointer;
}

.table-choice--overlap-selected {
  border-color: #dc2626;
  background: repeating-linear-gradient(135deg, #fff1f2 0 10px, #fee2e2 10px 20px);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .16);
}

.table-choice--locked:not(.table-choice--selected) {
  opacity: .58;
}

.table-choice__code {
  display: block;
  color: var(--brown-dark);
  font-weight: 800;
  margin-bottom: .35rem;
}

.table-choice__meta {
  display: block;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.35;
}

.table-choice__status {
  display: block;
  margin-top: .35rem;
  color: #b91c1c;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
}

/* ── Shift/slot tags in reservations table ── */
.shift-tag {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--brown-dark);
}
.time-tag {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── Shifts tab ── */
.shifts-add-card {
  margin-bottom: 1.25rem;
}

.shift-card {
  margin-bottom: 1rem;
  padding: 1.25rem 1.5rem;
}

.shift-card__header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: .85rem;
}

.shift-card__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.shift-card__emoji { font-size: 1.4rem; }
.shift-card__name  { font-weight: 700; font-size: 1rem; }
.shift-card__desc  { font-size: .78rem; color: var(--text-muted); font-weight: 400; font-style: italic; }
.shift-card__range { font-size: .78rem; color: var(--text-muted); font-weight: 400; }
.shift-card__order { font-size: .78rem; color: var(--text-muted); }

.shift-card__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.toggle-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brown-mid);
  cursor: pointer;
}

/* toggle inline en settings */
.toggle-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
}
.toggle-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brown-mid);
  cursor: pointer;
  flex-shrink: 0;
}

/* Selector de días */
.day-picker {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}

.day-btn {
  cursor: pointer;
}
.day-btn input[type="checkbox"] {
  display: none;
}
.day-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1.5px solid var(--border);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  user-select: none;
}
.day-btn input:checked + span {
  background: var(--brown-mid);
  color: #fff;
  border-color: var(--brown-mid);
}
.day-btn:hover span {
  border-color: var(--brown-mid);
  color: var(--brown-mid);
}
.day-btn input:checked:hover + span {
  background: var(--brown-dark, #5a3010);
  color: #fff;
}

/* chips de días en tarjeta de turno */
.shift-card__days {
  display: flex;
  gap: .25rem;
}
.day-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
  background: var(--bg-main);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.day-chip--on {
  background: var(--brown-mid);
  color: #fff;
  border-color: var(--brown-mid);
}

.shift-card__slots {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
}

.slots-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-top: .35rem;
  white-space: nowrap;
}

.slots-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

.slot-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
}

.slot-chip__del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0 .1rem;
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}
.slot-chip__del:hover { background: var(--error-bg); color: var(--error); }

.slot-add-inline {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.slot-time-input {
  width: 110px !important;
  padding: .3rem .5rem !important;
  font-size: .85rem !important;
}

.btn--sm { padding: .35rem .8rem; font-size: .82rem; }

/* ── Clients ── */
.clients-toolbar { margin-top: .75rem; }
.clients-search-input {
  width: 100%;
  max-width: 360px;
  padding: .55rem .9rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  font-size: .9rem;
  background: var(--white);
  outline: none;
}
.clients-search-input:focus { border-color: var(--brown); }

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

.clients-table-wrap {
  margin-top: .75rem;
}

.clients-num { text-align: center; font-variant-numeric: tabular-nums; }
.clients-empty { text-align: center; color: var(--grey-400); padding: 2rem; }

.client-modal { max-width: 760px; max-height: 80vh; display: flex; flex-direction: column; }
.client-modal-sub { font-size: .9rem; color: var(--grey-500); margin: -.5rem 0 1rem; }
.client-history-wrap { flex: 1; }
.client-history-table { font-size: .86rem; }

/* ── Service board (tab-sala) ───────────────────────────────── */
.service-board-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.service-summary-item,
.service-side-panel,
.service-column {
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.service-summary-item {
  border-radius: 8px;
  padding: .85rem 1rem;
}

.service-summary-item span {
  display: block;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
}

.service-summary-item strong {
  display: block;
  color: var(--text-main);
  font-size: 1.45rem;
  line-height: 1.1;
  margin-top: .25rem;
}

.service-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1rem;
  align-items: start;
}

.service-board__main {
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.service-board__side {
  display: grid;
  gap: 1rem;
}

.service-timeline,
.service-side-panel,
.service-column {
  border-radius: 8px;
}

.service-timeline {
  display: grid;
  gap: .4rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: .75rem;
}

.service-timeline-row {
  display: grid;
  grid-template-columns: 48px minmax(90px, 1fr) 86px;
  gap: .65rem;
  align-items: center;
  font-size: .78rem;
}

.service-timeline-row__time,
.service-timeline-row__count {
  color: var(--text-muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.service-timeline-row__count { text-align: right; }

.service-timeline-row__bar {
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.service-timeline-row__bar i {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: inherit;
}

.service-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: .75rem;
}

.service-column {
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
}

.service-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  font-weight: 800;
}

.service-column header strong {
  min-width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brown-dark);
  color: var(--white);
  font-size: .8rem;
}

.service-column__body {
  display: grid;
  gap: .6rem;
  min-height: 160px;
  padding: .75rem;
}

.service-card {
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  background: var(--white);
  padding: .7rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}

.service-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.service-card:active { transform: scale(.99); }
.service-card--pending { border-left-color: #f59e0b; }
.service-card--confirmed { border-left-color: #2563eb; }
.service-card--in_house { border-left-color: #16a34a; }
.service-card--completed { border-left-color: #7c3aed; }
.service-card--cancelled,
.service-card--no_show { border-left-color: #94a3b8; opacity: .78; }

.service-card__head,
.service-card__meta,
.service-card__actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.service-card__head {
  justify-content: space-between;
  margin-bottom: .35rem;
}

.service-card__head strong {
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
}

.service-card__name {
  font-size: .94rem;
  font-weight: 800;
  color: var(--text-main);
}

.service-card__meta {
  margin-top: .35rem;
  color: var(--text-muted);
  font-size: .75rem;
}

.service-card__meta span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.service-card__note {
  margin-top: .45rem;
  color: var(--text-muted);
  font-size: .75rem;
  line-height: 1.35;
}

.service-card__arrival { margin-top: .45rem; }

.service-card__actions {
  margin-top: .55rem;
}

.service-action {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  padding: .32rem .5rem;
  cursor: pointer;
}

.service-action:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.service-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .16rem .45rem;
  font-size: .66rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #334155;
}

.service-status--pending { background: #fef3c7; color: #92400e; }
.service-status--confirmed { background: #dbeafe; color: #1d4ed8; }
.service-status--in_house { background: #dcfce7; color: #166534; }
.service-status--completed { background: #ede9fe; color: #5b21b6; }
.service-status--cancelled,
.service-status--no_show { background: #f1f5f9; color: #64748b; }

.service-side-panel {
  border-radius: 8px;
  padding: .85rem;
}

.service-side-panel h3 {
  margin: 0 0 .65rem;
  font-size: .9rem;
}

.service-next-row {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: .45rem;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: .45rem 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.service-next-row:last-child { border-bottom: 0; }
.service-next-row strong { font-variant-numeric: tabular-nums; }
.service-next-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.service-next-row small {
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.service-table-metric {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
}

.service-table-metric:last-child { border-bottom: 0; }
.service-table-metric span { color: var(--text-muted); font-size: .78rem; }
.service-table-metric strong { font-variant-numeric: tabular-nums; }
.service-muted {
  margin: 0;
  color: var(--text-muted);
  font-size: .8rem;
}

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

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

  .service-columns {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .service-board-summary,
  .service-board__side,
  .service-columns {
    grid-template-columns: 1fr;
  }

  .service-timeline-row {
    grid-template-columns: 44px minmax(72px, 1fr) 76px;
  }
}

/* ── Help tab iframe ── */
.help-tab-panel {
  margin: 0;
  min-height: 0;
}

.help-iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 8.25rem);
  min-height: 520px;
  border: none;
  border-radius: var(--radius-sm);
  background: #fff;
}

/* ── Occupancy by slot (tab-ocupacion) ──────────────────────── */
.cap-legend {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.1rem;
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}
.cap-legend__label { font-weight: 600; color: var(--text-main); margin-right: .1rem; }
.cap-legend__item  { display: flex; align-items: center; gap: .3rem; }
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.cap-shift-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.cap-shift-header {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-bottom: .85rem;
  font-size: .95rem;
}
.cap-shift-range {
  margin-left: auto;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 400;
}
/* 3-column grid: time | bar with percentage | count */
.cap-slot-row {
  display: grid;
  grid-template-columns: 44px minmax(120px, 1fr) minmax(56px, max-content);
  align-items: center;
  gap: .7rem;
  padding: .3rem 0;
  border-bottom: 1px solid var(--border-light, #f0ebe5);
}
.cap-slot-row:last-child { border-bottom: none; }
.cap-slot-time {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
/* bar column */
.cap-bar-cell {
  min-width: 0;
}
.cap-bar {
  position: relative;
  width: 100%;
  height: 20px;
  background: var(--cream-dark);
  border-radius: 99px;
  overflow: hidden;
}
.cap-bar__fill {
  height: 100%;
  background: var(--brown-mid);
  border-radius: 99px;
  transition: width .3s ease;
}
.cap-bar--low .cap-bar__fill { background: #16a34a; }
.cap-bar--medium .cap-bar__fill { background: #2563eb; }
.cap-bar--high .cap-bar__fill { background: #f59e0b; }
.cap-bar--full .cap-bar__fill { background: #dc2626; }
.cap-bar--over .cap-bar__fill { background: #7c3aed; }
.cap-bar__label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 2.45rem;
  padding: .12rem .32rem;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--brown-dark);
  box-shadow: 0 1px 3px rgba(44, 26, 14, .14);
  font-size: .66rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}
/* number column — always right-aligned, same width every row */
.cap-slot-count {
  font-size: .79rem;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.cap-slot-count small { color: var(--text-muted); }
.cap-pill {
  display: inline-block;
  font-size: .67rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.4;
}
.cap-pill--high   { background: #fef3c7; color: #92400e; }
.cap-pill--low    { background: #dcfce7; color: #166534; }
.cap-pill--medium { background: #dbeafe; color: #1d4ed8; }
.cap-pill--full   { background: #fee2e2; color: #991b1b; }
.cap-pill--over   { background: #ede9fe; color: #5b21b6; }
.cap-pill--unlim  { background: #f3f4f6; color: #6b7280; }

/* ── Mobile cards ── */
.mobile-cards { display: none; }

.mob-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: .85rem 1rem;
  cursor: pointer;
  border-left: 4px solid var(--cream-dark);
  transition: box-shadow .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.mob-card:active { transform: scale(.985); }

.mob-card[data-status="pending"]   { border-left-color: #f59e0b; }
.mob-card[data-status="confirmed"] { border-left-color: #10b981; }
.mob-card[data-status="in_house"]  { border-left-color: #34d399; }
.mob-card[data-status="cancelled"] { border-left-color: #ef4444; }
.mob-card[data-status="no_show"]   { border-left-color: #9ca3af; }
.mob-card[data-status="completed"] { border-left-color: #7c3aed; }

.mob-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .35rem;
}
.mob-card__name {
  font-weight: 700;
  font-size: .97rem;
  line-height: 1.25;
}
.mob-card__sub {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .1rem;
}
.mob-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .65rem;
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .4rem;
}
.mob-card__meta span { display: inline-flex; align-items: center; gap: .2rem; }
.mob-card__notes {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mob-card--log { cursor: default; border-left-color: var(--cream-dark); }
.mob-card--log .mob-card__head { flex-direction: column; gap: .2rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  /* Let tall modals scroll on mobile instead of being clipped */
  .modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding: .75rem .5rem;
  }
  .modal {
    max-width: none;
    width: 100%;
  }

  .settings-form-actions {
    left: 0;
  }

  .sidebar-menu-toggle,
  .sidebar-restore-btn,
  #toggle-sidebar-btn {
    display: none !important;
  }

  #dashboard {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    grid-row: 2; /* override: sits in row 2 on mobile (after optional banner in row 1) */
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: .75rem 1rem;
    gap: .5rem;
    position: sticky;
    top: 0;
    z-index: 30;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .admin-content {
    grid-row: 3; /* content sits below the sidebar nav bar on mobile */
  }

  /* row 1: café name (left) + user/logout (right) */
  .sidebar__header  { order: 1; flex: 1; padding: 0; border: none; font-size: .95rem; }
  .sidebar__tools   { display: none; }
  .sidebar__footer  { order: 3; border: none; padding: 0; flex-direction: row; align-items: center; }
  /* row 2: nav items spanning full width */
  .sidebar__nav {
    order: 4;
    flex-basis: 100%;
    flex-direction: row;
    padding: 0 0 .2rem;
    flex: unset;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  .nav-item { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .admin-body { overflow-y: auto; overflow-x: hidden; }
  .admin-content { min-width: 0; overflow-x: clip; }
  .table-wrapper { max-width: 100%; overflow-x: auto; }
  .reservations-table { min-width: 1120px; }
  .clients-table.reservations-table,
  .client-history-table.reservations-table,
  .logs-table.reservations-table { min-width: 760px; }
  .toolbar-row--main { grid-template-columns: 1fr; }
  .reservation-search { min-width: 100%; }
  #multi-sort-btn { display: inline-flex; }

  /* Mobile card lists */
  #reservations-table-wrap,
  .clients-table-wrap,
  .logs-table-wrap,
  .catalog-table-wrap,
  #price-lists-table-wrap,
  #blocks-table-wrap,
  #areas-table-wrap,
  #tables-table-wrap,
  #combinations-table-wrap,
  #cap-overrides-table-wrap,
  #pos-terminals-table-wrap,
  #pos-groups-table-wrap,
  #orders-table-wrap { display: none !important; }
  .mobile-cards,
  .mobile-cards[hidden] {
    display: flex !important;
    flex-direction: column;
    gap: .6rem;
    padding: .25rem 0;
  }
  .mobile-cards:empty { display: none !important; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .tables-grid { grid-template-columns: 1fr; }
  .floor-dashboard__controls {
    width: 100%;
  }
  .floor-dashboard__controls > * { flex: 1 1 150px; }
  .floor-action-btns {
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .floor-action-btns > * { flex: 1 1 auto; }
  #floor-edit-toggle { min-width: 0; }
  .floor-dashboard__controls .floor-date-input {
    flex: 0 0 145px;
    width: 145px;
  }
  .floor-dashboard__controls .floor-time-input {
    flex: 0 0 105px;
    width: 105px;
  }
  .floor-object-toolbar {
    grid-template-columns: 1fr;
  }
  .floor-board {
    min-height: 440px;
    height: 58vh;
  }
}

/* ── Logs ── */
.logs-grid {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.logs-grid > * {
  min-width: 0;
}

.log-retention {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.log-help {
  margin: -.55rem 0 0;
  color: var(--text-muted);
  font-size: .88rem;
}

.log-retention__controls {
  display: flex;
  align-items: end;
  gap: .65rem;
  flex-wrap: wrap;
}

.log-retention__days {
  margin: 0;
  min-width: 150px;
}

.log-retention__days span {
  display: block;
  margin-bottom: .35rem;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.log-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cream-dark);
}

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

.log-card-header .settings-card__title {
  margin-bottom: 0;
}

.log-count {
  min-width: 2rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--brown-dark);
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
}

.logs-table-wrap {
  box-shadow: var(--shadow-sm);
}

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

.log-source {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-details summary {
  cursor: pointer;
  color: var(--brown-dark);
  font-weight: 600;
}

.log-details pre {
  margin-top: .5rem;
  max-width: 720px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  color: #374151;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: .75rem;
  font-size: .78rem;
}

.log-arrow {
  color: var(--text-muted);
  margin: 0 .35rem;
}

/* ── Support ── */
.support-page-header {
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.support-page-header > div,
.support-title-block {
  display: grid;
  gap: .4rem;
}

.support-page-header .panel-title,
.support-title-block .settings-card__title {
  line-height: 1.18;
  margin: 0;
}

.support-page-header .settings-card__hint,
.support-title-block .settings-card__hint {
  display: block;
  margin: 0;
  line-height: 1.45;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1fr);
  gap: 1rem;
  align-items: start;
}

.support-create-card,
.support-list-card,
.support-detail-card {
  min-width: 0;
}

.support-detail-card {
  grid-column: 1 / -1;
}

.support-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

.support-card-header .settings-card__title {
  margin-bottom: 0;
}

.support-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: .6rem;
  margin-bottom: .8rem;
}

.support-filters input,
.support-filters select,
.support-reply textarea {
  width: 100%;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  padding: .65rem .75rem;
  font: inherit;
  background: var(--white);
}

.support-ticket-list {
  display: grid;
  gap: .55rem;
  max-height: 420px;
  overflow: auto;
  padding-right: .2rem;
}

.support-ticket-card {
  display: grid;
  gap: .35rem;
  width: 100%;
  text-align: left;
  padding: .8rem;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: #fffaf5;
  color: var(--brown-dark);
  cursor: pointer;
}

.support-ticket-card:hover,
.support-ticket-card--active {
  border-color: var(--brown);
  box-shadow: var(--shadow-sm);
}

.support-ticket-card__top,
.support-ticket-card__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.support-ticket-card__top {
  justify-content: space-between;
}

.support-ticket-card__subject {
  font-weight: 700;
}

.support-ticket-card__meta {
  color: var(--text-muted);
  font-size: .78rem;
}

.support-badge,
.support-priority {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .18rem .55rem;
  font-size: .72rem;
  font-weight: 800;
}

.support-badge--open { background: #dbeafe; color: #1e40af; }
.support-badge--in_progress { background: #fef3c7; color: #92400e; }
.support-badge--waiting_customer { background: #ede9fe; color: #5b21b6; }
.support-badge--resolved { background: #d1fae5; color: #065f46; }
.support-badge--closed { background: #e5e7eb; color: #374151; }

.support-priority--low { background: #f3f4f6; color: #4b5563; }
.support-priority--normal { background: #e0f2fe; color: #075985; }
.support-priority--high { background: #ffedd5; color: #9a3412; }
.support-priority--urgent { background: #fee2e2; color: #991b1b; }

.support-thread {
  display: grid;
  gap: .7rem;
  max-height: 460px;
  overflow: auto;
  margin-bottom: 1rem;
}

.support-message {
  max-width: 820px;
  padding: .75rem .9rem;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: var(--white);
}

.support-message--support {
  margin-left: auto;
  background: #eef6ff;
  border-color: #bfdbfe;
}

.support-message__head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
  color: var(--text-muted);
  font-size: .78rem;
}

.support-message p {
  white-space: pre-wrap;
  margin: 0;
}

.support-reply {
  border-top: 1px solid var(--cream-dark);
  padding-top: 1rem;
}

@media (max-width: 600px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .panel-header { flex-direction: column; align-items: flex-start; }
  .list-header { flex-direction: column; align-items: flex-start; }
  .admin-content { padding: 1rem; }
  .global-action-search { justify-content: stretch; }
  .global-action-search input,
  .global-action-results { width: 100%; }
  .support-layout { grid-template-columns: 1fr; }
  .support-filters { grid-template-columns: 1fr; }

  .shift-card { padding: 1rem; cursor: pointer; }
  .shift-card__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
  }
  .shift-card__days { flex-wrap: wrap; }
  .shift-card__actions { align-self: flex-end; }

  /* Stats controls: stack on mobile */
  .stats-controls { flex-direction: column; align-items: stretch; }
  .stats-presets { flex-wrap: wrap; }
  .stats-range { flex-wrap: wrap; }
  .stats-range .date-filter { flex: 1 1 130px; }
  #stats-apply-btn { width: 100%; }

  /* Stats KPIs: 2-col grid on small screens */
  .stats-kpi-row { display: grid; grid-template-columns: 1fr 1fr; }
  .stats-kpi-card { flex: none; }
  .calendar-item { grid-template-columns: 1fr; gap: .35rem; }
}

/* ── Roles & permissions ── */
.perm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .5rem .75rem .75rem;
}
.perm-tag {
  font-size: .72rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-weight: 500;
}
.perm-tag--on  { background: var(--brown-dark); color: #fff; }
.perm-tag--off { background: var(--cream-dark); color: var(--text-muted); text-decoration: line-through; }

.role-badge {
  font-size: .72rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: var(--latte);
  color: var(--text-muted);
  font-weight: 600;
}

.permissions-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: .25rem;
}
.perm-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.perm-group--hidden { display: none; }
.perm-group__title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  padding: .2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: .15rem;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  cursor: pointer;
}
.perm-check input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--espresso); cursor: pointer; }

.mcp-user-tools {
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.mcp-user-tools__mode {
  margin-top: .55rem;
}

.mcp-user-tools__grid {
  margin-top: .65rem;
  padding: .7rem .8rem;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: #fffaf6;
}

.select {
  width: 100%;
  padding: .55rem .75rem;
  border: 1.5px solid #ddd6cd;
  border-radius: var(--radius);
  background: #fff;
  font-size: .95rem;
  color: var(--text-main);
  appearance: auto;
}

.field-help {
  margin: .45rem 0 0;
  color: var(--text-muted);
  font-size: .82rem;
  line-height: 1.35;
}

.assignment-mode-help {
  padding: .55rem .7rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fffaf6;
}

.two-factor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: #fffaf6;
}

.two-factor-status {
  display: grid;
  gap: .2rem;
}

.two-factor-status strong {
  color: var(--brown-dark);
}

.two-factor-status span,
.two-factor-setup p,
.two-factor-recovery p {
  color: var(--text-muted);
  font-size: .86rem;
}

.two-factor-setup {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.two-factor-qr-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  align-items: center;
}

.two-factor-qr-wrap img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
}

.two-factor-qr-wrap input {
  max-width: 180px;
  margin: .75rem .5rem .75rem 0;
  padding: .55rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}

.two-factor-recovery {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: #fffbeb;
}

.two-factor-recovery h4 {
  margin-bottom: .35rem;
  color: #92400e;
}

.two-factor-recovery pre {
  margin-top: .75rem;
  white-space: pre-wrap;
  font-weight: 800;
}

/* ── Orders / Tickets ──────────────────────────────────────────────────── */
.ticket-status-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ticket-status-badge[data-status="open"]      { background: #d1fae5; color: #065f46; }
.ticket-status-badge[data-status="closed"]    { background: #e0e7ff; color: #3730a3; }
.ticket-status-badge[data-status="cancelled"] { background: #fee2e2; color: #991b1b; }

.ticket-kds-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-left: .35rem;
}
.ticket-kds-badge[data-kds-status="sent"]        { background: #fef3c7; color: #92400e; }
.ticket-kds-badge[data-kds-status="in_progress"] { background: #fed7aa; color: #9a3412; }
.ticket-kds-badge[data-kds-status="ready"]       { background: #d1fae5; color: #065f46; }
.ticket-kds-badge[data-kds-status="served"]      { background: #e0e7ff; color: #3730a3; }

.kitchen-ready-banner {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .75rem;
  animation: pulse-green 1.5s ease-in-out infinite;
}
@keyframes pulse-green {
  0%, 100% { background: #d1fae5; }
  50%       { background: #a7f3d0; }
}

.btn--warning {
  background: #f59e0b;
  color: #fff;
  border: none;
}
.btn--warning:hover { background: #d97706; }

.pos-source-badge {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
  background: var(--cream-dark);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ticket-detail-modal {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 860px);
  overflow: hidden;
}
.ticket-detail-modal > .ticket-detail-header,
.ticket-detail-modal > .kitchen-ready-banner,
.ticket-detail-modal > .form-actions {
  flex-shrink: 0;
}
.ticket-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}
.ticket-detail-meta {
  font-size: .82rem;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.5;
}

.ticket-items-section {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.ticket-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
  flex-shrink: 0;
}
.section-label { font-weight: 600; font-size: .9rem; }
.ticket-items-title { margin: 0; font-size: .95rem; color: var(--brown-dark); }

#td-add-item-form,
.ticket-tax-summary,
.ticket-total-row {
  flex-shrink: 0;
}

.ticket-items-table-wrapper {
  flex: 1 1 auto;
  min-height: 80px;
  overflow-y: auto;
}

.add-item-grid {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(145px, 1.4fr) minmax(90px, .8fr) minmax(70px, .6fr);
  gap: .4rem;
  padding: .5rem 0 .75rem;
}

#td-item-notes {
  grid-column: 1 / 3;
}

#td-item-save,
#td-item-cancel {
  width: 100%;
}

@media (max-width: 760px) {
  .add-item-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #td-item-product,
  #td-item-variant,
  #td-item-notes {
    grid-column: 1 / -1;
  }
}

.ticket-items-table td { vertical-align: middle; }
.ticket-items-table .btn--icon {
  padding: .15rem .35rem;
  font-size: .8rem;
  line-height: 1;
}

.ticket-total-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  padding: .6rem 0;
  border-top: 1.5px solid var(--border);
  margin-top: .25rem;
  font-size: 1rem;
}
.ticket-total-row strong { font-size: 1.1rem; }

.filter-row {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.btn--success {
  background: #059669;
  color: #fff;
  border-color: #059669;
}
.btn--success:hover { background: #047857; border-color: #047857; }

/* ── POS Module ─────────────────────────────────────────────────────────── */
.pos-subtabs {
  display: flex;
  gap: .35rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.pos-subtab {
  padding: .45rem 1rem;
  font-size: .88rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.pos-subtab:hover { color: var(--text-main); }
.pos-subtab--active { color: var(--espresso); border-bottom-color: var(--espresso); font-weight: 600; }

.pos-subpanel { }
.pos-subpanel-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

/* Badge utility (active/inactive status chips) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  vertical-align: middle;
}
.badge--active   { background: #d1fae5; color: #065f46; }
.badge--inactive { background: #fee2e2; color: #991b1b; }

/* Table utility classes */
.actions-cell { white-space: nowrap; text-align: right; }
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }

/* POS list tables — compact rows, no forced min-width */
.pos-table.reservations-table { min-width: 0; }
.pos-table tbody tr { height: auto; min-height: 44px; }

/* Mobile action row inside mob-cards */
.mob-card__btns {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .6rem;
}
.mob-card--pos { cursor: default; }

.pos-color-dot {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  vertical-align: middle;
}
.pos-color-dot--lg { width: 1.1rem; height: 1.1rem; }

.pos-group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}
.pos-group-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
  background: var(--cream-dark);
  color: var(--text-main);
}
.pos-group-tag .pos-color-dot { width: .6rem; height: .6rem; }

.pos-assign-groups-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  max-height: 340px;
  overflow-y: auto;
  margin: .75rem 0;
  padding: .25rem 0;
}
.pos-assign-group-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.pos-assign-group-row input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--espresso); }
.pos-assign-group-row .pos-group-label { flex: 1; font-size: .9rem; }
.pos-assign-group-row .pos-group-label small { color: var(--text-muted); font-size: .78rem; }

.pos-items-search { margin-bottom: .75rem; }
.pos-items-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: .75rem;
}
.pos-items-col-header {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  padding: .2rem 0 .4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .35rem;
}
.pos-items-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.pos-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35rem .5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: .87rem;
}
.pos-item-row:hover { background: var(--cream); }
.pos-item-row .pos-item-name { flex: 1; }
.pos-item-row .pos-item-price { color: var(--text-muted); font-size: .78rem; margin: 0 .5rem; }
.pos-item-row .btn--icon-sm {
  padding: .1rem .35rem;
  font-size: .8rem;
  line-height: 1.2;
  border-radius: var(--radius-sm);
}

@media (max-width: 600px) {
  .two-factor-card,
  .two-factor-qr-wrap {
    grid-template-columns: 1fr;
  }

  .two-factor-card {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ── Konva experimental floor plan ─────────────────────────────────────── */
#floor-board .konvajs-content { position: absolute !important; top: 0; left: 0; }
#floor-board canvas { cursor: default; }
.floor-dashboard--editing #floor-board canvas { cursor: grab; }
.floor-dashboard--editing #floor-board canvas:active { cursor: grabbing; }

.konva-label-input-wrap {
  position: fixed;
  pointer-events: none;
  z-index: 200;
}

.konva-label-input {
  position: absolute;
  top: 0; left: 0;
  border: 2px solid #6b3f1f;
  border-radius: 6px;
  padding: .3rem .5rem;
  background: rgba(255,255,255,.96);
  color: #3b1e08;
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  resize: none;
  box-shadow: 0 2px 12px rgba(44,26,14,.18);
  pointer-events: auto;
}

/* Experimental settings banner ─────────────────────────────────────────── */
.settings-experimental-banner {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-top: .75rem;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, #fef9f0 0%, #fff8ed 100%);
  border: 1.5px dashed #d4a853;
  border-radius: var(--radius-sm);
}

.badge--experimental {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: #854d0e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ── Konva zoom buttons + export ─────────────────────────────────────────── */
.floor-zoom-btns {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: .25rem;
}

.floor-zoom-btns .btn {
  min-width: 32px;
  padding-left: .4rem;
  padding-right: .4rem;
}

/* ── Reservation modal actions ───────────────────────────────────────── */
.reservation-modal-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: .55rem;
  align-items: stretch;
  margin-top: 1.25rem;
}
.ticket-tax-summary {
  display: grid;
  gap: .35rem;
  padding: .75rem 0 .25rem;
  border-top: 1px solid var(--border);
}
.ticket-tax-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .86rem;
}

.reservation-modal-actions .btn,
.reservation-modal-actions .send-dropdown,
.reservation-modal-actions .send-dropdown > .btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
}

.reservation-modal-actions .btn {
  min-height: 44px;
  justify-content: center;
  padding: .6rem .65rem;
  font-size: .84rem;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
}

.reservation-modal-actions .btn--primary {
  flex-grow: 1.35;
  min-height: 44px;
}

.reservation-modal-actions .send-dropdown {
  display: flex;
  align-items: stretch;
}

.reservation-modal-actions .send-dropdown__menu {
  left: 0;
  right: auto;
  min-width: min(220px, calc(100vw - 2rem));
}

@media (max-width: 640px) {
  .reservation-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
  }

  .reservation-modal-actions .btn {
    padding: .65rem .45rem;
    font-size: .84rem;
  }
}

/* ── Admin design refresh ─────────────────────────────────────────────── */
.admin-body {
  --admin-ink: #29231f;
  --admin-muted: #70675f;
  --admin-line: #ddd4c8;
  --admin-surface: #fffdf9;
  --admin-canvas: #f2eee7;
  --admin-accent: #8b4b2d;
  --admin-sidebar: #25211e;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.admin-body,
.admin-content {
  background:
    radial-gradient(circle at 95% 0, rgba(193, 141, 103, .12), transparent 28rem),
    var(--admin-canvas);
}

.sidebar {
  background: var(--admin-sidebar);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.08);
}

.sidebar__header {
  margin: 0 .85rem;
  padding: .25rem 0 1.3rem;
  border-bottom-color: rgba(255,255,255,.12);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.18rem;
  letter-spacing: -.025em;
}

.sidebar__header span:first-child {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  font-size: 1rem;
}

.sidebar__nav { gap: .15rem; padding: 1rem .65rem; }

.nav-item {
  position: relative;
  border-radius: 2px;
  color: rgba(255,255,255,.68);
  font-size: .84rem;
  padding: .62rem .8rem;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.nav-item--active {
  background: #f7f1eb;
  color: var(--admin-ink);
  font-weight: 700;
}

.nav-item--active::before {
  position: absolute;
  top: .55rem;
  bottom: .55rem;
  left: 0;
  width: 3px;
  background: var(--admin-accent);
  content: '';
}

.sidebar__footer {
  margin: 0 .85rem;
  padding: 1rem 0 0;
  border-top-color: rgba(255,255,255,.12);
}

.sidebar__footer .btn--ghost {
  border-color: rgba(255,255,255,.25);
  border-radius: 2px;
  color: rgba(255,255,255,.8);
}

.reservations-toolbar,
.settings-card,
.card,
.table-wrapper,
.stat-card,
.shift-card,
.two-factor-card,
.two-factor-setup {
  border: 1px solid rgba(229, 222, 213, .9);
  box-shadow: var(--shadow-sm);
}

.settings-card,
.card,
.table-wrapper,
.stat-card,
.shift-card {
  background: var(--admin-surface);
  border-radius: 2px;
}

.admin-content { padding: clamp(1.25rem, 3vw, 2.5rem); }
.tab-panel { gap: 1rem; }

.global-action-search { margin-bottom: 1.25rem; }
.global-action-search input {
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid #bcb1a5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--admin-ink);
  padding: .55rem 0;
}
.global-action-search input:focus { border-color: var(--admin-accent); box-shadow: 0 2px 0 var(--admin-accent); }

.panel-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -.035em;
}

.admin-body .btn {
  border-radius: 2px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
}
.admin-body .btn--primary { background: var(--admin-accent); box-shadow: none; }
.admin-body .btn--primary:hover { background: #6e3821; box-shadow: none; }
.admin-body .btn--ghost { border-color: #cfc4b8; background: transparent; color: #51483f; }
.admin-body .btn--ghost:hover { border-color: #8e8175; background: #f5eee7; }

.reservations-toolbar {
  gap: .75rem;
  padding: .85rem;
  border-color: var(--admin-line);
  background: rgba(255,253,249,.82);
}

.date-filter,
.status-filter,
.reservation-search {
  min-height: 40px;
  border-width: 1px;
  border-color: #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
}

.date-filter:focus,
.status-filter:focus,
.reservation-search:focus { border-color: var(--admin-accent); box-shadow: 0 0 0 2px rgba(139,75,45,.12); }

.segmented-control {
  border-color: #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
}
.segmented-control__btn { border-radius: 1px; }
.segmented-control__btn[aria-pressed="true"],
#multi-sort-btn[aria-pressed="true"] { background: var(--admin-accent); }

.stats-row { gap: .65rem; }
.stat-card {
  min-height: 84px;
  padding: .8rem .9rem;
  border: 1px solid var(--admin-line);
  border-top-width: 3px;
  box-shadow: none;
  text-align: left;
}
.stat-card[data-filter-status]:hover { box-shadow: 0 8px 20px rgba(41,35,31,.08); transform: translateY(-1px); }
.stat-card__label { color: var(--admin-muted); font-size: .66rem; letter-spacing: .08em; }
.stat-card__value { margin-top: .2rem; color: var(--admin-ink); font-family: 'Fraunces', Georgia, serif; font-size: 1.65rem; font-weight: 600; }

.table-wrapper { border-color: var(--admin-line); box-shadow: none; }
.reservations-table { font-size: .84rem; }
.reservations-table th {
  border-bottom: 1px solid var(--admin-line);
  background: #eee8df;
  color: #61574d;
  font-size: .67rem;
  letter-spacing: .08em;
  padding: .8rem .9rem;
}
.reservations-table td { border-top-color: #e8e0d7; padding: .75rem .9rem; }
.reservations-table tbody tr:nth-child(even) td { background: #fdfaf5; }
.reservations-table tr:hover td,
.reservations-table tbody tr.clickable-row:hover td { background: #f5eee7; }
.reservation-code,
.customer-cell strong { color: var(--admin-ink); }
.phone-link { color: var(--admin-accent); }
.status-badge { border-radius: 2px; font-size: .7rem; font-weight: 700; }

.login-screen {
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    #25211e;
  background-size: 28px 28px, 28px 28px, auto;
}
.login-box {
  border: 1px solid rgba(255,255,255,.16);
  border-top: 3px solid #c18d67;
  border-radius: 2px;
  box-shadow: 0 28px 70px rgba(0,0,0,.3);
}
.login-logo { font-family: 'Fraunces', Georgia, serif; letter-spacing: -.03em; }
.login-box .field input { border-radius: 2px; }

/* Operational sheet pattern: shared visual contract for admin edit/create dialogs. */
.admin-body .admin-sheet {
  width: min(780px, calc(100vw - 2rem));
  max-width: 780px;
  max-height: min(820px, calc(100vh - 2rem));
  overflow: auto;
  padding: 1.75rem;
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-accent);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

.admin-body .admin-sheet--sm { width: min(560px, calc(100vw - 2rem)); max-width: 560px; }
.admin-body .admin-sheet--md { width: min(720px, calc(100vw - 2rem)); max-width: 720px; }
.admin-body .admin-sheet--lg { width: min(860px, calc(100vw - 2rem)); max-width: 860px; }

.admin-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-sheet__eyebrow {
  display: block;
  margin-bottom: .45rem;
  color: var(--admin-accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-body .admin-sheet__title,
.admin-body .admin-sheet .modal__title,
.admin-body .admin-sheet .settings-card__title {
  margin: 0;
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: -.03em;
}

.admin-sheet__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.admin-sheet__actions .btn {
  min-height: 36px;
  white-space: nowrap;
}

.admin-sheet__dropdown,
.admin-sheet__menu-anchor {
  position: relative;
}

.admin-sheet__dropdown summary {
  list-style: none;
}

.admin-sheet__dropdown summary::-webkit-details-marker {
  display: none;
}

.admin-sheet__menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  left: auto;
  z-index: 20;
  min-width: 185px;
  margin: 0;
  padding: .3rem 0;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(41, 35, 31, .15);
}

.admin-sheet__menu button,
.admin-sheet__menu .btn {
  display: block;
  width: 100%;
  padding: .55rem .8rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #51483f;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  text-align: left;
}

.admin-sheet__menu li {
  list-style: none;
}

.admin-sheet__menu button:hover,
.admin-sheet__menu .btn:hover {
  background: #f5eee7;
}

.admin-sheet__menu .btn--danger,
.admin-sheet__menu-danger {
  color: #ad3428;
}

.admin-sheet__menu .btn--danger:hover,
.admin-sheet__menu-danger:hover {
  background: #fbeceb;
  color: #8f281e;
}

.admin-body .admin-sheet .field { gap: .35rem; }
.admin-body .admin-sheet .field label,
.admin-body .admin-sheet label:not(.toggle-row):not(.check-row):not(.day-btn) {
  color: #62584e;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.admin-body .admin-sheet input:not([type="checkbox"]),
.admin-body .admin-sheet select,
.admin-body .admin-sheet textarea {
  min-height: 42px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}

.admin-body .admin-sheet input:not([type="checkbox"]):focus,
.admin-body .admin-sheet select:focus,
.admin-body .admin-sheet textarea:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}

.admin-body .admin-sheet textarea {
  min-height: 82px;
}

.admin-body .admin-sheet > .form-actions {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-line);
}

.admin-body .role-config-card .permissions-grid {
  gap: 1rem 1.5rem;
  padding: .9rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
}

.admin-body .role-config-card .perm-group__title {
  color: var(--admin-accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.admin-body .role-config-card .perm-check {
  color: #51483f;
  font-size: .82rem;
}

@media (max-width: 680px) {
  .admin-body .admin-sheet {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 1.25rem;
  }

  .admin-sheet__header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-sheet__actions {
    justify-content: flex-start;
  }
}

/* Reservation editor — intentionally scoped to avoid changing other admin dialogs. */
.admin-body #modal-overlay {
  background: rgba(35, 29, 25, .62);
  backdrop-filter: blur(4px);
}

.admin-body .reservation-edit-modal {
  width: min(720px, calc(100vw - 2rem));
  max-width: 720px;
  max-height: min(800px, calc(100vh - 2rem));
  overflow: auto;
  padding: 1.75rem;
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-accent);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}

.reservation-edit-modal__eyebrow {
  display: block;
  margin-bottom: .5rem;
  color: var(--admin-accent);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.admin-body .reservation-edit-modal .modal__title {
  margin: 0;
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.8rem;
  letter-spacing: -.035em;
}

.reservation-edit-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.reservation-edit-modal__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.reservation-edit-modal__header-actions .btn { min-height: 36px; white-space: nowrap; }
.reservation-edit-modal__header-actions .send-dropdown { position: relative; }
.reservation-edit-modal__header-actions .send-dropdown__menu {
  top: calc(100% + .4rem);
  bottom: auto;
  right: 0;
  left: auto;
  min-width: 210px;
}
.reservation-edit-modal .send-dropdown__divider {
  height: 1px;
  margin: .35rem 0;
  background: var(--admin-line);
}
.reservation-edit-modal .send-dropdown__danger { color: #ad3428; }
.reservation-edit-modal .send-dropdown__danger:hover { background: #fbeceb; color: #8f281e; }

.admin-body .reservation-edit-modal .form-grid { gap: 1.1rem 1.35rem; }
.admin-body .reservation-edit-modal .field { gap: .35rem; }
.admin-body .reservation-edit-modal label {
  color: #62584e;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .09em;
}
.admin-body .reservation-edit-modal input,
.admin-body .reservation-edit-modal select,
.admin-body .reservation-edit-modal textarea {
  min-height: 42px;
  border-width: 1px;
  border-color: #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
}
.admin-body .reservation-edit-modal textarea { min-height: 82px; }

.reservation-edit-modal .reservation-table-picker {
  align-items: center;
  border: 1px solid var(--admin-line);
  border-left: 3px solid #c18d67;
  border-radius: 2px;
  background: #f8f3ec;
  padding: .75rem .85rem;
}
.reservation-edit-modal .reservation-table-picker strong { color: var(--admin-ink); }
.reservation-edit-modal .reservation-table-picker small { color: var(--admin-muted); }

.reservation-edit-modal .send-dropdown__menu {
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  box-shadow: 0 12px 28px rgba(41,35,31,.15);
}

@media (max-width: 640px) {
  .admin-body .reservation-edit-modal {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 1.25rem;
  }
  .admin-body .reservation-edit-modal .modal__title { font-size: 1.55rem; }
  .reservation-edit-modal__header { align-items: stretch; flex-direction: column; }
  .reservation-edit-modal__header-actions { justify-content: flex-start; }
}

.date-filter,
.status-filter,
.reservation-search,
.select,
.clients-search-input,
.field input,
.field select,
.field textarea,
.settings-card input,
.settings-card select,
.settings-card textarea,
.modal input,
.modal select,
.modal textarea {
  min-height: 42px;
  background: #fff;
  border: 1.5px solid #ddd6cd;
  border-radius: 10px;
}

.date-filter:focus,
.status-filter:focus,
.reservation-search:focus,
.select:focus,
.clients-search-input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.settings-card input:focus,
.settings-card select:focus,
.settings-card textarea:focus,
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  border-color: var(--accent, #0f766e);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
  outline: none;
}

.field input[type="checkbox"],
.settings-card input[type="checkbox"],
.modal input[type="checkbox"],
.toggle-row input[type="checkbox"],
.toggle-label input[type="checkbox"] {
  min-height: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  accent-color: var(--brown-mid, #6b3f1f);
  box-shadow: none;
  cursor: pointer;
  flex: 0 0 18px;
}

.field input[type="checkbox"]:focus,
.settings-card input[type="checkbox"]:focus,
.modal input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(107, 63, 31, .16);
}

.btn {
  min-height: 42px;
  justify-content: center;
  border-radius: 10px;
  text-decoration: none;
}

.btn--sm {
  min-height: 34px;
}

.btn--primary {
  background: #3f2417;
  color: #fff;
  box-shadow: 0 8px 20px rgba(63, 36, 23, .18);
}

.btn--primary:hover {
  background: #2f1a10;
}

.btn--ghost {
  background: #fff;
  color: #604234;
  border-color: #ddd6cd;
}

.btn--ghost:hover {
  background: #f7f5f1;
  border-color: #cbbfb2;
}

.modal {
  border: 1px solid rgba(229, 222, 213, .95);
  box-shadow: var(--shadow-lg);
}

.modal-overlay {
  background: rgba(31, 41, 51, .54);
  backdrop-filter: blur(2px);
}

.reservations-table th {
  background: #f7f5f1;
}

.reservations-table tbody tr:nth-child(even) td {
  background: #fcfbf8;
}

.reservations-table tr:hover td {
  background: #eef7f5;
}

.reservations-table tbody tr.clickable-row:hover td {
  background: #fff4e8;
}

@media (max-width: 600px) {
  .btn {
    min-height: 46px;
  }
}

/* ── Legend filter interaction ───────────────────────────────────────────── */
[data-floor-filter] {
  transition: opacity .18s, font-weight .18s;
  border-radius: 6px;
  padding: .1rem .3rem;
}

[data-floor-filter]:hover {
  background: rgba(107,63,31,.07);
}

.floor-legend--active {
  font-weight: 700;
  background: rgba(107,63,31,.1) !important;
  outline: 1.5px solid rgba(107,63,31,.25);
}

.floor-legend--dimmed {
  opacity: .35;
}

/* ── Send dropdown in reservation modal ─────────────────────────────────── */
.send-dropdown {
  position: relative;
}
.send-dropdown__menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e0d5c8;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  list-style: none;
  margin: 0;
  padding: .3rem 0;
  z-index: 200;
}
.send-dropdown__menu li button {
  display: block;
  width: 100%;
  padding: .55rem 1rem;
  background: none;
  border: none;
  text-align: left;
  font-size: .92rem;
  color: var(--brown, #4a2c1a);
  cursor: pointer;
  white-space: nowrap;
}
.send-dropdown__menu li button:hover {
  background: var(--cream, #f5ede4);
}

/* ═══════════════════════════════════════════════════════════════
   STATISTICS DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

/* ── Top controls bar ─────────────────────────────────────────── */
.stats-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.stats-presets {
  display: flex;
  gap: .25rem;
}
.stats-preset-btn--active {
  background: var(--brown, #4a2c1a);
  color: #fff;
  border-color: var(--brown, #4a2c1a);
}
.stats-range {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.stats-range__label {
  font-size: .82rem;
  color: var(--text-muted, #777);
  white-space: nowrap;
}

/* ── KPI row ──────────────────────────────────────────────────── */
.stats-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1rem 0;
}
.stats-kpi-card {
  flex: 1 1 130px;
  background: #fff;
  border: 1px solid #e0d5c8;
  border-radius: 10px;
  padding: .9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 110px;
}
.stats-kpi-card__label {
  font-size: .78rem;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.stats-kpi-card__value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown, #4a2c1a);
  line-height: 1.1;
}
.stats-kpi-card__value--warn  { color: #c0392b; }
.stats-kpi-card__value--good  { color: #27ae60; }

/* ── Charts grid ─────────────────────────────────────────────── */
.stats-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  margin-top: .5rem;
}
.stats-chart-card {
  background: #fff;
  border: 1px solid #e0d5c8;
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
}
.stats-chart-card--wide {
  grid-column: 1 / -1;
}
.stats-chart-card__title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--brown, #4a2c1a);
  margin: 0 0 .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stats-chart-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* ── SVG bar charts (vertical) ───────────────────────────────── */
.stats-bar-svg {
  display: block;
  overflow: visible;
}
.stats-bar-rect {
  fill: var(--brown, #4a2c1a);
  rx: 3;
  opacity: .85;
  transition: opacity .15s;
}
.stats-bar-rect:hover { opacity: 1; }
.stats-bar-rect--cancelled { fill: #c0392b; opacity: .75; }
.stats-bar-rect--no-show   { fill: #e67e22; opacity: .75; }
.stats-bar-rect--completed { fill: #27ae60; opacity: .75; }
.stats-bar-rect--slot      { fill: #6b4c9a; opacity: .8; }
.stats-bar-rect--weekday   { fill: #1a6e8e; opacity: .8; }

.stats-bar-label {
  font-size: 11px;
  fill: #666;
  text-anchor: middle;
  dominant-baseline: auto;
}
.stats-bar-label--top {
  font-size: 10px;
  fill: var(--brown, #4a2c1a);
  font-weight: 600;
  dominant-baseline: auto;
}
.stats-bar-axis-line {
  stroke: #e0d5c8;
  stroke-width: 1;
}
.stats-bar-tick {
  font-size: 10px;
  fill: #aaa;
  text-anchor: end;
  dominant-baseline: middle;
}

/* ── Horizontal bar chart (top slots + status dist) ─────────── */
.stats-hbar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.stats-hbar-row {
  display: grid;
  grid-template-columns: minmax(72px, max-content) 1fr 38px;
  align-items: center;
  gap: .4rem;
}
.stats-hbar-label {
  font-size: .78rem;
  color: #555;
  text-align: right;
  white-space: nowrap;
}
.stats-hbar-track {
  background: #f0e9e2;
  border-radius: 4px;
  height: 14px;
  overflow: hidden;
}
.stats-hbar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--brown, #4a2c1a);
  transition: width .3s;
}
.stats-hbar-fill--slot     { background: #6b4c9a; }
.stats-hbar-fill--pending  { background: #f39c12; }
.stats-hbar-fill--confirmed{ background: #3498db; }
.stats-hbar-fill--in-house { background: #1abc9c; }
.stats-hbar-fill--cancelled{ background: #c0392b; }
.stats-hbar-fill--no-show  { background: #e67e22; }
.stats-hbar-fill--completed{ background: #27ae60; }
.stats-hbar-count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--brown, #4a2c1a);
  text-align: right;
  white-space: nowrap;
}

/* ── Loading placeholder ─────────────────────────────────────── */
.stats-loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted, #888);
  font-size: .9rem;
}

@media (max-width: 900px) {
  .stats-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  .stats-charts-grid {
    grid-template-columns: 1fr;
  }
  .stats-chart-card--wide {
    grid-column: auto;
  }
  .stats-kpi-card {
    flex: 1 1 90px;
  }
  .stats-chart-card {
    overflow: hidden;
    min-width: 0;
  }
  .stats-chart-wrap canvas {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* ═══════════════════════════════════════════════
   POS CASHIER — MOBILE (≤ 768px)
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .pos-cashier .pos-cashier__body {
    flex-direction: column;
    position: relative;
  }

  .pos-cashier .pos-cashier__products {
    flex: 1;
    min-height: 0;
  }

  /* Cart hidden by default — higher specificity to beat base display:flex */
  .pos-cashier .pos-cashier__cart {
    display: none;
    width: 100%;
    border-left: none;
    border-top: none;
    max-height: none;
    flex: 1;
  }

  .pos-cashier--cart-view .pos-cashier__products         { display: none; }
  .pos-cashier--cart-view .pos-cashier__cart             { display: flex; }

  .pos-cashier--tickets-view .pos-cashier__products      { display: none; }
  .pos-cashier--tickets-view .pos-cashier__tickets-panel { display: flex; }

  /* Push cashier body up so the fixed bottom bar doesn't cover it */
  .pos-cashier {
    padding-bottom: 60px;
  }

  /* Table picker viewport stops at the bar height */
  .pos-table-picker-overlay {
    bottom: 60px;
  }

  /* Tickets modal viewport accounts for bar too */
  .pos-tickets-modal-overlay {
    bottom: 60px;
  }

  .pos-cashier .pos-cashier__grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: .5rem;
    padding: .6rem;
  }

  .pos-cashier .pos-product-btn {
    min-height: 80px;
    padding: .7rem .4rem;
  }

  .pos-cashier .pos-cashier__groups {
    padding: .6rem;
    gap: .4rem;
  }

  .pos-cashier .pos-group-btn {
    padding: .45rem .75rem;
    font-size: .82rem;
  }

  .pos-cashier__header {
    gap: .45rem;
    padding: .55rem .65rem;
    flex-wrap: wrap;
  }

  .pos-ready-alert {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .pos-cashier__toast {
    order: 4;
    width: 100%;
    text-align: center;
  }

  .pos-ready-row {
    grid-template-columns: 1fr;
  }

  .pos-ready-row .btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════
   POS CASHIER
═══════════════════════════════════════════════ */
.pos-cashier-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
}
.pos-cashier-overlay[hidden] { display: none; }

.pos-cashier {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #1c1109;
  color: #f0e8dd;
}

/* ── Header ── */
.pos-cashier__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1.25rem;
  background: #111;
  border-bottom: 1px solid #2e2e2e;
  flex-shrink: 0;
}

.pos-cashier__back {
  background: rgba(255,255,255,.1);
  border: none;
  color: #f0e8dd;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: .4rem .85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.pos-cashier__back:hover { background: rgba(255,255,255,.2); }

.pos-cashier__title {
  flex: 1;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0e8dd;
}

.pos-cashier__toast {
  margin-left: 0;
  font-size: .83rem;
}

.pos-ready-alert {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.25rem;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  background: #232323;
  color: #f0e8dd;
  padding: .45rem .85rem;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .55);
}

.pos-ready-alert strong {
  min-width: 1.7rem;
  border-radius: 999px;
  background: #3f3f46;
  color: #f0e8dd;
  padding: .16rem .45rem;
  text-align: center;
}

.pos-ready-alert--active {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #78350f;
}

.pos-ready-alert--active strong {
  background: #92400e;
  color: #fff7ed;
}

.pos-ready-alert--blink {
  animation: posReadyPulse 1.1s ease-in-out infinite;
}

@keyframes posReadyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .55); }
  50% { box-shadow: 0 0 0 .35rem rgba(245, 158, 11, .08); }
}

.pos-ready-modal {
  max-width: min(760px, calc(100vw - 1.5rem));
  width: min(760px, calc(100vw - 1.5rem));
}

#pos-ready-overlay {
  z-index: 1002;
}

#ticket-detail-overlay {
  z-index: 1002;
}

.pos-ready-list {
  display: grid;
  gap: .65rem;
  margin-top: .9rem;
}

.pos-ready-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: center;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: #fffaf5;
  padding: .75rem;
}

.pos-ready-row__main {
  min-width: 0;
  display: grid;
  gap: .2rem;
}

.pos-ready-row__main strong {
  color: var(--brown-dark);
}

.pos-ready-row__main span,
.pos-ready-row__main small,
.pos-ready-empty {
  color: var(--text-muted);
}

.pos-ready-row__main small {
  overflow-wrap: anywhere;
}

.pos-ready-empty {
  border: 1px dashed var(--cream-dark);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

/* ── Body ── */
.pos-cashier__body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Sidebar ── */
/* ── POS left sidebar ── */
.pos-cashier__side {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .75rem .6rem;
  background: #120c08;
  border-right: 1px solid #2a1b12;
}

.pos-side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  width: 100%;
  min-height: 3.2rem;
  border: 1px solid #3a2a20;
  border-radius: 10px;
  background: #21160f;
  color: #f0e8dd;
  padding: .55rem .4rem;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  line-height: 1.2;
  position: relative;
}

.pos-side-btn:hover {
  border-color: #c8956c;
  background: #2a1a11;
}

.pos-side-btn__icon {
  font-size: 1.15rem;
}

.pos-side-btn--table.pos-side-table-btn--assigned,
.pos-side-btn--table.pos-cart-table-btn--assigned {
  border-color: #3b82f6;
  background: #0e2035;
  color: #bfdbfe;
}

.pos-side-btn--clear {
  min-height: 2rem;
  border-color: #7f1d1d;
  background: #1c0a0a;
  color: #fca5a5;
  font-size: .72rem;
}

.pos-side-btn--clear:hover {
  border-color: #ef4444;
  background: #2a0f0f;
}

.pos-side-btn--tickets {
  position: relative;
}

@media (max-width: 768px) {
  .pos-cashier__side {
    display: none;
  }
}

.pos-tickets-badge {
  background: #c8956c;
  color: #120c08;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 900;
  min-width: 1.2rem;
  height: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .25rem;
}

/* ── Tickets floating modal ── */
.pos-tickets-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 4rem 1rem 0;
}

.pos-tickets-modal {
  width: 280px;
  max-height: 70vh;
  background: #181818;
  border: 1px solid #3a2a20;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}

.pos-tickets-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .75rem;
  border-bottom: 1px solid #2a1b12;
  color: #f0e8dd;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pos-tickets-modal .pos-open-ticket-list {
  flex: 1;
  overflow-y: auto;
  padding: .5rem;
  display: grid;
  gap: .4rem;
}

/* ── Keep side-card titles hidden (legacy elements removed) ── */
.pos-side-card__head,
.pos-side-card__title {
  display: none;
}

.pos-side-refresh {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid #3a2a20;
  border-radius: 7px;
  background: #1d1510;
  color: #d7b899;
  cursor: pointer;
}

.pos-side-table-btn {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  min-height: 3rem;
  border: 1px solid #3a2a20;
  border-radius: 8px;
  background: #21160f;
  color: #f0e8dd;
  padding: .7rem .8rem;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.pos-side-table-btn:hover {
  border-color: #c8956c;
  background: #2a1a11;
}

.pos-side-table-btn--assigned {
  border-color: #3b82f6;
  background: #0e2035;
  color: #bfdbfe;
}

.pos-side-table-btn__icon {
  font-size: 1.1rem;
}

.pos-side-clear {
  width: 100%;
  border: 1px solid #3a2a20;
  border-radius: 7px;
  background: transparent;
  color: #c8956c;
  padding: .45rem .7rem;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
}

.pos-open-ticket-list {
  display: grid;
  gap: .45rem;
}

.pos-open-ticket,
.pos-open-ticket-empty {
  width: 100%;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #181818;
  color: #f0e8dd;
  padding: .6rem .65rem;
  text-align: left;
}

.pos-open-ticket {
  display: grid;
  gap: .18rem;
  cursor: pointer;
}

.pos-open-ticket:hover,
.pos-open-ticket--active {
  border-color: #c8956c;
  background: #24170f;
}

.pos-open-ticket__code {
  font-weight: 900;
}

.pos-open-ticket__meta,
.pos-open-ticket-empty {
  color: #8d8178;
  font-size: .78rem;
}

.pos-open-ticket strong {
  color: #c8956c;
  font-size: .82rem;
}

/* ── Products panel ── */
.pos-cashier__products {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-cashier__groups {
  display: flex;
  gap: .5rem;
  padding: .85rem 1rem;
  background: #181818;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: thin;
}

.pos-group-btn {
  background: #2a2a2a;
  border: 2px solid transparent;
  color: #ccc;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: .5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.pos-group-btn:hover { background: #383838; color: #fff; }
.pos-group-btn--active {
  background: #3a2010;
  border-color: var(--brown-light, #c8956c);
  color: #f0e8dd;
}

.pos-group-btn__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pos-cashier__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
  padding: 1rem;
  overflow-y: auto;
  align-content: start;
}

.pos-cashier__no-group {
  grid-column: 1 / -1;
  text-align: center;
  color: #666;
  padding: 3rem 1rem;
  font-size: .95rem;
}

.pos-product-btn {
  background: #2c2c2c;
  border: 2px solid transparent;
  border-radius: 10px;
  color: #f0e8dd;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .9rem .6rem;
  text-align: center;
  min-height: 90px;
  transition: background .12s, border-color .12s, transform .1s;
}
.pos-product-btn:hover {
  background: #3a3a3a;
  border-color: var(--brown-light, #c8956c);
  transform: translateY(-1px);
}
.pos-product-btn:active { transform: translateY(0); }

.pos-product-btn__name {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.pos-product-btn__price {
  font-size: .78rem;
  color: #c8956c;
  font-weight: 700;
}

/* ── Cart ── */
.pos-cashier__tickets-panel {
  display: none; /* shown only on mobile via pos-cashier--tickets-view */
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  background: #0e0e0e;
  padding: .6rem;
  gap: .45rem;
}

.pos-cashier__cart {
  width: 300px;
  flex-shrink: 0;
  background: #141414;
  border-left: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-cashier__cart-title {
  font-weight: 700;
  font-size: .95rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid #2a2a2a;
  background: #181818;
  flex-shrink: 0;
}

.pos-cashier__cart-list {
  flex: 1;
  overflow-y: auto;
  padding: .5rem 0;
}

.pos-cashier__cart-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #555;
  font-size: .88rem;
}

.pos-cart-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border-bottom: 1px solid #1e1e1e;
}

.pos-cart-item__name {
  flex: 1;
  font-size: .83rem;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-cart-item__qty {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
}

.pos-cart-qty-btn {
  background: #2a2a2a;
  border: none;
  color: #ccc;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.pos-cart-qty-btn:hover { background: #3a3a3a; color: #fff; }
.pos-cart-qty-btn--danger {
  color: #fca5a5;
}
.pos-cart-qty-btn--danger:hover {
  background: rgba(239, 68, 68, .18);
  color: #fecaca;
}

.pos-cart-item__count {
  font-size: .83rem;
  font-weight: 600;
  min-width: 1.4rem;
  text-align: center;
}

.pos-cart-item__total {
  font-size: .8rem;
  color: #c8956c;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 3rem;
  text-align: right;
}

.pos-cashier__cart-footer {
  border-top: 1px solid #2a2a2a;
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  background: #111;
  flex-shrink: 0;
}

.pos-cashier__cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .95rem;
  color: #ccc;
}

.pos-cashier__cart-total strong {
  font-size: 1.15rem;
  color: #f0e8dd;
}

.pos-cashier__cart-actions {
  display: flex;
  gap: .5rem;
}

.pos-cashier__cart-actions .btn--ghost {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #ccc;
}
.pos-cashier__cart-actions .btn--ghost:hover {
  background: #3a3a3a;
  color: #fff;
}
.pos-cashier__cart-actions .btn--primary {
  flex: 1;
}

/* ── Mobile bottom tab bar ── */
.pos-cashier__mobile-bar {
  display: flex; /* hidden via [hidden] attr by default; JS removes it when cashier opens on mobile */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  flex-shrink: 0;
  background: #0e0e0e;
  border-top: 1px solid #2a2a2a;
}

.pos-mobile-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .65rem .5rem .55rem;
  background: none;
  border: none;
  border-top: 3px solid transparent;
  color: #666;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color .15s, border-color .15s;
}

.pos-mobile-tab--active {
  color: #c8956c;
  border-top-color: #c8956c;
}

.pos-mobile-tab__icon { font-size: 1.35rem; line-height: 1; display: block; }
.pos-mobile-tab__label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: block; }

.pos-mobile-tab__badge {
  position: absolute;
  top: .35rem;
  right: calc(50% - 1.1rem);
  background: #c8956c;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .1rem .38rem;
  min-width: 1.25rem;
  text-align: center;
  line-height: 1.4;
}

.pos-mobile-tab__total {
  font-size: .75rem;
  font-weight: 700;
  color: #c8956c;
}
.pos-mobile-tab__total:empty { display: none; }

/* ── POS Cart: mesa row ───────────────────────────────────────────────────── */
.pos-cashier__cart-table-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border-top: 1px solid #2a2a2a;
}
.pos-cart-table-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .45rem;
  background: #2a2a2a;
  color: #aaa;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: .45rem .75rem;
  font-size: .82rem;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.pos-cart-table-btn:hover { background: #383838; color: #fff; }
.pos-cart-table-btn--assigned {
  background: #0e2035;
  color: #93c5fd;
  border-color: #3b82f6;
}
.pos-cart-table-btn__icon { font-size: 1rem; line-height: 1; }
.pos-cart-table-clear {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: .95rem;
  cursor: pointer;
  padding: .25rem .45rem;
  border-radius: 4px;
  line-height: 1;
}
.pos-cart-table-clear:hover { color: #ef4444; background: rgba(239,68,68,.12); }

/* ── POS Table Picker ─────────────────────────────────────────────────────── */
.pos-table-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  /* needed so .pos-walkin-wizard (position:absolute) is contained here */
  overflow: hidden;
}
.pos-table-picker-overlay[hidden] { display: none; }

.pos-table-picker {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.pos-table-picker__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  background: #111;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
}
.pos-table-picker__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.pos-table-picker__legend {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .5rem 1rem;
  background: #111;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}
.pos-table-picker__legend-item {
  font-size: .7rem;
  font-weight: 600;
  padding: .18rem .5rem;
  border-radius: 12px;
  border: 2px solid;
}
.pos-table-picker__legend-item--free     { border-color: #86efac; color: #15803d; background: #f0fdf4; }
.pos-table-picker__legend-item--occupied { border-color: #93c5fd; color: #2563eb; background: #eff6ff; }
.pos-table-picker__legend-item--blocked  { border-color: #9ca3af; color: #6b7280; background: #f3f4f6; }

.pos-table-picker__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}
.pos-table-picker__loading,
.pos-table-picker__empty {
  color: #888;
  text-align: center;
  padding: 3rem 1rem;
  font-size: .9rem;
}

.pos-table-area { margin-bottom: 1.75rem; }
.pos-table-area__name {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #888;
  margin-bottom: .6rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid #2a2a2a;
}
.pos-table-area__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .6rem;
}

.pos-table-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .65rem .5rem;
  border: 2px solid;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  transition: transform .1s, box-shadow .1s;
  min-height: 84px;
  text-align: center;
  gap: .15rem;
}
.pos-table-card:hover:not(.pos-table-card--blocked) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.pos-table-card:active:not(.pos-table-card--blocked) { transform: translateY(0); }
.pos-table-card--blocked { cursor: not-allowed; opacity: .65; }
.pos-table-card--selected {
  box-shadow: 0 0 0 3px #f59e0b;
}

.pos-table-card--free     { border-color: #86efac; }
.pos-table-card--occupied { border-color: #93c5fd; }
.pos-table-card--blocked  { border-color: #9ca3af; }

.pos-table-card__code {
  font-size: .88rem;
  font-weight: 700;
  color: #1a1a1a;
}
.pos-table-card__capacity {
  font-size: .68rem;
  color: #888;
}
.pos-table-card__status {
  font-size: .67rem;
  font-weight: 700;
  margin-top: .15rem;
}
.pos-table-card--free     .pos-table-card__status { color: #15803d; }
.pos-table-card--occupied .pos-table-card__status { color: #2563eb; }
.pos-table-card--blocked  .pos-table-card__status { color: #6b7280; }

.pos-table-card__guest {
  font-size: .65rem;
  color: #888;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── POS Walk-in Wizard ───────────────────────────────────────────────────── */
.pos-walkin-wizard {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.65);
  z-index: 10;
}
.pos-walkin-wizard[hidden] { display: none; }

.pos-walkin-wizard__box {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  width: min(300px, 90vw);
  display: flex;
  flex-direction: column;
  gap: .85rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.pos-walkin-wizard__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}
.pos-walkin-wizard__subtitle {
  font-size: .8rem;
  color: #888;
  text-align: center;
  margin-top: -.4rem;
}

.pos-walkin-covers-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: .25rem 0;
}
.pos-walkin-covers-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.pos-walkin-covers-btn:hover { background: #3a3a3a; }
.pos-walkin-covers-num {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  min-width: 2.5rem;
  text-align: center;
}

.pos-walkin-wizard__error {
  font-size: .78rem;
  color: #f87171;
  text-align: center;
  margin: 0;
}
.pos-walkin-wizard__actions {
  display: flex;
  gap: .6rem;
}
.pos-walkin-wizard__actions .btn--ghost {
  background: #2a2a2a;
  color: #aaa;
  border-color: #444;
}
.pos-walkin-wizard__actions .btn--ghost:hover { background: #383838; color: #fff; }
.pos-walkin-wizard__actions .btn--primary { flex: 1; }

/* ── POS Merge dialog ─────────────────────────────────────────────────────── */
.pos-merge-choices {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.pos-merge-btn {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-align: left;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 10px;
  padding: .75rem 1rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.pos-merge-btn:hover { background: #363636; border-color: #c8956c; }
.pos-merge-btn__title { font-size: .87rem; font-weight: 600; color: #fff; }
.pos-merge-btn__desc  { font-size: .73rem; color: #888; }

/* ── Cart: persisted items (already in ticket) ───────────────────────────── */
.pos-cart-section-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #555;
  padding: .35rem .75rem .1rem;
}
.pos-cart-item--persisted {
  opacity: .65;
  pointer-events: none;
}
.pos-cart-item--persisted .pos-cart-item__qty-static {
  font-size: .8rem;
  color: #888;
  padding: 0 .4rem;
  min-width: 2.5rem;
  text-align: center;
}

.pos-cart-item__lock {
  border: 1px solid #3f3f46;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(251, 191, 36, .08);
  padding: .1rem .35rem;
  font-size: .63rem;
  font-weight: 900;
}

/* ── Mobile tab: Mesas ────────────────────────────────────────────────────── */
.pos-mobile-tab__mesa {
  font-size: .68rem;
  font-weight: 700;
  color: #93c5fd;
  line-height: 1;
}
.pos-mobile-tab__mesa:empty { display: none; }
.pos-mobile-tab--table-assigned { color: #93c5fd; }

/* ── Public site module ──────────────────────────────────────────────────── */
.public-site-shell {
  align-items: start;
}

.public-site-main {
  display: grid;
  gap: 1rem;
}

.public-site-side {
  display: grid;
  gap: 1rem;
}

.settings-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.settings-card h3 {
  margin: 0 0 .85rem;
  color: var(--brown-dark);
  font-size: 1rem;
}

.settings-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  margin-bottom: .8rem;
}

.settings-card__header h3 {
  margin: 0;
}

.switch-row,
.check-row {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-primary);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.switch-row input,
.check-row input {
  width: auto;
}

.image-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
}

.image-input-row input[type="file"] {
  max-width: 12rem;
  padding: .52rem;
}

.image-input-row--stack {
  grid-template-columns: 1fr;
}

.image-input-row--table {
  grid-template-columns: minmax(10rem, 1fr);
}

.image-input-row--table input[type="file"] {
  max-width: none;
}

.public-gallery-list {
  display: grid;
  gap: .55rem;
}

.public-gallery-item {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  width: 100%;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: var(--white);
  padding: .45rem;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.public-gallery-item.is-muted {
  opacity: .55;
}

.public-gallery-item__thumb {
  width: 4rem;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--cream);
}

.public-gallery-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-gallery-item small {
  display: block;
  color: var(--text-muted);
  margin-top: .1rem;
}

@media (max-width: 980px) {
  .image-input-row {
    grid-template-columns: 1fr;
  }

  .image-input-row input[type="file"] {
    max-width: none;
  }
}

/* ── KDS / Cocina ───────────────────────────────────────────── */
.kds-shell {
  min-height: calc(100vh - 2rem);
  margin: -1rem;
  padding: 1.2rem;
  background: #111922;
  color: #e8f0f7;
  font-family: Inter, system-ui, sans-serif;
}

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

.kds-topbar h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.kds-topbar p {
  margin: .25rem 0 0;
  color: #92a8bd;
  font-weight: 700;
}

.kds-topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .65rem;
  color: #9fb3c5;
  font-weight: 800;
}

.kds-tool-btn,
.kds-refresh-btn,
.kds-action-btn {
  border: 1px solid rgba(93, 189, 255, .28);
  border-radius: 8px;
  color: #e8f7ff;
  background: #244f70;
  font: inherit;
  font-weight: 900;
  padding: .58rem .9rem;
  cursor: pointer;
}

.kds-refresh-btn,
.kds-action-btn {
  border-color: rgba(77, 215, 175, .34);
  background: #1b8a70;
}

.kds-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(18rem, 1fr));
  gap: .8rem;
  min-height: calc(100vh - 7rem);
  overflow-x: auto;
}

.kds-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 18rem;
  border: 1px solid #253849;
  border-radius: 8px;
  background: #17232e;
  overflow: hidden;
}

.kds-column__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid #2e786b;
  background: linear-gradient(180deg, #1d4c45, #183f3a);
}

.kds-column__header h3 {
  margin: 0;
  color: #f4faf7;
  font-size: 1rem;
  letter-spacing: 0;
}

.kds-column__header span {
  min-width: 2.2rem;
  border-radius: 999px;
  background: #14202b;
  color: #dcebf7;
  padding: .25rem .55rem;
  text-align: center;
  font-weight: 900;
}

.kds-column__body {
  display: grid;
  align-content: start;
  gap: .75rem;
  padding: .65rem;
  overflow-y: auto;
}

.kds-ticket {
  border: 1px solid #2a3d4d;
  border-left: 4px solid #49d2b2;
  border-radius: 8px;
  background: #1b2733;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
  padding: .8rem;
}

.kds-ticket__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}

.kds-ticket__head strong {
  color: #f8fbff;
  font-size: 1.1rem;
}

.kds-ticket__head span {
  color: #5ee5bf;
  font-weight: 900;
}

.kds-ticket__meta {
  margin-top: .45rem;
  color: #9ab0c2;
  font-weight: 800;
  font-size: .88rem;
}

.kds-ticket__tag {
  margin-top: .55rem;
  border: 1px solid #3e7093;
  border-radius: 999px;
  background: #254e6b;
  color: #d7edff;
  padding: .12rem .6rem;
  font-size: .78rem;
  font-weight: 900;
}

.kds-ticket__progress {
  margin-top: .6rem;
  color: #b8d1e3;
  font-size: .8rem;
  font-weight: 900;
}

.kds-ticket__items {
  display: grid;
  gap: .3rem;
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px dashed #314352;
}

.kds-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid #293b4b;
  border-radius: 7px;
  background: #131d26;
  color: #e5edf5;
  padding: .45rem .6rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.kds-item:disabled {
  cursor: default;
}

.kds-item--ready {
  border-color: #32b894;
  background: #1e4741;
}

.kds-item__qty {
  border: 1px solid #31485c;
  border-radius: 6px;
  background: #0f1821;
  color: #f7fbff;
  padding: .14rem .35rem;
  font-weight: 900;
}

.kds-item__name {
  min-width: 0;
  color: #edf4f9;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.kds-item--ready .kds-item__name {
  text-decoration: line-through;
  color: #a8c7bf;
}

.kds-item__name small {
  display: block;
  margin-top: .1rem;
  color: #91a7b8;
  font-size: .72rem;
  font-weight: 700;
}

.kds-item__status {
  color: #a8bfd1;
  font-size: .78rem;
  font-weight: 900;
}

.kds-item--ready .kds-item__status {
  color: #82f0cd;
}

.kds-ticket__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .7rem;
  padding-top: .65rem;
  border-top: 1px dashed #314352;
}

.kds-action-btn {
  padding: .5rem .8rem;
  font-size: .82rem;
}

.kds-empty,
.kds-loading {
  border: 1px dashed #33495c;
  border-radius: 8px;
  color: #95aabb;
  padding: 1rem;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 900px) {
  .kds-shell {
    margin: -.75rem;
    padding: .8rem;
  }

  .kds-topbar {
    display: grid;
  }

  .kds-topbar__actions {
    justify-content: flex-start;
  }

  .kds-hint {
    width: 100%;
  }

  .kds-board {
    grid-template-columns: repeat(3, minmax(17rem, 86vw));
    min-height: calc(100vh - 9rem);
  }
}

/* KDS warm project theme + drag states */
.kds-shell {
  margin: -1.25rem;
  padding: 1.2rem;
  background: #f3ede6;
  color: var(--text-primary);
  font-family: Inter, system-ui, sans-serif;
}

.kds-topbar {
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.kds-topbar h2 {
  color: var(--brown-dark);
  font-size: 1.35rem;
}

.kds-topbar p,
.kds-topbar__actions {
  color: var(--text-muted);
}

.kds-hint {
  color: var(--brown-mid);
}

.kds-tool-btn,
.kds-refresh-btn,
.kds-action-btn {
  border-color: var(--cream-dark);
  background: var(--white);
  color: var(--brown-dark);
  box-shadow: var(--shadow-sm);
}

.kds-refresh-btn,
.kds-action-btn {
  background: var(--brown-dark);
  color: var(--white);
}

.kds-board {
  min-height: calc(100vh - 8.4rem);
  gap: 1rem;
}

.kds-column {
  border-color: var(--cream-dark);
  background: #fffaf5;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.kds-column__header {
  border-bottom-color: var(--cream-dark);
  background: var(--white);
}

.kds-column__header h3 {
  color: var(--brown-dark);
}

.kds-column__header span {
  background: var(--cream);
  color: var(--brown-dark);
}

.kds-column--drop {
  border-color: var(--brown-mid);
  box-shadow: 0 0 0 3px rgba(107, 63, 31, .16), var(--shadow-md);
}

.kds-ticket {
  border-color: var(--cream-dark);
  border-left-color: #0f766e;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  touch-action: none;
}

.kds-board--can-drag .kds-ticket {
  cursor: grab;
}

.kds-board--can-drag .kds-ticket:active {
  cursor: grabbing;
}

.kds-ticket__head strong {
  color: var(--brown-dark);
}

.kds-ticket__head span {
  color: #0f766e;
}

.kds-ticket__meta {
  color: var(--text-muted);
}

.kds-ticket__tag {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.kds-ticket__progress {
  color: var(--brown-mid);
}

.kds-ticket__items,
.kds-ticket__actions {
  border-top-color: var(--cream-dark);
}

.kds-item {
  border-color: var(--cream-dark);
  background: #fffaf5;
  color: var(--text-primary);
}

.kds-item--ready {
  border-color: #86efac;
  background: #ecfdf5;
}

.kds-item__qty {
  border-color: var(--cream-dark);
  background: var(--white);
  color: var(--brown-dark);
}

.kds-item__name {
  color: var(--text-primary);
}

.kds-item--ready .kds-item__name {
  color: #166534;
}

.kds-item__name small,
.kds-item__status {
  color: var(--text-muted);
}

.kds-item--ready .kds-item__status {
  color: #15803d;
}

.kds-empty,
.kds-loading {
  border-color: var(--cream-dark);
  color: var(--text-muted);
  background: rgba(255, 255, 255, .56);
}

.kds-ticket--dragging {
  opacity: .38;
}

.kds-ticket--ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  opacity: .94;
  transform-origin: top left;
  box-shadow: var(--shadow-lg);
}

.kds-drag-active {
  cursor: grabbing;
  user-select: none;
}

#dashboard.sidebar-hidden .kds-shell {
  margin-left: 0;
  padding-left: 4.4rem;
}

@media (max-width: 900px) {
  .kds-shell {
    margin: -.75rem;
    padding: .8rem;
  }

  #dashboard.sidebar-hidden .kds-shell {
    padding-left: .8rem;
    padding-top: 3.8rem;
  }
}

/* ── Inventory ───────────────────────────────────────────────────────────── */
.inv-alerts-banner {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  font-size: .85rem;
}
.inv-alerts-banner__title {
  font-weight: 700;
  color: #b45309;
  margin-bottom: .2rem;
}
.inv-alert-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #78350f;
}
.inv-stock-low  { color: #dc2626; font-weight: 700; }
.inv-stock-ok   { color: #16a34a; }
.inv-badge-unit {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  background: var(--bg-muted, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 5px;
  padding: .05rem .35rem;
  color: var(--text-muted);
}
.radio-group {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding: .25rem 0;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .9rem;
  cursor: pointer;
}

.catalog-journal-modal {
  max-width: 1180px;
}
.catalog-journal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}
.catalog-journal-heading .modal__title {
  margin-bottom: .2rem;
}
.catalog-journal-table {
  min-width: 1040px;
  table-layout: fixed;
}
.catalog-journal-table th {
  white-space: normal;
}
.catalog-journal-table th:first-child {
  width: 20%;
}
.catalog-journal-table th:nth-child(2) {
  width: 10%;
}
.catalog-journal-table th:nth-child(3) {
  width: 13%;
}
.catalog-journal-table th:nth-child(4),
.catalog-journal-table th:nth-child(5) {
  width: 10%;
}
.catalog-journal-table th:nth-child(6) {
  width: 11%;
}
.catalog-journal-table th:nth-child(7) {
  width: 20%;
}
.catalog-journal-table th:last-child {
  width: 6%;
}
.catalog-journal-table input,
.catalog-journal-table select {
  width: 100%;
  min-width: 0;
}
.catalog-journal-table input:disabled,
.catalog-journal-table select:disabled {
  background: var(--bg-muted, #f3f4f6);
  color: var(--text-muted);
}
.catalog-journal-count {
  margin-right: auto;
  color: var(--text-muted);
  font-size: .875rem;
}

.catalog-stock-mov-modal {
  max-width: 520px;
  width: min(520px, calc(100vw - 2rem));
}

.catalog-stock-mov-form {
  gap: .9rem 1rem;
  margin-top: .45rem;
}

.catalog-stock-mov-form .field {
  min-width: 0;
}

.catalog-stock-mov-form .field label {
  margin-bottom: .4rem;
}

.catalog-stock-mov-type {
  max-width: 260px;
}

.catalog-stock-mov-type select {
  width: 100%;
}

.catalog-stock-mov-qty-row {
  display: flex;
  gap: .5rem;
}

.catalog-stock-mov-qty-row input {
  flex: 1;
  min-width: 0;
}

.catalog-stock-mov-qty-row select {
  flex: 0 0 auto;
  width: auto;
  max-width: 130px;
}

#catalog-mov-qty-hint {
  display: block;
  margin-top: .35rem;
  color: var(--text-muted);
  font-size: .78rem;
}

.catalog-stock-mov-convert {
  display: block;
  margin-top: .15rem;
  color: var(--brown-mid, #8a5a3b);
  font-size: .78rem;
  font-weight: 600;
}

.catalog-stock-mov-unit {
  color: var(--text-muted);
  font-weight: 400;
  font-size: .85em;
  margin-right: .35rem;
}

.form-hint {
  color: var(--text-muted);
  font-size: .8rem;
}

.catalog-stock-mov-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(224, 212, 196, .8);
}

.catalog-stock-mov-actions .btn {
  min-width: 118px;
}

@media (max-width: 560px) {
  .catalog-stock-mov-type {
    max-width: none;
  }

  .catalog-stock-mov-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .catalog-stock-mov-actions .btn {
    width: 100%;
  }
}

/* ── Vendors module ── */
.vendor-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.vendor-modal {
  max-width: 680px;
}
.purchase-orders-modal,
.purchase-order-modal {
  max-width: 920px;
}
.purchase-order-detail-modal {
  max-width: 720px;
}
.purchase-orders-heading,
.purchase-order-lines-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}
.purchase-orders-heading .modal__title {
  margin-bottom: 0;
}
.purchase-order-lines-heading {
  margin-top: .75rem;
}
.purchase-order-lines-table {
  min-width: 680px;
  table-layout: fixed;
}
.purchase-order-lines-table th:first-child {
  width: 42%;
}
.purchase-order-lines-table th:nth-child(2),
.purchase-order-lines-table th:nth-child(3),
.purchase-order-lines-table th:nth-child(4) {
  width: 17%;
}
.purchase-order-lines-table th:last-child {
  width: 7%;
}
.purchase-order-lines-table input,
.purchase-order-lines-table select {
  width: 100%;
  min-width: 0;
}
.purchase-order-products {
  display: block;
  max-width: 260px;
  margin-top: .2rem;
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.purchase-order-actions {
  display: flex;
  gap: .35rem;
  min-width: 150px;
}
.status--pending {
  background: #fff4cc;
  color: #725600;
}
.vendor-add-price-form {
  background: var(--bg-subtle, #f8f5f1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-top: .5rem;
}
#catalog-product-vendors-tbody td {
  font-size: .875rem;
}
.muted {
  color: var(--text-muted, #888);
}

/* ── MCP connector ── */
.mcp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
  gap: 1rem;
  align-items: start;
}

#tab-mcp > .panel-header {
  align-items: flex-start;
  margin-bottom: 1.6rem;
}

#tab-mcp > .panel-header .panel-title {
  margin-bottom: .5rem;
}

#tab-mcp > .panel-header .settings-card__hint {
  margin: 0;
}

.mcp-status-row,
.mcp-token-display,
.mcp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  flex-wrap: wrap;
}

.mcp-status-row .settings-card__title {
  margin-bottom: .55rem;
}

.mcp-status-row .settings-card__hint {
  margin: 0;
}

.mcp-endpoint-box,
.mcp-token-box {
  margin-top: 1.15rem;
}

.mcp-endpoint-box label,
.mcp-token-box label {
  display: block;
  margin-bottom: .45rem;
  color: var(--brown-dark);
  font-size: .86rem;
  font-weight: 700;
}

.mcp-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
}

.mcp-copy-row input {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
  font-size: .84rem;
}

.mcp-token-display {
  justify-content: flex-start;
}

.mcp-token-display code,
#mcp-token-once code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mcp-token-display code {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: .5rem .7rem;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: #fffaf6;
  color: var(--brown-dark);
}

#mcp-token-once {
  margin-top: .7rem;
  padding: .7rem .8rem;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #14532d;
}

.mcp-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
  margin-top: 1.1rem;
  max-width: 420px;
}

.mcp-actions {
  justify-content: flex-end;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cream-dark);
}

.mcp-tools-list {
  display: grid;
  gap: .6rem;
}

.mcp-tools-note {
  margin: 0 0 .25rem;
  padding: .75rem .85rem;
  border: 1px solid #facc15;
  border-radius: 8px;
  background: #fefce8;
  color: #713f12;
  font-size: .86rem;
  line-height: 1.4;
}

.mcp-tool-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  padding: .75rem .8rem;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: #fffaf6;
  cursor: pointer;
}

.mcp-tool-row--write {
  background: #fff7ed;
  border-color: #fed7aa;
}

.mcp-tool-row input {
  width: 1rem;
  height: 1rem;
}

.mcp-tool-row strong,
.mcp-tool-row small {
  display: block;
}

.mcp-tool-row strong {
  color: var(--brown-dark);
  font-size: .92rem;
}

.mcp-tool-row small {
  margin-top: .15rem;
  color: var(--text-muted);
  font-size: .78rem;
}

.mcp-tool-row:has(input:disabled) {
  cursor: not-allowed;
  opacity: .62;
}

.mcp-instructions-card,
.mcp-logs-card {
  grid-column: 1 / -1;
}

.mcp-steps {
  display: grid;
  gap: .55rem;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .mcp-layout,
  .mcp-settings-grid,
  .mcp-copy-row {
    grid-template-columns: 1fr;
  }

  .mcp-copy-row .btn,
  .mcp-actions .btn,
  .mcp-token-display .btn {
    width: 100%;
  }
}

/* ── Sala / service board refresh ─────────────────────────────────────── */
.admin-body #tab-sala .panel-header {
  align-items: flex-end;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-body #tab-sala .panel-header__actions {
  gap: .45rem;
}

.admin-body #tab-sala .date-filter,
.admin-body #tab-sala .status-filter {
  min-height: 36px;
  border-color: #cfc4b8;
  border-radius: 2px;
  background: var(--admin-surface);
}

.admin-body .service-board-summary {
  gap: .65rem;
  margin-bottom: .75rem;
}

.admin-body .service-summary-item,
.admin-body .service-side-panel,
.admin-body .service-column {
  border-color: var(--admin-line);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}

.admin-body .service-summary-item {
  position: relative;
  min-height: 88px;
  padding: .8rem .9rem;
  border-top: 3px solid #c7a28b;
}

.admin-body .service-summary-item span {
  color: var(--admin-muted);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.admin-body .service-summary-item strong {
  margin-top: .3rem;
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
}

.admin-body .service-board {
  grid-template-columns: minmax(0, 1fr) 278px;
  gap: .75rem;
}

.admin-body .service-board__main,
.admin-body .service-board__side { gap: .75rem; }

.admin-body .service-timeline {
  gap: .5rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: rgba(255, 253, 249, .74);
  padding: .85rem .9rem;
}

.admin-body .service-timeline-row {
  grid-template-columns: 42px minmax(90px, 1fr) 82px;
  gap: .6rem;
  color: var(--admin-muted);
  font-size: .73rem;
}

.admin-body .service-timeline-row__time,
.admin-body .service-timeline-row__count { color: #665c53; }

.admin-body .service-timeline-row__bar {
  height: 7px;
  border-radius: 0;
  background: #e7ded3;
}

.admin-body .service-timeline-row__bar i {
  border-radius: 0;
  background: var(--admin-accent);
}

.admin-body .service-columns { gap: .65rem; }

.admin-body .service-column {
  border-top: 3px solid #b9afa4;
  overflow: hidden;
}

.admin-body .service-column--pending { border-top-color: #c8913a; }
.admin-body .service-column--confirmed { border-top-color: #51779a; }
.admin-body .service-column--in_house { border-top-color: #597e61; }
.admin-body .service-column--closed { border-top-color: #91877e; }

.admin-body .service-column header {
  padding: .7rem .75rem;
  border-bottom-color: var(--admin-line);
  background: #f3ede5;
  color: #574d44;
  font-size: .72rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.admin-body .service-column header strong {
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #302a26;
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .7rem;
}

.admin-body .service-column__body {
  align-content: start;
  gap: .55rem;
  min-height: 190px;
  padding: .65rem;
  background: rgba(255, 253, 249, .66);
}

.admin-body .service-card {
  border: 1px solid #ded5ca;
  border-left: 3px solid #aaa097;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
  padding: .65rem;
}

.admin-body .service-card:hover {
  border-color: #bca38f;
  box-shadow: 0 6px 16px rgba(41, 35, 31, .08);
}

.admin-body .service-card--pending { border-left-color: #c8913a; }
.admin-body .service-card--confirmed { border-left-color: #51779a; }
.admin-body .service-card--in_house { border-left-color: #597e61; }
.admin-body .service-card--completed { border-left-color: #786b91; }
.admin-body .service-card--cancelled,
.admin-body .service-card--no_show { border-left-color: #aaa097; }

.admin-body .service-card__head strong {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
}

.admin-body .service-card__name { color: var(--admin-ink); font-size: .88rem; }
.admin-body .service-card__meta,
.admin-body .service-card__note { color: var(--admin-muted); font-size: .72rem; }

.admin-body .service-status {
  border-radius: 2px;
  padding: .16rem .34rem;
  font-size: .61rem;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.admin-body .service-status--pending { background: #f7e9cd; color: #765317; }
.admin-body .service-status--confirmed { background: #dce8ef; color: #365b76; }
.admin-body .service-status--in_house { background: #dfece0; color: #3f6446; }
.admin-body .service-status--completed { background: #e9e3f0; color: #5d4d74; }
.admin-body .service-status--cancelled,
.admin-body .service-status--no_show { background: #ebe7e1; color: #70675f; }

.admin-body .service-action {
  border-color: #cfc4b8;
  border-radius: 2px;
  background: transparent;
  color: #544a42;
  font-size: .68rem;
}

.admin-body .service-action:hover {
  border-color: var(--admin-accent);
  background: #f7ece4;
  color: #6e3821;
}

.admin-body .service-side-panel { padding: .8rem; }
.admin-body .service-side-panel h3 {
  margin-bottom: .7rem;
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.admin-body .service-next-row {
  border-bottom-color: #e5ddd3;
  color: #5d534b;
  font-size: .76rem;
}

.admin-body .service-next-row:hover { color: var(--admin-accent); }
.admin-body .service-next-row strong { color: var(--admin-ink); }

.admin-body .service-table-metric {
  border-bottom-color: #e5ddd3;
  color: var(--admin-muted);
}

.admin-body .service-table-metric strong { color: var(--admin-ink); font-family: 'Fraunces', Georgia, serif; }
.admin-body .service-muted { color: var(--admin-muted); font-size: .76rem; }

@media (max-width: 980px) {
  .admin-body .service-board { grid-template-columns: 1fr; }
  .admin-body .service-board__side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .admin-body #tab-sala .panel-header { align-items: stretch; }
  .admin-body #tab-sala .panel-header__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body #tab-sala .panel-header__actions .date-filter,
  .admin-body #tab-sala .panel-header__actions .status-filter { width: 100%; }
  .admin-body .service-board-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body .service-columns { grid-template-columns: minmax(220px, 1fr); }
  .admin-body .service-board__side { grid-template-columns: 1fr; }
}

/* ── Mesas module refresh ─────────────────────────────────────────────── */
.admin-body #tab-mesas > .panel-header {
  align-items: flex-end;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-body .table-module-tabs {
  gap: .25rem;
  margin: 0 0 1.35rem;
  padding: .4rem;
  border-color: var(--admin-line);
  border-radius: 2px;
  background: rgba(255, 253, 249, .78);
}

.admin-body .table-module-tab {
  min-height: 38px;
  border-radius: 2px;
  color: #62584e;
  font-size: .8rem;
}

.admin-body .table-module-tab:hover {
  border-color: transparent;
  background: #f2ebe3;
}

.admin-body .table-module-tab.is-active {
  border-color: #302a26;
  background: #302a26;
}

.admin-body .table-module-tab span {
  min-width: 1.35rem;
  border-radius: 50%;
  background: #eee5da;
  color: #63584e;
  font-size: .68rem;
}

.admin-body .table-module-tab.is-active span {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.admin-body .table-section { gap: 1rem; }

.admin-body .list-header {
  padding: .1rem 0 .85rem;
  border-bottom: 1px solid #e0d7cd;
}

.admin-body .list-header .settings-card__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: -.025em;
}

.admin-body .list-header .settings-card__hint { color: var(--admin-muted); }

.admin-body #tab-mesas .table-wrapper {
  border-color: var(--admin-line);
  border-radius: 2px;
  background: var(--admin-surface);
}

.admin-body #tab-mesas .table-wrapper th {
  background: #f1ebe3;
  color: #645a50;
  font-size: .66rem;
  letter-spacing: .085em;
}

.admin-body #tab-mesas .table-wrapper td { border-top-color: #e7ded4; }
.admin-body #tab-mesas .table-wrapper tbody tr:hover td { background: #f8f1e9; }
.admin-body #tab-mesas .table-wrapper td strong { color: var(--admin-ink); }

.admin-body .table-empty-note {
  border-color: #cfc4b8;
  border-radius: 2px;
  background: #faf6f0;
  color: var(--admin-muted);
}

.admin-body .table-config-card {
  border: 1px solid var(--admin-line);
  border-top: 3px solid #c18d67;
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 20px 48px rgba(41, 35, 31, .16);
}

.admin-body .table-config-card .settings-card__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: -.03em;
}

.admin-body .table-config-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-body .table-config-card__eyebrow {
  display: block;
  margin-bottom: .45rem;
  color: var(--admin-accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-body .table-config-card__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.admin-body .table-config-card__header-actions .btn { min-height: 36px; white-space: nowrap; }
.table-actions-dropdown { position: relative; }

.table-actions-dropdown__menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 20;
  min-width: 175px;
  padding: .3rem 0;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(41, 35, 31, .15);
}

.table-actions-dropdown__menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #ad3428;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: .55rem .8rem;
  text-align: left;
}

.table-actions-dropdown__menu button:hover { background: #fbeceb; color: #8f281e; }

/* ── Turnos refresh ──────────────────────────────────────────────────── */
.admin-body #tab-turnos > .panel-header {
  align-items: flex-end;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-body #shifts-list { display: grid; gap: .7rem; }

.admin-body #tab-turnos .shift-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1.35rem;
  margin: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--admin-line);
  border-left: 4px solid #c18d67;
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}

.admin-body #tab-turnos .shift-card:hover {
  border-color: #bea18b;
  box-shadow: 0 8px 20px rgba(41, 35, 31, .08);
}

.admin-body #tab-turnos .shift-card__header {
  display: grid;
  grid-template-columns: 1fr;
  gap: .45rem;
  margin: 0;
}

.admin-body #tab-turnos .shift-card__title {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr);
  column-gap: .7rem;
  row-gap: .2rem;
  align-items: center;
}

.admin-body #tab-turnos .shift-card__emoji {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  grid-row: span 3;
  border: 1px solid #4a4039;
  border-radius: 50%;
  background: #302a26;
  font-size: 1rem;
}

.admin-body #tab-turnos .shift-card__name {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

.admin-body #tab-turnos .shift-card__desc,
.admin-body #tab-turnos .shift-card__range,
.admin-body #tab-turnos .shift-card__order {
  color: var(--admin-muted);
  font-size: .72rem;
}

.admin-body #tab-turnos .shift-card__desc {
  font-style: normal;
  line-height: 1.35;
}

.admin-body #tab-turnos .shift-card__range {
  grid-column: 2;
  color: #5d534b;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.admin-body #tab-turnos .shift-card__order {
  grid-column: 2;
  justify-self: start;
  border-left: 2px solid #c18d67;
  padding-left: .4rem;
  font-size: .65rem;
  letter-spacing: .08em;
}

.admin-body #tab-turnos .shift-card__days {
  justify-content: flex-end;
  border-left: 1px solid #e3dbd1;
  padding-left: 1.2rem;
}

.admin-body #tab-turnos .day-chip {
  width: 1.45rem;
  height: 1.45rem;
  border-color: #d4c8bb;
  border-radius: 2px;
  background: #f6f1ea;
  color: #71675d;
  font-size: .65rem;
}

.admin-body #tab-turnos .day-chip--on { border-color: var(--admin-accent); background: var(--admin-accent); color: #fff; }
.admin-body #tab-turnos .shift-card__actions {
  justify-content: flex-end;
  grid-column: 2;
}

.admin-body #tab-turnos .toggle-label { color: #62584e; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

.admin-body .shift-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-body .shift-editor__eyebrow {
  display: block;
  margin-bottom: .45rem;
  color: var(--admin-accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-body .shifts-add-card .settings-card__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: -.03em;
}

.admin-body .shifts-add-card {
  width: min(780px, calc(100vw - 2rem));
  max-width: 780px;
  max-height: min(820px, calc(100vh - 2rem));
  padding: 1.75rem;
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-accent);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

.admin-body .shifts-add-card .form-grid {
  gap: 1.05rem 1.35rem;
}

.admin-body .shifts-add-card .field { gap: .35rem; }

.admin-body .shifts-add-card .field label {
  color: #62584e;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .09em;
}

.admin-body .shifts-add-card input,
.admin-body .shifts-add-card select {
  min-height: 42px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}

.admin-body .shifts-add-card input:focus,
.admin-body .shifts-add-card select:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}

.admin-body .shifts-add-card .field:has(#new-shift-desc) {
  padding: .7rem .8rem;
  border-left: 3px solid #c18d67;
  background: #f8f3ec;
}

.admin-body .shifts-add-card .day-picker {
  gap: .4rem;
  margin-top: .15rem;
  padding: .7rem .8rem;
  border: 1px solid var(--admin-line);
  background: #f8f3ec;
}

.admin-body .shifts-add-card .day-btn span {
  width: 2rem;
  height: 2rem;
  border-color: #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  color: #665c53;
}

.admin-body .shifts-add-card .day-btn input:checked + span {
  border-color: var(--admin-accent);
  background: var(--admin-accent);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .22);
}

/* ── Bloqueos refresh ────────────────────────────────────────────────── */
.admin-body #tab-bloqueos > .panel-header {
  align-items: flex-end;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}
.admin-body #tab-bloqueos .table-wrapper {
  border-color: var(--admin-line);
  border-radius: 2px;
  background: var(--admin-surface);
}
.admin-body #tab-bloqueos .table-wrapper th {
  background: #f1ebe3;
  color: #645a50;
  font-size: .66rem;
  letter-spacing: .085em;
}
.admin-body #tab-bloqueos .table-wrapper td { border-top-color: #e7ded4; }
.admin-body #tab-bloqueos .table-wrapper tbody tr:hover td { background: #f8f1e9; }

.admin-body .block-config-card {
  width: min(760px, calc(100vw - 2rem));
  max-width: 760px;
  max-height: min(800px, calc(100vh - 2rem));
  padding: 1.75rem;
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-accent);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}
.admin-body .block-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}
.admin-body .block-editor__eyebrow {
  display: block;
  margin-bottom: .45rem;
  color: var(--admin-accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.admin-body .block-config-card .settings-card__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: -.03em;
}
.admin-body .block-editor__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}
.admin-body .block-editor__header-actions .btn { min-height: 36px; white-space: nowrap; }
.admin-body .block-config-card .form-grid { gap: 1.05rem 1.35rem; }
.admin-body .block-config-card .field { gap: .35rem; }
.admin-body .block-config-card .field label {
  color: #62584e;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .09em;
}
.admin-body .block-config-card input {
  min-height: 42px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
}
.admin-body .block-config-card .field:has(#block-reason) {
  padding: .7rem .8rem;
  border-left: 3px solid #c18d67;
  background: #f8f3ec;
}
.block-actions-dropdown { position: relative; }
.block-actions-dropdown__menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 20;
  min-width: 180px;
  padding: .3rem 0;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(41, 35, 31, .15);
}
.block-actions-dropdown__menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #ad3428;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: .55rem .8rem;
  text-align: left;
}
.block-actions-dropdown__menu button:hover { background: #fbeceb; color: #8f281e; }
.block-actions-dropdown__menu button:disabled {
  color: #a59b92;
  cursor: not-allowed;
  opacity: .72;
}
.block-actions-dropdown__menu button:disabled:hover { background: transparent; color: #a59b92; }

/* ── Ocupación refresh ───────────────────────────────────────────────── */
.admin-body #tab-ocupacion > .panel-header {
  align-items: flex-end;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-body #tab-ocupacion .panel-header__actions { gap: .45rem; }
.admin-body #tab-ocupacion .panel-header__actions input {
  min-height: 36px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: var(--admin-surface);
}

.admin-body #cap-date {
  min-height: 36px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}
.admin-body #cap-date:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}

/* Reservation toolbar — explicit selectors override the legacy rounded inputs. */
.admin-body .reservations-toolbar #reservation-search,
.admin-body .reservations-toolbar #filter-date,
.admin-body .reservations-toolbar #filter-status {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
  color: var(--admin-ink);
}
.admin-body .reservations-toolbar #reservation-search:focus,
.admin-body .reservations-toolbar #filter-date:focus,
.admin-body .reservations-toolbar #filter-status:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}

/* ── Remaining admin modules: shared editorial pass ───────────────────── */
.admin-body #tab-roles > .panel-header,
.admin-body #tab-usuarios > .panel-header,
.admin-body #tab-clientes > .panel-header,
.admin-body #tab-catalogo > .panel-header,
.admin-body #tab-precios > .panel-header,
.admin-body #tab-web-publica > .panel-header,
.admin-body #tab-pedidos > .panel-header,
.admin-body #tab-proveedores > .panel-header,
.admin-body #tab-settings > .panel-header,
.admin-body #tab-logs > .panel-header,
.admin-body #tab-estadisticas > .panel-header {
  align-items: flex-end;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-body #tab-clientes .clients-toolbar {
  margin: 0 0 1rem;
  padding: .65rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: rgba(255, 253, 249, .78);
}
.admin-body #tab-clientes .clients-search-input {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}
.admin-body #tab-clientes .clients-search-input:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}

.admin-body #tab-clientes .table-wrapper,
.admin-body #tab-catalogo .table-wrapper,
.admin-body #tab-precios .table-wrapper,
.admin-body #tab-pedidos .table-wrapper,
.admin-body #tab-proveedores .table-wrapper,
.admin-body #tab-logs .table-wrapper {
  border-color: var(--admin-line);
  border-radius: 2px;
  background: var(--admin-surface);
}
.admin-body #tab-clientes .reservations-table th,
.admin-body #tab-catalogo .reservations-table th,
.admin-body #tab-precios .reservations-table th,
.admin-body #tab-pedidos .reservations-table th,
.admin-body #tab-proveedores .reservations-table th,
.admin-body #tab-logs .reservations-table th {
  background: #f1ebe3;
  color: #645a50;
  font-size: .66rem;
  letter-spacing: .085em;
}
.admin-body #tab-clientes .reservations-table td,
.admin-body #tab-catalogo .reservations-table td,
.admin-body #tab-precios .reservations-table td,
.admin-body #tab-pedidos .reservations-table td,
.admin-body #tab-proveedores .reservations-table td,
.admin-body #tab-logs .reservations-table td { border-top-color: #e7ded4; }
.admin-body #tab-clientes .reservations-table tbody tr:hover td,
.admin-body #tab-catalogo .reservations-table tbody tr:hover td,
.admin-body #tab-precios .reservations-table tbody tr:hover td,
.admin-body #tab-pedidos .reservations-table tbody tr:hover td,
.admin-body #tab-proveedores .reservations-table tbody tr:hover td,
.admin-body #tab-logs .reservations-table tbody tr:hover td { background: #f8f1e9; }

.admin-body #tab-settings .settings-card,
.admin-body #tab-web-publica .settings-card,
.admin-body #tab-logs .settings-card,
.admin-body #tab-catalogo .settings-card,
.admin-body #tab-proveedores .settings-card,
.admin-body #tab-precios .settings-card {
  border: 1px solid var(--admin-line);
  border-top: 3px solid #c18d67;
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}
.admin-body #tab-settings .settings-card__title,
.admin-body #tab-web-publica .settings-card__title,
.admin-body #tab-logs .settings-card__title,
.admin-body #tab-catalogo .settings-card__title,
.admin-body #tab-proveedores .settings-card__title,
.admin-body #tab-precios .settings-card__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: -.025em;
}
.admin-body #tab-settings .settings-card__hint,
.admin-body #tab-web-publica .settings-card__hint,
.admin-body #tab-logs .settings-card__hint { color: var(--admin-muted); }

.admin-body #tab-settings .settings-card input:not([type="checkbox"]),
.admin-body #tab-settings .settings-card select,
.admin-body #tab-settings .settings-card textarea,
.admin-body #tab-web-publica .settings-card input:not([type="checkbox"]),
.admin-body #tab-web-publica .settings-card select,
.admin-body #tab-web-publica .settings-card textarea {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}

.admin-body #tab-web-publica .catalog-library-card {
  gap: .9rem;
  padding: 1.1rem;
  border: 1px solid var(--admin-line);
  border-top: 3px solid #c18d67;
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}

.admin-body #tab-web-publica .catalog-library-card > h3,
.admin-body #tab-web-publica .catalog-library-card .settings-card__header h3 {
  margin: 0;
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -.025em;
}

.admin-body #tab-web-publica .catalog-library-card .field {
  gap: .35rem;
}

.admin-body #tab-web-publica .catalog-library-card .field label {
  color: #62584e;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.admin-body #tab-web-publica .catalog-library-card input:not([type="checkbox"]),
.admin-body #tab-web-publica .catalog-library-card textarea {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}

.admin-body #tab-web-publica .catalog-library-card textarea { min-height: 84px; }

.admin-body #tab-web-publica .catalog-library-card input:focus,
.admin-body #tab-web-publica .catalog-library-card textarea:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}

.admin-body #tab-web-publica .catalog-library-card .image-input-row {
  gap: .5rem;
}

/* The public-site sidebar is a layout container, not an extra rounded card. */
.admin-body #tab-web-publica .public-site-side {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Settings: remove the remaining legacy pill navigation and legacy sub-sections. */
.admin-body #tab-settings .settings-grid {
  gap: 1.25rem;
}

.admin-body #tab-settings,
.admin-body #tab-settings input,
.admin-body #tab-settings select,
.admin-body #tab-settings textarea,
.admin-body #tab-settings button {
  font-family: 'DM Sans', Arial, sans-serif;
}

.admin-body #tab-settings .panel-title,
.admin-body #tab-settings .settings-card__title,
.admin-body #tab-settings .payment-section__summary,
.admin-body #tab-settings .two-factor-recovery h4 {
  font-family: 'Fraunces', Georgia, serif;
}

.admin-body #tab-settings .panel-title { letter-spacing: -.035em; }

.admin-body #tab-settings .settings-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: -1.75rem -1.75rem 1.5rem;
  padding: .7rem 1rem;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid var(--admin-line);
  border-left: 0;
  background: #f3ede5;
}

.admin-body #tab-settings .settings-subtab {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #70675f;
  padding: .6rem .8rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.admin-body #tab-settings .settings-subtab::after {
  position: absolute;
  right: .8rem;
  bottom: -.7rem;
  left: .8rem;
  height: 2px;
  background: transparent;
  content: '';
}

.admin-body #tab-settings .settings-subtab:hover {
  background: rgba(255, 253, 249, .6);
  color: var(--admin-ink);
}

.admin-body #tab-settings .settings-subtab.is-active {
  background: transparent;
  color: var(--admin-accent);
}

.admin-body #tab-settings .settings-subtab.is-active::after { background: var(--admin-accent); }

.admin-body #tab-settings .settings-pane > .settings-card__title:first-child {
  margin-bottom: 1.1rem;
}

.admin-body #tab-settings .settings-subsection {
  margin-top: 1.5rem;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--admin-line);
}

.admin-body #tab-settings .settings-subsection .settings-card__title {
  font-size: 1.15rem;
}

.admin-body #tab-settings .test-email-row {
  margin-top: 1rem;
  padding: .75rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #f7f1e9;
}

.admin-body #tab-settings .test-email-row .input {
  min-height: 38px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
}

.admin-body #tab-settings .settings-experimental-banner {
  border: 1px solid #ddc28b;
  border-left: 3px solid #ba8231;
  border-radius: 2px;
  background: #fff8e8;
}

.admin-body #tab-settings .payment-section {
  margin-top: .85rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
}

.admin-body #tab-settings .payment-section__summary {
  padding: .85rem 1rem;
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
}

.admin-body #tab-settings .payment-section__body {
  padding: 1rem;
  border-top: 1px solid var(--admin-line);
}

.admin-body #tab-settings .settings-form-actions {
  margin: 1.5rem -1.75rem -1.75rem;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--admin-line);
  background: #f7f1e9;
}

@media (max-width: 680px) {
  .admin-body #tab-settings .settings-subtabs {
    margin: -1.25rem -1.25rem 1.25rem;
    padding-inline: .65rem;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .admin-body #tab-settings .settings-subtab { white-space: nowrap; }
  .admin-body #tab-settings .settings-form-actions {
    margin: 1.25rem -1.25rem -1.25rem;
    padding: 1rem 1.25rem;
  }
}

/* Statistics: separate quick choices from the custom date range. */
.admin-body #tab-estadisticas > .panel-header { align-items: stretch; }
.admin-body #tab-estadisticas .stats-controls {
  display: grid;
  grid-template-columns: auto minmax(340px, 1fr) auto;
  align-items: end;
  gap: .75rem;
  margin-top: .9rem;
  padding: .75rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #f7f1e9;
}
.admin-body #tab-estadisticas .stats-filter-group { display: grid; gap: .35rem; }
.admin-body #tab-estadisticas .stats-filter-group__label {
  color: #70675f;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.admin-body #tab-estadisticas .stats-presets { gap: .25rem; }
.admin-body #tab-estadisticas .stats-preset-btn {
  min-height: 36px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  color: #5d534b;
}
.admin-body #tab-estadisticas .stats-preset-btn:hover { border-color: #b77b57; background: #fff8f1; }
.admin-body #tab-estadisticas .stats-preset-btn--active {
  border-color: var(--admin-accent);
  background: var(--admin-accent);
  color: #fff;
}
.admin-body #tab-estadisticas .stats-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.admin-body #tab-estadisticas .stats-range__field {
  display: grid;
  gap: .25rem;
  color: #70675f;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-body #tab-estadisticas .stats-range input {
  width: 100%;
  min-height: 38px;
  color: var(--admin-ink);
}
.admin-body #tab-estadisticas #stats-apply-btn { min-height: 38px; margin-bottom: 0; }
.admin-body #tab-estadisticas .stats-chart-wrap { padding: .35rem 0 .1rem; }
.admin-body #tab-estadisticas .stats-bar-label { fill: #62584e; font-size: 10px; font-weight: 700; }
.admin-body #tab-estadisticas .stats-bar-tick { fill: #776d63; }

@media (max-width: 1000px) {
  .admin-body #tab-estadisticas .stats-controls { grid-template-columns: 1fr auto; }
  .admin-body #tab-estadisticas .stats-filter-group--range { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .admin-body #tab-estadisticas .stats-controls { grid-template-columns: 1fr; }
  .admin-body #tab-estadisticas .stats-filter-group--range { grid-column: auto; }
  .admin-body #tab-estadisticas .stats-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body #tab-estadisticas .stats-range { grid-template-columns: 1fr; }
  .admin-body #tab-estadisticas #stats-apply-btn { width: 100%; }
}

/* Support: bring tickets, conversation and filters into the editorial admin system. */
.admin-body #tab-soporte > .panel-header {
  align-items: flex-end;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}
.admin-body #tab-soporte .settings-card {
  border: 1px solid var(--admin-line);
  border-top: 3px solid #c18d67;
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}
.admin-body #tab-soporte .settings-card__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: -.025em;
}
.admin-body #tab-soporte .field > span,
.admin-body #tab-soporte .field > label {
  color: #62584e;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.admin-body #tab-soporte input,
.admin-body #tab-soporte select,
.admin-body #tab-soporte textarea {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}
.admin-body #tab-soporte textarea { min-height: 104px; }
.admin-body #tab-soporte input:focus,
.admin-body #tab-soporte select:focus,
.admin-body #tab-soporte textarea:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}
.admin-body #tab-soporte .support-filters {
  margin-bottom: .9rem;
  padding: .55rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #f7f1e9;
}
.admin-body #tab-soporte .support-ticket-list { gap: .45rem; }
.admin-body #tab-soporte .support-ticket-card {
  border: 1px solid var(--admin-line);
  border-left: 3px solid #c18d67;
  border-radius: 2px;
  background: #fffdf9;
  color: var(--admin-ink);
  box-shadow: none;
}
.admin-body #tab-soporte .support-ticket-card:hover,
.admin-body #tab-soporte .support-ticket-card--active {
  border-color: #b77b57;
  border-left-color: var(--admin-accent);
  background: #f8f1e9;
  box-shadow: none;
}
.admin-body #tab-soporte .support-ticket-card__subject {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
}
.admin-body #tab-soporte .support-badge,
.admin-body #tab-soporte .support-priority {
  border-radius: 2px;
  font-size: .67rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.admin-body #tab-soporte .support-thread {
  padding: .25rem;
  border: 1px solid var(--admin-line);
  background: #f7f1e9;
}
.admin-body #tab-soporte .support-message {
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
}
.admin-body #tab-soporte .support-message--support {
  border-color: #c8a188;
  background: #f8ede3;
}
.admin-body #tab-soporte .support-reply {
  border-top-color: var(--admin-line);
}

/* Help is an embedded guide: frame it as a clean editorial document. */
.admin-body #tab-ayuda {
  padding: 0;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-top: 3px solid #c18d67;
  border-radius: 2px;
  overflow: hidden;
}
.admin-body #tab-ayuda .help-iframe {
  height: calc(100vh - 7.5rem);
  border-radius: 0;
  background: var(--admin-surface);
}

.admin-body #tab-roles #roles-list,
.admin-body #tab-usuarios #users-list { display: grid; gap: .7rem; }
.admin-body #tab-roles .shift-card,
.admin-body #tab-usuarios .shift-card {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--admin-line);
  border-left: 3px solid #c18d67;
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}
.admin-body #tab-roles .shift-card__name,
.admin-body #tab-usuarios .shift-card__name {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
}
.admin-body #tab-roles .shift-card__desc,
.admin-body #tab-usuarios .shift-card__desc { color: var(--admin-muted); font-style: normal; }

.admin-body #tab-estadisticas .stats-controls {
  padding: .65rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: rgba(255, 253, 249, .78);
}
.admin-body #tab-estadisticas .stats-preset-btn--active { background: var(--admin-accent); border-color: var(--admin-accent); }
.admin-body #tab-estadisticas .stats-range input {
  min-height: 36px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
}
.admin-body #tab-estadisticas .stats-kpi-card,
.admin-body #tab-estadisticas .stats-chart-card {
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}
.admin-body #tab-estadisticas .stats-kpi-card { border-top: 3px solid #c18d67; }
.admin-body #tab-estadisticas .stats-kpi-card__value {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
}
.admin-body #tab-estadisticas .stats-chart-card__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
}

.admin-body .price-list-modal,
.admin-body #price-item-modal .modal,
.admin-body #catalog-product-modal .modal,
.admin-body #catalog-category-modal .modal,
.admin-body #catalog-modifier-modal .modal {
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-accent);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}
.admin-body .price-list-modal .modal__title,
.admin-body #price-item-modal .modal__title,
.admin-body #catalog-product-modal .modal__title,
.admin-body #catalog-category-modal .modal__title,
.admin-body #catalog-modifier-modal .modal__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -.03em;
}

@media (max-width: 680px) {
  .admin-body #tab-roles > .panel-header,
  .admin-body #tab-usuarios > .panel-header,
  .admin-body #tab-clientes > .panel-header,
  .admin-body #tab-catalogo > .panel-header,
  .admin-body #tab-precios > .panel-header,
  .admin-body #tab-web-publica > .panel-header,
  .admin-body #tab-settings > .panel-header,
  .admin-body #tab-logs > .panel-header,
  .admin-body #tab-estadisticas > .panel-header { align-items: stretch; }
}

.admin-body .cap-legend {
  gap: .35rem;
  margin: 0 0 1rem;
  padding: .45rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: rgba(255, 253, 249, .78);
}

.admin-body .cap-legend__label {
  margin: 0 .45rem 0 .15rem;
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: .95rem;
}

.admin-body .cap-legend__item {
  gap: .28rem;
  padding: .25rem .45rem;
  border-left: 2px solid #b8ada2;
  color: #6e645b;
  font-size: .7rem;
}
.admin-body .cap-legend__item:nth-of-type(2) { border-left-color: #7f9a83; }
.admin-body .cap-legend__item:nth-of-type(3) { border-left-color: #748ea4; }
.admin-body .cap-legend__item:nth-of-type(4) { border-left-color: #c5953f; }
.admin-body .cap-legend__item:nth-of-type(5) { border-left-color: #b75e51; }

.admin-body .cap-grid { gap: .75rem; }
.admin-body .cap-shift-block {
  padding: 0;
  border: 1px solid var(--admin-line);
  border-top: 3px solid #c18d67;
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
  overflow: hidden;
}

.admin-body .cap-shift-header {
  align-items: center;
  gap: .55rem;
  margin: 0;
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--admin-line);
  background: #f3ede5;
}

.admin-body .cap-shift-header > span:first-child {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: #302a26;
  font-size: .8rem;
}

.admin-body .cap-shift-header strong {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
}
.admin-body .cap-shift-range { color: var(--admin-muted); font-size: .72rem; }

.admin-body .cap-slot-row {
  grid-template-columns: 48px minmax(120px, 1fr) minmax(54px, max-content);
  gap: .75rem;
  padding: .48rem .9rem;
  border-bottom-color: #e7ded4;
}
.admin-body .cap-slot-row:hover { background: #faf5ee; }
.admin-body .cap-slot-time { color: #5d534b; font-size: .74rem; }
.admin-body .cap-bar { height: 8px; border-radius: 0; background: #e5dbd0; }
.admin-body .cap-bar__fill { border-radius: 0; background: var(--admin-accent); }
.admin-body .cap-bar--low .cap-bar__fill { background: #7f9a83; }
.admin-body .cap-bar--medium .cap-bar__fill { background: #748ea4; }
.admin-body .cap-bar--high .cap-bar__fill { background: #c5953f; }
.admin-body .cap-bar--full .cap-bar__fill { background: #b75e51; }

.admin-body .cap-bar__label {
  border: 0;
  border-radius: 2px;
  background: #fffdf9;
  color: #5d534b;
  box-shadow: 0 1px 3px rgba(41, 35, 31, .12);
  font-size: .61rem;
}
.admin-body .cap-slot-count { color: var(--admin-ink); font-size: .74rem; font-weight: 700; }

@media (max-width: 680px) {
  .admin-body #tab-ocupacion > .panel-header { align-items: stretch; }
  .admin-body .cap-legend { flex-wrap: wrap; white-space: normal; }
  .admin-body .cap-legend__label { width: 100%; }
  .admin-body .cap-slot-row { padding-inline: .7rem; }
}
@media (max-width: 680px) {
  .admin-body #tab-bloqueos > .panel-header { align-items: stretch; }
  .admin-body .block-config-card { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); padding: 1.25rem; }
  .admin-body .block-editor__header { align-items: stretch; flex-direction: column; }
  .admin-body .block-editor__header-actions { justify-content: flex-start; }
}

.admin-body .shift-editor__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.admin-body .shift-editor__header-actions .btn { min-height: 36px; white-space: nowrap; }
.shift-actions-dropdown { position: relative; }
.shift-actions-dropdown__menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 20;
  min-width: 175px;
  padding: .3rem 0;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(41, 35, 31, .15);
}

.shift-actions-dropdown__menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #ad3428;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: .55rem .8rem;
  text-align: left;
}

.shift-actions-dropdown__menu button:hover { background: #fbeceb; color: #8f281e; }

/* User editor: matches the header action pattern used by operational sheets. */
.admin-body .user-config-card {
  width: min(780px, calc(100vw - 2rem));
  max-width: 780px;
  max-height: min(820px, calc(100vh - 2rem));
  padding: 1.75rem;
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-accent);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}
.admin-body .user-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}
.admin-body .user-editor__eyebrow {
  display: block;
  margin-bottom: .45rem;
  color: var(--admin-accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.admin-body .user-config-card .settings-card__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: -.03em;
}
.admin-body .user-editor__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}
.admin-body .user-editor__header-actions .btn { min-height: 36px; white-space: nowrap; }
.user-actions-dropdown { position: relative; }
.user-actions-dropdown__menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 20;
  min-width: 175px;
  padding: .3rem 0;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(41, 35, 31, .15);
}
.user-actions-dropdown__menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #ad3428;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: .55rem .8rem;
  text-align: left;
}
.user-actions-dropdown__menu button:hover { background: #fbeceb; color: #8f281e; }

@media (max-width: 680px) {
  .admin-body .user-config-card { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); padding: 1.25rem; }
  .admin-body .user-editor__header { align-items: stretch; flex-direction: column; }
  .admin-body .user-editor__header-actions { justify-content: flex-start; }
}

/* Catalog: lists, dictionaries and editor sheets share the current admin language. */
.admin-body #new-user-form input[type="text"],
.admin-body #new-user-form input[type="password"] {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}
.admin-body #new-user-form input[type="text"]:focus,
.admin-body #new-user-form input[type="password"]:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}

.admin-body #tab-catalogo .panel-header__actions { gap: .4rem; }
.admin-body #tab-catalogo .catalog-toolbar {
  margin-bottom: 1rem;
  padding: .65rem;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: rgba(255, 253, 249, .78);
}
.admin-body #tab-catalogo .catalog-search,
.admin-body #tab-catalogo .catalog-toolbar select {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}
.admin-body #tab-catalogo .catalog-search:focus,
.admin-body #tab-catalogo .catalog-toolbar select:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}
.admin-body #tab-catalogo .catalog-table-wrap {
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: none;
}
.admin-body #tab-catalogo .catalog-table tbody tr { cursor: pointer; }
.admin-body #tab-catalogo .catalog-table tbody tr:hover td { background: #f8f1e9; }

.admin-body [id^="catalog-"][id$="-modal"] > .modal.admin-form-modal {
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-accent);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}
.admin-body [id^="catalog-"][id$="-modal"] .modal__title {
  color: var(--admin-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.45rem;
  letter-spacing: -.03em;
}
.admin-body [id^="catalog-"][id$="-modal"] > .modal.admin-form-modal > .modal__title:not(#catalog-product-modal-title) {
  margin: 0 0 1.25rem;
  padding-bottom: .95rem;
  border-bottom: 1px solid var(--admin-line);
}
.admin-body [id^="catalog-"][id$="-modal"] .field input:not([type="checkbox"]),
.admin-body [id^="catalog-"][id$="-modal"] .field select,
.admin-body [id^="catalog-"][id$="-modal"] .field textarea {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}
.admin-body [id^="catalog-"][id$="-modal"] .field textarea { min-height: 88px; }
.admin-body [id^="catalog-"][id$="-modal"] .field input:focus,
.admin-body [id^="catalog-"][id$="-modal"] .field select:focus,
.admin-body [id^="catalog-"][id$="-modal"] .field textarea:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}
.admin-body [id^="catalog-"][id$="-modal"] .table-wrapper {
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}
.admin-body [id^="catalog-"][id$="-modal"] .reservations-table th {
  background: #f1ebe3;
  color: #645a50;
  font-size: .66rem;
  letter-spacing: .085em;
}
.admin-body [id^="catalog-"][id$="-modal"] .reservations-table td { border-top-color: #e7ded4; }
.admin-body [id^="catalog-"][id$="-modal"] .reservations-table tbody tr:hover td { background: #f8f1e9; }
.admin-body [id^="catalog-"][id$="-modal"] .reservations-table input:not([type="checkbox"]),
.admin-body [id^="catalog-"][id$="-modal"] .reservations-table select {
  min-height: 32px;
  border: 1px solid #d8cec3;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}
.admin-body [id^="catalog-"][id$="-modal"] .reservations-table input:focus,
.admin-body [id^="catalog-"][id$="-modal"] .reservations-table select:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .1);
}
.admin-body [id^="catalog-"][id$="-modal"] .form-actions {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-line);
}

.admin-body .catalog-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}
.admin-body .catalog-editor__eyebrow {
  display: block;
  margin-bottom: .45rem;
  color: var(--admin-accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.admin-body .catalog-editor__header .modal__title { margin: 0; }
.admin-body .catalog-editor__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}
.admin-body .catalog-editor__header-actions .btn { min-height: 36px; white-space: nowrap; }
.admin-body .catalog-editor__header-actions .catalog-product-actions { position: relative; }
.admin-body .catalog-editor__header-actions .catalog-product-actions__panel {
  right: 0;
  left: auto;
  min-width: 185px;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(41, 35, 31, .15);
}
.admin-body .catalog-product-footer {
  justify-content: flex-start;
  margin-top: 1.15rem;
}
.admin-body .catalog-product-footer__actions { display: none; }

/* Price lists and price lines use the same sheet hierarchy as catalog editors. */
.admin-body .price-list-modal,
.admin-body .price-item-modal {
  width: min(860px, calc(100vw - 2rem));
  max-width: 860px;
  max-height: min(820px, calc(100vh - 2rem));
  padding: 1.75rem;
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-accent);
  border-radius: 2px;
  background: var(--admin-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}
.admin-body .price-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-line);
}
.admin-body .price-editor__eyebrow {
  display: block;
  margin-bottom: .45rem;
  color: var(--admin-accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.admin-body .price-editor__header .modal__title { margin: 0; }
.admin-body .price-editor__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}
.admin-body .price-editor__header-actions .btn { min-height: 36px; white-space: nowrap; }
.admin-body .price-editor__actions { position: relative; }
.admin-body .price-editor__actions summary { list-style: none; }
.admin-body .price-editor__actions summary::-webkit-details-marker { display: none; }
.admin-body .price-editor__actions-menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 20;
  min-width: 165px;
  padding: .3rem 0;
  border: 1px solid var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(41, 35, 31, .15);
}
.admin-body .price-editor__actions-menu button {
  width: 100%;
  padding: .55rem .8rem;
  border: 0;
  background: transparent;
  color: #ad3428;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  text-align: left;
}
.admin-body .price-editor__actions-menu button:hover { background: #fbeceb; color: #8f281e; }
.admin-body .price-list-modal .field input:not([type="checkbox"]),
.admin-body .price-list-modal .field select,
.admin-body .price-list-modal .field textarea,
.admin-body .price-item-modal .field input:not([type="checkbox"]),
.admin-body .price-item-modal .field select,
.admin-body .price-item-modal .field textarea {
  min-height: 40px;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  box-shadow: none;
}
.admin-body .price-list-modal .field textarea { min-height: 78px; }
.admin-body .price-list-modal .field input:focus,
.admin-body .price-list-modal .field select:focus,
.admin-body .price-list-modal .field textarea:focus,
.admin-body .price-item-modal .field input:focus,
.admin-body .price-item-modal .field select:focus,
.admin-body .price-item-modal .field textarea:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}
.admin-body .price-list-modal > .form-actions,
.admin-body .price-item-modal > .form-actions { display: none; }
.admin-body .price-list-modal #price-list-items-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-line);
}
.admin-body .price-list-modal #price-list-items-section h4 {
  color: var(--admin-ink) !important;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem !important;
}

@media (max-width: 680px) {
  .admin-body .price-list-modal,
  .admin-body .price-item-modal { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); padding: 1.25rem; }
  .admin-body .price-editor__header { align-items: stretch; flex-direction: column; }
  .admin-body .price-editor__header-actions { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .admin-body .catalog-editor__header { align-items: stretch; flex-direction: column; }
  .admin-body .catalog-editor__header-actions { justify-content: flex-start; }
}

.admin-body .table-config-card .field label {
  color: #62584e;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.admin-body .table-config-card input,
.admin-body .table-config-card select,
.admin-body .table-config-card textarea {
  border-color: #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
}

.admin-body .table-mini-card,
.admin-body .combination-table-choice {
  border-color: var(--admin-line);
  border-radius: 2px;
  background: #fffdf9;
}

.admin-body .table-mini-card { border-left: 3px solid #c18d67; }
.admin-body .table-mini-card strong,
.admin-body .combination-table-choice strong { color: var(--admin-ink); }
.admin-body .table-mini-card small,
.admin-body .combination-table-choice small { color: var(--admin-muted); }

.admin-body .combination-table-choice:hover {
  border-color: #b99a83;
  background: #f9f0e8;
}

.admin-body #tab-mesas .mob-card {
  border-color: var(--admin-line);
  border-left: 3px solid #c18d67;
  border-radius: 2px;
  background: var(--admin-surface);
}

@media (max-width: 680px) {
  .admin-body #tab-mesas > .panel-header { align-items: stretch; }
  .admin-body .table-module-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body .table-module-tab { justify-content: space-between; padding-inline: .65rem; }
  .admin-body .list-header { align-items: stretch; flex-direction: column; }
  .admin-body .list-header__actions .btn { flex: 1 1 auto; }
  .admin-body .table-config-card__header { align-items: stretch; flex-direction: column; }
  .admin-body .table-config-card__header-actions { justify-content: flex-start; }
  .admin-body .shift-editor__header { align-items: stretch; flex-direction: column; }
  .admin-body .shift-editor__header-actions { justify-content: flex-start; }
  .admin-body .shifts-add-card { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); padding: 1.25rem; }
  .admin-body #tab-turnos .shift-card { grid-template-columns: 1fr; row-gap: .8rem; }
  .admin-body #tab-turnos .shift-card__days { justify-content: flex-start; border-left: 0; border-top: 1px solid #e3dbd1; padding: .75rem 0 0; }
  .admin-body #tab-turnos .shift-card__actions { grid-column: 1; justify-content: flex-start; }
}

/* Logs: retain the operational controls within the editorial admin system. */
.admin-body #tab-logs .log-retention {
  align-items: flex-end;
  gap: 1.5rem;
  padding: 1rem 0 1.15rem;
}

.admin-body #tab-logs .log-retention__controls {
  align-items: flex-end;
  gap: .55rem;
}

.admin-body #tab-logs .log-retention__days {
  min-width: 164px;
}

.admin-body #tab-logs .log-retention__days span {
  margin-bottom: .42rem;
  color: #62584e;
  font-family: 'DM Sans', sans-serif;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .09em;
}

.admin-body #tab-logs #log-retention-days {
  min-height: 40px;
  padding: .55rem .7rem;
  border: 1px solid #cfc4b8;
  border-radius: 2px;
  background: #fffdf9;
  color: var(--admin-ink);
  font-family: 'DM Sans', sans-serif;
  box-shadow: none;
}

.admin-body #tab-logs #log-retention-days:focus {
  border-color: var(--admin-accent);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(139, 75, 45, .12);
}

.admin-body #tab-logs #save-log-retention-btn {
  min-height: 40px;
  padding-inline: .9rem;
  border-radius: 2px;
}

.admin-body #tab-logs .log-actions {
  margin-top: 0;
  padding-top: 1rem;
  border-top-color: var(--admin-line);
}

@media (max-width: 680px) {
  .admin-body #tab-logs .log-retention { align-items: stretch; }
  .admin-body #tab-logs .log-retention__controls { width: 100%; }
  .admin-body #tab-logs .log-retention__days { flex: 1 1 150px; }
}
