/* Portal del trabajador — mi.nomiclock.com. Tokens y componentes tomados del diseño "panel del empleado"
   (Next.js/shadcn) pasados a CSS puro: sin build, iconos con Material Symbols. */
:root {
  /* Paleta oficial NomiClock (docs/brand-guidelines.md): navy #16325b, ámbar #fea619, teal #37ab9e. */
  --background: #f8f9ff; --foreground: #0b1c30;
  --brand: #16325b; --brand-dark: #001d41; --brand-foreground: #fff; --brand-container: #dfe8f5;
  --success: #37ab9e; --success-container: #89f5e7; --on-success-container: #005049;
  --warning: #fea619; --warning-container: #ffddb8; --on-warning-container: #855300; --on-warning: #241900;
  --info-container: #d6e3ff; --on-info-container: #2d4771;
  --card: #fff; --muted: #eff4ff; --muted-foreground: #44474e;
  --destructive: #ba1a1a; --error-container: #ffdad6; --on-error-container: #93000a;
  --border: rgba(196, 198, 208, .65); --input: #c4c6d0;
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .6; cursor: default; }
input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.icon { font-family: 'Material Symbols Outlined'; font-weight: 400; font-style: normal; font-size: 20px; line-height: 1; display: inline-block; letter-spacing: normal; white-space: nowrap; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; vertical-align: middle; }
.icon.sm { font-size: 16px; } .icon.lg { font-size: 26px; }
.display { font-family: var(--font-display); }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted-foreground); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: giro .7s linear infinite; display: inline-block; }
@keyframes giro { to { transform: rotate(360deg); } }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: var(--brand); padding: 16px; }
.login-box { width: 100%; max-width: 380px; text-align: center; color: #fff; }
.login-box img { height: 44px; width: auto; }
.login-box .sub { margin: 8px 0 20px; opacity: .8; }
.login-card { background: var(--card); color: var(--foreground); border-radius: 8px; padding: 22px; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: grid; gap: 14px; }
.campo label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-foreground); margin-bottom: 5px; }
.campo input, .campo select { width: 100%; height: 46px; border: 1px solid var(--input); border-radius: 8px; padding: 0 12px; background: var(--card); }
.campo input:focus, .campo select:focus { outline: 2px solid rgba(22,50,91,.3); }
.estado { min-height: 18px; font-size: 13px; }
.estado.error { color: var(--destructive); } .estado.ok { color: var(--on-success-container); }
.link { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; font-weight: 600; text-align: center; }

/* ---------- botones ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; background: var(--brand); color: var(--brand-foreground); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn:active:not(:disabled) { transform: scale(.99); }
.btn.sec { background: var(--muted); color: var(--foreground); box-shadow: none; }
.btn.borde { background: var(--card); color: var(--destructive); border: 1px solid var(--border); }
.btn.ok { background: var(--success); }
.btn.inline { width: auto; }

/* ---------- layout ---------- */
.app { min-height: 100dvh; }
.side { display: none; }
.main { max-width: 672px; margin: 0 auto; padding: 16px 16px 110px; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; background: var(--brand); color: var(--brand-foreground); padding: 12px 16px; }
.topbar .logo { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; }
.topbar .t1 { font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1.1; }
.topbar .t2 { font-size: 11px; opacity: .65; }
.topbar .grow { flex: 1; }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(255,255,255,.96); border-top: 1px solid var(--border); backdrop-filter: blur(8px); padding-bottom: env(safe-area-inset-bottom); }
.bottom-in { max-width: 672px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.navb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 11px; font-weight: 600; color: var(--muted-foreground); }
.navb .pill { height: 32px; width: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.navb.on { color: var(--brand); } .navb.on .pill { background: var(--brand-container); }
@media (min-width: 768px) {
  .app { display: flex; }
  .topbar, .bottom { display: none; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; width: 256px; flex-shrink: 0; background: var(--brand); color: var(--brand-foreground); padding: 16px; }
  .side .marca { display: flex; align-items: center; gap: 10px; padding: 10px 8px; }
  .side .marca .logo { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; }
  .side nav { margin-top: 16px; flex: 1; display: grid; align-content: start; gap: 4px; }
  .side .navs { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; font-weight: 600; color: rgba(255,255,255,.65); }
  .side .navs:hover { background: rgba(255,255,255,.1); color: #fff; } .side .navs.on { background: rgba(255,255,255,.15); color: #fff; }
  .side .yo { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; background: rgba(255,255,255,.1); text-align: left; width: 100%; }
  .content { flex: 1; min-width: 0; }
  .content .cabecera { position: sticky; top: 0; z-index: 40; padding: 16px 32px; border-bottom: 1px solid var(--border); background: rgba(248,249,255,.85); backdrop-filter: blur(8px); }
  .content .cabecera h1 { margin: 0; font-family: var(--font-display); font-size: 20px; }
  .main { max-width: 768px; padding: 20px 32px 40px; }
}
@media (max-width: 767px) { .content .cabecera { display: none; } }
.avatar { border-radius: 999px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-weight: 700; width: 36px; height: 36px; flex-shrink: 0; }
.avatar.grande { width: 80px; height: 80px; font-family: var(--font-display); font-size: 24px; background: var(--brand); color: #fff; }

/* ---------- tarjetas ---------- */
.stack { display: grid; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 20px; box-shadow: 0 1px 2px rgba(20,35,58,.06); }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.hero { background: var(--brand); color: var(--brand-foreground); padding: 22px; }
.hero .saludo { font-size: 13px; opacity: .7; font-weight: 600; }
.hero h1 { margin: 2px 0 0; font-family: var(--font-display); font-size: 24px; }
.hero .fecha { margin-top: 4px; font-size: 13px; opacity: .7; }
.hero .reloj { margin-top: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero .reloj .lbl { font-size: 12px; opacity: .6; font-weight: 600; }
.hero .reloj .hora { font-family: var(--font-display); font-size: 36px; font-weight: 700; letter-spacing: -.01em; }
.chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.turno { background: var(--success); color: #00201d; } .chip.cerrada { background: rgba(255,255,255,.15); color: #fff; } .chip.sin { background: var(--warning); color: var(--on-warning); }
.checadas { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--border); }
.checadas > div { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 4px; text-align: center; }
.checadas > div + div { border-left: 1px solid var(--border); }
.checadas .l { font-size: 11px; color: var(--muted-foreground); }
.checadas .h { font-size: 14px; font-weight: 700; }
.checadas .off { color: rgba(68,71,78,.4); }
.nota-pie { border-top: 1px solid var(--border); background: var(--muted); padding: 10px 18px; text-align: center; font-size: 12px; color: var(--muted-foreground); }
.metricas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .metricas { grid-template-columns: repeat(3, 1fr); } }
.metrica { padding: 16px; }
.metrica .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--brand-container); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.metrica .v { margin-top: 10px; font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.metrica .n { font-size: 12px; font-weight: 600; } .metrica .s { font-size: 11px; color: var(--muted-foreground); }
.rapidas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .rapidas { grid-template-columns: repeat(3, 1fr); } }
.rapida { text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 14px; display: grid; gap: 3px; box-shadow: 0 1px 2px rgba(20,35,58,.06); }
.rapida:hover { border-color: var(--brand); background: var(--muted); }
.rapida .a { font-weight: 700; } .rapida .d { font-size: 12px; color: var(--muted-foreground); } .rapida .g { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--brand); }
.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fila { display: flex; align-items: center; gap: 12px; border-radius: 8px; background: var(--muted); padding: 10px 12px; }
.fila .ico { width: 40px; height: 40px; border-radius: 8px; background: var(--card); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fila .dia { width: 44px; height: 44px; border-radius: 8px; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.fila .dia b { font-size: 13px; } .fila .dia span { font-size: 10px; text-transform: uppercase; color: var(--muted-foreground); }
.fila .cuerpo { flex: 1; min-width: 0; } .fila .t { font-weight: 700; font-size: 14px; } .fila .s { font-size: 12px; color: var(--muted-foreground); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.b-ok { background: var(--success-container); color: var(--on-success-container); } .b-warn { background: var(--warning-container); color: var(--on-warning-container); }
.b-bad { background: var(--error-container); color: var(--on-error-container); } .b-mute { background: var(--muted); color: var(--muted-foreground); } .b-info { background: var(--info-container); color: var(--on-info-container); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { border-radius: 8px; background: var(--muted); padding: 8px 12px; }
.stat .k { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted-foreground); } .stat .v { margin-top: 2px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.banda { display: flex; align-items: center; gap: 20px; background: var(--brand); color: var(--brand-foreground); padding: 22px; }
.banda .ic { width: 56px; height: 56px; border-radius: 8px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; }
.banda .k { font-size: 13px; opacity: .7; } .banda .v { font-family: var(--font-display); font-size: 36px; font-weight: 700; } .banda .v small { font-size: 16px; opacity: .6; font-weight: 500; }
.barra { height: 8px; border-radius: 999px; background: var(--muted); overflow: hidden; } .barra > div { height: 100%; border-radius: 999px; background: var(--success); }
.reparto { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted-foreground); }
.pago { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--border); }
.pago > div { padding: 12px 20px; text-align: center; } .pago > div + div { border-left: 1px solid var(--border); }
.pago .k { font-size: 12px; color: var(--muted-foreground); } .pago .v { font-family: var(--font-display); font-weight: 700; }
.pago .p { color: var(--on-success-container); } .pago .d { color: var(--destructive); }
.form { display: grid; gap: 14px; }
.dos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.acciones { display: flex; gap: 8px; } .acciones .btn { flex: 1; min-width: 0; padding-inline: 8px; } .acciones .btn.fijo { flex: 0 0 auto; width: auto; padding-inline: 18px; }
.datos { margin: 0; display: grid; }
.datos > div { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); } .datos > div:first-child { border-top: 0; padding-top: 0; } .datos > div:last-child { padding-bottom: 0; }
.datos .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--muted); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.datos dt { color: var(--muted-foreground); } .datos dd { margin: 0 0 0 auto; text-align: right; font-weight: 700; }
.perfil-cab { display: flex; flex-direction: column; align-items: center; text-align: center; }
.perfil-cab h1 { margin: 12px 0 0; font-family: var(--font-display); font-size: 20px; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.tag { border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; background: var(--muted); color: var(--muted-foreground); } .tag.b { background: var(--brand-container); color: var(--brand); }
.checar { display: grid; gap: 12px; }
.checar video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #000; }
.codigo { text-align: center; padding: 6px 0; } .codigo .n { font-family: var(--font-display); font-size: 32px; letter-spacing: .3em; color: var(--brand); } .codigo .c { font-size: 12px; color: var(--muted-foreground); }
.qr { display: flex; justify-content: center; padding: 8px 0; }
.vacio { text-align: center; color: var(--muted-foreground); padding: 12px 0; }
/* recibo (modal e impresión) */
.velo { position: fixed; inset: 0; z-index: 80; background: rgba(15,36,68,.5); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .velo { align-items: center; } }
.hoja { background: var(--card); width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; border-radius: 8px 8px 0 0; padding: 22px; }
@media (min-width: 640px) { .hoja { border-radius: 8px; } }
.hoja h3 { margin: 0; font-family: var(--font-display); font-size: 18px; }
.conceptos { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.conceptos th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--muted-foreground); padding: 6px 0; border-bottom: 1px solid var(--border); }
.conceptos td { padding: 6px 0; border-bottom: 1px solid var(--border); } .conceptos td.imp, .conceptos th.imp { text-align: right; }
.conceptos tr.tot td { font-weight: 700; border-bottom: 0; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 99; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; max-width: 90vw; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
@media print {
  body * { visibility: hidden; } .velo, .velo * { visibility: visible; }
  .velo { position: static; background: none; } .hoja { max-height: none; border-radius: 0; padding: 0; } .no-print { display: none !important; }
}

/* utilidades (sin estilos en línea: la CSP no permite style="") */
.u-nota { font-size: 11px; margin: 12px 0 0; } .u-mini { font-size: 11px; opacity: .6; } .u-elipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-sub { font-size: 13px; opacity: .7; margin-top: 2px; } .u-neto { font-size: 30px; font-weight: 700; margin-top: 4px; } .u-b { font-weight: 700; } .u-b6 { font-weight: 600; }
.u-mt14 { margin-top: 14px; } .u-mrango { margin: -6px 0 12px; } .u-m10 { margin: 0 0 10px; } .u-m0 { margin: 0; } .u-m2 { margin: 2px 0 0; } .u-min0 { min-width: 0; } .u-p18 { padding: 18px; }
.u-tc12 { text-align: center; margin: 0 0 12px; }

/* marca: logotipo (logo-dark.png) e ícono (reloj-icono.png) reales */
.marca-ico { width: 32px; height: 32px; border-radius: 8px; display: block; }
.topbar .marca-txt { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.1; }

.fila.fila-col { flex-direction: column; align-items: stretch; }
.fila-fila { display: flex; align-items: center; gap: 12px; }
.u-mt8 { margin-top: 8px; }
a.btn { text-decoration: none; }
