/* enpunto.mx — estilos compartidos
   Dirección: cristal tipo macOS. Fondo con resplandores azules del logo, superficies translúcidas
   con desenfoque, bordes de luz y botones con brillo. Tipografía del sistema (SF en Mac) y Lexend
   solo para el nombre de la marca. */
@font-face { font-family: "Lexend"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fuentes/lexend-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fuentes/lexend-latin-600-normal.woff2") format("woff2"); }

:root {
  /* Marca (del logo) */
  --brand: #0a6cff;
  --brand-2: #3fb4ff;
  --brand-deep: #0a3fd6;
  --brand-ink: #ffffff;
  --brand-soft: rgba(10, 108, 255, .10);
  /* Texto y superficies */
  --page: #eef3fb;
  --ink: #0b1b3f;
  --ink-2: #33456e;
  --muted: #6a7896;
  --line: rgba(15, 40, 90, .10);
  --bg: rgba(15, 40, 90, .045);
  --card: rgba(255, 255, 255, .66);
  --card-strong: rgba(255, 255, 255, .88);
  --glass-border: rgba(255, 255, 255, .9);
  --input: rgba(255, 255, 255, .78);
  --btn: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 255, .82));
  --hl: inset 0 1px 0 rgba(255, 255, 255, .95);
  --shadow: 0 1px 1px rgba(10, 30, 80, .04), 0 10px 30px -10px rgba(10, 30, 80, .16), 0 30px 60px -30px rgba(10, 30, 80, .18);
  --glow-1: rgba(63, 180, 255, .30);
  --glow-2: rgba(10, 108, 255, .20);
  --glow-3: rgba(130, 170, 255, .28);
  --overlay: rgba(8, 18, 45, .28);
  /* Estados */
  --in: #0c9b63;  --in-soft: rgba(12, 155, 99, .12);
  --out: #e8590c; --out-soft: rgba(232, 89, 12, .12);
  --warn: #b26a00; --warn-soft: rgba(245, 159, 0, .14);
  --bad: #e03131; --bad-soft: rgba(224, 49, 49, .11);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-marca: "Lexend", var(--font);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #3d8bff; --brand-2: #5cc8ff; --brand-deep: #1450e6; --brand-soft: rgba(61, 139, 255, .16);
    --page: #040a1e; --ink: #eaf1ff; --ink-2: #bccaea; --muted: #8696bb;
    --line: rgba(160, 190, 255, .12); --bg: rgba(160, 190, 255, .06);
    --card: rgba(20, 34, 72, .52); --card-strong: rgba(16, 28, 62, .86); --glass-border: rgba(255, 255, 255, .09);
    --input: rgba(8, 16, 40, .55); --btn: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
    --hl: inset 0 1px 0 rgba(255, 255, 255, .08);
    --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 14px 40px -12px rgba(0, 0, 0, .55);
    --glow-1: rgba(30, 120, 255, .30); --glow-2: rgba(0, 170, 255, .16); --glow-3: rgba(40, 80, 220, .30);
    --overlay: rgba(0, 4, 16, .55);
    --in: #34d399; --in-soft: rgba(52, 211, 153, .14); --out: #ff8a4c; --out-soft: rgba(255, 138, 76, .15);
    --warn: #ffc14d; --warn-soft: rgba(255, 193, 77, .14); --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, .15);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #3d8bff; --brand-2: #5cc8ff; --brand-deep: #1450e6; --brand-soft: rgba(61, 139, 255, .16);
  --page: #040a1e; --ink: #eaf1ff; --ink-2: #bccaea; --muted: #8696bb;
  --line: rgba(160, 190, 255, .12); --bg: rgba(160, 190, 255, .06);
  --card: rgba(20, 34, 72, .52); --card-strong: rgba(16, 28, 62, .86); --glass-border: rgba(255, 255, 255, .09);
  --input: rgba(8, 16, 40, .55); --btn: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
  --hl: inset 0 1px 0 rgba(255, 255, 255, .08);
  --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 14px 40px -12px rgba(0, 0, 0, .55);
  --glow-1: rgba(30, 120, 255, .30); --glow-2: rgba(0, 170, 255, .16); --glow-3: rgba(40, 80, 220, .30);
  --overlay: rgba(0, 4, 16, .55);
  --in: #34d399; --in-soft: rgba(52, 211, 153, .14); --out: #ff8a4c; --out-soft: rgba(255, 138, 76, .15);
  --warn: #ffc14d; --warn-soft: rgba(255, 193, 77, .14); --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, .15);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--ink); font-size: 15px; line-height: 1.45; letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh;
  background:
    radial-gradient(900px 620px at -5% -10%, var(--glow-1), transparent 62%),
    radial-gradient(800px 600px at 105% -5%, var(--glow-2), transparent 60%),
    radial-gradient(1100px 760px at 50% 115%, var(--glow-3), transparent 62%),
    var(--page);
  background-attachment: fixed;
}
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: 1.75rem; font-weight: 700; } h2 { font-size: 1.22rem; font-weight: 650; } h3 { font-size: 1.04rem; font-weight: 650; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .85em; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.stack > * + * { margin-top: 16px; }
:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(10, 108, 255, .28); }

/* Superficie de cristal */
.card, .stat, .side, .modal, .tabs, .topbar, .alert, .sim-cristal {
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--btn); color: var(--ink);
  padding: 8px 16px; border-radius: 11px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 38px;
  box-shadow: var(--hl), 0 1px 2px rgba(10, 30, 80, .08);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease, border-color .2s ease;
}
.btn:hover { border-color: rgba(10, 108, 255, .35); box-shadow: var(--hl), 0 4px 14px -6px rgba(10, 108, 255, .35); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary {
  border-color: transparent; color: var(--brand-ink);
  background: linear-gradient(180deg, var(--brand-2) -30%, var(--brand) 50%, var(--brand-deep) 130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 20, 80, .25), 0 8px 18px -8px rgba(10, 108, 255, .75);
  text-shadow: 0 1px 1px rgba(0, 30, 100, .25);
}
.btn.primary:hover { filter: brightness(1.07) saturate(1.05); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: rgba(224, 49, 49, .4); box-shadow: var(--hl), 0 4px 14px -6px rgba(224, 49, 49, .35); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.sm { padding: 5px 11px; min-height: 30px; font-size: .84rem; border-radius: 9px; }
.btn.big { font-size: 1.04rem; padding: 13px 22px; min-height: 50px; border-radius: 14px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* Formularios */
label.f { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 12px; color: var(--ink-2); }
label.f > span.h { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 3px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--input); border: 1px solid var(--line); border-radius: 11px;
  padding: 9px 12px; width: 100%; margin-top: 5px; min-height: 42px; box-shadow: inset 0 1px 2px rgba(10, 30, 80, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(10, 108, 255, .2); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--brand); box-shadow: none; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin-bottom: 12px; cursor: pointer; }
label.check input { margin-top: 2px; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.dias { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dias label { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--input); border-radius: 9px; padding: 6px 10px; font-weight: 500; cursor: pointer; }
.dias input { width: 16px; height: 16px; }

/* Tarjetas */
.card { background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow), var(--hl); padding: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow), var(--hl); }
.stat .n { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .84rem; margin-top: 2px; }
.stat.in .n { color: var(--in); } .stat.out .n { color: var(--out); } .stat.bad .n { color: var(--bad); } .stat.warn .n { color: var(--warn); }
button.stat { font: inherit; text-align: left; cursor: pointer; color: inherit; width: 100%; transition: transform .15s ease, box-shadow .2s ease; }
button.stat:hover { transform: translateY(-1px); box-shadow: var(--shadow), var(--hl), 0 0 0 1px rgba(10, 108, 255, .25); }

/* Tablas */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; background: var(--bg); position: sticky; top: 0; }
tbody tr { transition: background .15s ease; }
tbody tr:hover td { background: rgba(10, 108, 255, .035); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.inactivo td { opacity: .55; }
tr.anulado td { text-decoration: line-through; opacity: .6; }
tr.anulado td.acc { text-decoration: none; opacity: 1; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: .76rem; font-weight: 600; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.in { background: var(--in-soft); color: var(--in); border-color: transparent; }
.chip.out { background: var(--out-soft); color: var(--out); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

/* Avisos */
.alert { border-radius: 13px; padding: 12px 15px; border: 1px solid var(--glass-border); background: var(--card); box-shadow: var(--hl); }
.alert.info { background: var(--brand-soft); border-color: rgba(10, 108, 255, .18); }
.alert.ok { background: var(--in-soft); border-color: rgba(12, 155, 99, .2); color: var(--ink); }
.alert.warn { background: var(--warn-soft); border-color: rgba(245, 159, 0, .25); }
.alert.bad { background: var(--bad-soft); border-color: rgba(224, 49, 49, .22); }
.secret { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; background: var(--input); border: 1px dashed rgba(10, 108, 255, .35); padding: 7px 12px; border-radius: 10px; user-select: all; word-break: break-all; display: inline-block; }

/* Marca */
.brandmark { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brandmark img { width: 36px; height: 36px; filter: drop-shadow(0 4px 10px rgba(10, 108, 255, .35)); }
.wordmark { font-family: var(--font-marca); font-weight: 600; font-size: 1.32rem; letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.wordmark .tld { background: linear-gradient(180deg, var(--brand-2), var(--brand) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Estructura del panel: barra lateral flotante como en macOS */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  background: var(--card); border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: var(--shadow), var(--hl);
  margin: 12px 0 12px 12px; padding: 16px 10px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 12px; height: calc(100vh - 24px); overflow-y: auto;
}
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 550; transition: background .15s ease, color .15s ease; }
.side a.nav svg { flex: none; opacity: .75; }
.side a.nav:hover { background: var(--bg); color: var(--ink); }
.side a.nav.on {
  color: #fff; background: linear-gradient(180deg, var(--brand-2) -40%, var(--brand) 60%, var(--brand-deep) 140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 14px -8px rgba(10, 108, 255, .8);
}
.side a.nav.on svg { opacity: 1; }
.side .sep { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 12px 12px 4px; font-weight: 600; }
.side .foot { margin-top: auto; padding: 12px 8px 2px; border-top: 1px solid var(--line); font-size: .85rem; }
.main { padding: 26px 30px 60px; min-width: 0; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.pagehead p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.ctxbar {
  background: linear-gradient(90deg, rgba(10, 30, 90, .92), rgba(10, 70, 200, .88)); color: #fff;
  padding: 8px 28px; display: flex; gap: 12px; align-items: center; justify-content: space-between; font-size: .9rem;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 6px 20px -10px rgba(10, 40, 120, .6);
}
.ctxbar .btn { min-height: 30px; padding: 4px 12px; font-size: .85rem; }
.topbar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 8px 22% 8px 8px; margin: 0; height: auto; z-index: 40; transform: translateX(-110%); transition: transform .22s ease; background: var(--card-strong); }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .main { padding: 16px 16px 60px; }
  .ctxbar { padding: 8px 16px; }
}

/* Modal */
.modal-bg { position: fixed; inset: 0; background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 100; padding: 16px; animation: aparece .18s ease; }
.modal { background: var(--card-strong); border: 1px solid var(--glass-border); border-radius: 20px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 30px 80px -20px rgba(5, 20, 60, .45), var(--hl); animation: sube .22s cubic-bezier(.2, .9, .3, 1.2); }
.modal.wide { max-width: 860px; }
.modal header { padding: 20px 24px 0; display: flex; justify-content: space-between; align-items: center; }
.modal header h2 { margin: 0; }
.modal .body { padding: 16px 24px; }
.modal footer { padding: 0 24px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes sube { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* Toasts */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: rgba(12, 22, 50, .88); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12); max-width: 90vw; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: sube .2s ease; }
.toast.err { background: rgba(200, 30, 30, .92); }

/* Acceso */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .box { width: 100%; max-width: 420px; }
.auth .brandmark { flex-direction: column; justify-content: center; gap: 12px; padding: 0 0 8px; }
.auth .brandmark img { width: 104px; height: 104px; filter: drop-shadow(0 14px 30px rgba(10, 108, 255, .45)); }
.auth .brandmark .wordmark { font-size: 2.1rem; }
.auth .card { padding: 24px; border-radius: 22px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 12px; padding: 3px; margin-bottom: 18px; border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .15s ease, color .15s ease; }
.tabs button.on { background: var(--card-strong); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 30, 80, .12), var(--hl); }

/* Portal del empleado */
.emp { max-width: 560px; margin: 0 auto; padding: 16px 16px 60px; }
.emp header { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 16px; }
.clock { text-align: center; padding: 26px 12px 14px; }
.clock .t { font-size: clamp(3.4rem, 16vw, 5.2rem); font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.035em; line-height: 1; }
.clock .d { color: var(--ink-2); margin-top: 8px; font-weight: 500; }
.clock .src { font-size: .76rem; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
.punch {
  position: relative; overflow: hidden; width: 100%; border: 0; border-radius: 22px; padding: 28px 16px; font: inherit; font-size: 1.45rem; font-weight: 700; color: #fff; cursor: pointer; letter-spacing: -.01em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .18); transition: transform .12s ease, filter .2s ease;
}
.punch::before { content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: 21px 21px 40% 40% / 21px 21px 18px 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0)); pointer-events: none; }
.punch.in { background: linear-gradient(180deg, #3fe0a2 -20%, #12a86c 55%, #087a4d 130%); box-shadow: 0 16px 30px -14px rgba(12, 155, 99, .8), inset 0 -2px 0 rgba(0, 60, 30, .25); }
.punch.out { background: linear-gradient(180deg, #ffab6b -20%, #f06418 55%, #c2440a 130%); box-shadow: 0 16px 30px -14px rgba(232, 89, 12, .8), inset 0 -2px 0 rgba(90, 30, 0, .25); }
.punch:hover { filter: brightness(1.05); }
.punch:active { transform: scale(.985); }
.punch:disabled { opacity: .6; }
.punch small { display: block; font-size: .88rem; font-weight: 600; opacity: .92; margin-top: 4px; position: relative; }
.done { text-align: center; padding: 30px 16px; border-radius: 22px; border: 1px solid var(--glass-border); box-shadow: var(--shadow), var(--hl); }
.done.in { background: var(--in-soft); } .done.out { background: var(--out-soft); }
.done .big { font-size: 1.55rem; font-weight: 700; }
.done .check { font-size: 3rem; line-height: 1; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border: 0; }

/* Utilidades de impresión */
@media print {
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .noprint, .side, .topbar, .ctxbar, #toasts { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; background: #fff; }
  th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; position: static; }
  table { font-size: 9pt; }
  th, td { padding: 4px 6px; }
  tr { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
.doc { max-width: 1000px; margin: 24px auto; background: #fff; color: #111; padding: 40px; border-radius: 6px; box-shadow: 0 30px 70px -30px rgba(5, 20, 60, .45); }
.doc h1 { font-size: 1.35rem; } .doc h2 { font-size: 1.05rem; margin-top: 22px; border-bottom: 2px solid #111; padding-bottom: 4px; }
.doc table { font-size: .85rem; } .doc th { background: #f0f0f0; color: #333; position: static; }
.doc th, .doc td { border: 1px solid #ccc; padding: 5px 7px; }
.doc tbody tr:hover td { background: none; }
.doc .meta { display: grid; grid-template-columns: 180px 1fr; gap: 2px 12px; font-size: .9rem; }
.doc .meta dt { font-weight: 700; } .doc .meta dd { margin: 0; }
.doc .sello { font-family: var(--mono); font-size: .75rem; word-break: break-all; }
.doc .emp-block { break-inside: avoid-page; margin-top: 18px; }
.doc .firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 60px; text-align: center; font-size: .85rem; }
.doc .firmas div { border-top: 1px solid #111; padding-top: 6px; }
.doc-marca { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: #555; margin-top: 28px; }
.doc-marca img { width: 18px; height: 18px; }
@media print { .doc { padding: 0; max-width: none; margin: 0; box-shadow: none; } }

/* Credenciales imprimibles */
.creds { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.cred { border: 1px dashed rgba(10, 108, 255, .35); background: var(--input); border-radius: 12px; padding: 12px; font-size: .9rem; break-inside: avoid; }
.cred b { font-size: 1rem; }
.cred .k { font-family: var(--mono); font-weight: 700; }

/* Onboarding */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border: 0; }
.steps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: #fff; display: grid; place-items: center; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 10px -4px rgba(10, 108, 255, .7); }
.steps li.ok::before { content: "✓"; background: linear-gradient(180deg, #3fe0a2, #0c9b63); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.code { font-family: var(--mono); background: var(--input); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .85rem; overflow-x: auto; white-space: pre; }
details.exp > summary { cursor: pointer; list-style: none; }
details.exp > summary::-webkit-details-marker { display: none; }

/* Imprimir solo el contenido de un modal (credenciales) */
@media print {
  body.imprime-modal > *:not(.modal-bg) { display: none !important; }
  body.imprime-modal .modal-bg { position: static; background: none; padding: 0; display: block; }
  body.imprime-modal .modal { box-shadow: none; max-height: none; max-width: none; }
  body.imprime-modal .modal header button, body.imprime-modal .modal footer, body.imprime-modal .noprint { display: none !important; }
}
.acciones { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filtros label.f { margin: 0; min-width: 150px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.dot.on { background: var(--in); box-shadow: 0 0 0 3px var(--in-soft); } .dot.off { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
tr.click { cursor: pointer; }
tr.detalle td { background: var(--bg); padding: 0 12px 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Selfie del registro remoto */
.selfie { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.selfie video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }

/* Selector de empleados (incidencias, turnos) */
.emp-pick-list { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--input); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 10px; }
.emp-pick-list label { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.emp-pick-list label:hover { background: var(--bg); }
.emp-pick-list input { width: 16px; height: 16px; flex: none; }
.emp-pick [data-cuenta] { margin-top: 4px; }
.nowrap { white-space: nowrap; }

/* Turnos */
.t-chip { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 7px; font-size: .72rem; font-weight: 700; color: #fff; background: #0a6cff; }
.t-chip.c1 { background: #e8590c; } .t-chip.c2 { background: #5f3dc4; } .t-chip.c3 { background: #0c9b63; } .t-chip.c4 { background: #c2255c; } .t-chip.c5 { background: #1098ad; }
.t-chip.off { background: var(--bg); color: var(--muted); }
table.t-cal th, table.t-cal td.t-cel { text-align: center; padding-left: 4px; padding-right: 4px; }
table.t-cal th.hoy { color: var(--brand); }

/* Gráfica horario contra real */
.grafica { margin: 12px 0 4px; }
.g-scroll { overflow-x: auto; }
.grafica svg { width: 100%; height: auto; display: block; }
.g-grid { stroke: var(--line); stroke-width: 1; }
.g-ylab { fill: var(--muted); font-size: 10px; text-anchor: end; font-family: var(--mono); }
.g-xlab { fill: var(--muted); font-size: 10px; text-anchor: middle; } .g-xlab.b { fill: var(--ink-2); font-weight: 700; font-size: 11px; }
.g-plan { fill: var(--brand-soft); stroke: var(--brand); stroke-opacity: .35; stroke-dasharray: 3 3; }
.g-plan.falta { fill: var(--bad-soft); stroke: var(--bad); }
.g-real { fill: var(--brand); } .g-real.tarde { fill: #f59f00; } .g-real.abierta { opacity: .55; }
.g-extra { fill: #7048e8; }
.g-tag { font-size: 10px; font-weight: 700; fill: var(--muted); text-anchor: middle; } .g-tag.falta { fill: var(--bad); font-size: 14px; }
.g-ley { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--ink-2); margin-top: 6px; }
.g-ley i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.g-ley .s-plan { background: var(--brand-soft); border: 1px dashed var(--brand); } .g-ley .s-real { background: var(--brand); } .g-ley .s-tarde { background: #f59f00; } .g-ley .s-extra { background: #7048e8; }
.g-ley b.falta { color: var(--bad); }
.kpis { margin-top: 4px; } .kpis .stat .n { font-size: 1.6rem; }
@media print { .grafica .g-scroll { overflow: visible; } }

/* Tu plan */
.barra { height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.barra span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--brand)); border-radius: 99px; }
.planes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.planes label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--input); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: .92rem; }
.planes label span { flex: 1; }
.planes label em { font-style: normal; font-size: .72rem; color: var(--brand); font-weight: 700; }
.planes label.actual { border-color: var(--brand); }
.planes label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.planes input[type=radio] { width: 18px; height: 18px; flex: none; margin: 0; padding: 0; box-shadow: none; border-radius: 50%; }
.planes label span { white-space: nowrap; }

/* Ayudas */
.tip { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 6px; border-radius: 50%; font-size: .68rem; font-weight: 800; line-height: 1;
  color: var(--brand); background: var(--brand-soft); border: 1px solid rgba(10, 108, 255, .25); cursor: help; vertical-align: 2px; user-select: none; }
.tip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
#tip-burbuja { position: fixed; z-index: 3000; max-width: min(300px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 11px; font-size: .82rem; line-height: 1.4; font-weight: 500;
  color: #fff; background: rgba(8, 18, 45, .94); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
#tip-burbuja.on { opacity: 1; transform: none; }
@media print { .tip, #tip-burbuja { display: none !important; } }

/* Permisos del portal del empleado */
.permisos { margin: 4px 0 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card-strong, #fff); }
.permisos.listo { border-color: rgba(12,155,99,.35); background: rgba(12,155,99,.07); }
.permisos.mal { border-color: rgba(224,49,49,.4); background: rgba(224,49,49,.06); }
.permisos .tit { font-weight: 700; margin-bottom: 4px; }
.permisos ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.permisos ul li { display: flex; justify-content: space-between; gap: 10px; font-size: .95rem; }
.permisos b.ok { color: #0c9b63; } .permisos b.no { color: #d6336c; } .permisos b.pend { color: #c46e00; }
ol.pasos { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; line-height: 1.45; }
