/* ============================================================
   CREW – Sistema de Diseño
   Paleta: Negro / Dorado-cobre / Blancos suaves
   Tipografía: Cormorant Garamond (headings) + Inter (body)
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --gold:          #c9a96e;
  --gold-light:    #e2c98a;
  --gold-dark:     #9a7a48;
  --gold-muted:    #7a6140;
  --black:         #0a0a0a;
  --black-soft:    #111111;
  --black-card:    #161616;
  --black-border:  #222222;
  --black-input:   #1c1c1c;
  --white:         #f5f0e8;
  --white-soft:    #d4cfc6;
  --text-muted:    #6b6560;
  --danger:        #c0392b;
  --warning:       #e67e22;
  --success:       #27ae60;

  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Inter', system-ui, sans-serif;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     32px;
  --radius-full:   9999px;

  --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card:   0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold:   0 0 24px rgba(201, 169, 110, 0.15);
}

/* ── Reset base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.crew-body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Utilidades ────────────────────────────────────────────────────────────── */
.text-gold         { color: var(--gold) !important; }
.text-gold-light   { color: var(--gold-light) !important; }
.text-muted-gold   { color: var(--text-muted) !important; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black) !important;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  box-shadow: 0 2px 16px rgba(201, 169, 110, 0.2);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(201, 169, 110, 0.35);
}
.btn-outline-gold {
  border: 1px solid var(--gold-dark);
  color: var(--gold) !important;
  background: transparent;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-outline-gold:hover {
  background: rgba(201, 169, 110, 0.08);
  border-color: var(--gold);
}
.btn-xs { padding: 4px 10px; font-size: 0.78rem; }

.py-6 { padding-top: 5rem; padding-bottom: 5rem; }

/* ── Logo ──────────────────────────────────────────────────────────────────── */
.crew-logo, .crew-logo:hover {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold) !important;
  text-decoration: none;
  letter-spacing: 0.08em;
}
.crew-logo-sm {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.1em;
}
.crew-logo-lg {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.logo-icon { color: var(--gold); margin-right: 6px; }

/* ── Inputs ────────────────────────────────────────────────────────────────── */
.crew-input {
  background: var(--black-input) !important;
  border: 1px solid var(--black-border) !important;
  color: var(--white) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body);
  padding: 0.75rem 1rem !important;
  transition: border-color var(--transition);
}
.crew-input:focus {
  border-color: var(--gold-dark) !important;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12) !important;
  outline: none;
}
.crew-input::placeholder { color: var(--text-muted) !important; }
.crew-input--sm { padding: 0.45rem 0.8rem !important; font-size: 0.875rem !important; }

.comment-input {
  background: var(--black-input) !important;
  border: 1px solid var(--black-border) !important;
  color: var(--white) !important;
  border-radius: var(--radius-sm) !important;
  resize: vertical;
  transition: border-color var(--transition);
}
.comment-input:focus {
  border-color: var(--gold-dark) !important;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12) !important;
}
.comment-input::placeholder { color: var(--text-muted) !important; }

/* ── Alertas / mensajes ────────────────────────────────────────────────────── */
.crew-alert {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
}
.crew-alert-danger {
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: #e57373;
}
.crew-alert-warning {
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid rgba(201, 169, 110, 0.2);
  color: var(--gold-light);
}
.field-error {
  color: #e57373;
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.landing-nav {
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--black-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.landing-hero {
  position: relative;
  min-height: calc(100vh - 70px);
  background:
    radial-gradient(ellipse at 60% 40%, rgba(201, 169, 110, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(201, 169, 110, 0.04) 0%, transparent 50%),
    var(--black);
  overflow: hidden;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a96e' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}
.hero-badge {
  display: inline-block;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.25);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: var(--radius-full);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--white-soft);
  font-weight: 300;
  line-height: 1.8;
}

.landing-features {
  background: var(--black-soft);
  border-top: 1px solid var(--black-border);
  border-bottom: 1px solid var(--black-border);
}
.feature-card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  height: 100%;
}
.feature-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}
.feature-icon {
  font-size: 2.5rem;
  color: var(--gold);
}
.feature-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.feature-text {
  color: var(--white-soft);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.landing-footer {
  background: var(--black);
  border-top: 1px solid var(--black-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RATING PAGE (perfil del camarero)
   ═══════════════════════════════════════════════════════════════════════════ */
.rating-page {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 169, 110, 0.07) 0%, transparent 50%),
    var(--black);
}
.rating-topbar {
  border-bottom: 1px solid var(--black-border);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
}
.rating-footer {
  border-top: 1px solid var(--black-border);
}

/* Tarjeta central */
.rating-card {
  width: 100%;
  max-width: 480px;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-card);
}

/* Foto del camarero */
.waiter-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-dark);
  box-shadow: 0 0 0 6px rgba(201, 169, 110, 0.1);
}
.waiter-photo-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--black-input);
  border: 2px solid var(--black-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
  margin: 0 auto;
}
.waiter-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--white);
  margin: 0.25rem 0 0;
  letter-spacing: 0.01em;
}
.waiter-business {
  color: var(--gold-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

/* ── Selector de estrellas ──────────────────────────────────────────────────── */
.star-group { border-bottom: 1px solid var(--black-border); padding-bottom: 2rem; }
.star-group:last-of-type { border-bottom: none; }

.star-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.star-selector {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}
.star-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 2.8rem;
  color: var(--black-border);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
}
.star-btn.active {
  color: var(--gold);
  transform: scale(1.1);
}
/* El hover y el highlight progresivo los gestiona íntegramente stars.js */

/* Submit button */
.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Pantalla de agradecimiento ─────────────────────────────────────────────── */
.thanks-wrapper {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.thanks-wrapper.thanks-animate {
  opacity: 1;
  transform: translateY(0);
}
.thanks-icon {
  font-size: 3rem;
  color: var(--gold);
  animation: pulse-gold 2s infinite;
}
.thanks-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--white);
}
.thanks-subtitle {
  color: var(--white-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}
.thanks-stars {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold);
}
.thanks-stars span {
  display: inline-block;
  animation: star-pop 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.thanks-stars span:nth-child(1) { animation-delay: 0.0s; }
.thanks-stars span:nth-child(2) { animation-delay: 0.1s; }
.thanks-stars span:nth-child(3) { animation-delay: 0.2s; }
.thanks-stars span:nth-child(4) { animation-delay: 0.3s; }
.thanks-stars span:nth-child(5) { animation-delay: 0.4s; }

@keyframes star-pop {
  0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
  70%  { transform: scale(1.25) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes pulse-gold {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50%       { text-shadow: 0 0 20px rgba(201, 169, 110, 0.5); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.dashboard-body { background: var(--black); }

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.dashboard-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--black-card);
  border-right: 1px solid var(--black-border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--black-border);
}
.sidebar-nav { flex: 1; }
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(201, 169, 110, 0.08);
  color: var(--gold-light);
}
.sidebar-footer {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--black-border);
  padding-top: 1rem;
}

/* ── Main ────────────────────────────────────────────────────────────────────── */
.dashboard-main {
  flex: 1;
  padding: 2.5rem 2rem;
  overflow-y: auto;
}
.dashboard-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

/* ── KPIs ────────────────────────────────────────────────────────────────────── */
.kpi-card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}
.kpi-card:hover { border-color: var(--gold-dark); }
.kpi-card--gold {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.1), rgba(154, 122, 72, 0.05));
  border-color: var(--gold-dark);
}
.kpi-icon { font-size: 1.5rem; color: var(--gold); margin-bottom: 0.5rem; }
.kpi-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.kpi-label { color: var(--text-muted); font-size: 0.78rem; margin-top: 4px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── Empleado del mes ────────────────────────────────────────────────────────── */
.employee-month-card {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.1), rgba(154, 122, 72, 0.04));
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
}
.employee-month-placeholder {
  background: rgba(201, 169, 110, 0.04);
  border: 1px dashed var(--black-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.employee-crown { font-size: 2.5rem; }
.employee-badge {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-muted);
  font-weight: 600;
}
.employee-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}
.employee-stats { color: var(--gold); font-size: 0.9rem; }
.employee-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-dark);
}

/* ── Filtro de fechas ────────────────────────────────────────────────────────── */
.date-filter-form {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

/* ── Ranking ─────────────────────────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
}
.ranking-list { display: flex; flex-direction: column; gap: 0.75rem; }

.ranking-row {
  display: grid;
  grid-template-columns: 50px 1fr 2fr auto auto;
  align-items: center;
  gap: 1rem;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: var(--transition);
}
.ranking-row:hover { border-color: var(--gold-dark); }
.ranking-row--top {
  border-color: var(--gold-dark);
  background: linear-gradient(90deg, rgba(201, 169, 110, 0.06) 0%, var(--black-card) 100%);
}

.rank-position { text-align: center; }
.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
}
.rank-medal--gold  { color: #fbbf24; }
.rank-medal--silver { color: #94a3b8; }
.rank-medal--bronze { color: #b45309; }
.rank-number {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-muted);
}
.rank-photo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-dark);
  flex-shrink: 0;
}
.rank-photo-placeholder {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--black-input);
  border: 1px solid var(--black-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.rank-name { font-weight: 600; color: var(--white); font-size: 0.95rem; }
.rank-count { font-size: 0.78rem; color: var(--text-muted); }

.rank-scores { display: flex; flex-direction: column; gap: 6px; }
.rank-score-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}
.score-label { color: var(--text-muted); width: 50px; flex-shrink: 0; }
.score-bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--black-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.score-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.score-value { color: var(--gold-light); font-weight: 600; width: 30px; text-align: right; }

.rank-overall { min-width: 64px; }
.overall-stars {
  color: var(--gold-dark);
  font-size: 0.7rem;
  letter-spacing: 1px;
  margin-top: 2px;
}
.rank-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* ============================================================
   CRUD PANEL  –  tablas, badges, botones, formularios
   ============================================================ */

/* --- Tabla genérica CRUD --- */
.crud-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--black-border);
}
.crud-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.crud-table thead {
  background: var(--black-card);
}
.crud-table thead th {
  padding: 12px 16px;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--black-border);
  white-space: nowrap;
}
.crud-table tbody tr {
  border-bottom: 1px solid var(--black-border);
  transition: background 0.15s;
}
.crud-table tbody tr:last-child { border-bottom: none; }
.crud-table tbody tr:hover { background: rgba(201,169,110,.04); }
.crud-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  color: var(--white);
}
.td-comment { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Badges de estado --- */
.crew-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.crew-badge--green {
  background: rgba(74,222,128,.12);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,.25);
}
.crew-badge--muted {
  background: rgba(255,255,255,.06);
  color: var(--text-muted);
  border: 1px solid var(--black-border);
}

/* --- Botón icono (en tabla) --- */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  text-decoration: none;
}

/* --- Botón danger outline (icono eliminar) --- */
.btn-danger-outline {
  color: #f87171;
  border: 1px solid rgba(248,113,113,.3);
  background: transparent;
}
.btn-danger-outline:hover {
  background: rgba(248,113,113,.12);
  color: #fca5a5;
  border-color: rgba(248,113,113,.5);
}

/* --- Botón danger sólido (confirmar eliminar) --- */
.btn-danger-solid {
  background: #ef4444;
  color: #fff;
  border: 1px solid #ef4444;
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  transition: background 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-danger-solid:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

/* --- Tarjeta de formularios CRUD --- */
.crud-form-card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  max-width: 680px;
}

/* --- Confirm de borrado --- */
.delete-confirm-card { border-color: rgba(248,113,113,.2); }
.delete-warning {
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #fca5a5;
  font-size: 0.9rem;
}
.delete-warning strong { color: #f87171; }

/* --- Fotos camarero --- */
.waiter-photo-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gold-dark);
}
.waiter-photo-sm {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--black-border);
}
.waiter-photo-lg {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gold-dark);
}
.waiter-avatar-sm,
.waiter-avatar-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--black-border);
  color: var(--gold-dark);
}
.waiter-avatar-sm { width: 40px; height: 40px; font-size: 1.3rem; }
.waiter-avatar-lg { width: 80px; height: 80px; font-size: 2.2rem; }

/* --- Stars compactas (en tabla) --- */
.stars-small {
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* --- Hints y errores de campo --- */
.form-hint { font-size: 0.8rem; color: var(--text-muted); }
.field-error { font-size: 0.82rem; color: #f87171; }

/* --- Fila cabecera sección --- */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.section-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold-light);
  font-weight: 500;
  margin: 0;
}

/* --- Barra de filtros --- */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.filter-bar__fields {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1;
}
.filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.filter-bar__actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.crew-select { background: var(--black-bg); }

/* --- Paginación --- */
.pagination-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--black-border);
  color: var(--gold);
  text-decoration: none;
  transition: background 0.15s;
}
.page-btn:hover { background: var(--black-card); color: var(--gold-light); }
.page-info { font-size: 0.85rem; color: var(--text-muted); }

/* --- Estado vacío --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

/* --- Back link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--black-border);
  color: var(--gold);
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.15s;
  flex-shrink: 0;
}
.back-link:hover { background: var(--black-card); color: var(--gold-light); }

/* --- Detalles de rating en página de borrado --- */
.rating-delete-info {
  background: var(--black-bg);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
}

/* --- btn-sm --- */
.btn-sm { padding: 7px 16px !important; font-size: 0.82rem !important; }

/* --- Utilidades de espaciado extra --- */
.mb-6 { margin-bottom: 3rem !important; }
.mt-6 { margin-top: 3rem !important; }
.py-6 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

.overall-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.overall-stars { font-size: 0.7rem; color: var(--gold-dark); }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state { color: var(--text-muted); }

/* ── Login ───────────────────────────────────────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-card);
}

/* ── Responsive dashboard ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dashboard-sidebar {
    display: none; /* Sidebar oculto en móvil, mejorable con off-canvas */
  }
  .dashboard-main { padding: 1.5rem 1rem; }
  .ranking-row {
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: auto auto;
  }
  .rank-scores { display: none; }
  .rank-actions { grid-column: 3; grid-row: 1; }
  .rank-qr { display: none !important; }
}

/* ── Scrollbar personalizado ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--black-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }
