/* Cafeterías web — tema dorado/negro (Las Vegas Bar & Cafetería) */
:root {
  --gold: #d4af37;
  --gold-light: #f0d97a;
  --gold-dark: #9a7b1e;
  --bg: #0e0d0b;
  --card: #1a1815;
  --card2: #23201c;
  --text: #f5efe0;
  --muted: #b8ad93;
  --line: #3a332a;
  --danger: #c0392b;
  --green: #27ae60;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.5; }
a { color: var(--gold-light); }

/* --- Público --- */
.hero { text-align: center; padding: 24px 16px 12px; background: linear-gradient(180deg, #1c1813, var(--bg)); }
.logo { width: 210px; height: 210px; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); background: #000; box-shadow: 0 0 0 5px #000, 0 6px 24px rgba(0,0,0,.6); }
.logo.small { width: 120px; height: 120px; }
.hero h1 { color: var(--gold); font-size: 1.6rem; margin-top: 12px; letter-spacing: .5px; }
.tagline { color: var(--muted); font-size: .95rem; }

.sticky-bar { position: sticky; top: 0; z-index: 10; background: rgba(14, 13, 11, .96); padding: 10px 12px; border-bottom: 1px solid var(--line); }
#search { width: 100%; padding: 12px 14px; font-size: 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); margin-bottom: 8px; }
.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-btn { flex: 0 0 auto; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--gold-dark); background: var(--card); color: var(--text); font-size: .95rem; cursor: pointer; }
.cat-btn.active { background: var(--gold); color: #1a1405; font-weight: 700; border-color: var(--gold); }

.menu, .offers { max-width: 900px; margin: 0 auto; padding: 16px 12px; }
.offers { background: linear-gradient(180deg, #241c08, transparent); border-bottom: 1px solid var(--line); }
.offers h2, .cat-group h2 { color: var(--gold); font-size: 1.25rem; margin: 8px 0 12px; }
.cat-group { margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.card-img { width: 100%; height: 110px; object-fit: cover; display: block; }
@media (min-width: 700px) { .card-img { height: 150px; } }
.card-img.placeholder { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--gold-dark); background: var(--card2); }
.card-body { padding: 10px; position: relative; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.card-top h3 { font-size: .95rem; line-height: 1.3; }
.desc { color: var(--muted); font-size: .85rem; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vermas-toggle { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; margin: 0; }
.vermas-toggle:checked ~ .desc { display: block; -webkit-line-clamp: unset; overflow: visible; }
.vermas { color: var(--gold); font-size: .8rem; cursor: pointer; display: inline-block; margin-top: 2px; }
.vermas .menos { display: none; }
.vermas-toggle:checked ~ .vermas .mas { display: none; }
.vermas-toggle:checked ~ .vermas .menos { display: inline; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; flex-wrap: wrap; gap: 4px; }
.price { font-weight: 700; color: var(--gold-light); font-size: 1.05rem; }
.price-old { text-decoration: line-through; color: var(--muted); margin-right: 6px; font-size: .9rem; }
.offer-price { color: #ffdf5e; }
.badge { background: var(--gold); color: #1a1405; font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 10px; white-space: nowrap; }
.warn-badge { background: var(--danger); color: #fff; }
.card.unavailable { opacity: .55; }
.no-avail { color: #e74c3c; font-size: .85rem; font-weight: 700; }
.no-results { text-align: center; color: var(--muted); padding: 32px 12px; }
footer { text-align: center; padding: 28px 12px 40px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 16px; }

/* --- Admin: shell clásico (sidebar + topbar + contenido) --- */
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar { display: none; }
.admin-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #14120f; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-brand { color: var(--gold); font-weight: 800; white-space: nowrap; }
.admin-topbar h1 { font-size: 1.2rem; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.bell { position: relative; text-decoration: none; font-size: 1.25rem; }
.bell-count { position: absolute; top: -6px; right: -10px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 800; border-radius: 10px; padding: 1px 6px; }
.topbar-link { color: var(--muted); font-size: .9rem; text-decoration: none; white-space: nowrap; }
.topbar-link:hover { color: var(--gold-light); }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); white-space: nowrap; font-size: .92rem; }
.admin-nav a.active { background: var(--gold); color: #1a1405; font-weight: 700; }
.admin-main { max-width: 1080px; width: 100%; margin: 0 auto; padding: 20px 16px 48px; }
@media (min-width: 960px) {
  .sidebar { display: flex; flex-direction: column; width: 248px; flex: 0 0 248px; background: #14120f; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; padding: 20px 12px 16px; }
  .sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
  .sidebar-brand img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; background: #000; }
  .sidebar-brand b { display: block; color: var(--gold); font-size: 1rem; line-height: 1.25; }
  .sidebar-brand span { color: var(--muted); font-size: .78rem; }
  .nav-group { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 16px 10px 6px; }
  .sidebar a.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .95rem; border-left: 3px solid transparent; }
  .sidebar a.nav-link:hover { background: var(--card); }
  .sidebar a.nav-link.active { background: rgba(212, 175, 55, .12); border-left-color: var(--gold); color: var(--gold-light); font-weight: 700; }
  .nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 800; border-radius: 10px; padding: 1px 7px; }
  .sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
  .sidebar-user { display: flex; flex-direction: column; padding: 10px; border-radius: 8px; text-decoration: none; color: var(--text); margin-bottom: 8px; }
  .sidebar-user:hover { background: var(--card); }
  .sidebar-user b { font-size: .95rem; }
  .sidebar-user span { color: var(--muted); font-size: .8rem; }
  .role-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .topbar-brand, .admin-nav { display: none; }
  .admin-topbar h1 { font-size: 1.35rem; }
  .admin-main { padding: 24px 28px 48px; }
}

/* KPI: 4 tarjetas arriba, número grande + etiqueta + detalle */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 700px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--gold-dark); border-radius: 14px; padding: 18px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.kpi-num { font-size: 2rem; font-weight: 800; color: var(--gold-light); line-height: 1.25; }
.kpi-sub { color: var(--muted); font-size: .85rem; }
.kpi-sub a { color: var(--gold-light); text-decoration: none; }
.kpi.danger { border-top-color: var(--danger); }
.kpi.danger .kpi-num { color: #e74c3c; }
.kpi.ok { border-top-color: var(--green); }

/* Tarjetas del panel (panel-card para no chocar con .card del menú público) */
.dash-grid { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 800px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.panel-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.panel-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.panel-card-head h2 { font-size: 1.05rem; color: var(--gold); margin: 0; }
.panel-card-head a { font-size: .88rem; color: var(--gold-light); text-decoration: none; white-space: nowrap; }
.panel-card.no-pad { padding: 0; overflow-x: auto; }
.panel-card .table { margin-top: 0; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.mini-stat b { font-size: 1.35rem; color: var(--gold-light); }
.mini-stat span { color: var(--muted); font-size: .88rem; }
.low-list { list-style: none; }
.low-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.low-list li:last-child { border-bottom: 0; }
.ok { color: var(--green); }
.hint { color: var(--muted); font-size: .9rem; margin-top: 12px; }
.muted { color: var(--muted); font-size: .85rem; }
.error { color: #ff6b5e; margin: 12px 0; }

/* Píldoras de estado */
.pill { display: inline-block; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.pill-green { background: rgba(39, 174, 96, .18); color: #5fd68f; }
.pill-gray { background: rgba(184, 173, 147, .18); color: var(--muted); }
.pill-red { background: rgba(192, 57, 43, .2); color: #ff8a7a; }
.pill-gold { background: rgba(212, 175, 55, .2); color: var(--gold-light); }

.form { display: flex; flex-direction: column; gap: 12px; max-width: 600px; }
.form.inline { max-width: none; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: .95rem; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; }
.form input[type="text"], .form input[type="tel"], .form input[type="number"], .form input[type="password"],
.form input[type="file"], .form input:not([type]), .form select, .form textarea {
  padding: 11px 12px; font-size: 1rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .18); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form .row { grid-template-columns: 1fr; } }
.btn { display: inline-block; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font-size: 1rem; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { border-color: var(--gold-dark); }
.btn.primary { background: var(--gold); color: #1a1405; font-weight: 700; border-color: var(--gold); }
.btn.primary:hover { background: var(--gold-light); }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.btn.danger { background: transparent; border-color: var(--danger); color: #ff8a7a; }
.btn.danger:hover { background: var(--danger); color: #fff; }

.table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: .95rem; }
.table th, .table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--gold); font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover td { background: rgba(212, 175, 55, .04); }
.table tr.low td { background: rgba(192, 57, 43, .12); }
.table tr.unread td { background: rgba(212, 175, 55, .08); }
.actions { white-space: nowrap; }
.actions form { display: inline; }
.thumb { max-width: 200px; border-radius: 8px; }
.thumb-sm { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; }
.add-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.add-box summary { cursor: pointer; font-weight: 700; color: var(--gold-light); font-size: 1.05rem; }
.add-box form { margin-top: 14px; }

.login-wrap { max-width: 400px; margin: 0 auto; padding: 48px 16px; text-align: center; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px 24px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.login-wrap h1 { font-size: 1.3rem; color: var(--gold); margin: 16px 0; }
.login-wrap .form { text-align: left; margin-top: 16px; }

/* --- Código QR --- */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.qr-frame { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); }
.qr-frame svg { display: block; width: min(320px, 78vw); height: auto; }
.qr-url { font-size: .95rem; word-break: break-all; text-align: center; }
.qr-url a { color: var(--gold-light); }

/* --- Landing --- */
.landing { max-width: 480px; margin: 0 auto; padding: 40px 16px 48px; text-align: center; }
.landing .logo { display: block; margin: 0 auto; }
.landing h1 { color: var(--gold); font-size: 1.5rem; margin-top: 16px; letter-spacing: .5px; }
.landing-hint { color: var(--muted); margin: 22px 0 14px; font-size: 1.05rem; }
.choice-list { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.choice { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; color: var(--text); }
.choice-icon { font-size: 1.8rem; }
.choice-text { flex: 1; display: flex; flex-direction: column; }
.choice-text small { color: var(--muted); font-size: .85rem; }
.choice-arrow { color: var(--gold); font-size: 1.6rem; }

/* --- Menú: encabezado compacto --- */
.menu-header { text-align: center; padding: 12px 16px 4px; }
.menu-header .logo { width: 84px; height: 84px; }
.menu-header h1 { color: var(--gold); font-size: 1.25rem; margin-top: 8px; }
.back { display: block; text-align: left; color: var(--gold-light); text-decoration: none; font-size: .95rem; }

/* --- Formularios públicos --- */
.form-page { max-width: 480px; margin: 0 auto; padding: 20px 16px 48px; }
.form-page h1 { color: var(--gold); font-size: 1.35rem; margin: 12px 0 6px; }
.form-page .muted { display: block; margin-bottom: 16px; }
.stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; font-size: 2.8rem; margin: 4px 0 16px; }
.stars input { display: none; }
.stars label { cursor: pointer; color: #4a4436; line-height: 1; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--gold); }
.stars-static { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.thanks { text-align: center; padding-top: 64px; }
.thanks-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--gold); color: #1a1405; font-size: 2.4rem; line-height: 72px; margin: 0 auto 16px; font-weight: 700; }
.thanks .btn { margin: 8px 4px 0; }

/* --- Caja de notificaciones en la landing --- */
.notify-box { background: linear-gradient(180deg, #241c08, var(--card)); border: 1px solid var(--gold-dark); border-radius: 14px; padding: 20px 16px; margin-top: 28px; text-align: left; }
.notify-box h2 { color: var(--gold); font-size: 1.15rem; text-align: center; }
.notify-box p { color: var(--muted); text-align: center; margin: 4px 0 14px; font-size: .95rem; }
.notify-box .error { color: #ff6b5e; }
.notify-box .form { max-width: none; }
