/* =====================================================================
   app.css  ·  ESTILO COMPARTIDO de PGTECH Barber
   Lo usan: login, panel del dueño, panel del barbero, Modo Dios y la página "suspendido".
   ---------------------------------------------------------------------
   Para cambiar los COLORES de la marca, edita solo la sección ":root" de abajo.
   Idea de diseño: asfalto oscuro + amarillo de línea de calle + el rojo y azul
   del poste de barbero. Letras anchas y fuertes, como un letrero de barbería.
   ===================================================================== */

:root {
    --bg: #101114;            /* fondo general: asfalto */
    --panel: #1a1b20;         /* tarjetas */
    --panel-2: #23242b;       /* tarjetas dentro de tarjetas, campos */
    --line: #30323c;          /* bordes */
    --txt: #f2f2ee;           /* texto principal */
    --muted: #9b9dab;         /* texto secundario */
    --y: #ffd21f;             /* amarillo: acción principal */
    --y-d: #e6b800;
    --red: #ff4338;           /* rojo del poste */
    --blue: #3a6dff;          /* azul del poste */
    --ok: #2fd27a;
    --warn: #ffb020;
    --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
    --body: 'Barlow', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--txt); font-family: var(--body); font-size: 16.5px; line-height: 1.5; min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-stretch: 78%; font-weight: 800; line-height: 1.05; letter-spacing: .005em; text-transform: uppercase; }
h1 { font-size: clamp(30px, 6vw, 44px); } h2 { font-size: 25px; } h3 { font-size: 19px; }
a { color: inherit; }
.muted { color: var(--muted); } .small { font-size: 14px; } .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }

/* Franja del poste de barbero (rojo / blanco / azul en diagonal) */
.pole { height: 8px; background: repeating-linear-gradient(-45deg, var(--red) 0 12px, #f2f2ee 12px 24px, var(--blue) 24px 36px, #f2f2ee 36px 48px); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--y); background: var(--y); color: #14130a; font: 700 16px var(--body); padding: 11px 18px; border-radius: 8px; cursor: pointer; text-decoration: none; transition: transform .12s, background .12s; }
.btn:hover { background: var(--y-d); border-color: var(--y-d); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.secondary { background: transparent; color: var(--txt); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--txt); background: transparent; }
.btn.danger { background: transparent; color: #ff8c84; border-color: #5b2a27; }
.btn.danger:hover { background: #3a1a18; border-color: var(--red); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #05190e; }
.btn.small { padding: 7px 12px; font-size: 14px; }
.btn.block { width: 100%; }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 7px 10px; cursor: pointer; font: 600 13px var(--body); }
.icon-btn:hover { color: var(--txt); border-color: var(--txt); }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
input, select, textarea { width: 100%; font: 500 16px var(--body); color: var(--txt); background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 13px; }
input[type=checkbox] { accent-color: var(--y); width: 18px; height: 18px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--y); }
input::placeholder { color: #6c6e7b; }
select option { background: #1a1b20; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2, .grid2.svform { grid-template-columns: 1fr !important; } }

/* ---------- Tarjetas y estructura ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card + .card { margin-top: 16px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .between { justify-content: space-between; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.badge.ok { color: var(--ok); border-color: #1d5a3b; background: #11291e; }
.badge.warn { color: var(--warn); border-color: #5e4412; background: #2a2010; }
.badge.bad { color: #ff8c84; border-color: #5b2a27; background: #2e1514; }

/* ---------- Barra superior de los paneles ---------- */
.top { background: #0c0d0f; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-stretch: 78%; font-weight: 900; font-size: 21px; text-transform: uppercase; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--y); }
.brand b { color: var(--y); }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 0 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: transparent; border: 0; color: var(--muted); font: 700 16px var(--body); padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--txt); }
.tab.on { color: var(--y); border-bottom-color: var(--y); }
main.page { padding: 22px 0 70px; }

/* ---------- Números grandes ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi .v { font-family: var(--display); font-stretch: 78%; font-weight: 900; font-size: 32px; line-height: 1.1; margin-top: 4px; }
.kpi .l { color: var(--muted); font-size: 14px; font-weight: 600; }
.kpi.hot { border-color: var(--y); background: linear-gradient(160deg, #2a2508, var(--panel)); }
.kpi.hot .v { color: var(--y); }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, 1fr); } .kpi .v { font-size: 26px; } }

/* ---------- Sillas ---------- */
.sillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.silla { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.silla.ocupada { border-color: #3d4a22; }
.silla-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
.silla-img { height: 150px; display: flex; align-items: flex-end; justify-content: center; padding-top: 8px; background: radial-gradient(ellipse at 50% 95%, #2a2c35 0%, transparent 65%); }
.silla-img img { height: 140px; width: auto; filter: drop-shadow(0 10px 14px rgba(0,0,0,.55)); }
.silla:not(.ocupada) .silla-img img { opacity: .55; filter: grayscale(.6) drop-shadow(0 10px 14px rgba(0,0,0,.55)); }
.silla-body { padding: 12px 16px 16px; display: grid; gap: 4px; flex: 1; }
.silla-body .barbero { font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: 20px; text-transform: uppercase; }
.silla-money { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 10px; }
.silla-money b { font-family: var(--display); font-stretch: 78%; font-weight: 900; font-size: 26px; color: var(--y); }
.silla-actions { display: grid; gap: 8px; padding: 0 16px 16px; }
.silla-actions .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid #25262d; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }

/* ---------- Ventanas (modal) y avisos ---------- */
.overlay { position: fixed; inset: 0; background: rgba(5,5,7,.78); display: flex; align-items: flex-start; justify-content: center; padding: 28px 14px; z-index: 100; overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 560px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); margin: auto 0; }
.modal.wide { max-width: 860px; }
.modal h2 { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; width: min(92vw, 440px); }
.toast { background: #f2f2ee; color: #14130a; padding: 13px 16px; border-radius: 10px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5); border-left: 6px solid var(--y); }
.toast.ok { border-left-color: var(--ok); } .toast.err { border-left-color: var(--red); }
.secret { font-family: var(--display); font-weight: 900; font-size: 44px; letter-spacing: .12em; text-align: center; background: var(--panel-2); border: 2px dashed var(--y); border-radius: 12px; padding: 14px; margin: 14px 0; color: var(--y); }
.banner { background: #2a2010; border: 1px solid #5e4412; color: #ffd98a; padding: 11px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--muted); font: 700 14px var(--body); padding: 8px 14px; cursor: pointer; }
.seg button.on { background: var(--y); color: #14130a; }

/* ---------- Ticket (liquidación) ---------- */
.ticket { background: #f2f2ee; color: #16171a; border-radius: 6px; padding: 18px; font-family: 'Courier New', monospace; font-size: 15px; }
.ticket .t-row { display: flex; justify-content: space-between; padding: 3px 0; }
.ticket .t-sep { border-top: 2px dashed #9a9a94; margin: 8px 0; }
.ticket .t-big { font-weight: 900; font-size: 19px; }

@media print { body { background: #fff; color: #000; } .top, .tabs, .no-print, .toasts { display: none !important; } .overlay { position: static; background: none; padding: 0; } .modal { border: 0; box-shadow: none; background: #fff; color: #000; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
