/* ═══════════════════════════════════════════════════════════
   EMPLEADITO DB — DARK PREMIUM DASHBOARD
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS VARIABLES ───────────────────────────────────────── */
:root {
  --bg-base:       #080c14;
  --bg-surface:    #0f1623;
  --bg-card:       #141d2e;
  --bg-card-hover: #1a2540;
  --bg-input:      #0d1525;
  --bg-elevated:   #1e293b;

  --accent:        #4f8cff;
  --accent-dim:    #3a6fd8;
  --accent-glow:   rgba(79, 140, 255, 0.18);
  --accent-solid:  #5b9aff;

  --green:  #22c55e;
  --blue:   #3b82f6;
  --yellow: #eab308;
  --red:    #ef4444;
  --purple: #a855f7;
  --cyan:   #06b6d4;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  --border:         rgba(255,255,255,0.07);
  --border-focus:   rgba(79,140,255,0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 24px var(--accent-glow);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.6);

  --font: 'Inter', system-ui, sans-serif;
  --transition: 0.2s ease;
}

/* ─── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(79,140,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.05) 0%, transparent 50%);
  overflow: hidden;
}

.login-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: particle-float linear infinite;
}
@keyframes particle-float {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  10%  { opacity: 0.3; }
  90%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

.login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  padding: 48px 36px;
  background: rgba(15,22,35,0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  animation: login-appear 0.6s ease;
}
@keyframes login-appear {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo-wrap {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(79,140,255,0.25);
  animation: logo-glow 3s ease-in-out infinite alternate;
}
@keyframes logo-glow {
  from { box-shadow: 0 0 20px rgba(79,140,255,0.2); }
  to   { box-shadow: 0 0 40px rgba(79,140,255,0.35); }
}
.login-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input-group input,
.input-group textarea,
.input-group select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79,140,255,0.1);
}
.input-group input::placeholder { color: var(--text-muted); }

.input-row {
  display: flex;
  gap: 12px;
}
.input-row .input-group { flex: 1; }

.login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--red);
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

.login-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}
.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,140,255,0.3);
}
.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.login-btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 62px;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.logo-text-wrap {
  display: flex;
  flex-direction: column;
}
.logo-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-solid);
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.logo-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── TABS ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab:hover { background: var(--bg-card); color: var(--text-primary); }
.tab.active {
  background: var(--accent-glow);
  border-color: var(--border-focus);
  color: var(--accent-solid);
  font-weight: 600;
}
.tab-icon { font-size: 1rem; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  animation: badge-pulse 2s infinite;
}
.badge.new-flash { animation: badge-flash 0.6s ease 3; }
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}
@keyframes badge-flash {
  0%, 100% { background: var(--red); }
  50%      { background: var(--accent); }
}

/* ─── HEADER RIGHT ────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}
.user-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.role-admin { background: rgba(168,85,247,0.2); color: var(--purple); }
.role-operador,
.role-cocina,
.role-mozo { background: rgba(59,130,246,0.15); color: var(--blue); }

.btn-logout {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.08);
  color: var(--red);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-logout:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.4);
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */
.main { padding: 20px; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fade-in 0.3s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ─── SECTION HEADER ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.last-update-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn-refresh {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.btn-refresh:hover { background: var(--bg-card-hover); color: var(--accent); border-color: var(--border-focus); }
.btn-refresh.spinning { animation: spin 0.7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-primary {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #fff;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,140,255,0.2); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.btn-danger {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.15);
  color: var(--red);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* ═══════════════════════════════════════════════════════════
   KANBAN BOARD
   ═══════════════════════════════════════════════════════════ */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .kanban { grid-template-columns: 1fr; } }

.kanban-col {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.col-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.col-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Column colors */
.col-yellow { border-top: 3px solid var(--yellow); }
.col-yellow .col-title { color: var(--yellow); }
.col-yellow .col-count { background: rgba(234,179,8,0.15); color: var(--yellow); }

.col-blue { border-top: 3px solid var(--blue); }
.col-blue .col-title { color: var(--blue); }
.col-blue .col-count { background: rgba(59,130,246,0.15); color: var(--blue); }

.col-purple { border-top: 3px solid var(--purple); }
.col-purple .col-title { color: var(--purple); }
.col-purple .col-count { background: rgba(168,85,247,0.15); color: var(--purple); }

.col-green { border-top: 3px solid var(--green); }
.col-green .col-title { color: var(--green); }
.col-green .col-count { background: rgba(34,197,94,0.15); color: var(--green); }

.kanban-col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.kanban-col-body::-webkit-scrollbar { width: 4px; }
.kanban-col-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ─── ORDER CARD ──────────────────────────────────────────── */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all var(--transition);
  animation: card-in 0.25s ease;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.order-card:hover { background: var(--bg-card-hover); border-color: rgba(79,140,255,0.15); }
.order-card.final { opacity: 0.55; }

.card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.card-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  font-family: monospace;
  background: var(--accent-glow);
  padding: 2px 7px;
  border-radius: 4px;
}
.card-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.card-time.urgent { color: var(--red); font-weight: 600; }
.card-time.warning { color: var(--yellow); font-weight: 600; }

.card-cliente {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.card-phone {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.card-address {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-items-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.card-notes {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 5px 8px;
  background: rgba(234,179,8,0.08);
  border-radius: 4px;
  border-left: 2px solid var(--yellow);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
}
.card-badges {
  display: flex;
  gap: 4px;
}
.card-badge {
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.07);
  color: var(--text-secondary);
  font-weight: 500;
}
.tipo-delivery { background: rgba(168,85,247,0.15); color: var(--purple); }
.tipo-takeaway { background: rgba(6,182,212,0.15); color: var(--cyan); }
.tipo-local    { background: rgba(34,197,94,0.15); color: var(--green); }

.card-actions {
  display: flex;
  gap: 6px;
}
.card-btn {
  flex: 1;
  padding: 7px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.card-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.card-btn.btn-advance {
  background: rgba(79,140,255,0.12);
  color: var(--accent);
  border-color: rgba(79,140,255,0.25);
  flex: 2;
}
.card-btn.btn-advance:hover { background: rgba(79,140,255,0.25); }
.card-btn.btn-cancelar {
  background: rgba(239,68,68,0.08);
  color: var(--red);
  border-color: rgba(239,68,68,0.2);
}
.card-btn.btn-cancelar:hover { background: rgba(239,68,68,0.2); }

.empty-col {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ═══════════════════════════════════════════════════════════
   DATA TABLE (Reservas, Productos)
   ═══════════════════════════════════════════════════════════ */
.table-responsive { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}
.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody tr {
  transition: background var(--transition);
}
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-primary);
  vertical-align: middle;
}
.cell-center { text-align: center; }
.cell-money  { font-weight: 600; color: var(--green); }
.cell-name   { font-weight: 600; }
.cell-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

/* Today highlight */
.row-today {
  background: rgba(234,179,8,0.06) !important;
}
.row-today td:first-child {
  border-left: 3px solid var(--yellow);
}

/* Inactive row */
.row-inactive { opacity: 0.45; }

.action-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-btn:hover { background: var(--bg-card-hover); }
.action-btn.delete:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); }

/* Estado badges */
.estado-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}
.estado-PENDIENTE   { background: rgba(234,179,8,0.15); color: var(--yellow); }
.estado-CONFIRMADA  { background: rgba(34,197,94,0.15); color: var(--green); }
.estado-CANCELADA   { background: rgba(239,68,68,0.15); color: var(--red); }
.estado-COMPLETADA  { background: rgba(148,163,184,0.12); color: var(--text-muted); }

/* ─── FILTERS ─────────────────────────────────────────────── */
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.filter-group input[type="date"],
.filter-group select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.82rem;
  padding: 6px 10px;
  outline: none;
  transition: border-color var(--transition);
}
.filter-group input[type="date"]:focus,
.filter-group select:focus { border-color: var(--border-focus); }

/* ─── TOGGLE SWITCH ───────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: rgba(34,197,94,0.2); border-color: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); background: var(--green); }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.toggle-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   MENU UPLOAD
   ═══════════════════════════════════════════════════════════ */
.menu-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-surface);
  max-width: 600px;
  margin: 0 auto;
}
.menu-upload-area:hover,
.menu-upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(79,140,255,0.04);
}
.upload-icon { font-size: 3rem; margin-bottom: 16px; }
.upload-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.upload-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.upload-types {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
}

.preview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  max-width: 600px;
  margin: 0 auto 16px;
}
.preview-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.preview-pdf-icon { font-size: 2.5rem; }
.preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.preview-name { font-weight: 600; font-size: 0.9rem; }
.preview-size { font-size: 0.75rem; color: var(--text-muted); }
.preview-remove { flex-shrink: 0; }

.menu-progress {
  max-width: 600px;
  margin: 16px auto;
}
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 3px;
  transition: width 0.3s ease;
}
.progress-text {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.btn-upload {
  display: none;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-overlay.visible { opacity: 1; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}
.modal-overlay.visible .modal { transform: scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-card);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.modal-body {
  padding: 20px 24px;
}
.modal-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-form {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  animation: toast-in 0.3s ease;
  pointer-events: all;
  box-shadow: var(--shadow-card);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}
.toast.success { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.3);  color: var(--green); }
.toast.error   { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: var(--red); }
.toast.info    { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: var(--blue); }
.toast.warning { background: rgba(234,179,8,0.1);  border-color: rgba(234,179,8,0.3);  color: var(--yellow); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   LOADING / SKELETON
   ═══════════════════════════════════════════════════════════ */
.loading-state, .error-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

.skeleton-col {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.skeleton-header {
  width: 60%;
  height: 16px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  margin-bottom: 14px;
  animation: shimmer 1.5s infinite;
}
.skeleton-card {
  width: 100%;
  height: 100px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  animation: shimmer 1.5s infinite;
}
.skeleton-table { padding: 14px; }
.skeleton-row {
  width: 100%;
  height: 44px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet 10"
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .header {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px;
  }
  .tabs {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .tab { padding: 7px 12px; font-size: 0.8rem; }
  .main { padding: 14px; }
  .section-title { font-size: 1.1rem; }

  .user-info { display: none; }
}

@media (max-width: 600px) {
  .login-container { margin: 16px; padding: 32px 24px; }
  .login-logo { width: 64px; height: 64px; }
  .login-title { font-size: 1.4rem; }

  .header-left { display: none; }
  .data-table { font-size: 0.75rem; }
  .data-table thead th { padding: 8px 10px; }
  .data-table tbody td { padding: 8px 10px; }
}

/* ═══════════════════════════════════════════════════════════
   CONFIGURACION & NEGOCIO
   ═══════════════════════════════════════════════════════════ */
.config-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.config-column {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.config-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.config-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.config-card-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.config-card-body {
  padding: 20px;
}
.demora-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green);
  transition: all var(--transition);
}
.demora-alert.active {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: var(--red);
}
.demora-text strong {
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════
   SEDE SELECTOR (ADMIN)
   ═══════════════════════════════════════════════════════════ */
.sede-selector {
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 4px 24px 4px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px;
  transition: all var(--transition);
  margin-right: 12px;
}
.sede-selector:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(79, 140, 255, 0.3);
}
.sede-selector:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* BOTONES TURNOS DINAMICOS */
.btn-turno-action {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-turno-action:hover {
  background: var(--bg-card-hover);
}
.btn-turno-action.add {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.3);
}
.btn-turno-action.add:hover {
  background: rgba(34, 197, 94, 0.1);
}
.btn-turno-action.delete {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-turno-action.delete:hover {
  background: rgba(239, 68, 68, 0.1);
}
