/* ÉLITE Specialty Services — ESTILO B «Marca ÉLITE» (elegido por Fernando,
   2026-11-10; referencia aprobada: files/diseno/estilo-b-marca.png).
   Banda superior con degradado azul marino → azul → violeta, wordmark
   ÉLITE y saludo en blanco, esquinas inferiores redondeadas; hoja de
   contenido que se sobrepone a la banda; tarjeta de estado blanca;
   acciones como tarjetas blancas grandes con chip de icono de color
   (entrada en degradado de marca) y chevron a la derecha; pie con el
   estado de la geocerca. Todo en español, botones enormes para personal
   con poca tecnología. */
:root {
  --navy: #0b1f3a;
  --blue: #1d4ed8;
  --royal: #2563eb;
  --violet: #7c3aed;
  --header-grad: linear-gradient(120deg, #0b1f3a 30%, #1d4ed8 75%, #7c3aed);
  --btn-grad: linear-gradient(90deg, #1d4ed8, #7c3aed);
  --bg: #eef1f6;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --hairline: #e5e5ea;
  --field-bg: #f5f5f7;
  --amber: #f59e0b;
  --sky: #0ea5e9;
  --red: #ef4444;
  --ok: #1d7a35;
  --ok-bg: #e6f7ea;
  --green: #34c759;
  --orange: #ff9500;
  --warn: #8a5a00;
  --warn-bg: #fff6df;
  --danger: #c81e1e;
  --danger-bg: #ffe9e9;
  --radius: 22px;
  --shadow-card: 0 3px 12px rgba(11, 31, 58, .07);
  --shadow-estado: 0 10px 26px rgba(11, 31, 58, .13);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
    'Helvetica Neue', 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ===== Banda de marca (Estilo B) ===== */
header.brand {
  background: var(--header-grad);
  color: #fff;
  padding: 28px 24px 34px;
  border-radius: 0 0 28px 28px;
}
body.emp header.brand { padding-bottom: 58px; } /* la hoja se sobrepone */
header.brand .logo { font-size: 19px; font-weight: 800; letter-spacing: 2.5px; }
header.brand .logo span {
  display: block; font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.6px; opacity: .8; margin-top: 2px;
}
header.brand h1 { font-size: 24px; margin: 16px 0 2px; font-weight: 800; letter-spacing: -0.02em; }
header.brand p { margin: 0; font-size: 13.5px; opacity: .85; }

/* Saludo dentro de la banda (solo con sesión iniciada) */
.greet { display: none; margin-top: 26px; }
body:has(#view-main:not(.hidden)) .greet,
body:has(#view-confirm:not(.hidden)) .greet { display: block; }
.greet h1 { font-size: 27px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.greet .chip { margin-top: 10px; }

main { padding: 0 18px 48px; max-width: 560px; margin: 0 auto; }
main.admin-wrap { max-width: 980px; padding-top: 22px; }

/* Hoja sobrepuesta a la banda */
.overlap { margin-top: -36px; position: relative; }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.hidden { display: none !important; }

/* Tarjeta de estado (primera tarjeta blanca de la hoja) */
.estado { box-shadow: var(--shadow-estado); padding: 19px; }
.estado .lab { font-size: 11px; letter-spacing: 1.4px; color: var(--muted); font-weight: 700; }
.estado .detail { font-size: 15.5px; font-weight: 600; color: #2c2c2e; margin-top: 6px; line-height: 1.55; }
.estado .linkbtn { margin-top: 6px; }

/* Estado del empleado / títulos de sección centrados (login, selector) */
.status { text-align: center; }
.status .who { font-size: 23px; font-weight: 700; color: var(--navy); letter-spacing: -0.015em; }
#position-zone .status { text-align: left; }
#position-zone .who { font-size: 21px; font-weight: 800; margin: 10px 0 14px; }

.chip {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .02em;
}
.chip.dentro { background: var(--ok-bg); color: var(--ok); }
.chip.lonche { background: var(--warn-bg); color: var(--warn); }
/* Dentro de la banda de marca, el chip va translúcido blanco (Estilo B) */
.greet .chip.dentro, .greet .chip.lonche { background: rgba(255, 255, 255, .18); color: #fff; }

/* PIN: teclado numérico grande, teclas redondas y claras */
.pin-display {
  font-size: 32px; letter-spacing: .55em; text-align: center;
  padding: 14px 0 6px; font-weight: 700; color: var(--navy);
  min-height: 56px;
}
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pinpad button {
  font: inherit; font-size: 27px; font-weight: 600;
  height: 72px; border: none; border-radius: 999px;
  background: var(--field-bg); color: var(--text); cursor: pointer;
  transition: transform .08s ease, background .12s ease;
}
.pinpad button:active { background: #e8e8ed; transform: scale(.96); }

/* ===== Acciones: tarjetas grandes con chip de color (Estilo B) =====
   Estructura (index.html y app.js): <span class="ic">chip</span> Título
   <small>subtítulo</small> — el texto suelto cae en la celda (fila 1,
   columna 2) por auto-colocación de la cuadrícula. */
.bigbtn {
  display: grid; grid-template-columns: 46px 1fr 20px; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center; text-align: left;
  width: 100%; font: inherit; cursor: pointer; border: none;
  background: #fff; color: var(--navy);
  border-radius: 20px; padding: 17px 16px; margin-bottom: 13px;
  font-size: 17.5px; font-weight: 800;
  box-shadow: var(--shadow-card);
  transition: transform .08s ease, opacity .12s ease;
}
.bigbtn .ic {
  grid-column: 1; grid-row: 1 / span 2;
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 21px; font-weight: 800; font-style: normal;
}
.bigbtn small { grid-column: 2; grid-row: 2; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.bigbtn::after {
  content: '›'; grid-column: 3; grid-row: 1 / span 2;
  font-size: 20px; font-weight: 400; color: #c7c7cc; text-align: right;
}
.bigbtn.in { background: var(--btn-grad); color: #fff; }
.bigbtn.in .ic { background: rgba(255, 255, 255, .22); }
.bigbtn.in small { color: rgba(255, 255, 255, .85); }
.bigbtn.in::after { color: rgba(255, 255, 255, .6); }
.bigbtn.lunch-out .ic { background: var(--amber); }
.bigbtn.lunch-in .ic { background: var(--sky); }
.bigbtn.out .ic { background: var(--red); }
.bigbtn:active { transform: scale(.98); }
.bigbtn:disabled { opacity: .45; }
/* Variante centrada (botón «Aceptar» de la confirmación) */
.bigbtn.center { display: block; text-align: center; font-size: 19px; padding: 18px; }
.bigbtn.center::after { content: none; }

/* Tarjetas grandes de posición (selector al checar entrada) */
.pos-card {
  display: grid; grid-template-columns: 52px 1fr 20px; grid-template-rows: auto auto;
  column-gap: 6px; align-items: center; text-align: left;
  width: 100%; font: inherit; cursor: pointer; border: none;
  background: #fff; border-radius: 20px;
  padding: 17px 16px; margin-bottom: 13px;
  box-shadow: var(--shadow-card);
  transition: transform .08s ease;
}
.pos-card .pos-ic {
  grid-column: 1; grid-row: 1 / span 2;
  width: 46px; height: 46px; border-radius: 14px; background: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.pos-card .pos-name { grid-column: 2; grid-row: 1; align-self: end; font-size: 17.5px; font-weight: 800; color: var(--navy); }
.pos-card .pos-sub { grid-column: 2; grid-row: 2; align-self: start; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.pos-card::after {
  content: '›'; grid-column: 3; grid-row: 1 / span 2;
  font-size: 20px; color: #c7c7cc; text-align: right;
}
.pos-card:active { transform: scale(.98); }

.alert-box {
  background: var(--warn-bg); color: #7a5200; border-radius: 16px;
  padding: 14px 16px; font-size: 15px; margin-bottom: 14px; line-height: 1.5;
}
.msg { text-align: center; font-size: 16.5px; min-height: 24px; margin: 10px 0; }
.msg.ok { color: var(--ok); font-weight: 600; }
.msg.err { color: var(--danger); font-weight: 600; }

/* Confirmación tras cada marcaje: clarísima */
.confirm { text-align: center; padding: 38px 24px 28px; }
.confirm-icon {
  width: 104px; height: 104px; margin: 0 auto 20px;
  border-radius: 50%; background: var(--green); color: #fff;
  font-size: 58px; font-weight: 700; line-height: 104px;
  box-shadow: 0 12px 30px rgba(52, 199, 89, .35);
}
.confirm-icon.warn { background: var(--orange); box-shadow: 0 12px 30px rgba(255, 149, 0, .35); }
.confirm-title { font-size: 27px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.confirm-time { font-size: 40px; font-weight: 800; color: var(--text); margin-top: 8px; letter-spacing: -0.02em; }
.confirm-sub { font-size: 16.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

.notif {
  background: #fbfbfd; border: 1px solid #ececf0; border-left: 4px solid var(--royal);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-size: 15px; line-height: 1.45;
}
.notif b { display: block; margin-bottom: 2px; }
.notif small { color: var(--faint); }

/* Pie: estado de la geocerca */
.pie { margin-top: 24px; text-align: center; font-size: 12.5px; color: var(--muted); }
.pie b { color: var(--navy); }

label.field { display: block; font-size: 14.5px; font-weight: 600; margin: 14px 0 7px; color: var(--text); }
select, input[type="text"], input[type="number"], input[type="date"], input[type="password"] {
  font: inherit; font-size: 16.5px; width: 100%; padding: 14px;
  border: 1px solid #d2d2d7; border-radius: 14px; background: #fff; color: var(--text);
}
select:focus, input:focus { outline: 2px solid var(--royal); outline-offset: 1px; border-color: transparent; }
.testmode { font-size: 14px; color: var(--muted); display: flex; gap: 9px; align-items: center; line-height: 1.4; }
.testmode input { width: 20px; height: 20px; }
.linkbtn {
  background: none; border: none; color: var(--royal); font: inherit;
  font-size: 15px; font-weight: 500; cursor: pointer; padding: 8px 0;
}

/* Admin: tablas claras y legibles dentro de tarjetas */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid #f0f0f2; vertical-align: top; }
th { color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.smallbtn {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; border-radius: 999px; padding: 9px 16px;
  background: var(--btn-grad); color: #fff;
  transition: transform .08s ease;
}
.smallbtn:active { transform: scale(.97); }
.smallbtn.ghost { background: var(--field-bg); color: var(--navy); }
.smallbtn.danger { background: var(--danger-bg); color: var(--danger); }
h2.sec { font-size: 18px; color: var(--navy); margin: 4px 0 14px; font-weight: 700; letter-spacing: -0.015em; }
h3.sec { font-size: 16px; color: var(--navy); margin: 4px 0 12px; font-weight: 700; }
.total-row td { font-weight: 700; border-top: 2px solid var(--navy); border-bottom: none; }
.badge-alert { background: var(--danger-bg); color: var(--danger); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.badge-cut { background: var(--danger-bg); color: var(--danger); border-radius: 999px; padding: 2px 9px; font-size: 12.5px; font-weight: 700; }
.inactive { opacity: .45; }
.emp-pos { display: flex; gap: 9px; align-items: center; font-size: 15px; padding: 7px 0; line-height: 1.4; }
.emp-pos input { width: 20px; height: 20px; }
