/* ══════════════════════════════════════════════════════════════════════════════
   Sistema Snack & Comida Rápida — Estilos Globales
   ══════════════════════════════════════════════════════════════════════════════ */

:root {
  --primary:    #1a1f36;
  --accent:     #ff6b35;
  --accent2:    #f7c59f;
  --success:    #27ae60;
  --danger:     #e74c3c;
  --warning:    #f39c12;
  --info:       #3498db;
  --purple:     #9b59b6;
  --light-bg:   #f4f6fa;
  --card-bg:    #ffffff;
  --border:     #dee2e6;
  --text:       #2c3e50;
  --text-muted: #6c757d;
  --shadow:     0 2px 12px rgba(0,0,0,.10);
  --radius:     12px;
  --radius-sm:  6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--light-bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Navbar ─────────────────────────────────────────────────────────────────── */

.navbar-main {
  background: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  padding: .6rem 1.25rem;
}
.navbar-main .navbar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent) !important;
  letter-spacing: .5px;
}
.navbar-main .nav-link {
  color: #cdd3e0 !important;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: .4rem .8rem !important;
  transition: background .2s, color .2s;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  background: rgba(255,107,53,.18);
  color: var(--accent) !important;
}

/* ── Cards generales ────────────────────────────────────────────────────────── */

.card-stat {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  border-left: 5px solid var(--accent);
  transition: transform .15s;
}
.card-stat:hover { transform: translateY(-2px); }
.card-stat .icon {
  font-size: 2.4rem;
  opacity: .85;
}
.card-stat .value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.card-stat .label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.card-stat.green  { border-color: var(--success); }
.card-stat.blue   { border-color: var(--info);    }
.card-stat.purple { border-color: var(--purple);  }
.card-stat.red    { border-color: var(--danger);  }

/* ── Status badges ──────────────────────────────────────────────────────────── */

.status-badge {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge-abierta    { background: #e8f4fd; color: #2471a3; }
.badge-cocina     { background: #fef9e7; color: #d68910; }
.badge-preparando { background: #fdebd0; color: #ca6f1e; }
.badge-lista      { background: #eafaf1; color: #1e8449; }
.badge-entregada  { background: #e8daef; color: #6c3483; }
.badge-pagada     { background: #d5f5e3; color: #1a5276; border: 1px solid #a9dfbf; }
.badge-cancelada  { background: #fadbd8; color: #922b21; }

/* ── Botones ────────────────────────────────────────────────────────────────── */

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .5rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-accent:hover { background: #e55a25; }
.btn-accent:active { transform: scale(.97); }

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: .5rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: #fff;
}

/* ── POS ────────────────────────────────────────────────────────────────────── */

.pos-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1rem;
  padding: 1rem;
  height: calc(100vh - 62px);
  overflow: hidden;
}

/* Product panel */
.pos-left {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  overflow: hidden;
}
.category-tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.cat-tab {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: .35rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.cat-tab:hover { border-color: var(--accent); color: var(--accent); }
.cat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.product-search {
  position: relative;
}
.product-search input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: .5rem 1rem .5rem 2.6rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
.product-search input:focus { border-color: var(--accent); }
.product-search .search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .7rem;
  overflow-y: auto;
  padding-right: 4px;
}
.product-grid::-webkit-scrollbar { width: 6px; }
.product-grid::-webkit-scrollbar-track { background: transparent; }
.product-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.product-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem .7rem;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  user-select: none;
  position: relative;
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.product-card:active { transform: scale(.97); }
.product-card.unavailable { opacity: .4; cursor: not-allowed; }
.product-card .prod-icon { font-size: 2rem; margin-bottom: .3rem; }
.product-card .prod-image {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto .35rem;
  display: block;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.product-card .prod-name { font-size: .78rem; font-weight: 600; line-height: 1.2; margin-bottom: .3rem; }
.product-card .prod-price { font-size: .95rem; font-weight: 700; color: var(--accent); }
.product-card .prod-desc { font-size: .65rem; color: var(--text-muted); margin-top: .2rem; line-height: 1.2; }

/* Order panel */
.pos-right {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.order-header {
  background: var(--primary);
  color: #fff;
  padding: .9rem 1rem;
}
.order-type-btns { display: flex; gap: .4rem; margin-top: .5rem; }
.order-type-btn {
  flex: 1;
  background: rgba(255,255,255,.12);
  border: 2px solid transparent;
  border-radius: 6px;
  color: #ccc;
  font-size: .72rem;
  font-weight: 600;
  padding: .3rem .2rem;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.order-type-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.order-meta { display: flex; gap: .5rem; margin-top: .5rem; }
.order-meta input {
  flex: 1;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  color: #fff;
  padding: .3rem .6rem;
  font-size: .8rem;
  outline: none;
}
.order-meta input::placeholder { color: rgba(255,255,255,.5); }

.order-items {
  flex: 1;
  overflow-y: auto;
  padding: .6rem;
}
.order-items::-webkit-scrollbar { width: 5px; }
.order-items::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.order-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .3rem;
  padding: .5rem;
  border-radius: 8px;
  margin-bottom: .4rem;
  background: #f8f9fa;
  border: 1px solid transparent;
  transition: border-color .15s;
}
.order-item:hover { border-color: var(--accent); }
.order-item-name { font-size: .82rem; font-weight: 600; }
.order-item-note { font-size: .7rem; color: var(--text-muted); font-style: italic; }
.order-item-price { font-size: .82rem; font-weight: 700; color: var(--accent); text-align: right; }
.qty-controls {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .3rem;
}
.qty-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  transition: background .15s;
}
.qty-btn.minus { background: #fee; color: var(--danger); }
.qty-btn.minus:hover { background: var(--danger); color: #fff; }
.qty-btn.plus  { background: #efe; color: var(--success); }
.qty-btn.plus:hover { background: var(--success); color: #fff; }
.qty-val { font-weight: 700; min-width: 20px; text-align: center; font-size: .9rem; }
.note-btn {
  background: none; border: 1px solid #ccc; border-radius: 4px;
  font-size: .65rem; color: var(--text-muted); cursor: pointer; padding: 1px 5px;
  transition: all .15s;
}
.note-btn:hover { border-color: var(--info); color: var(--info); }

.order-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}
.order-empty i { font-size: 3rem; opacity: .3; }

.order-footer { padding: .7rem; border-top: 1px solid var(--border); }
.total-row { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .2rem; }
.total-row.grand { font-size: 1.15rem; font-weight: 700; }
.discount-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .4rem;
}
.discount-row label { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
.discount-row input {
  width: 80px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .25rem .4rem;
  font-size: .8rem;
  text-align: right;
}
.action-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .6rem; }
.action-btns button { padding: .6rem; font-size: .82rem; }
.btn-kitchen {
  background: #e67e22;
  color: #fff; border: none; border-radius: 8px;
  font-weight: 700; cursor: pointer; transition: background .2s;
  display: flex; align-items: center; justify-content: center; gap: .3rem;
}
.btn-kitchen:hover { background: #ca6f1e; }
.btn-pay {
  background: var(--success);
  color: #fff; border: none; border-radius: 8px;
  font-weight: 700; cursor: pointer; transition: background .2s;
  display: flex; align-items: center; justify-content: center; gap: .3rem;
}
.btn-pay:hover { background: #219a52; }
.btn-cancel {
  background: #fff; color: var(--danger);
  border: 2px solid var(--danger); border-radius: 8px;
  font-weight: 700; cursor: pointer; transition: all .2s;
}
.btn-cancel:hover { background: var(--danger); color: #fff; }
.btn-clear {
  background: #fff; color: var(--text-muted);
  border: 2px solid var(--border); border-radius: 8px;
  font-weight: 600; cursor: pointer; transition: all .2s;
}
.btn-clear:hover { border-color: var(--text-muted); color: var(--text); }

/* ── Cocina ─────────────────────────────────────────────────────────────────── */

body.cocina-page {
  background: #111827;
  color: #f1f5f9;
}
.cocina-header {
  background: #0f172a;
  padding: .8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #1e293b;
}
.cocina-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}
.cocina-clock {
  font-size: 1.5rem;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.cocina-refresh-bar {
  height: 4px;
  background: #1e293b;
  position: relative;
}
.cocina-refresh-progress {
  height: 100%;
  background: var(--accent);
  transition: width .5s linear;
}
.cocina-stats {
  display: flex;
  gap: 1rem;
  padding: .7rem 1.5rem;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}
.cocina-stat {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: #94a3b8;
}
.cocina-stat strong { color: #f1f5f9; font-size: 1.1rem; }

.cocina-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  padding: 1rem;
  overflow-y: auto;
  height: calc(100vh - 130px);
}
.cocina-card {
  background: #1e293b;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
  transition: border-color .2s;
}
.cocina-card.urgent { border-color: var(--danger); }
.cocina-card.warning { border-color: var(--warning); }
.cocina-card.ready { border-color: var(--success); }

.cocina-card-header {
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cocina-order-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
}
.cocina-order-type {
  font-size: .78rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}
.cocina-timer {
  font-size: .85rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 50px;
  font-variant-numeric: tabular-nums;
}
.cocina-timer.green  { background: #14532d; color: #4ade80; }
.cocina-timer.yellow { background: #713f12; color: #fbbf24; }
.cocina-timer.red    { background: #7f1d1d; color: #f87171; }

.cocina-items { padding: .5rem 1rem; flex: 1; }
.cocina-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .5rem;
  border-radius: 6px;
  margin-bottom: .3rem;
  background: #0f172a;
  cursor: pointer;
  transition: background .15s;
}
.cocina-item:hover { background: #1e3a5f; }
.cocina-item.done {
  opacity: .5;
  text-decoration: line-through;
}
.cocina-item .qty-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: .1rem .4rem;
  font-size: .85rem;
  font-weight: 800;
  min-width: 28px;
  text-align: center;
}
.cocina-item .item-name {
  flex: 1;
  font-size: .92rem;
  font-weight: 600;
  color: #e2e8f0;
}
.cocina-item .item-note {
  font-size: .7rem;
  color: #fbbf24;
  font-style: italic;
}

.cocina-card-footer {
  padding: .6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  border-top: 1px solid #334155;
}
.btn-cocina-action {
  padding: .55rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .82rem;
  border: none;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: .3rem;
}
.btn-start  { background: #92400e; color: #fde68a; }
.btn-start:hover { background: #b45309; }
.btn-done   { background: #14532d; color: #86efac; }
.btn-done:hover { background: #166534; }
.btn-deliver { background: #312e81; color: #a5b4fc; }
.btn-deliver:hover { background: #3730a3; }

.cocina-empty {
  grid-column: 1/-1;
  text-align: center;
  color: #475569;
  padding: 4rem 2rem;
}
.cocina-empty i { font-size: 5rem; }

/* ── Menu Management ────────────────────────────────────────────────────────── */

.menu-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  padding: 1rem;
  height: calc(100vh - 62px);
  overflow: hidden;
}
.menu-sidebar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.menu-sidebar-header {
  background: var(--primary);
  color: #fff;
  padding: .9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.category-list { overflow-y: auto; flex: 1; }
.category-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background .15s;
}
.category-item:hover { background: #f8f9fa; }
.category-item.active { background: #fff3ee; border-left: 3px solid var(--accent); }
.category-item .cat-icon { font-size: 1.3rem; }
.category-item .cat-name { flex: 1; font-weight: 600; font-size: .9rem; }
.category-item .cat-count {
  background: #eee; border-radius: 50px;
  font-size: .7rem; padding: .1rem .5rem; color: var(--text-muted);
}

.menu-content {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.menu-module-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .9rem 1.2rem .55rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}
.module-tab {
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: .38rem .95rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  transition: all .15s ease;
}
.module-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.module-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 107, 53, .25);
}
.menu-content-header {
  padding: .9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ingredient-date-filter {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
  color: var(--text-muted);
  font-weight: 600;
}
.ingredient-date-filter input[type="date"] {
  padding: .4rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.ingredient-date-filter input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, .15);
}
.table-action-btn {
  border: none;
  border-radius: 6px;
  padding: .3rem .7rem;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  transition: all .15s;
}
.table-action-btn.edit {
  background: #e8f4fd;
  color: #2471a3;
}
.table-action-btn.edit:hover {
  background: #2471a3;
  color: #fff;
}
.table-action-btn.delete {
  background: #fadbd8;
  color: #922b21;
}
.table-action-btn.delete:hover {
  background: #c0392b;
  color: #fff;
}
.table-action-btn.add {
  background: #eafaf1;
  color: #1e8449;
}
.table-action-btn.add:hover {
  background: #1e8449;
  color: #fff;
}
.recipe-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .6rem;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  padding: .55rem;
}
.recipe-row .recipe-fields {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: .5rem;
}
.recipe-row input,
.recipe-row select {
  width: 100%;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .86rem;
}
.recipe-row .readonly-unit {
  background: #f1f3f8;
}
.recipe-remove-btn {
  background: #fadbd8;
  color: #922b21;
  border: none;
  border-radius: 8px;
  padding: .6rem 1rem;
  cursor: pointer;
  font-weight: 700;
  transition: all .15s;
}
.recipe-remove-btn:hover {
  background: #c0392b;
  color: #fff;
}
.products-table-wrap { overflow-y: auto; flex: 1; }
table.products-table {
  width: 100%;
  border-collapse: collapse;
}
.products-table th {
  background: #f8f9fa;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  padding: .6rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  position: sticky; top: 0;
}
.products-table td {
  padding: .65rem 1rem;
  font-size: .88rem;
  border-bottom: 1px solid #f4f4f4;
  vertical-align: middle;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}
.products-table tr:hover td { background: #fafafa; }
.availability-toggle {
  display: flex; align-items: center; gap: .3rem;
}
.toggle-switch {
  position: relative; width: 38px; height: 22px; cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #ccc; border-radius: 22px;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ── Reportes ───────────────────────────────────────────────────────────────── */

.reportes-layout { padding: 1rem; overflow-y: auto; height: calc(100vh - 62px); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.section-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1rem;
}
.section-card-header {
  background: var(--primary);
  color: #fff;
  padding: .75rem 1.2rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
}
.section-card-body { padding: 1rem 1.2rem; }

/* Charts (canvas) */
.chart-wrap { position: relative; height: 250px; }

/* ── Modal ──────────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform .2s;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-header {
  background: var(--primary);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 700;
}
.modal-close {
  background: none; border: none; color: #fff;
  font-size: 1.3rem; cursor: pointer; opacity: .7;
}
.modal-close:hover { opacity: 1; }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: .75rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; }

/* Form styles inside modal */
.form-group { margin-bottom: .9rem; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-muted); margin-bottom: .25rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

/* Payment modal specifics */
.payment-amount {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  text-align: center;
  padding: .5rem 0 1rem;
}
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.payment-method-btn {
  padding: .8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: .88rem;
  transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.payment-method-btn i { font-size: 1.5rem; }
.payment-method-btn:hover { border-color: var(--accent); }
.payment-method-btn.active { border-color: var(--accent); background: #fff3ee; color: var(--accent); }
.change-display {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: var(--radius);
  padding: .8rem;
  text-align: center;
  margin-top: .7rem;
}
.change-display .change-label { font-size: .8rem; color: var(--text-muted); }
.change-display .change-amount { font-size: 1.8rem; font-weight: 700; color: var(--success); }

/* Receipt print styles */
.receipt-preview {
  font-family: 'Courier New', monospace;
  color: #111;
}
.receipt-ticket {
  width: min(80mm, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .12);
}
.receipt-ticket-inner {
  width: 72mm;
  max-width: 100%;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.25;
}
.receipt-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.receipt-logo {
  width: 28mm;
  height: 28mm;
  object-fit: contain;
  flex: 0 0 auto;
}
.receipt-store-block { flex: 1; min-width: 0; }
.receipt-store-name {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.receipt-store-subtitle {
  font-size: .85rem;
  font-weight: 700;
  margin-top: 2px;
}
.receipt-store-meta {
  font-size: .72rem;
  margin-top: 2px;
  color: #374151;
}
.receipt-divider {
  border-top: 1px dashed #111;
  margin: 8px 0;
}
.receipt-meta {
  font-size: .72rem;
  display: grid;
  gap: 2px;
}
.receipt-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.receipt-line-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.receipt-item-name {
  flex: 1;
  display: flex;
  gap: 4px;
  min-width: 0;
}
.receipt-qty { font-weight: 700; white-space: nowrap; }
.receipt-item-price { white-space: nowrap; font-weight: 700; }
.receipt-item-note {
  font-size: .68rem;
  padding-left: 16px;
  color: #4b5563;
}
.receipt-totals {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.receipt-total-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: .76rem;
}
.receipt-total-row.grand {
  font-size: .92rem;
  font-weight: 900;
}
.receipt-footer {
  text-align: center;
  font-size: .76rem;
  font-weight: 700;
}

.receipt-preview::-webkit-scrollbar { width: 8px; }
.receipt-preview::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
}

/* ── Toast notifications ─────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast-msg {
  background: #1e293b;
  color: #f1f5f9;
  border-radius: 8px;
  padding: .7rem 1.2rem;
  font-size: .88rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  display: flex; align-items: center; gap: .5rem;
  animation: slideIn .25s ease;
  min-width: 220px;
}
.toast-msg.success { border-left: 4px solid var(--success); }
.toast-msg.error   { border-left: 4px solid var(--danger); }
.toast-msg.info    { border-left: 4px solid var(--info); }
.toast-msg.warning { border-left: 4px solid var(--warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.text-accent  { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-muted   { color: var(--text-muted) !important; }
.fw-700 { font-weight: 700; }
.fw-900 { font-weight: 900; }
.gap-2  { gap: .5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pos-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    height: auto;
  }
  .menu-layout { grid-template-columns: 1fr; }
  .cocina-grid { grid-template-columns: 1fr; }
}

/* ── Print ──────────────────────────────────────────────────────────────────── */
@media print {
  @page { size: 80mm auto; margin: 0; }
  body * { visibility: hidden !important; }
  .receipt-ticket, .receipt-ticket * { visibility: visible !important; }
  .modal-overlay,
  .modal-box,
  .modal-header,
  .modal-footer,
  .receipt-preview {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .modal-overlay.open {
    position: static !important;
    inset: auto !important;
    display: block !important;
  }
  .modal-body { padding: 0 !important; }
  .receipt-ticket {
    width: 80mm !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .receipt-ticket-inner {
    width: 72mm !important;
    font-size: 10pt !important;
  }
  .receipt-logo { width: 18mm !important; height: 18mm !important; }
  .modal-header,
  .modal-footer,
  .modal-close,
  .btn-accent,
  .btn-outline-accent {
    display: none !important;
  }
}
