/* ============================================================
   ADMIN CSS — Balcó del Vedat Admin Panel
   Premium warm-light restaurant management theme
   Mobile-first, card-based layout
   ============================================================ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Roboto+Slab:wght@500;600;700&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
  --bg: #f4f2f0;
  --surface: #FFFFFF;
  --primary: #462a18;
  --primary-dark: #4E2F1A;
  --primary-light: #8B6914;
  --primary-alpha: rgba(70, 42, 24, 0.1);
  --text: #2C1810;
  --text-secondary: #7A6352;
  --text-muted: #A89888;
  --border: #E8DDD3;
  --border-light: #F0E8DF;
  --hover: #F5EDE4;
  --success: #4CAF50;
  --success-light: #E8F5E9;
  --warning: #FF9800;
  --warning-light: #FFF3E0;
  --danger: #F44336;
  --danger-light: #FFEBEE;
  --info: #2196F3;
  --info-light: #E3F2FD;

  /* Status */
  --st-pendiente-bg: #FFF3E0;
  --st-pendiente: #E65100;
  --st-confirmada-bg: #E8F5E9;
  --st-confirmada: #2E7D32;
  --st-cancelada-bg: #FFEBEE;
  --st-cancelada: #C62828;
  --st-avisada-bg: #E3F2FD;
  --st-avisada: #1565C0;
  --st-menu-bg: #F3E5F5;
  --st-menu: #7B1FA2;
  --st-reserva-bg: #F5F5F5;
  --st-reserva: #616161;
  --st-noshow-bg: #ECEFF1;
  --st-noshow: #37474F;

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 64px;
  --bottom-nav-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(107, 66, 38, 0.06);
  --shadow: 0 2px 12px rgba(107, 66, 38, 0.08);
  --shadow-md: 0 4px 20px rgba(107, 66, 38, 0.1);
  --shadow-lg: 0 8px 32px rgba(107, 66, 38, 0.12);
  --shadow-hover: 0 6px 24px rgba(107, 66, 38, 0.15);

  /* Timing */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.25s var(--ease);
  --transition-fast: 0.15s var(--ease);
  --transition-slow: 0.4s var(--ease);
}
/* Helper class for Material Symbols Rounded */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga";
}
.nav-icon.material-symbols-rounded {
  display: inline-flex;
}
.bottom-nav-icon.material-symbols-rounded {
  display: inline-flex;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Roboto Slab', Georgia, serif;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.375rem; font-weight: 600; }
h3 { font-size: 1.125rem; font-weight: 600; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--primary-dark); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─────────────────────────────────────────────── */
/* LOGIN SCREEN                                     */
/* ─────────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f4f2f0 0%, #F5EDE4 50%, #E8DDD3 100%);
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: fadeInUp 0.6s var(--ease);
}

.login-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.login-logo-img {
  height: 90px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.login-title {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.login-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 12px;
  padding: 10px;
  background: var(--danger-light);
  border-radius: var(--radius-sm);
}

.input-icon-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

.input-icon-wrap input {
  padding-left: 44px;
}

/* ─────────────────────────────────────────────── */
/* APP LAYOUT                                       */
/* ─────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-brand-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}

.sidebar-logo-img {
  height: 38px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-sub-text {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.nav-link:hover {
  background: #f4f2f0;
  color: var(--text);
}

.nav-link.active {
    background: rgb(169 160 155 / 10%);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-icon {
  font-size: 1.25rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
}

.logout-btn {
  width: 100%;
  text-align: left;
  color: var(--danger) !important;
}

.logout-btn:hover {
  background: var(--danger-light) !important;
}

/* ─── Sidebar Overlay ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ─── Hamburger Button ─── */
.hamburger-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px;
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition-fast);
}

/* ─── Main Content ─── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 24px;
  min-height: 100vh;
  max-width: 1200px;
}

/* ─── Mobile Bottom Nav ─── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 12px rgba(107, 66, 38, 0.08);
  z-index: 998;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav {
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  min-width: 56px;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-icon {
  font-size: 1.3rem;
}

.bottom-nav-label {
  font-size: 0.65rem;
  letter-spacing: 0.3px;
}

/* ─────────────────────────────────────────────── */
/* DAY NAVIGATOR                                    */
/* ─────────────────────────────────────────────── */
.day-navigator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(179deg, var(--surface) 0%, #f4f2f0 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 20px;
  border: 1px solid #f4f2f0;
}

.day-nav-arrow {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  transition: all var(--transition);
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.day-nav-arrow:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.day-nav-arrow:active {
  transform: scale(0.95);
}

.day-nav-center {
  text-align: center;
  flex: 1;
  padding: 0 16px;
}

.day-nav-date {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.today-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: var(--radius-pill);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─────────────────────────────────────────────── */
/* STATS GRID                                       */
/* ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--border);
  transition: all var(--transition);
  text-align: center;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.stat-primary { border-left-color: var(--primary); }
.stat-success { border-left-color: var(--success); }
.stat-warning { border-left-color: var(--warning); }
.stat-info { border-left-color: var(--info); }

.stat-number {
  font-family: 'Roboto Slab', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-primary .stat-number { color: var(--primary); }
.stat-success .stat-number { color: var(--success); }
.stat-warning .stat-number { color: var(--warning); }
.stat-info .stat-number { color: var(--info); }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─────────────────────────────────────────────── */
/* SEARCH BAR                                       */
/* ─────────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 24px;
}

.search-bar .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  height: 56px;
  padding: 0 24px 0 52px;
  font-size: 1rem;
  border: 1px solid #ffffff;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-alpha), var(--shadow);
}

/* ─────────────────────────────────────────────── */
/* SECTION HEADER                                   */
/* ─────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

.section-header h2 {
  font-size: 1.15rem;
  color: var(--primary);
}

.section-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─────────────────────────────────────────────── */
/* RESERVATION CARDS                                */
/* ─────────────────────────────────────────────── */
.reservations-list {
  min-height: 200px;
}

.reservation-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
  overflow: visible;
  transition: all var(--transition);
  cursor: pointer;
}

.reservation-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.reservation-card.expanded {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-alpha);
}

.card-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.card-time {
  font-family: 'Roboto Slab', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
  text-align: center;
  flex-shrink: 0;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-status-wrap {
  flex-shrink: 0;
  position: relative;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  white-space: nowrap;
}

.status-badge:hover {
  filter: brightness(0.92);
  transform: scale(1.05);
}

.badge-pendiente {
  background: var(--st-pendiente-bg);
  color: var(--st-pendiente);
}

.badge-confirmada {
  background: var(--st-confirmada-bg);
  color: var(--st-confirmada);
}

.badge-cancelada {
  background: var(--st-cancelada-bg);
  color: var(--st-cancelada);
}

.badge-avisada {
  background: var(--st-avisada-bg);
  color: var(--st-avisada);
}

.badge-menu {
  background: var(--st-menu-bg);
  color: var(--st-menu);
}

.badge-reserva {
  background: var(--st-reserva-bg);
  color: var(--st-reserva);
}

.badge-noshow {
  background: var(--st-noshow-bg);
  color: var(--st-noshow);
}

/* Card Details (expandable) */
.card-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), padding 0.35s var(--ease);
  padding: 0 16px;
  border-top: 0px solid var(--border-light);
}

.reservation-card.expanded .card-details {
  max-height: 600px;
  padding: 16px;
  border-top-width: 1px;
}

.detail-row {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.detail-row strong {
  color: var(--text);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  min-height: 40px;
  cursor: pointer;
}

.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-whatsapp {
  background: #E8F5E9;
  color: #2E7D32;
  border-color: #C8E6C9;
}
.btn-whatsapp:hover:not(:disabled) {
  background: #C8E6C9;
}

.btn-edit {
  background: #E3F2FD;
  color: #1565C0;
  border-color: #BBDEFB;
}
.btn-edit:hover {
  background: #BBDEFB;
}

.btn-delete {
  background: #FFEBEE;
  color: #C62828;
  border-color: #FFCDD2;
}
.btn-delete:hover {
  background: #FFCDD2;
}

/* Status Dropdown */
.status-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 110;
  min-width: 180px;
  padding: 6px;
  animation: slideDown 0.2s var(--ease);
}

.status-dropdown.open {
  display: block;
}

.status-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.status-option:hover {
  filter: brightness(0.95);
}

.status-option.badge-pendiente { color: var(--st-pendiente); }
.status-option.badge-confirmada { color: var(--st-confirmada); }
.status-option.badge-cancelada { color: var(--st-cancelada); }
.status-option.badge-avisada { color: var(--st-avisada); }
.status-option.badge-menu { color: var(--st-menu); }
.status-option.badge-reserva { color: var(--st-reserva); }

.status-option:hover {
  background: var(--hover);
}

/* Niños badge */
.ninos-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Zone tag */
.zone-tag {
  display: inline-block;
  padding: 1px 8px;
  background: var(--primary-alpha);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─────────────────────────────────────────────── */
/* PHONE LINK                                       */
/* ─────────────────────────────────────────────── */
.phone-link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}
.phone-link:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────── */
/* PAGE TRANSITIONS                                 */
/* ─────────────────────────────────────────────── */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s var(--ease);
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.5rem;
  color: var(--primary);
}

/* ─────────────────────────────────────────────── */
/* FORMS                                            */
/* ─────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.form-group textarea {
  height: auto;
  padding: 12px 16px;
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-alpha);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Form mode toggle */
.form-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
}

.mode-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 28px;
  transition: var(--transition);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.extra-fields {
  transition: all var(--transition);
}

.reservation-form {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    max-width: 1200px;
}

/* ─────────────────────────────────────────────── */
/* BUTTONS                                          */
/* ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--hover);
  color: var(--primary);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: #D32F2F;
}

.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-success:hover:not(:disabled) {
  background: #388E3C;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  height: 56px;
  font-size: 1.05rem;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

/* ─────────────────────────────────────────────── */
/* CLIENT CARDS                                     */
/* ─────────────────────────────────────────────── */
.clientes-list {
  min-height: 200px;
}

.client-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.client-card:hover {
  box-shadow: var(--shadow);
}

.client-card.expanded {
  box-shadow: var(--shadow-md);
}

.client-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  gap: 16px;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.client-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.client-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.client-stat {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.client-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), padding 0.35s var(--ease);
  padding: 0 16px;
  border-top: 0px solid var(--border-light);
}

.client-card.expanded .client-details {
  max-height: 300px;
  padding: 16px;
  border-top-width: 1px;
}

.client-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.empresa-tag {
  display: inline-block;
  padding: 1px 8px;
  background: var(--info-light);
  color: var(--info);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─────────────────────────────────────────────── */
/* CONFIGURATION                                    */
/* ─────────────────────────────────────────────── */
.config-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.config-tabs::-webkit-scrollbar { display: none; }

.config-tab {
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all var(--transition-fast);
  cursor: pointer;
  min-height: 44px;
}

.config-tab:hover {
  background: var(--hover);
}

.config-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.config-panel {
  display: none;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
}

.config-panel.active {
  display: block;
  animation: fadeIn 0.2s var(--ease);
}

/* Schedule rows */
.schedule-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-day {
  font-weight: 700;
  font-family: 'Roboto Slab', serif;
  min-width: 100px;
  color: var(--primary);
  padding-top: 4px;
}

.schedule-services {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-service {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 120px;
}

.toggle-input {
  position: relative;
  width: 44px;
  height: 24px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.toggle-input::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.toggle-input:checked {
  background: var(--primary);
}

.toggle-input:checked::before {
  left: 23px;
}

.schedule-hours {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
}

/* Config list items */
.config-list {
  margin-bottom: 16px;
}

.config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.config-item:last-child {
  border-bottom: none;
}

.config-item > div {
  flex: 1;
  font-size: 0.9rem;
}

/* WhatsApp template items */
.wa-template-item {
  flex-direction: column;
  align-items: stretch;
}

.wa-template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.wa-template-text {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 8px;
  font-family: inherit;
  color: var(--text);
  outline: none;
}

.wa-template-text:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
}

/* ─────────────────────────────────────────────── */
/* EXPORT                                           */
/* ─────────────────────────────────────────────── */
.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.export-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  text-align: center;
}

.export-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.export-card h3 {
  margin-bottom: 8px;
  color: var(--primary);
}

.export-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.export-card .form-row {
  margin-bottom: 16px;
  text-align: left;
}

/* ─────────────────────────────────────────────── */
/* MODAL                                            */
/* ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: fadeIn 0.2s var(--ease);
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s var(--ease);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 1.2rem;
  color: var(--primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
}

.modal-close:hover {
  background: var(--hover);
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
  font-size: 0.95rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
}

/* ─────────────────────────────────────────────── */
/* TOAST NOTIFICATIONS                              */
/* ─────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--info);
  animation: toastIn 0.35s var(--ease);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.toast.toast-out {
  animation: toastOut 0.3s var(--ease) forwards;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--info); }

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────── */
/* LOADING & EMPTY STATES                           */
/* ─────────────────────────────────────────────── */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

.loading-spinner p {
  font-size: 0.9rem;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state p {
  font-size: 1rem;
}

/* ─────────────────────────────────────────────── */
/* AUTOCOMPLETE                                     */
/* ─────────────────────────────────────────────── */
.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
}

.autocomplete-dropdown.open {
  display: block;
  animation: slideDown 0.2s var(--ease);
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 0.9rem;
}

.autocomplete-item:hover {
  background: var(--hover);
}

.autocomplete-empty {
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─────────────────────────────────────────────── */
/* WHATSAPP TEMPLATE MODAL                          */
/* ─────────────────────────────────────────────── */
.wa-templates {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-option {
  text-decoration: none;
  text-align: center;
}

/* ─────────────────────────────────────────────── */
/* HISTORY LIST                                     */
/* ─────────────────────────────────────────────── */
.history-list {
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.history-item:last-child {
  border-bottom: none;
}

.history-date {
  font-weight: 600;
  min-width: 80px;
}

/* ─────────────────────────────────────────────── */
/* EDIT FORM (in modal)                             */
/* ─────────────────────────────────────────────── */
.edit-form .form-group {
  margin-bottom: 12px;
}

.edit-form .form-row {
  gap: 12px;
}

/* ─────────────────────────────────────────────── */
/* UTILITY CLASSES                                  */
/* ─────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ─────────────────────────────────────────────── */
/* ANIMATIONS                                       */
/* ─────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(60px); }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.form-submit-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* ─────────────────────────────────────────────── */
/* RESPONSIVE: TABLET (768px)                       */
/* ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-content {
    max-width: 100%;
  }
}

/* ─────────────────────────────────────────────── */
/* RESPONSIVE: MOBILE (768px)                       */
/* ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Sidebar: hidden by default, slides in */
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .hamburger-btn {
    display: flex;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 72px; /* Space for hamburger */
    padding-bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  }

  /* Day navigator */
  .day-navigator {
    padding: 16px;
    margin-bottom: 16px;
  }

  .day-nav-date {
    font-size: 1.15rem;
  }

  .day-nav-arrow {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* Compacting print buttons on mobile */
  .dashboard-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    margin-bottom: 16px !important;
  }
  .dashboard-actions .btn-print {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 6px 4px !important;
    font-size: 0.75rem !important;
    height: 38px !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
  }
  .btn-text-full {
    display: none !important;
  }
  .btn-text-short {
    display: inline !important;
  }

  /* Search */
  .search-bar {
    margin-bottom: 16px;
  }

  .search-bar input {
    height: 50px;
    font-size: 0.95rem;
  }

  /* Form rows stack */
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  /* Cards */
  .card-main {
    padding: 14px;
    gap: 12px;
  }

  .card-time {
    font-size: 1.1rem;
    min-width: 50px;
  }

  .card-name {
    font-size: 0.95rem;
  }

  .card-meta {
    font-size: 0.8rem;
  }

  .status-badge {
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  /* Config tabs scroll */
  .config-tabs {
    gap: 6px;
  }

  .config-tab {
    padding: 8px 14px;
    font-size: 0.8rem;
    min-height: 40px;
  }

  .config-panel {
    padding: 16px;
  }

  /* Schedule rows */
  .schedule-row {
    flex-direction: column;
    gap: 8px;
  }

  .schedule-day {
    min-width: auto;
  }

  .schedule-service {
    flex-wrap: wrap;
  }

  /* Export */
  .export-grid {
    grid-template-columns: 1fr;
  }

  .export-card {
    padding: 20px;
  }

  /* Modal */
  .modal {
    max-width: 100%;
    max-height: 85vh;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0;
    animation: slideUp 0.3s var(--ease);
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* Toast */
  .toast-container {
    bottom: calc(var(--bottom-nav-h) + 12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    max-width: none;
  }

  /* Reservation form */
  .reservation-form {
    padding: 20px;
  }

  /* Page header */
  .page-title {
    font-size: 1.25rem;
  }

  /* Card actions wrap */
  .card-actions {
    flex-direction: column;
  }

  .btn-action {
    justify-content: center;
  }

  /* Login */
  .login-card {
    padding: 32px 24px;
  }

  .login-title {
    font-size: 1.5rem;
  }

  /* Responsive fixes */
  .form-submit-actions {
    flex-direction: column;
    gap: 8px;
  }
  .bottom-nav-item {
    padding: 6px 2px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
}

/* ─────────────────────────────────────────────── */
/* RESPONSIVE: SMALL MOBILE (<400px)                */
/* ─────────────────────────────────────────────── */
@media (max-width: 400px) {
  .day-nav-date {
    font-size: 1rem;
  }

  .day-nav-arrow {
    width: 44px;
    height: 44px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .card-time {
    min-width: 44px;
    font-size: 1rem;
  }
}

/* ─────────────────────────────────────────────── */
/* DASHBOARD ACTION BUTTONS                         */
/* ─────────────────────────────────────────────── */
.dashboard-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-download {
  background: linear-gradient(354deg, #f4f2f0 0%, #ffffff 100%);
  color: var(--primary);
  border: 1px solid #d3d3d3;
  font-weight: 600;
  min-height: 48px;
  flex: 1;
  min-width: 140px;
}

.btn-download:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-print {
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
  font-weight: 600;
  min-height: 48px;
  min-width: 120px;
}

.btn-print:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-text-short {
  display: none;
}
.btn-text-full {
  display: inline;
}

/* ─────────────────────────────────────────────── */
/* CLIENTS TABLE                                    */
/* ─────────────────────────────────────────────── */
.clients-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 700px;
}

.clients-table thead {
  background: linear-gradient(135deg, #FAF3EB 0%, #F0E8DF 100%);
  border-bottom: 2px solid var(--border);
}

.clients-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.clients-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
}

.clients-table tbody tr {
  transition: background var(--transition-fast);
}

.clients-table tbody tr:hover {
  background: var(--hover);
}

.clients-table tbody tr:last-child td {
  border-bottom: none;
}

.clients-table .client-name-cell {
  font-weight: 600;
  color: var(--text);
}

.clients-table .phone-link {
  color: var(--primary);
  font-weight: 500;
}

.clients-table .empresa-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--info-light);
  color: var(--info);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.clients-table .obs-cell {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.clients-table .btn-action {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ─────────────────────────────────────────────── */
/* WHATSAPP TEMPLATE CARDS (Full CRUD)              */
/* ─────────────────────────────────────────────── */
.wa-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}

.wa-card:hover {
  box-shadow: var(--shadow);
}

.wa-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.wa-card-header input {
  flex: 1;
  min-width: 120px;
  height: 40px;
  padding: 0 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition-fast);
}

.wa-card-header input:focus {
  border-color: var(--primary);
}

.wa-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.wa-card textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 12px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  line-height: 1.5;
}

.wa-card textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
}

.wa-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: white;
}

/* ─────────────────────────────────────────────── */
/* TIPOS EVENTO & CAMPOS CONFIG                     */
/* ─────────────────────────────────────────────── */
.tipo-evento-list {
  margin-bottom: 16px;
}

.tipo-evento-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.tipo-evento-item:last-child {
  border-bottom: none;
}

.tipo-evento-item .tipo-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.tipo-evento-item .tipo-actions {
  display: flex;
  gap: 6px;
}

.campo-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.campo-toggle-row:last-child {
  border-bottom: none;
}

.campo-toggle-row .campo-label {
  font-weight: 500;
  font-size: 0.9rem;
}

/* ─────────────────────────────────────────────── */
/* PRINT VIEW (hidden container for printing)       */
/* ─────────────────────────────────────────────── */
.print-view {
  display: none;
}

/* ─────────────────────────────────────────────── */
/* PRINT STYLES                                     */
/* ─────────────────────────────────────────────── */
@page {
  margin: 8mm;
}

@media print {
  .sidebar,
  .hamburger-btn,
  .mobile-bottom-nav,
  .search-bar,
  .card-actions,
  .toast-container,
  .modal-overlay,
  .dashboard-actions,
  .day-nav-arrow,
  .today-badge,
  .status-dropdown {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .reservation-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  .reservation-card .card-details {
    max-height: none !important;
    padding: 8px 16px !important;
    border-top-width: 1px !important;
  }

  .reservation-card.expanded .card-details {
    max-height: none !important;
  }

  .day-navigator {
    box-shadow: none !important;
    border: none !important;
    padding: 10px 0 !important;
    justify-content: center !important;
  }

  .stats-grid {
    display: none !important;
  }

  .page:not(.active) {
    display: none !important;
  }

  .print-view {
    display: block !important;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    page-break-inside: auto;
  }

  .print-table th {
    background: #f0e8df !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 6px 8px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    border: 1px solid #ccc;
  }

  .print-table td {
    padding: 5px 8px;
    border: 1px solid #ccc;
    vertical-align: top;
  }

  .print-table tr {
    break-inside: avoid;
  }

  .print-section-title {
    font-size: 19px;
    font-weight: 700;
    margin: 12px 0 6px;
    color: #462a18;
  }

  /* ── Reservas Print Table ── */
  .print-section-title-compact {
    font-size: 17px;
    font-weight: 700;
    margin: 14px 0 6px 0;
    border-bottom: 2px solid #462a18;
    padding-bottom: 3px;
    text-transform: none;
    color: #462a18;
  }

  .print-table-reservas {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
  }
  .print-table-reservas th {
    background: #f5efe8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border: 1px solid #d5cabb;
    padding: 5px 8px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    text-align: left;
    color: #7a6652;
    letter-spacing: 0.03em;
  }
  .print-table-reservas td {
    border: 1px solid #e0d5c7;
    padding: 5px 8px;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
  }
  .print-table-reservas tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .print-table-reservas td.center {
    text-align: center;
  }
  .print-table-reservas td.bold {
    font-weight: 700;
  }

  /* ── Card-based Comanda Print Styles ── */
  .print-header-compact {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #462a18;
  }
  .print-header-compact h2 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    color: #462a18;
  }
  .print-header-compact p {
    margin: 4px 0 0 0;
    font-size: 16px;
    color: #555;
  }

  /* Individual comanda card */
  .comanda-print-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
    page-break-inside: avoid;
    break-inside: avoid;
    overflow: hidden;
  }
  .comanda-print-card-header {
    padding: 10px 16px;
    background: #faf5ef !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-bottom: 1px solid #e0d5c7;
  }
  .comanda-print-card-header .card-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c1810;
    margin: 0;
    font-style: italic;
  }
  .comanda-print-card-header .card-subtitle {
    font-size: 14px;
    color: #666;
    margin: 2px 0 0 0;
  }

  /* 4-column table inside each card */
  .comanda-print-card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.45;
  }
  .comanda-print-card-table th {
    background: #f5efe8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border: 1px solid #d5cabb;
    border-top: none;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    text-align: left;
    color: #7a6652;
    letter-spacing: 0.03em;
  }
  .comanda-print-card-table td {
    border: 1px solid #e0d5c7;
    border-bottom: none;
    padding: 8px 12px;
    vertical-align: top;
    font-size: 15px;
    line-height: 1.55;
    color: #222;
  }
  .comanda-print-card-table td .item-qty {
    font-weight: 800;
    font-size: 1.05em;
    margin-right: 3px;
  }
  .comanda-print-card-table td .item-nota {
    color: #c0392b;
    font-weight: 700;
    font-size: 0.9em;
  }
  .comanda-print-card-table td .empty-cell {
    color: #bbb;
    font-style: italic;
  }

  /* Extras / Notas bar below the table */
  .comanda-print-card-extras {
    padding: 6px 12px;
    font-size: 14px;
    color: #333;
    border-top: 1px solid #e0d5c7;
    background: #fdfaf7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: white;
  }
}

/* Card position relative for dropdown */
.reservation-card {
  position: relative;
}

/* ─────────────────────────────────────────────── */
/* ─────────────────────────────────────────────── */
/* CALENDAR POPUP ENHANCED (CON OCUPACIÓN Y TURNOS)*/
/* ─────────────────────────────────────────────── */
.calendar-popup {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s var(--ease);
}

.calendar-popup-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(70, 42, 24, 0.15);
  padding: 24px;
  width: 580px;
  max-width: 98vw;
  max-height: 94vh;
  overflow-y: auto;
  animation: slideUp 0.3s var(--ease);
}

.calendar-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-popup-title {
  font-family: 'Roboto Slab', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.calendar-popup-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
}

.calendar-popup-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.calendar-popup-close:hover {
  color: var(--primary);
  background: var(--hover);
}

.calendar-summary-banner {
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
  font-weight: 500;
}

.calendar-summary-banner strong {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  background: #FAF6F0;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.calendar-month-label {
  font-family: 'Roboto Slab', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: capitalize;
}

.calendar-nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-nav-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

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

.calendar-weekdays span {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-card-day {
  background: #FAF8F5;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  cursor: pointer;
  transition: all 0.15s ease-out;
  position: relative;
  user-select: none;
}

.cal-card-day:hover {
  border-color: var(--primary);
  background: var(--hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.cal-card-day.other-month {
  background: #F7F5F2;
  border-color: #EFEAE5;
  opacity: 0.45;
  cursor: default;
}

.cal-card-day.closed-day {
  background: #F0ECE8;
  border-color: #E2D7CC;
}

.cal-card-day.is-today {
  border-color: var(--primary-light);
  background: #FFFDF9;
  box-shadow: inset 0 0 0 1px var(--primary-light);
}

.cal-card-day.is-selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow);
}

.cal-card-day.is-selected .cal-day-num,
.cal-card-day.is-selected .cal-shift-row {
  color: #FFFFFF !important;
}

.cal-day-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.cal-shift-row {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
  white-space: nowrap;
}

.cal-shift-row.shift-closed {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.cal-shift-icon {
  font-size: 0.75rem;
}

.calendar-today-btn {
  width: 100%;
  margin-top: 12px;
}

.day-nav-date {
  cursor: pointer;
  transition: color var(--transition-fast);
}

.day-nav-date:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

/* ─────────────────────────────────────────────── */
/* COMANDAS PAGE                                    */
/* ─────────────────────────────────────────────── */
.comandas-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.comandas-list {
  min-height: 200px;
}

.comanda-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
  overflow: hidden;
  transition: all var(--transition);
}

.comanda-card:hover {
  box-shadow: var(--shadow);
}

.comanda-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, #FAF3EB 0%, #F0E8DF 100%);
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  flex-wrap: wrap;
}

.comanda-card-header .comanda-info {
  flex: 1;
}

.comanda-card-header .comanda-name {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

.comanda-card-header .comanda-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.comanda-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.comanda-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.comanda-column {
  padding: 12px;
  border-right: 1px solid var(--border-light);
  min-height: 80px;
}

.comanda-column:last-child {
  border-right: none;
}

.comanda-column-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-alpha);
}

.comanda-item {
  font-size: 0.85rem;
  padding: 3px 0;
  color: var(--text);
  line-height: 1.4;
}

.comanda-item .comanda-qty {
  font-weight: 700;
  color: var(--primary);
  margin-right: 4px;
}

.comanda-item .comanda-note {
  font-size: 0.75rem;
  color: var(--warning);
  font-weight: 600;
  display: block;
  margin-left: 20px;
}

.comanda-notes {
  padding: 10px 16px;
  background: var(--warning-light);
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.comanda-notes strong {
  color: var(--warning);
}

/* No comanda state */
.no-comanda-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px dashed var(--border);
  margin-bottom: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  opacity: 0.8;
  transition: all var(--transition);
}

.no-comanda-card:hover {
  opacity: 1;
  border-color: var(--primary);
}

.no-comanda-info {
  flex: 1;
}

.no-comanda-name {
  font-weight: 600;
  color: var(--text);
}

.no-comanda-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Resumen cocina */
.resumen-cocina {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.resumen-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

.resumen-section-title {
  font-family: 'Roboto Slab', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-alpha);
}

.resumen-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.9rem;
  border-bottom: 1px dotted var(--border-light);
}

.resumen-item:last-child {
  border-bottom: none;
}

.resumen-item .resumen-qty {
  font-weight: 700;
  color: var(--primary);
  min-width: 30px;
  text-align: right;
}

/* Comanda form in modal */
.comanda-form-section {
  margin-bottom: 20px;
}

.comanda-form-section-title {
  font-family: 'Roboto Slab', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comanda-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  align-items: center;
}

.comanda-form-row input[type="number"] {
  width: 70px;
  height: 40px;
  text-align: center;
  padding: 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary);
  outline: none;
}

.comanda-form-row input[type="number"]:focus {
  border-color: var(--primary);
}

.comanda-form-row input[type="text"] {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  font-size: 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.comanda-form-row input[type="text"]:focus {
  border-color: var(--primary);
}

.comanda-form-row .btn-remove-row {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--danger);
  background: var(--danger-light);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  border: none;
}

.comanda-form-row .btn-remove-row:hover {
  background: var(--danger);
  color: white;
}

.btn-add-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-alpha);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 4px;
}

.btn-add-row:hover {
  background: var(--primary);
  color: white;
  border-style: solid;
}

/* Comanda print view */
.comandas-print-view {
  display: none;
}

/* Print overrides for comandas */
@media print {
  .comandas-print-view {
    display: block !important;
  }

  .comanda-print-block {
    page-break-inside: avoid;
    margin-bottom: 24px;
    border: 1px solid #ccc;
    padding: 12px;
  }

  .comanda-print-header {
    font-size: 14px;
    font-weight: 700;
    color: #462a18;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #462a18;
  }

  .comanda-print-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .comanda-print-col {
    padding: 6px 8px;
    border-right: 1px solid #ccc;
    font-size: 11px;
  }

  .comanda-print-col:last-child {
    border-right: none;
  }

  .comanda-print-col-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10px;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ccc;
  }

  .comandas-actions {
    display: none !important;
  }
}

/* Responsive comandas */
@media (max-width: 768px) {
  .comanda-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .comanda-column {
    border-bottom: 1px solid var(--border-light);
  }

  .comanda-column:nth-child(2) {
    border-right: none;
  }

  .comanda-column:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .comandas-actions {
    flex-direction: column;
  }

  .calendar-popup-content {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0;
  }

  .calendar-popup {
    align-items: flex-end;
  }

  .resumen-cocina {
    grid-template-columns: 1fr;
  }

  .comanda-form-row {
    flex-wrap: wrap;
  }

  .comanda-form-row input[type="number"] {
    width: 60px;
  }
}

/* Paginación de Clientes */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

.pagination-info {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-page-indicator {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

/* Modal edición clientes premium grid */
.edit-client-grid-form .form-section-title {
  font-family: 'Roboto Slab', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 6px;
  margin: 20px 0 12px 0;
}

.edit-client-grid-form .form-section-title:first-child {
  margin-top: 0;
}

.clients-table th {
  position: sticky;
  top: 0;
  background: #FAF3EB;
}

.clients-table-wrap {
  position: relative;
  max-height: 70vh;
  overflow: auto;
}

/* Dashboard Comanda Integration */
.badge-comanda-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #27ae60;
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
}

.comanda-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.comanda-mini-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comanda-mini-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.comanda-mini-item {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.comanda-mini-item strong {
  color: var(--primary);
  background: var(--primary-alpha);
  padding: 0 4px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.comanda-mini-note {
  color: var(--danger);
  font-weight: bold;
  cursor: help;
}

.btn-action.btn-comanda {
  background-color: var(--primary);
  color: white;
  border: none;
  font-weight: 600;
}

.btn-action.btn-comanda:hover {
  background-color: var(--primary-dark);
}

/* ── PIN Code Styles ── */
.pin-form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px !important;
}

.pin-label {
  font-size: 0.8rem !important;
  letter-spacing: 0.1em;
  font-weight: 700 !important;
  color: var(--text-secondary);
  margin-bottom: 8px !important;
  text-transform: uppercase;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 20px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background-color: transparent;
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background-color: var(--primary);
  transform: scale(1.15);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 260px;
  margin: 0 auto 20px;
}

.pin-key {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: var(--surface);
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  padding: 0;
  margin: 0;
  transition: all var(--transition-fast) !important;
  box-shadow: var(--shadow-sm);
  touch-action: manipulation;
}

.pin-key:active,
.pin-key.active {
  background-color: var(--hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(0.92);
}

.pin-key-action {
  font-size: 18px;
  background-color: var(--border-light);
  border-color: transparent;
}

.pin-key-action:active,
.pin-key-action.active {
  background-color: var(--border);
  color: var(--text);
}

/* ── Admin Booking Widget Iframe ── */
.nr-iframe-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  background-color: var(--surface);
  transition: all var(--transition);
}

.nr-iframe-container iframe {
  width: 100%;
  height: 980px;
  border: none;
  display: block;
}

#lbl-reserva-rapida.active,
#lbl-reserva-completa.active {
  font-weight: 700;
  color: var(--primary);
}

/* ── Custom Print Styles for Comandas and Kitchen Summary ── */
.resumen-print-view {
  display: none;
}

@media print {
  /* Ocultar el layout principal de la aplicación al imprimir comandas o resumen total */
  body.printing-custom-view #app {
    display: none !important;
  }

  body.printing-custom-view .comandas-print-view,
  body.printing-custom-view .resumen-print-view,
  body.printing-custom-view #print-container {
    display: block !important;
  }

  /* Tabla Estilo Columnas Excel */
  .comanda-print-excel-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 10px;
    background: #ffffff;
  }

  .comanda-print-excel-table th,
  .comanda-print-excel-table td {
    border: 1.5px solid #000000 !important; /* Bordes gruesos estilo Excel */
    padding: 6px 8px;
    font-size: 11px;
    text-align: left;
    vertical-align: top;
    color: #000000 !important;
  }

  .comanda-print-excel-table th {
    background: #f2f2f2 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.05em;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .comanda-print-excel-table td.empty-cell {
    color: #999999 !important;
    text-align: center;
    font-style: italic;
  }

  .comanda-print-qty {
    font-weight: 800;
    margin-right: 4px;
    background: #e1e7ed !important;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid #7f8c8d;
    display: inline-block;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .comanda-print-note {
    color: #c0392b !important;
    font-weight: 700;
    font-size: 9px;
    margin-left: 4px;
  }

  /* Estilos Impresión Resumen Cocina */
  .resumen-print-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
  }

  .resumen-print-section {
    border: 1.5px solid #000000;
    border-radius: 6px;
    padding: 14px;
    background: #ffffff;
    page-break-inside: avoid;
  }

  .resumen-print-section-title {
    font-size: 17px;
    font-weight: 800;
    border-bottom: 2px solid #000000;
    padding-bottom: 6px;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: #462a18;
  }

  .resumen-print-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    padding: 5px 0;
    border-bottom: 1px dashed #7f8c8d;
  }

  .resumen-print-item:last-child {
    border-bottom: none;
  }

  .resumen-print-item.empty {
    justify-content: center;
    color: #999999;
    font-style: italic;
  }

  .resumen-print-qty {
    font-weight: 800;
    font-size: 17px;
    background: #e1e7ed !important;
    padding: 2px 6px;
    border: 1.5px solid #000000;
    border-radius: 4px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ── Contrato de Entrega a Cuenta Print Styles ── */
.contrato-print-view {
  display: none;
}

@media print {
  body.printing-custom-view .contrato-print-view {
    display: block !important;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    color: #000000 !important;
    background: #ffffff !important;
    padding: 30px 40px;
    font-size: 18px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
  }

  .contrato-header {
    text-align: center;
    margin-bottom: 25px;
  }

  .contrato-logo {
    max-height: 80px;
    display: block;
    margin: 0 auto 15px auto;
  }

  .contrato-title {
    font-size: 21px;
    font-weight: 700;
    text-transform: uppercase;
    color: #462a18 !important;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-align: center;
  }

  .contrato-date {
    text-align: right;
    font-size: 18px;
    margin-bottom: 25px;
    font-style: italic;
  }

  .contrato-section-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 25px;
    margin-bottom: 10px;
    border-bottom: 1.5px solid #462a18;
    padding-bottom: 4px;
    color: #462a18 !important;
  }

  .contrato-text {
    margin-bottom: 12px;
    text-align: justify;
  }

  .contrato-list {
    margin-bottom: 20px;
    padding-left: 20px;
  }

  .contrato-list li {
    margin-bottom: 8px;
    text-align: justify;
  }

  .contrato-table-entregas {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 25px 0;
  }

  .contrato-table-entregas th,
  .contrato-table-entregas td {
    border: 1px solid #dddddd !important;
    padding: 8px 12px;
    text-align: left;
    font-size: 17px;
  }

  .contrato-table-entregas th {
    background-color: #f8f9fa !important;
    font-weight: 700;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .contrato-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    page-break-inside: avoid;
  }

  .contrato-signature-block {
    width: 45%;
    text-align: center;
  }

  .contrato-signature-line {
    border-top: 1px solid #000000;
    margin-top: 50px;
    margin-bottom: 8px;
  }

  .contrato-signature-label {
    font-size: 17px;
    font-weight: bold;
  }

  .contrato-footer {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 15px;
    color: #777777 !important;
    border-top: 1px solid #eeeeee;
    padding-top: 8px;
    page-break-before: avoid;
  }
}

/* ============================================================
   FICHA DE CLIENTE PREMIUM
   ============================================================ */

.client-profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 4px;
}

.client-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.client-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1c284b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(28, 40, 75, 0.15);
}

.client-profile-info {
  flex: 1;
}

.client-vip-tag {
  background: #1c284b;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.client-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.client-stat-box {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  transition: transform 0.2s;
}

.client-stat-box:hover {
  transform: translateY(-2px);
}

.client-stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1c284b;
  line-height: 1.2;
}

.client-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

.client-last-visit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text);
  margin-top: 4px;
}

.client-notes-box {
  background: #f8f9fa;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border-left: 3px solid var(--primary);
  margin-top: 4px;
}

.client-notes-text {
  margin: 0;
  font-size: 0.85rem;
  font-style: italic;
  color: #555;
  line-height: 1.4;
}


