/* ========================================================
   BAROPS PWA - SISTEMA OPERATIVO DE BARRA
   Tema claro profesional · Mobile-first (celular → tablet → escritorio)
   El color de marca (--accent-gold) lo define White Label.
   ======================================================== */

:root {
  /* Superficies */
  --bg-main: #f4f6fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-elevated: #eef2f7;
  --bg-inset: #f1f5f9;
  --bg-subtle: #f8fafc;
  --border-subtle: #e4e9f0;
  --border-strong: #cfd8e3;
  --border-focus: rgba(14, 165, 233, 0.5);

  /* Texto */
  --text-strong: #0f172a;
  --text-main: #1e293b;
  --text-soft: #334155;
  --text-muted: #64748b;
  --text-dark: #0f172a;

  /* Marca (sobrescrito por WhiteLabelManager) */
  --accent-gold: #0ea5e9;
  --accent-gold-light: #38bdf8;
  --accent-gold-glow: rgba(14, 165, 233, 0.18);
  --accent-solid: color-mix(in srgb, var(--accent-gold) 72%, #0c2a4a);
  --accent-ink: color-mix(in srgb, var(--accent-gold) 62%, #0f172a);
  --accent-soft: color-mix(in srgb, var(--accent-gold) 9%, #ffffff);
  --accent-border: color-mix(in srgb, var(--accent-gold) 35%, #ffffff);

  /* Semánticos */
  --success: #10b981;
  --success-text: #047857;
  --success-soft: #ecfdf5;
  --success-border: #a7f3d0;
  --success-glow: rgba(16, 185, 129, 0.2);
  --admin-blue: #2563eb;
  --admin-blue-glow: rgba(37, 99, 235, 0.18);
  --info-text: #0369a1;
  --amber: #f59e0b;
  --warn-text: #b45309;
  --warn-soft: #fffbeb;
  --warn-border: #fcd34d;
  --danger: #ef4444;
  --danger-text: #b91c1c;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --danger-glow: rgba(239, 68, 68, 0.18);

  /* Forma */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.14), 0 4px 8px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 0 3px var(--accent-gold-glow);

  /* Layout */
  --gutter: 16px;
  --nav-height: 64px;
  --header-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tap: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

img { max-width: 100%; }

/* Utilidades de texto */
.accent-text { color: var(--accent-ink); font-weight: 700; }
.amber-text { color: var(--warn-text); }
.muted-xs { font-size: 12px; color: var(--text-muted); }

/* ========================================================
   APP SHELL
   ======================================================== */
.app-viewport {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
}

.app-layout {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
}

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

/* ========================================================
   TOP HEADER
   ======================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  padding: 10px var(--gutter);
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-ink));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px var(--accent-gold-glow);
  overflow: hidden;
}

.brand-icon svg { width: 21px; height: 21px; }

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.brand-text { min-width: 0; }

.brand-text h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text h1 span { color: var(--accent-ink); }

.brand-text .status-badge {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.brand-text .status-badge > span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dot-online {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-xs);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.icon-btn:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(0.95); }

.icon-btn-accent {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
  color: #fff;
}

.icon-btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  border-radius: var(--radius-pill);
  padding: 3px 5px;
  border: 2px solid #fff;
  text-align: center;
}

.role-switcher-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background 0.15s, border-color 0.15s;
}

.role-switcher-btn:hover { background: var(--bg-subtle); border-color: var(--border-strong); }

.role-switcher-btn.admin-mode {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* PWA install */
.pwa-banner {
  background: var(--accent-soft);
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--accent-border);
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-soft);
}

/* ========================================================
   BOTONES GENÉRICOS
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.1s, filter 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover { filter: brightness(0.96); }
.btn:active { transform: scale(0.97); }

.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 12.5px; }

.btn-accent { background: var(--accent-solid); color: #fff; }
.btn-blue { background: var(--accent-solid); color: #fff; box-shadow: var(--shadow-xs); }
.btn-outline { background: var(--bg-card); border-color: var(--border-strong); color: var(--text-soft); }
.btn-ghost-accent {
  background: var(--bg-card);
  border-color: var(--accent-border);
  color: var(--accent-ink);
  box-shadow: var(--shadow-xs);
}

.btn-ghost-accent:hover { background: var(--accent-soft); filter: none; }

.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 6px 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover { color: var(--text-strong); }

.chip {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-blue { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-border); }
.chip-amber { background: var(--warn-soft); color: var(--warn-text); border: 1px solid var(--warn-border); }

/* ========================================================
   FORMULARIOS
   ======================================================== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; min-width: 0; }
.field:last-child { margin-bottom: 0; }

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.field-inline { display: flex; gap: 6px; }
.field-inline > .styled-select { flex: 1; min-width: 0; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.field-row .field { margin-bottom: 0; }

.styled-select,
.styled-input {
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text-strong);
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 16px; /* evita zoom automático en iOS */
  font-weight: 500;
  outline: none;
  width: 100%;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.styled-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  text-overflow: ellipsis;
}

textarea.styled-input { resize: vertical; min-height: 64px; line-height: 1.45; }

.styled-select:focus,
.styled-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.styled-select option { background: #fff; color: var(--text-strong); }

.styled-input::placeholder { color: #94a3b8; }

.pin-input { text-align: center; letter-spacing: 6px; font-weight: 700; }
.pin-input-lg { font-size: 22px; min-height: 52px; margin-bottom: 10px; }

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 16px;
  background: var(--bg-inset);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.check-label {
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-height: 32px;
}

.check-label input { width: 18px; height: 18px; accent-color: var(--accent-gold); }

.error-text { color: var(--danger-text); font-size: 12.5px; margin-bottom: 10px; font-weight: 600; }

/* Switch (checkbox visual) */
.switch-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  min-height: var(--tap);
  user-select: none;
}

.switch-label input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  width: 38px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: #cbd5e1;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
  transition: transform 0.2s;
}

.switch-label input:checked + .switch-track { background: var(--accent-gold); }
.switch-label input:checked + .switch-track::after { transform: translateX(16px); }
.switch-label input:focus-visible + .switch-track { outline: 2px solid var(--accent-gold); outline-offset: 2px; }

/* ========================================================
   OPERADOR / TURNO
   ======================================================== */
.shift-banner {
  padding: 14px var(--gutter) 4px;
}

.shift-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px;
}

.shift-grid .field { margin-bottom: 0; }

/* ========================================================
   PROGRESO
   ======================================================== */
.progress-card {
  margin: 12px var(--gutter) 4px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.progress-header span.pct {
  color: var(--accent-ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--success));
  border-radius: var(--radius-pill);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-foot {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========================================================
   NAVEGACIÓN POR PESTAÑAS (escritorio)
   En celular/tablet se usa la barra inferior.
   ======================================================== */
.tab-pills-container {
  display: none;
  gap: 4px;
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-pills-container::-webkit-scrollbar { display: none; }

.tab-pill {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  min-height: 36px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}

.tab-pill:hover { color: var(--text-strong); }

.tab-pill.active {
  background: var(--bg-card);
  color: var(--text-strong);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.tab-pill.admin-tab.active { color: #1d4ed8; }

/* ========================================================
   VISTAS
   ======================================================== */
.view-section {
  display: none;
  padding: 14px var(--gutter) 24px;
  animation: fadeIn 0.25s ease forwards;
}

.view-section.active { display: block; }

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

.section-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.section-headline h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.section-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.section-headline .badge-tag {
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  flex-shrink: 0;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.card-head > div { min-width: 0; flex: 1 1 200px; }

.card-title { display: block; color: var(--text-strong); font-size: 15px; font-weight: 700; line-height: 1.3; }
.card-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

.segmented > .stock-status-btn {
  flex: 1;
  background: transparent;
  border-color: transparent;
  border-radius: 8px;
  box-shadow: none;
}

.segmented > .stock-status-btn.active {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}

/* ========================================================
   CHECKLIST: CONTROLES
   ======================================================== */
.checklist-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.today-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.today-card-text { min-width: 0; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.today-card h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-strong);
  margin-top: 2px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

#banner-day-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

/* Selector Apertura / Cierre */
.form-shift-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.form-shift-btn {
  min-height: 56px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.form-shift-btn:hover { color: var(--text-strong); }

.form-shift-btn.active {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}

.form-shift-btn .shift-title { font-size: 14px; font-weight: 700; }
.form-shift-btn .shift-subtitle { font-size: 11.5px; color: var(--text-muted); }
.form-shift-btn.active .shift-subtitle { color: var(--accent-ink); font-weight: 600; }

/* Selector de día */
.day-chips-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 12px;
}

.day-chips-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.day-chips-header .accent-text { font-size: 12.5px; }

.day-chips-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.day-chips-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.c14-day-btn {
  min-height: var(--tap);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
}

.c14-day-btn:hover { background: var(--bg-elevated); border-color: var(--border-strong); }

.c14-day-btn.active {
  background: var(--accent-solid);
  color: #fff;
  border-color: var(--accent-solid);
  box-shadow: 0 2px 8px var(--accent-gold-glow);
}

.c14-day-btn.is-today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}

.c14-day-btn.active.is-today::after { background: #fff; }

/* Barra de filtros */
.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding: 0 2px;
}

.counter-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* Alerta Kegerators */
.kegerator-alert-banner {
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  border-left: 4px solid var(--danger);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.kegerator-alert-banner .alert-icon { font-size: 20px; line-height: 1.2; }

.kegerator-alert-banner .alert-text {
  font-size: 12.5px;
  font-weight: 500;
  color: #7f1d1d;
  line-height: 1.45;
}

.kegerator-alert-banner .alert-text strong { color: var(--danger-text); }

/* ========================================================
   TARJETAS DE TAREA
   ======================================================== */
.tasks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.task-group { margin-bottom: 20px; }

.task-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 14px;
  min-height: 60px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  user-select: none;
}

.task-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.task-card:active { transform: scale(0.99); }

.task-card.completed {
  background: var(--success-soft);
  border-color: var(--success-border);
}

.task-checkbox-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 1px;
}

.custom-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.task-card:hover .custom-checkbox { border-color: var(--accent-gold); }

.task-card.completed .custom-checkbox {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 0 3px var(--success-glow);
  animation: pop 0.25s ease;
}

@keyframes pop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.custom-checkbox svg { display: none; width: 15px; height: 15px; color: #fff; }
.task-card.completed .custom-checkbox svg { display: block; }

.task-content { flex: 1; min-width: 0; }

.task-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.4;
  transition: color 0.2s;
  overflow-wrap: anywhere;
}

.task-card.completed .task-title {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(100, 116, 139, 0.6);
}

.task-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 8px;
  font-size: 11.5px;
}

.meta-role-tag {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

/* Las plantillas JS ponen estilos en línea al tag de rol: se normalizan al tema */
.task-meta .meta-role-tag[style] {
  background: var(--accent-soft) !important;
  color: var(--accent-ink) !important;
  border-color: var(--accent-border) !important;
}

.meta-role-tag.barback { background: #e0f2fe; color: #0369a1; }

.task-card.not-applicable {
  opacity: 0.6;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  box-shadow: none;
  cursor: not-allowed;
}

.task-card.not-applicable:hover { opacity: 0.85; }

.tag-not-today {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

.goto-sig-wrap { margin-top: 18px; }

/* ========================================================
   BOTÓN PRINCIPAL
   ======================================================== */
.action-submit-btn {
  width: 100%;
  min-height: 50px;
  background: var(--accent-solid);
  border: none;
  color: #fff;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), 0 4px 12px var(--accent-gold-glow);
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
  text-align: center;
}

.action-submit-btn:hover { background: var(--accent-ink); }
.action-submit-btn:active { transform: scale(0.98); }

.action-submit-btn.btn-blue { background: var(--accent-solid); color: #fff; }
.action-submit-btn.btn-blue:hover { background: var(--accent-ink); }

.action-submit-btn.btn-amber {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), 0 4px 12px rgba(15, 23, 42, 0.18);
}

.action-submit-btn.btn-amber:hover { background: #1e293b; }

/* ========================================================
   FIRMAS & CIERRE
   ======================================================== */
.obs-field { margin-bottom: 14px; }

.sig-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.signature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  min-width: 0;
}

.admin-close-card {
  border-top: 4px solid var(--amber);
}

.signature-card h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inset-box {
  background: var(--bg-inset);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.canvas-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
}

#label-current-signer { font-size: 13px; color: var(--text-soft); font-weight: 600; min-width: 0; }

.canvas-wrapper {
  position: relative;
  background: #fff;
  background-image: radial-gradient(circle, #e2e8f0 1px, transparent 1px);
  background-size: 16px 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  touch-action: none;
  overflow: hidden;
  height: 150px;
  width: 100%;
}

.canvas-wrapper::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 30px;
  border-bottom: 1px solid #cbd5e1;
  pointer-events: none;
}

.canvas-hint {
  position: absolute;
  left: 16px;
  bottom: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #94a3b8;
  pointer-events: none;
}

canvas.sig-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.canvas-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 6px 2px;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.canvas-clear-btn:hover { color: var(--danger-text); }

.canvas-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.registered-sigs {
  margin-top: 16px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.registered-sigs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.registered-sigs-head strong { font-size: 12.5px; color: var(--text-soft); font-weight: 600; }
.registered-sigs-head .accent-text { font-size: 12.5px; white-space: nowrap; }

.registered-sigs-list { display: flex; flex-direction: column; gap: 8px; }

/* Imagen de firma guardada: fondo claro para que se lea el trazo */
.registered-sigs-list img { background: #fff !important; border-color: var(--border-subtle) !important; }

.empty-note {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 10px;
}

.audit-summary { margin-bottom: 14px; }

.closed-banner {
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  text-align: center;
}

.closed-banner strong { color: var(--success-text); font-size: 13.5px; display: block; }
.closed-banner span { font-size: 12.5px; color: #065f46; margin-top: 2px; display: block; }

/* ========================================================
   ADMIN
   ======================================================== */
.admin-subnav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin: 0 calc(var(--gutter) * -1) 12px;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.admin-subnav::-webkit-scrollbar { display: none; }
.admin-subnav .stock-status-btn { flex-shrink: 0; scroll-snap-align: start; }

.stock-status-btn {
  min-height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.stock-status-btn:hover { color: var(--text-strong); border-color: var(--border-strong); }

.stock-status-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-ink);
}

.stock-status-btn.ready {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success-text);
}

.label-btn {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-ink);
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
}

.admin-badge-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--admin-blue);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-badge-strip strong { color: var(--text-strong); font-size: 14.5px; }
.admin-badge-strip p { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 10px;
  text-align: left;
}

.kpi-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

.kpi-num.blue { color: #1d4ed8; }
.kpi-num.green { color: var(--success-text); }

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.reports-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }

.report-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}

.report-item-card:hover { border-color: #93c5fd; box-shadow: var(--shadow-sm); }

.report-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.report-status-pill,
.report-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--bg-elevated);
  color: var(--text-soft);
}

.report-status-pill.aprobado,
.report-status-badge.aprobado { background: var(--success-soft); color: var(--success-text); }

.report-status-pill.pendiente,
.report-status-badge.pendiente { background: var(--warn-soft); color: var(--warn-text); }

.report-status-pill.observado,
.report-status-badge.observado { background: var(--danger-soft); color: var(--danger-text); }

.report-meta-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }

/* Usuarios */
#users-mount-container > div:first-child { box-shadow: var(--shadow-sm); }

#users-cards-feed { display: grid; grid-template-columns: 1fr; gap: 10px; }

.user-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}

.user-card-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.user-card-info { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 220px; }
.user-card-info > div:last-child { min-width: 0; }

.user-avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.user-meta-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.user-meta-details {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-badge-role {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 11px;
}

.user-badge-admin {
  background: var(--warn-soft);
  color: var(--warn-text);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-weight: 700;
  font-size: 11px;
}

.user-badge-shift {
  background: var(--bg-elevated);
  color: var(--text-soft);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 11px;
}

.user-actions-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.user-btn-sm {
  min-height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.user-btn-sm:hover { background: var(--bg-subtle); color: var(--text-strong); }
.user-btn-sm.btn-danger { color: var(--danger-text); border-color: var(--danger-border); }
.user-btn-sm.btn-danger:hover { background: var(--danger-soft); }

/* ========================================================
   MATRIZ SEMANAL
   ======================================================== */
.matrix-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  background: #fff;
}

.matrix-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.matrix-table th {
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border-strong);
  border-right: 1px solid var(--border-subtle);
  text-transform: uppercase;
  white-space: nowrap;
}

.matrix-table th.task-col-head { text-align: left; min-width: 200px; }

.matrix-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.matrix-table tbody tr:hover td { background-color: var(--bg-subtle); }

.matrix-table td.matrix-cell-active {
  background: var(--accent-soft);
  text-align: center;
  color: var(--accent-ink);
  font-weight: 700;
}

.matrix-table td.matrix-cell-inactive {
  background: #f1f5f9;
  text-align: center;
  color: #cbd5e1;
  font-size: 11px;
}

/* Columna de tarea fija al desplazar horizontalmente */
.matrix-table th:first-child,
.matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}

.matrix-table td:first-child { background: #fff; box-shadow: 1px 0 0 var(--border-subtle), 4px 0 8px rgba(15, 23, 42, 0.05); }
.matrix-table th:first-child { z-index: 2; }

.matrix-note { margin-top: 10px; font-size: 12px; color: var(--text-muted); font-style: italic; }

@media (max-width: 640px) {
  .matrix-table th.task-col-head { min-width: 160px; }
  .matrix-table th,
  .matrix-table td { padding: 8px 6px; }
}

/* ========================================================
   BARRA DE NAVEGACIÓN INFERIOR (celular / tablet)
   ======================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding: 6px 8px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 4px;
  z-index: 90;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  flex: 1;
  max-width: 180px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  position: relative;
}

.nav-item svg { width: 22px; height: 22px; }

.nav-item.active {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.nav-item.admin-nav.active { color: #1d4ed8; background: #eff6ff; }

.nav-badge-dot {
  position: absolute;
  top: 4px;
  right: 20%;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
}

/* ========================================================
   FOOTER
   ======================================================== */
.app-footer {
  text-align: center;
  padding: 18px var(--gutter) 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  margin: 12px var(--gutter) 0;
}

/* ========================================================
   MODALES (hoja inferior en celular, diálogo centrado en tablet/escritorio)
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-overlay.open { display: flex; animation: fadeOverlay 0.2s ease; }

@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.modal-dialog {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 560px;
  padding: 12px 18px calc(18px + var(--safe-bottom));
  box-shadow: var(--shadow-md);
  animation: sheetUp 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-dialog::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: #cbd5e1;
  margin: 0 auto 12px;
}

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

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--text-strong); line-height: 1.3; }

.modal-title-row { display: flex; align-items: center; gap: 10px; }
.modal-title-icon { font-size: 22px; }

.modal-close-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.modal-close-btn:hover { background: #e2e8f0; color: var(--text-strong); }

.modal-text { font-size: 13.5px; color: var(--text-muted); margin-bottom: 12px; }
.modal-text strong { color: var(--text-strong); }

.push-box {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-soft);
}

.push-box strong { color: var(--text-strong); }

.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--text-strong);
}

.notif-feed {
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matrix-modal-dialog { max-width: 960px; }

/* ========================================================
   TOAST
   ======================================================== */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 14px);
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-align: center;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success-text); }

.lightbox-img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
}

/* ========================================================
   COMPONENTES LEGADOS (limpieza profunda / producción)
   ======================================================== */
.deep-clean-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 16px;
}

.day-badge-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.day-badge {
  background: var(--accent-solid);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.photo-required-tag {
  background: var(--danger-soft);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.deep-clean-title { font-size: 16px; font-weight: 700; color: var(--text-strong); margin-bottom: 6px; }
.deep-clean-instructions { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }

.day-selector-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 14px; }

.day-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 2px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.day-chip.active { background: var(--accent-solid); color: #fff; border-color: var(--accent-solid); font-weight: 700; }

.photo-evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }

.photo-capture-box {
  background: var(--bg-subtle);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  position: relative;
  cursor: pointer;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-capture-box:hover { border-color: var(--accent-gold); background: var(--accent-soft); }
.photo-capture-box.has-photo { border: 2px solid var(--success); padding: 0; }

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius-md) - 2px);
}

.photo-overlay-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 100%);
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: #fff;
  font-size: 10px;
}

.retake-btn { background: rgba(239, 68, 68, 0.9); border: none; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 9px; }
.photo-box-label { font-size: 12px; font-weight: 700; color: var(--text-strong); margin-top: 6px; }
.photo-box-hint { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.photo-input-hidden { display: none; }

.prep-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prep-info h4 { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.prep-info p { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.prep-actions { display: flex; align-items: center; gap: 6px; }

/* ========================================================
   ICONOGRAFÍA (js/icons.js)
   ======================================================== */
.ico {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  vertical-align: -0.2em;
  stroke-width: 2;
}

/* Contenedores flex: el gap ya separa ícono y texto */
.tab-pill .ico,
.btn .ico,
.stock-status-btn .ico,
.action-submit-btn .ico { width: 16px; height: 16px; vertical-align: 0; }

.stock-status-btn,
.user-btn-sm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

.form-shift-btn .shift-title { display: inline-flex; align-items: center; gap: 7px; }
.form-shift-btn .shift-title .ico { width: 17px; height: 17px; }
.form-shift-btn.active .shift-title .ico { color: var(--accent-ink); }

.kegerator-alert-banner .alert-icon { color: var(--danger); display: flex; }
.kegerator-alert-banner .alert-icon .ico { width: 20px; height: 20px; }

.modal-title-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-title-icon .ico { width: 19px; height: 19px; }

.closed-banner strong { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }

.tag-not-today .ico,
.task-meta .ico { width: 13px; height: 13px; vertical-align: -0.15em; }

.matrix-table td.matrix-cell-active .ico { width: 15px; height: 15px; stroke-width: 2.5; vertical-align: middle; }

.pwa-banner span { display: inline-flex; align-items: center; gap: 8px; }

/* Número de paso en las tarjetas de firma */
.card-title { display: flex; align-items: center; gap: 8px; }

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid var(--accent-border);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-close-card .step-num { background: var(--warn-soft); color: var(--warn-text); border-color: var(--warn-border); }

/* Avatares con iniciales */
.user-avatar-badge {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--accent-ink);
}

/* ========================================================
   RESPONSIVE
   ======================================================== */

/* Celulares pequeños */
@media (max-width: 380px) {
  :root { --gutter: 12px; }
  #role-btn-label { display: none; }
  .role-switcher-btn { width: 40px; padding: 0; justify-content: center; }
  .shift-grid { grid-template-columns: 1fr; }
  .brand-text .status-badge { display: none; }
  .day-chips-grid { gap: 3px; }
  .c14-day-btn { font-size: 11px; }
  .field-row { grid-template-columns: 1fr; }
  .kpi-num { font-size: 20px; }
}

/* Celulares */
@media (max-width: 520px) {
  .today-card { padding: 12px 14px; }
  .today-card h2 { font-size: 17px; }
  #banner-day-subtitle { font-size: 12.5px; }
  .today-card .btn { padding: 6px 10px; }
  .progress-tags { display: none; }
  .admin-badge-strip { flex-direction: column; align-items: stretch; }
  .canvas-foot .btn { flex: 1; }
  .push-box { flex-direction: column; align-items: stretch; }
  .user-actions-btns { width: 100%; }
  .user-actions-btns .user-btn-sm { flex: 1; }
}

/* Tablet (vertical y horizontal) */
@media (min-width: 640px) {
  :root { --gutter: 24px; }

  .app-layout { max-width: 820px; }

  /* Operador y progreso lado a lado */
  .side-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 14px;
    padding: 18px var(--gutter) 0;
  }

  .shift-banner,
  .progress-card {
    margin: 0;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }

  .shift-grid { grid-template-columns: 1fr; gap: 12px; }
  .progress-card { justify-content: center; }
  .progress-header span.pct { font-size: 26px; }

  .view-section { padding-top: 18px; }

  .modal-overlay { align-items: center; padding: 24px; }

  .modal-dialog {
    border-bottom: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    max-height: 88vh;
    animation: zoomIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .modal-dialog::before { display: none; }
  .modal-sm { max-width: 420px; }

  .form-shift-btn .shift-title { font-size: 15px; }

  .checklist-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .today-card { grid-column: 1 / -1; }

  .tasks-grid,
  .reports-grid,
  #users-cards-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .user-card-item { align-items: flex-start; }

  .canvas-wrapper { height: 170px; }
}

/* Tablet vertical estrecha: las tareas en una columna se leen mejor */
@media (min-width: 640px) and (max-width: 819px) {
  .tasks-grid { grid-template-columns: 1fr; }
}

/* Escritorio: layout de dos columnas */
@media (min-width: 1024px) {
  :root {
    --gutter: 28px;
    --header-height: 68px;
  }

  body { font-size: 15px; }

  .app-viewport { padding-bottom: 0; }

  .top-header { padding: 12px max(var(--gutter), calc((100vw - 1400px) / 2 + var(--gutter))); }
  .brand-text h1 { font-size: 18px; }
  .brand-text .status-badge { font-size: 12.5px; }

  .app-layout {
    max-width: 1400px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 28px;
    padding: 24px var(--gutter) 0;
    align-items: start;
  }

  .side-panel {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
  }

  .shift-grid { grid-template-columns: 1fr; gap: 14px; }

  .progress-card { padding: 18px; }
  .progress-header span.pct { font-size: 30px; }
  .progress-foot { flex-direction: column; gap: 4px; }
  .progress-tags { display: block; }

  .tab-pills-container { display: flex; margin-bottom: 18px; }

  .view-section { padding: 0 0 24px; }

  .section-headline h2 { font-size: 22px; }

  .checklist-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    margin-bottom: 14px;
  }

  .today-card { padding: 18px 20px; }
  .today-card h2 { font-size: 22px; }

  .form-shift-btn { min-height: 64px; }

  .tasks-grid { grid-template-columns: 1fr; }

  .sig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

  .admin-subnav { margin: 0 0 16px; padding-left: 0; padding-right: 0; }

  .admin-kpi-grid { gap: 14px; }
  .kpi-card { padding: 18px; }
  .kpi-num { font-size: 30px; }

  /* Sin barra inferior en escritorio: la navegación va en las pestañas */
  .bottom-nav { display: none; }

  .toast-container { bottom: 28px; }

  .app-footer { margin: 12px 0 0; padding-bottom: 24px; }
}

/* Escritorio amplio: tareas en dos columnas */
@media (min-width: 1280px) {
  .tasks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (hover: none) {
  .task-card:hover { box-shadow: var(--shadow-xs); border-color: var(--border-subtle); }
  .task-card.completed:hover { border-color: var(--success-border); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Etiqueta de tarea crítica (generada por app.js) */
.tag-critical {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--danger-text);
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  vertical-align: 1px;
}

/* ========================================================
   ESTILOS DE SESIÓN DE USUARIO POR ROL & LOGIN
   ======================================================== */
.user-session-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(8px);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.user-session-chip.admin {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
}

.user-session-avatar {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
}

.user-session-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-session-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.user-session-role {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
}

.user-session-chip.admin .user-session-role {
  color: #f59e0b;
}

.btn-user-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 4px;
}

.btn-user-switch:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: var(--accent-gold);
}

/* Modal Login Card */
.modal-login-card {
  max-width: 520px;
  width: 95%;
  background: #0f172a;
  border: 1px solid rgba(217, 119, 6, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(217, 119, 6, 0.15);
  border-radius: 20px;
  padding: 28px 24px;
}

.login-brand-head {
  text-align: center;
  margin-bottom: 22px;
}

.brand-crest {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
}

.login-brand-head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 4px;
}

.login-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.login-prompt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 14px;
  text-align: center;
}

.login-users-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding: 2px;
}

@media (max-width: 480px) {
  .login-users-grid {
    grid-template-columns: 1fr;
  }
}

.user-login-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.user-login-card:hover {
  background: #273549;
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.user-login-card.admin-card {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

.user-login-card.admin-card:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.card-avatar {
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-role-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
}

.user-login-card.admin-card .card-role-label {
  color: #fbbf24;
}

/* Step 2: PIN Entry */
.btn-back-users {
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}

.btn-back-users:hover {
  color: var(--accent-gold);
}

.selected-user-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.user-large-avatar {
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-user-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
}

.badge-role {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.pin-entry-box {
  margin-bottom: 16px;
}

.pin-display {
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: 10px !important;
  text-align: center !important;
  padding: 12px !important;
  border: 2px solid var(--accent-gold) !important;
  background: #0b1120 !important;
  color: #fff !important;
  border-radius: 12px !important;
}

.login-error {
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin-top: 6px;
}

/* Numeric Keypad */
.numeric-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.keypad-btn {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.keypad-btn:active, .keypad-btn:hover {
  background: #334155;
  border-color: var(--accent-gold);
  transform: scale(0.97);
}

.keypad-clear {
  color: #f87171;
}

.keypad-back {
  color: #38bdf8;
}

/* ========================================================
   FIRMA DIGITAL PROPIA DEL BARTENDER (EN SU ROL)
   ======================================================== */
.bartender-own-sig-card {
  background: #1e293b;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
  margin-bottom: 24px;
}

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

.step-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.bartender-own-sig-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.sig-sub {
  font-size: 12.5px;
  color: var(--text-soft);
  margin: 0;
}

.badge-status-pending {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.badge-status-signed {
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.canvas-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 10px;
}

.sig-success-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 16px;
  border-radius: 12px;
  flex-wrap: wrap;
}

.success-icon-wrap {
  font-size: 28px;
}

.success-details {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.success-details strong {
  font-size: 14px;
  color: #10b981;
}

.sig-preview-wrap {
  margin-top: 6px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 8px;
  display: inline-block;
  max-width: 220px;
}

.sig-preview-wrap img {
  max-height: 48px;
  display: block;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.4));
}

/* ========================================================
   REQUERIMIENTO Y ADJUNCIÓN DE FOTOS EN TAREAS
   ======================================================== */
.tag-photo-required {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.task-photo-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-left: 28px;
}

.btn-task-camera {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-task-camera:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.task-photo-thumb-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-photo-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(56, 189, 248, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.task-photo-thumb:hover {
  transform: scale(1.15);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.btn-remove-photo {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
}

.btn-remove-photo:hover {
  color: #f87171;
}

/* Lightbox Modal */
.lightbox-card {
  max-width: 640px;
  width: 95%;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.btn-close-lightbox {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-lightbox:hover {
  background: #ef4444;
}

.lightbox-image-wrap {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  border-radius: 10px;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.lightbox-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* ========================================================
   CHECKFLOW PWA INSTALLATION BANNER & ACTION
   ======================================================== */
.pwa-banner {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.15), rgba(245, 158, 11, 0.12));
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 90;
  animation: slideDown 0.3s ease;
}

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

.btn-install-header {
  animation: pulseInstall 2.5s infinite;
}

@keyframes pulseInstall {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(56, 189, 248, 0); }
}

/* ========================================================
   ACTIVE OPERATOR CARD (EL USUARIO LOGEADO ES EL SELECCIONADO)
   ======================================================== */
.active-operator-card {
  background: #1e293b !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: var(--radius-lg) !important;
  padding: 14px 16px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
}

.operator-profile-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.operator-avatar {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.operator-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.operator-sublabel {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
}

.operator-fullname {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operator-badge-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
}

.btn-change-operator {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-change-operator:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #fff;
}

/* ========================================================
   NOTIFICATIONS PUSH MODAL
   ======================================================== */
.notif-modal-dialog {
  max-width: 540px;
  width: 95%;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
}

.push-permission-card {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.btn-clear-notifs {
  background: none;
  border: none;
  color: #f87171;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-clear-notifs:hover {
  background: rgba(239, 68, 68, 0.15);
}

