:root{
  --bg:#eef2f7;
  --surface:#ffffff;
  --surface-soft:#f7f9fc;
  --line:#dde4ef;
  --line-strong:#d3dceb;
  --text:#0f172a;
  --muted:#667085;
  --muted-2:#8a94a6;
  --blue:#2b50f6;
  --blue-dark:#1837cc;
  --blue-soft:#edf2ff;
  --green:#14966d;
  --green-soft:#e8f8f1;
  --orange:#d97706;
  --orange-soft:#fff5e7;
  --red:#c93f5a;
  --red-soft:#fff0f3;
  --shadow:0 14px 40px rgba(15,23,42,.07);
  --shadow-soft:0 10px 24px rgba(15,23,42,.05);
  --radius-xl:32px;
  --radius-lg:24px;
  --radius-md:18px;
  --radius-sm:14px;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Inter",system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%;overscroll-behavior:none}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
*{-webkit-tap-highlight-color:transparent}
::selection{background:transparent;color:inherit}
button,input,select,textarea{font:inherit}
button{cursor:pointer;border:0;background:none;color:inherit;touch-action:manipulation}
img{display:block;max-width:100%}
table{border-collapse:collapse;width:100%}
.hidden{display:none!important}
.logo{height:auto;width:clamp(138px,12vw,220px)}
.page{min-height:100svh;padding:28px}
.shell{position:relative;max-width:1380px;margin:0 auto;min-height:calc(100svh - 56px)}

/* shared */
.primary,.secondary,.ghost,.small-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:56px;padding:0 22px;border-radius:18px;font-weight:680;letter-spacing:-.02em;
  transition:transform .14s ease,background .16s ease,box-shadow .16s ease,color .16s ease,border-color .16s ease;
}
.primary{background:linear-gradient(180deg,#2f56ff 0%,#2449ef 100%);color:#fff;box-shadow:0 12px 24px rgba(43,80,246,.22)}
.primary:hover{transform:translateY(-1px);box-shadow:0 16px 30px rgba(43,80,246,.25)}
.secondary{background:#eef2f8;border:1px solid var(--line);color:#152038}
.ghost{background:transparent;border:1px solid var(--line);color:#152038}
.small-btn{min-height:42px;padding:0 16px;border:1px solid var(--line);background:#fff;color:#152038;border-radius:14px;font-weight:620}
.small-btn.blue{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 10px 22px rgba(43,80,246,.18)}
.small-btn.red{background:#fff;border-color:#f2c8d3;color:#b33b57}
.primary:active,.secondary:active,.ghost:active,.small-btn:active{transform:scale(.985)}
.primary:disabled,.secondary:disabled,.small-btn:disabled{opacity:.56;cursor:not-allowed;transform:none;box-shadow:none}
.field{display:grid;gap:8px}
.field label{font-size:13px;font-weight:620;color:#607089;letter-spacing:-.01em}
.field input,.field select,.field textarea{
  width:100%;min-height:52px;padding:0 16px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--text);outline:none;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.field textarea{min-height:110px;padding:14px 16px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#b9c8ff;box-shadow:0 0 0 4px rgba(43,80,246,.08)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.form-grid .full{grid-column:1/-1}
.chip{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:650}
.chip.on{background:var(--green-soft);color:var(--green)}
.chip.off{background:#f1f3f7;color:#707b8e}
.subtle{margin:6px 0 0;color:var(--muted);font-size:14px}
.error-box{padding:14px 16px;border-radius:16px;background:var(--red-soft);border:1px solid #f5cad5;color:#8c2640}
.empty,.empty-state{padding:42px 22px;border-radius:24px;background:#fff;border:1px solid var(--line);text-align:center;color:var(--muted)}
.empty-state h2{margin:8px 0 6px;font-size:24px;font-weight:700;letter-spacing:-.03em}
.empty-state p{margin:0 auto;max-width:420px;line-height:1.5}

/* loaders / overlays */
.native-loading,.terminal-gate{display:grid;place-items:center;min-height:100%}
.gate-card{width:min(540px,92vw);padding:42px;border-radius:32px;background:rgba(255,255,255,.9);border:1px solid rgba(255,255,255,.85);box-shadow:var(--shadow);display:grid;justify-items:center;gap:18px;text-align:center}
.gate-card p{margin:0;color:var(--muted);line-height:1.55}
.native-spinner{width:28px;height:28px;border-radius:999px;border:3px solid rgba(43,80,246,.14);border-top-color:var(--blue);animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.modal-overlay{position:fixed;inset:0;background:rgba(14,23,38,.24);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);display:grid;place-items:center;padding:24px;z-index:60}
.modal{width:min(640px,100%);background:#fff;border:1px solid rgba(255,255,255,.8);border-radius:28px;box-shadow:0 30px 60px rgba(15,23,42,.14);padding:28px}
.modal h2{margin:0 0 18px;font-size:28px;font-weight:720;letter-spacing:-.035em}
.modal .modal-note{margin:-4px 0 18px;color:var(--muted)}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,120px);background:rgba(15,23,42,.92);color:#fff;padding:12px 18px;border-radius:999px;font-size:14px;font-weight:600;box-shadow:0 18px 40px rgba(15,23,42,.18);z-index:80;transition:transform .22s ease,opacity .22s ease;opacity:0;pointer-events:none;max-width:min(92vw,680px);text-align:center}
.toast.show{transform:translate(-50%,0);opacity:1}

/* home / terminal */
.tablet-home{display:grid;grid-template-columns:1.12fr .88fr;gap:0;min-height:calc(100svh - 56px);background:rgba(255,255,255,.82);border:1px solid rgba(255,255,255,.9);border-radius:36px;box-shadow:var(--shadow);overflow:hidden}
.home-left,.home-right{padding:42px 46px}
.home-left{display:grid;grid-template-rows:auto 1fr;background:linear-gradient(180deg,#fbfcff 0%,#f7f9fd 100%)}
.home-right{display:grid;place-items:center;background:#fff;border-left:1px solid rgba(221,228,239,.68)}
.hero-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.status-stack{display:grid;justify-items:end;gap:10px}
.status-pill{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border-radius:999px;background:var(--green-soft);color:var(--green);font-weight:650;font-size:14px}
.status-dot{width:11px;height:11px;border-radius:50%;background:currentColor;box-shadow:0 0 0 5px rgba(20,150,109,.13)}
.status-pill.offline{background:var(--orange-soft);color:var(--orange)}
.status-pill.pending{background:var(--orange-soft);color:var(--orange)}
.status-pill.syncing{background:var(--blue-soft);color:var(--blue)}
.status-pill.error{background:var(--red-soft);color:var(--red)}
.terminal-label{font-size:15px;font-weight:580;color:#76839a;text-align:right;line-height:1.3;max-width:220px}
.sync-actions{display:flex;gap:7px;justify-content:flex-end;min-height:0}
.sync-action{min-height:30px;padding:0 11px;border-radius:999px;border:1px solid #dce4f0;background:rgba(255,255,255,.84);color:#516079;font-size:12px;font-weight:650;box-shadow:0 5px 12px rgba(15,23,42,.035);transition:transform .12s ease,background .14s ease,border-color .14s ease}
.sync-action:active{transform:scale(.97);background:#eef2ff;border-color:#cfd8ff;color:var(--blue)}
.sync-issue-list{display:grid;gap:9px;max-height:min(48svh,390px);overflow:auto;padding-right:2px}
.sync-issue{padding:13px 14px;border:1px solid #e4e9f1;border-radius:16px;background:#f9fafc}
.sync-issue>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sync-issue b{font-size:14px;color:#1b2742}
.sync-issue span{font-size:12px;color:#7a879c;white-space:nowrap}
.sync-issue p{margin:7px 0 0;font-size:13px;line-height:1.4;color:#a43b50}
.sync-modal{width:min(680px,100%)}
.hero-center{display:grid;align-content:center;justify-items:center;gap:18px;padding:16px 0 0}
.clock{font-variant-numeric:tabular-nums;letter-spacing:-.055em;line-height:.9;color:#16213b;text-align:center}
.clock-main{font-size:clamp(96px,10vw,176px);font-weight:730}
.clock-seconds{font-size:clamp(34px,3vw,60px);font-weight:650;color:#7a8497;vertical-align:baseline;margin-left:4px}
.date{font-size:clamp(24px,1.65vw,34px);font-weight:500;color:#667287;text-align:center;letter-spacing:-.03em;max-width:700px;line-height:1.18}
.pin-shell{width:min(440px,100%);display:grid;justify-items:center;gap:20px;padding:26px 22px}
.segmented{display:grid;grid-template-columns:1fr 1fr;gap:6px;background:#eef2f7;border:1px solid #e1e7f1;padding:6px;border-radius:20px;width:100%}
.segmented button{min-height:58px;border-radius:16px;font-weight:650;color:#6f7a8e;transition:background .16s ease,box-shadow .16s ease,color .16s ease,transform .16s ease}
.segmented button.active{background:#fff;color:#121a31;box-shadow:0 6px 18px rgba(15,23,42,.08)}
.segmented-home{max-width:420px}
/* V2.9.5.8 · Si Consultar está desactivado no mostramos un selector de una sola opción. */
.home-right.consult-disabled .pin-shell{gap:12px}
.home-right.consult-disabled .identity-list{max-height:min(66svh,650px)}
.subtle-title{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#8290a7;font-weight:700;margin-top:6px}
.pin-dots{display:flex;align-items:center;justify-content:center;gap:12px;min-height:24px}
.pin-dots i{width:11px;height:11px;border-radius:50%;border:2px solid #c5cfde;background:transparent;transition:all .14s ease}
.pin-dots i.filled{background:#2d4ff2;border-color:#2d4ff2;transform:scale(1.06)}
.pin-dots.error i{border-color:#d43d57;background:rgba(212,61,87,.12)}
.keypad{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.keypad button{min-height:84px;border-radius:24px;border:1px solid #dfe6f0;background:#fff;box-shadow:0 8px 18px rgba(15,23,42,.04);font-size:34px;font-weight:650;color:#17213a;transition:transform .08s ease,background .12s ease,box-shadow .12s ease}
.keypad button:hover{background:#fbfcff}
.keypad button.ok{background:linear-gradient(180deg,#2f56ff,#2449ef);color:#fff;border-color:transparent;box-shadow:0 16px 28px rgba(43,80,246,.24)}
.keypad button.erase{font-size:29px}
.keypad button.pressed{transform:scale(.97);background:#edf2fb;box-shadow:0 4px 10px rgba(15,23,42,.06)}
.keypad button.ok.pressed{background:#2143dc}
.network-note{font-size:13px;font-weight:620;color:var(--orange);background:var(--orange-soft);border:1px solid #ffe1b4;padding:10px 14px;border-radius:14px;width:100%;text-align:center}
.shake{animation:shake .34s linear}
@keyframes shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(7px)}60%{transform:translateX(-6px)}80%{transform:translateX(5px)}}

/* terminal views */
.view{min-height:calc(100svh - 56px);background:rgba(255,255,255,.88);border:1px solid rgba(255,255,255,.9);border-radius:36px;box-shadow:var(--shadow);padding:34px 38px}
.view-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}
.back{width:44px;height:44px;border-radius:14px;background:#eef2f7;border:1px solid var(--line);font-size:28px;line-height:1;color:#16213b}
.worker-top,.consult-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}
.worker-name{font-size:clamp(36px,3.4vw,54px);font-weight:710;letter-spacing:-.05em;line-height:1.02;color:#101a30}
.consult-name{font-size:clamp(32px,3vw,44px)}
.worker-topline{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.worker-inline-status{display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:0 12px;border-radius:999px;font-size:13px;font-weight:650;border:1px solid var(--line)}
.worker-inline-status .dot{width:9px;height:9px;border-radius:999px;background:currentColor}
.worker-inline-status.working{background:var(--green-soft);border-color:#cdeedc;color:var(--green)}
.worker-inline-status.inactive{background:#f3f5f8;border-color:#e4e9f1;color:#778399}
.worker-inline-status.offline-worker{background:var(--orange-soft);border-color:#f3dfbd;color:var(--orange)}
.cards{display:grid;gap:14px;margin-bottom:16px}
.cards.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.cards.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.cards.one{grid-template-columns:minmax(0,1fr)}
.cards.compact .card{padding:18px}
.card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:22px 20px;box-shadow:var(--shadow-soft)}
.card-label{font-size:12px;text-transform:uppercase;letter-spacing:.11em;font-weight:700;color:#74819a;margin-bottom:10px}
.card-value{font-size:clamp(22px,2vw,42px);line-height:1.05;letter-spacing:-.04em;font-weight:700;color:#12203a}
.card-value.pos,.balance-big.pos{color:var(--green)}
.card-value.neg,.balance-big.neg{color:var(--red)}
.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:24px}
.balance-big{font-size:clamp(26px,2.2vw,40px);font-weight:720;letter-spacing:-.04em}
.meta-stack{display:grid;gap:6px}
.consult-segment{width:min(260px,100%)}
.table-wrap,.admin-scroll{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow-soft);overflow:auto}
.data-table th,.data-table td,.admin-table th,.admin-table td{padding:16px 18px;border-bottom:1px solid #edf1f6;text-align:left;white-space:nowrap}
.data-table th,.admin-table th{font-size:13px;font-weight:670;color:#72809a;background:#fbfcfe}
.data-table td,.admin-table td{font-size:15px;color:#1c2842}
.data-table tr:last-child td,.admin-table tr:last-child td{border-bottom:0}
.success-wrap{min-height:calc(100svh - 124px);display:grid;place-content:center;justify-items:center;text-align:center;padding:24px}
.success-check{width:84px;height:84px;border-radius:50%;display:grid;place-items:center;background:var(--green-soft);color:var(--green);font-size:42px;font-weight:700;box-shadow:0 12px 28px rgba(20,150,109,.16)}
.success-check.small{width:58px;height:58px;font-size:28px;margin:0 auto 8px}
.success-title{margin-top:20px;font-size:38px;font-weight:720;letter-spacing:-.04em}
.success-time{margin-top:10px;font-size:62px;font-weight:720;letter-spacing:-.055em;color:#152038}
.success-meta{margin-top:8px;font-size:18px;color:var(--muted)}
.terminal-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#eef2f7;color:#16213b;font-size:20px}
.terminal-symbol.big{width:64px;height:64px;border-radius:18px;font-size:28px;margin:0 auto}
.terminal-mini{display:inline-flex;align-items:center;max-width:240px;padding:7px 10px;border-radius:12px;background:#f6f8fb;color:#586579;border:1px solid #e8edf4}
.pair-code-result{text-align:center}
.pair-code-display{margin:10px 0 12px;font-size:56px;letter-spacing:.12em;font-weight:720}

/* admin */
.admin-page{min-height:100svh;display:grid;place-items:center;padding:24px}
.login-card{width:min(460px,100%);display:grid;gap:18px;padding:36px;background:rgba(255,255,255,.9);border:1px solid rgba(255,255,255,.9);border-radius:30px;box-shadow:var(--shadow)}
.admin-shell{min-height:100svh;display:grid;grid-template-columns:260px 1fr;gap:18px;padding:18px}
.sidebar{display:grid;grid-template-rows:auto 1fr auto;gap:20px;background:rgba(255,255,255,.88);border:1px solid rgba(255,255,255,.94);border-radius:32px;box-shadow:var(--shadow);padding:22px 16px;backdrop-filter:blur(12px)}
.sidebar .logo{margin:8px auto 4px;width:145px;justify-self:center}
.nav{display:grid;gap:6px;align-content:start}
.nav button{display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:18px;color:#526178;font-weight:620;transition:background .15s ease,color .15s ease,transform .15s ease}
.nav button:hover{background:#f1f5fb;color:#16213b}
.nav button.active{background:#eef2ff;color:var(--blue)}
.nav-icon{width:18px;display:inline-grid;place-items:center;color:#8693a9;font-size:13px}
.side-bottom{display:grid;gap:10px;padding-top:8px}
.side-bottom .secondary{min-height:46px;background:#f2f5fa;border-radius:16px}
.admin-main{background:rgba(255,255,255,.52);border:1px solid rgba(255,255,255,.9);border-radius:32px;box-shadow:var(--shadow);padding:22px 22px 26px;overflow:auto}
.toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.admin-title{margin:0;font-size:clamp(28px,2.2vw,38px);font-weight:710;letter-spacing:-.04em;color:#16213b}
.section-title{margin:26px 0 14px;font-size:22px;font-weight:690;letter-spacing:-.03em;color:#1b2742}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.stat{background:#fff;border:1px solid var(--line);border-radius:26px;padding:20px 20px 18px;box-shadow:var(--shadow-soft)}
.stat span{display:block;font-size:13px;font-weight:630;color:#73829c;margin-bottom:12px}
.stat b{display:block;font-size:52px;line-height:.95;letter-spacing:-.05em;font-weight:710;color:#16213b}
.stat small{display:block;margin-top:8px;color:#8894a6;font-size:13px}
.row-actions,.terminal-actions{display:flex;gap:8px;flex-wrap:wrap}
.balance-table{margin-bottom:20px}
.terminal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.terminal-card{background:#fff;border:1px solid var(--line);border-radius:26px;padding:18px;box-shadow:var(--shadow-soft)}
.terminal-card-top{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.terminal-card h3{margin:0 0 12px;font-size:24px;font-weight:700;letter-spacing:-.03em;color:#16213b}
.terminal-meta{display:grid;gap:4px;margin-bottom:16px}
.terminal-meta span{font-size:13px;color:#8693a8}
.terminal-meta b{font-size:16px;color:#1e2a44}
.pair-card .device-mark{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#eef2ff;color:#2b50f6;font-size:24px}
.pair-card h1{margin:0;font-size:34px;font-weight:710;letter-spacing:-.04em}
.pair-code-input{width:min(280px,100%);min-height:60px;padding:0 18px;border:1px solid var(--line);border-radius:18px;text-align:center;font-size:32px;letter-spacing:.18em;font-weight:700;color:#182239;outline:none;margin-bottom:12px}
.pair-card form{display:grid;justify-items:center;gap:12px;width:100%}

.check-line{display:inline-flex;align-items:center;gap:10px;min-height:20px;font-size:15px;font-weight:600;color:#1c2842}
.check-line input{width:18px;height:18px;accent-color:var(--blue)}
.inline-check{padding-top:4px}
.multi-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.multi-range.hidden{display:none}
@media (max-width:920px){.multi-range{grid-template-columns:1fr}}

/* responsive */
@media (max-width:1180px){
  .tablet-home{grid-template-columns:1fr;min-height:auto}
  .home-right{border-left:0;border-top:1px solid rgba(221,228,239,.68)}
  .hero-center{padding:30px 0 10px}
  .cards.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats,.terminal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:920px){
  .page{padding:14px}
  .shell{min-height:calc(100svh - 28px)}
  .home-left,.home-right,.view{padding:24px}
  .admin-shell{grid-template-columns:1fr;padding:12px}
  .sidebar{grid-template-rows:auto auto auto}
  .nav{grid-template-columns:repeat(5,minmax(0,1fr));overflow:auto}
  .nav button{justify-content:center;padding:12px 10px}
  .nav button span:last-child{display:none}
  .side-bottom{grid-template-columns:1fr 1fr}
  .stats,.terminal-grid,.cards.four,.cards.two,.action-grid,.form-grid{grid-template-columns:1fr}
  .toolbar,.worker-top,.consult-top{flex-direction:column;align-items:stretch}
  .consult-segment{width:100%}
}
@media (max-width:640px){
  .logo{width:170px}
  .page{padding:10px}
  .tablet-home,.view,.gate-card,.login-card,.sidebar,.admin-main{border-radius:24px}
  .home-left,.home-right,.view{padding:18px}
  .hero-top{align-items:flex-start;gap:12px}
  .status-stack{justify-items:start}
  .terminal-label{text-align:left;max-width:none}
  .hero-center{gap:12px;padding:18px 0 0}
  .clock-main{font-size:78px}
  .clock-seconds{font-size:28px}
  .date{font-size:18px}
  .pin-shell{padding:8px 0 0;gap:16px}
  .segmented button{min-height:54px}
  .keypad button{min-height:72px;border-radius:20px;font-size:28px}
  .pin-dots i{width:10px;height:10px}
  .worker-name{font-size:34px}
  .success-time{font-size:46px}
  .pair-code-display{font-size:40px}
}

/* v241 admin refinements */
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,select,[contenteditable="true"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
button,a,img,table,th,td,div,span,p,h1,h2,h3,h4,h5,h6{-webkit-user-select:none;user-select:none}

.nav button{gap:0;padding:14px 16px}
.nav button.active{background:#eef2ff;color:var(--blue)}
.side-bottom .secondary.danger{background:#fff5f5;border-color:#f0c7ce;color:#b4475f}
.side-bottom .secondary.danger:hover{background:#fff1f3}

.admin-title{font-weight:680;letter-spacing:-.035em}
.section-title{font-weight:650}

.stats{align-items:stretch}
.stat{position:relative;padding-left:24px;overflow:hidden}
.stat::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:4px;border-radius:999px;background:#dfe6f3}
.stat.accent-blue::before{background:var(--blue)}
.stat.accent-green::before{background:var(--green)}
.stat.accent-orange::before{background:var(--orange)}
.stat.accent-red::before{background:var(--red)}
.stat b{font-size:50px}

.positive,.admin-table td.positive,.data-table td.positive{color:var(--green)!important}
.negative,.admin-table td.negative,.data-table td.negative{color:var(--red)!important}
.neutral,.admin-table td.neutral,.data-table td.neutral{color:#1c2842!important}

.terminal-card-top{justify-content:flex-end;margin-bottom:10px}
.terminal-card h3{font-size:22px;font-weight:660}
.empty-state h2{font-weight:660}

@media (max-width:920px){
  .nav button span:last-child{display:inline}
  .nav button{justify-content:center}
}

/* v242 terminal spacing refinement */
#workerContent{height:100%}
.worker-layout{min-height:calc(100svh - 250px);display:flex;flex-direction:column}
.worker-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}
.worker-cards .card{min-height:128px;display:flex;flex-direction:column;justify-content:center}
.worker-current-row{margin-bottom:0}
.worker-current-card{min-height:96px;display:flex;flex-direction:column;justify-content:center}
.worker-spacer{flex:1;min-height:10px}
.worker-actions{margin-top:14px}
#workerView .view-head{margin-bottom:20px}
#workerView .worker-top{margin-bottom:18px}
#workerView .worker-name{font-size:clamp(34px,3vw,50px)}
#workerView .card-value{font-size:clamp(26px,2.3vw,40px)}

@media (max-width:920px){
  .worker-layout{min-height:auto}
  .worker-cards{grid-template-columns:1fr}
  .worker-spacer{display:none}
}

/* v244 ajustes */
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.settings-card{background:#fff;border:1px solid var(--line);border-radius:26px;padding:24px;box-shadow:var(--shadow-soft)}
.settings-card-head{margin-bottom:20px}
.settings-card h2{margin:0 0 6px;font-size:22px;font-weight:660;letter-spacing:-.025em;color:#16213b}
.settings-card p{margin:0;color:var(--muted);font-size:14px;line-height:1.45}
.time-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.time-fields input{text-align:center;font-variant-numeric:tabular-nums;font-size:18px;font-weight:620}
.settings-actions{grid-column:1/-1;display:flex;justify-content:flex-end;padding-top:2px}
@media(max-width:920px){.settings-grid{grid-template-columns:1fr}}
@media(max-width:520px){.time-fields{grid-template-columns:1fr}}

/* Salvapantallas SterlumiQ · identidad corporativa animada */
.screensaver{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 45%,rgba(33,66,244,.08),transparent 28%),
    radial-gradient(circle at 18% 82%,rgba(91,118,255,.055),transparent 26%),
    radial-gradient(circle at 86% 18%,rgba(33,66,244,.045),transparent 24%),
    linear-gradient(180deg,#ffffff 0%,#f8faff 54%,#f1f4fa 100%);
  touch-action:manipulation;
  isolation:isolate;
}
.screensaver-grid{
  position:absolute;inset:-8%;pointer-events:none;opacity:.64;
  background-image:
    linear-gradient(90deg,transparent 0%,rgba(33,66,244,.022) 50%,transparent 100%),
    repeating-linear-gradient(0deg,transparent 0 47px,rgba(33,66,244,.025) 48px,transparent 49px),
    repeating-linear-gradient(90deg,transparent 0 83px,rgba(33,66,244,.015) 84px,transparent 85px);
  -webkit-mask-image:radial-gradient(ellipse at center,#000 24%,rgba(0,0,0,.55) 61%,transparent 88%);
  mask-image:radial-gradient(ellipse at center,#000 24%,rgba(0,0,0,.55) 61%,transparent 88%);
  animation:ss-grid-drift 28s linear infinite alternate;
}
.screensaver-aurora{
  position:absolute;inset:-22%;z-index:0;pointer-events:none;
  background:
    radial-gradient(ellipse at 30% 56%,rgba(33,66,244,.075),transparent 28%),
    radial-gradient(ellipse at 70% 42%,rgba(105,128,255,.055),transparent 25%);
  filter:blur(28px);
  animation:ss-aurora 16s ease-in-out infinite alternate;
}
.screensaver-fibers{
  position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:visible;
}
.fiber-line{
  fill:none;stroke:url(#ssFiberBlue);stroke-width:1.35;stroke-linecap:round;
  stroke-dasharray:2 15;opacity:.33;
  animation:ss-dashes 20s linear infinite;
}
.fiber-line-2{opacity:.22;stroke-width:1.05;animation-duration:27s;animation-direction:reverse}
.fiber-line-3{opacity:.16;stroke-width:.9;animation-duration:33s}
.fiber-node{fill:#2142f4;opacity:.82}
.node-2{opacity:.55}.node-3{opacity:.42}
.screensaver-stage{
  position:relative;z-index:4;display:grid;place-items:center;gap:20px;
  width:min(76vw,980px);padding:68px 40px;text-align:center;
  animation:ss-stage-float 8.5s cubic-bezier(.45,0,.55,1) infinite;
}
.screensaver-logo-wrap{
  position:relative;display:grid;place-items:center;overflow:hidden;padding:8px 14px;
  filter:drop-shadow(0 20px 40px rgba(33,66,244,.085));
  animation:ss-logo-breathe 6.8s ease-in-out infinite;
}
.screensaver-logo{
  position:relative;z-index:2;width:clamp(280px,31vw,590px);height:auto;
}
.screensaver-sheen{
  position:absolute;z-index:3;top:-30%;bottom:-30%;left:-34%;width:24%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.82),rgba(103,126,255,.14),transparent);
  transform:skewX(-17deg);filter:blur(1px);opacity:0;
  animation:ss-sheen 9.5s ease-in-out infinite;
  pointer-events:none;
}
.screensaver-tagline{
  color:#69748a;font-size:clamp(14px,1.08vw,19px);font-weight:520;
  letter-spacing:.085em;line-height:1.3;
  animation:ss-tagline 6.8s ease-in-out infinite;
}
.screensaver-orbit{
  position:absolute;z-index:2;left:50%;top:50%;pointer-events:none;border-radius:50%;
  border:1px solid rgba(33,66,244,.055);transform:translate(-50%,-50%);
}
.orbit-a{
  width:min(56vw,780px);height:min(56vw,780px);
  box-shadow:0 0 0 88px rgba(33,66,244,.011),0 0 0 176px rgba(33,66,244,.005);
  animation:ss-orbit-a 21s ease-in-out infinite alternate;
}
.orbit-b{
  width:min(42vw,590px);height:min(42vw,590px);border-color:rgba(33,66,244,.038);
  transform:translate(-50%,-50%) scaleX(1.22) rotate(-12deg);
  animation:ss-orbit-b 15s ease-in-out infinite alternate;
}
.screensaver::before{
  content:"";position:absolute;z-index:2;left:-18%;right:-18%;top:50%;height:1px;
  background:linear-gradient(90deg,transparent 0%,rgba(33,66,244,.03) 12%,rgba(33,66,244,.16) 50%,rgba(33,66,244,.03) 88%,transparent 100%);
  box-shadow:0 0 18px rgba(33,66,244,.07);pointer-events:none;
  animation:ss-horizon 7.5s ease-in-out infinite;
}
.screensaver::after{
  content:"";position:absolute;z-index:0;inset:0;pointer-events:none;
  background:linear-gradient(105deg,transparent 24%,rgba(33,66,244,.022) 44%,rgba(33,66,244,.05) 50%,rgba(33,66,244,.018) 56%,transparent 76%);
  transform:translateX(-60%);
  animation:ss-wide-sweep 14s ease-in-out infinite;
}
.screensaver-on{overflow:hidden}
@keyframes ss-grid-drift{0%{transform:translate3d(-1.5%,-1%,0)}100%{transform:translate3d(1.8%,1.4%,0)}}
@keyframes ss-aurora{0%{transform:translate3d(-3%,2%,0) scale(.98);opacity:.75}100%{transform:translate3d(3%,-2%,0) scale(1.06);opacity:1}}
@keyframes ss-dashes{to{stroke-dashoffset:-260}}
@keyframes ss-stage-float{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-10px) scale(1.009)}}
@keyframes ss-logo-breathe{0%,100%{transform:scale(1);filter:saturate(1)}50%{transform:scale(1.012);filter:saturate(1.05)}}
@keyframes ss-sheen{0%,54%{left:-34%;opacity:0}60%{opacity:.6}70%{left:112%;opacity:.22}72%,100%{left:112%;opacity:0}}
@keyframes ss-tagline{0%,100%{opacity:.72;transform:translateY(0);letter-spacing:.085em}50%{opacity:1;transform:translateY(2px);letter-spacing:.10em}}
@keyframes ss-orbit-a{0%{transform:translate(-52%,-49%) scale(.98)}100%{transform:translate(-48%,-51%) scale(1.035)}}
@keyframes ss-orbit-b{0%{transform:translate(-50%,-50%) scaleX(1.18) scaleY(.96) rotate(-12deg)}100%{transform:translate(-50%,-50%) scaleX(1.26) scaleY(1.03) rotate(-7deg)}}
@keyframes ss-horizon{0%,100%{opacity:.35;transform:scaleX(.76)}50%{opacity:.9;transform:scaleX(1)}}
@keyframes ss-wide-sweep{0%,18%{transform:translateX(-70%);opacity:0}34%{opacity:1}60%{transform:translateX(70%);opacity:.75}72%,100%{transform:translateX(70%);opacity:0}}
@media(prefers-reduced-motion:reduce){
  .screensaver-grid,.screensaver-aurora,.fiber-line,.screensaver-stage,.screensaver-logo-wrap,.screensaver-sheen,.screensaver-tagline,.screensaver-orbit,.screensaver::before,.screensaver::after{animation:none}
  .fiber-node{display:none}
}
@media(max-width:640px){
  .screensaver-stage{width:94vw;padding:46px 22px;gap:15px}
  .screensaver-logo{width:min(72vw,380px)}
  .orbit-a{width:min(84vw,580px);height:min(84vw,580px)}
  .orbit-b{width:min(68vw,470px);height:min(68vw,470px)}
}

/* v254 consulta refinada */
.consult-panel{display:grid;gap:18px}
.consult-top-refined{align-items:flex-start;gap:24px;margin-bottom:0}
.consult-heading{display:grid;gap:12px;min-width:0}
.consult-balance-panel{display:inline-grid;gap:6px;padding:14px 16px;border:1px solid var(--line);border-radius:20px;background:#fbfcfe;box-shadow:var(--shadow-soft);width:fit-content;max-width:100%}
.consult-balance-panel .card-label{margin-bottom:0}
.consult-period-note{font-size:13px;font-weight:600;color:#71809a}
.consult-tools{display:grid;justify-items:end;gap:12px;min-width:min(520px,100%)}
.consult-segment-wide{width:min(720px,100%);grid-template-columns:repeat(4,minmax(0,1fr))}
.consult-segment-wide button{min-width:0}
.consult-range-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) max-content;gap:12px;align-items:end;width:min(720px,100%)}
.consult-range-row.hidden{display:none}
.mini-field{gap:6px}
.mini-field label{font-size:12px;font-weight:650;color:#6d7c95}
.mini-field input{min-height:48px;border-radius:14px;background:#fff}
.consult-apply{min-height:48px;padding:0 18px;white-space:nowrap}
.consult-table-wrap{overflow:auto}

@media (max-width:920px){
  .consult-tools,.consult-segment-wide,.consult-range-row{width:100%;min-width:0}
  .consult-range-row{grid-template-columns:1fr}
  .consult-balance-panel{width:100%}
}


/* v256 filtros admin */
.admin-filterbar{
  display:grid;
  grid-template-columns:minmax(220px,320px) 1fr;
  gap:14px;
  align-items:end;
  margin:-4px 0 18px;
}
.admin-filterbar-spans{
  grid-template-columns:minmax(220px,300px) minmax(360px,520px) auto;
}
.admin-filter-field label{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#77849a;
}
.admin-date-segment{
  grid-template-columns:repeat(4,minmax(0,1fr));
  width:100%;
  max-width:520px;
}
.admin-date-segment button{
  min-height:48px;
  font-size:14px;
}
.admin-range-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,148px)) max-content;
  gap:8px;
  align-items:end;
  justify-content:start;
}
.admin-range-row.hidden{display:none}
.admin-range-row .field{min-width:0}
.admin-range-row input[type="date"]{min-width:0;padding:0 12px}
.admin-range-row .small-btn{
  min-height:48px;
  width:auto;
  min-width:88px;
  padding:0 16px;
  justify-self:start;
}
@media(max-width:1180px){
  .admin-filterbar,
  .admin-filterbar-spans{
    grid-template-columns:1fr;
  }
  .admin-date-segment{
    max-width:none;
  }
  .admin-range-row{
    grid-template-columns:repeat(2,minmax(0,1fr)) max-content;
  }
}
@media(max-width:640px){
  .admin-range-row{
    grid-template-columns:1fr;
  }
}


/* v261 orientación automática / móvil vertical */
@media (orientation: portrait) and (max-width: 900px){
  .page{padding:10px;min-height:100svh}
  .shell{min-height:calc(100svh - 20px);max-width:620px}
  .tablet-home{grid-template-columns:1fr;min-height:calc(100svh - 20px);border-radius:28px}
  .home-left{min-height:36svh;padding:24px 22px 18px}
  .home-right{min-height:64svh;padding:18px 22px 24px;border-left:0;border-top:1px solid rgba(221,228,239,.68)}
  .hero-top{align-items:flex-start}
  .logo{width:clamp(150px,42vw,220px)}
  .status-pill{padding:8px 12px;font-size:13px}
  .terminal-label{font-size:13px;max-width:180px}
  .sync-actions{gap:5px}
  .sync-action{min-height:28px;padding:0 9px;font-size:11px}
  .hero-center{padding:18px 0 0;gap:10px}
  .clock-main{font-size:clamp(76px,21vw,118px)}
  .clock-seconds{font-size:clamp(25px,7vw,38px)}
  .date{font-size:clamp(18px,5vw,24px)}
  .pin-shell{width:100%;max-width:440px;padding:0;gap:14px}
  .segmented button{min-height:50px}
  .keypad{gap:10px}
  .keypad button{min-height:68px;border-radius:20px;font-size:28px}
}


/* v272 agrupación de tramos por día */
.day-span-stack{display:grid;gap:7px;align-content:start}
.day-span-line{display:flex;align-items:center;gap:8px;min-height:30px;white-space:nowrap}
.day-span-index{display:inline-grid;place-items:center;flex:0 0 22px;width:22px;height:22px;border-radius:8px;background:#eef2f8;color:#71809a;font-size:11px;font-weight:700}
.day-span-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}
.grouped-day-row>td{vertical-align:top}
.grouped-day-row>td:nth-child(1),.grouped-day-row>td:nth-child(2),.grouped-day-row>td:nth-child(6),.grouped-day-row>td:nth-child(7){padding-top:22px}
.terminal-stack .terminal-mini{max-width:280px}
.action-stack .small-btn{min-height:34px;padding:0 11px;border-radius:11px;font-size:12px}
@media(max-width:920px){.day-span-line{white-space:normal}.day-span-actions{flex-wrap:wrap}}


/* v273 Dashboard y tema oscuro del Admin */
.dashboard-toolbar{align-items:center;margin-bottom:18px}
.dashboard-digital-clock{display:flex;align-items:baseline;justify-content:flex-end;min-width:180px;padding:2px 4px;font-variant-numeric:tabular-nums;letter-spacing:-.045em;color:#15213a}
.dashboard-clock-main{font-size:clamp(34px,3vw,48px);font-weight:720;line-height:1}
.dashboard-clock-seconds{font-size:clamp(15px,1.25vw,20px);font-weight:650;color:#7c879a;margin-left:4px;letter-spacing:-.02em}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:16px;margin-top:18px;align-items:start}
.dashboard-card{background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow-soft);padding:20px;min-width:0}
.dashboard-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.dashboard-card-head h2{margin:0;font-size:18px;font-weight:660;letter-spacing:-.02em;color:#1b2742}
.dashboard-card-head>span{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 9px;border-radius:999px;background:#f1f5fb;color:#6d7b91;font-size:12px;font-weight:700}
.dashboard-worker-list,.dashboard-balance-list{max-height:390px;overflow:auto;overscroll-behavior:contain;padding-right:2px}
.dashboard-worker-columns{display:grid;grid-template-columns:minmax(0,1fr) 118px 118px;gap:16px;padding:6px 4px 10px;border-bottom:1px solid rgba(21,33,58,.08);color:#8a95a8;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.dashboard-worker-columns span:nth-child(2),.dashboard-worker-columns span:nth-child(3){text-align:right}
.dashboard-worker-row{display:grid;grid-template-columns:minmax(0,1fr) 118px 118px;align-items:center;gap:16px;padding:16px 4px;border-bottom:1px solid rgba(21,33,58,.08)}
.dashboard-worker-row:last-child{border-bottom:0}
.dashboard-worker-name{display:flex;align-items:center;gap:10px;min-width:0;font-weight:630;color:#1d2942}
.dashboard-worker-name>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-live-dot{width:10px;height:10px;border-radius:50%;background:var(--green);box-shadow:0 0 0 5px rgba(20,150,109,.10);flex:none}
.dashboard-entry-time,.dashboard-duration{display:flex;align-items:baseline;justify-content:flex-end;white-space:nowrap;font-variant-numeric:tabular-nums}
.dashboard-duration{color:var(--green)}
.dashboard-time-main{font-size:15px;font-weight:680;color:#1c2942;font-variant-numeric:tabular-nums}
.dashboard-duration-main{font-size:15px;font-weight:720;color:var(--green);font-variant-numeric:tabular-nums}
.dashboard-duration-seconds{font-size:10px;font-weight:650;color:#63ad93;margin-left:1px;font-variant-numeric:tabular-nums}
.dashboard-time-seconds{font-size:10px;font-weight:620;color:#8d98aa;font-variant-numeric:tabular-nums;margin-left:1px}
.dashboard-empty{padding:34px 8px;text-align:center;color:var(--muted);font-size:14px}
.dashboard-balance-row{display:grid;grid-template-columns:minmax(80px,130px) minmax(80px,1fr) minmax(76px,auto);align-items:center;gap:12px;padding:11px 2px;border-bottom:1px solid #edf1f6}
.dashboard-balance-row:last-child{border-bottom:0}
.dashboard-balance-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:620;color:#25324a}
.dashboard-balance-track{height:12px;border-radius:999px;background:#edf1f6;overflow:hidden}
.dashboard-balance-bar{display:block;height:100%;border-radius:999px;background:#a9b3c4;min-width:0;transition:width .28s ease}
.dashboard-balance-bar.positive{background:var(--green)!important}
.dashboard-balance-bar.negative{background:var(--red)!important}
.dashboard-balance-value{text-align:right;font-size:13px;font-weight:720;font-variant-numeric:tabular-nums;white-space:nowrap}
.side-bottom .nav-theme{min-height:46px;background:#f2f5fa;border-radius:16px}

html[data-admin-theme="dark"]{--bg:#08111d;--surface:#101a28;--surface-soft:#142031;--line:#26364a;--line-strong:#35485f;--text:#f3f6fb;--muted:#a9b5c6;--muted-2:#8391a6;--blue-soft:#162650;--green-soft:#102e25;--orange-soft:#36270f;--red-soft:#35151d;--shadow:0 16px 42px rgba(0,0,0,.28);--shadow-soft:0 10px 28px rgba(0,0,0,.20)}
html[data-admin-theme="dark"] body{background:var(--bg);color:var(--text)}
html[data-admin-theme="dark"] .admin-shell{background:transparent}
html[data-admin-theme="dark"] .sidebar,
html[data-admin-theme="dark"] .admin-main,
html[data-admin-theme="dark"] .login-card{background:rgba(15,25,39,.94);border-color:#26364a}
html[data-admin-theme="dark"] .admin-main{background:rgba(13,23,36,.82)}
html[data-admin-theme="dark"] .nav button{color:#a9b5c7}
html[data-admin-theme="dark"] .nav button:hover{background:#162335;color:#f3f6fb}
html[data-admin-theme="dark"] .nav button.active{background:#17264a;color:#7e9aff}
html[data-admin-theme="dark"] .admin-title,
html[data-admin-theme="dark"] .section-title,
html[data-admin-theme="dark"] .dashboard-card-head h2,
html[data-admin-theme="dark"] .dashboard-worker-name,
html[data-admin-theme="dark"] .dashboard-time-main,
html[data-admin-theme="dark"] .dashboard-balance-name{color:#f2f5fa}
html[data-admin-theme="dark"] .stat,
html[data-admin-theme="dark"] .dashboard-card,
html[data-admin-theme="dark"] .admin-scroll,
html[data-admin-theme="dark"] .terminal-card,
html[data-admin-theme="dark"] .settings-card,
html[data-admin-theme="dark"] .modal,
html[data-admin-theme="dark"] .empty,
html[data-admin-theme="dark"] .empty-state{background:#111d2b;border-color:#29394d}
html[data-admin-theme="dark"] .stat span,
html[data-admin-theme="dark"] .stat small,
html[data-admin-theme="dark"] .dashboard-entry,
html[data-admin-theme="dark"] .dashboard-empty{color:#9dacbf}
html[data-admin-theme="dark"] .stat b{color:#f6f8fb}
html[data-admin-theme="dark"] .dashboard-worker-row,
html[data-admin-theme="dark"] .dashboard-balance-row,
html[data-admin-theme="dark"] .admin-table th,
html[data-admin-theme="dark"] .admin-table td{border-color:rgba(255,255,255,.08)}
html[data-admin-theme="dark"] .dashboard-card-head>span{background:#192638;color:#9dacbf}
html[data-admin-theme="dark"] .dashboard-balance-track{background:#223146}
html[data-admin-theme="dark"] .dashboard-digital-clock{color:#f5f7fb}
html[data-admin-theme="dark"] .dashboard-clock-seconds{color:#8fa0b6}
html[data-admin-theme="dark"] .dashboard-worker-columns{color:#7f90a8;border-color:rgba(255,255,255,.08)}
html[data-admin-theme="dark"] .dashboard-entry-time .dashboard-time-main{color:#f2f5fa}
html[data-admin-theme="dark"] .dashboard-entry-time .dashboard-time-seconds{color:#8fa0b6}

html[data-admin-theme="dark"] .data-table th,
html[data-admin-theme="dark"] .admin-table th{background:#142131;color:#9dabbe}
html[data-admin-theme="dark"] .data-table td,
html[data-admin-theme="dark"] .admin-table td{color:#e7ecf3}
html[data-admin-theme="dark"] .field label{color:#9eabc0}
html[data-admin-theme="dark"] .field input,
html[data-admin-theme="dark"] .field select,
html[data-admin-theme="dark"] .field textarea{background:#0f1b29;border-color:#2a3b50;color:#f1f5f9;color-scheme:dark}
html[data-admin-theme="dark"] .secondary,
html[data-admin-theme="dark"] .small-btn,
html[data-admin-theme="dark"] .side-bottom .nav-theme{background:#172436;border-color:#2b3b50;color:#e8edf4}
html[data-admin-theme="dark"] .small-btn.blue{background:var(--blue);border-color:var(--blue);color:#fff}
html[data-admin-theme="dark"] .small-btn.red{background:#1c1a24;border-color:#5b2e3b;color:#ff8fa6}
html[data-admin-theme="dark"] .side-bottom .secondary.danger{background:#23171e;border-color:#5c2b39;color:#ff8da5}
html[data-admin-theme="dark"] .terminal-mini{background:#172436;border-color:#2a3b50;color:#b8c4d5}
html[data-admin-theme="dark"] .chip.off{background:#1a2636;color:#a7b3c3}
html[data-admin-theme="dark"] .chip.on{background:#123126;color:#52d4a2}
html[data-admin-theme="dark"] .positive,
html[data-admin-theme="dark"] .admin-table td.positive,
html[data-admin-theme="dark"] .data-table td.positive{color:#45d49e!important}
html[data-admin-theme="dark"] .negative,
html[data-admin-theme="dark"] .admin-table td.negative,
html[data-admin-theme="dark"] .data-table td.negative{color:#ff6f89!important}
html[data-admin-theme="dark"] .neutral,
html[data-admin-theme="dark"] .admin-table td.neutral,
html[data-admin-theme="dark"] .data-table td.neutral{color:#e2e8f0!important}
html[data-admin-theme="dark"] .modal-overlay{background:rgba(0,0,0,.46)}
html[data-admin-theme="dark"] .toast{background:rgba(240,244,250,.94);color:#111b2a}

@media(max-width:1100px){.dashboard-grid{grid-template-columns:1fr}.dashboard-worker-list,.dashboard-balance-list{max-height:330px}}
@media(max-width:700px){.dashboard-balance-row{grid-template-columns:minmax(72px,110px) minmax(60px,1fr) auto;gap:8px}.dashboard-card{padding:16px}.dashboard-worker-columns,.dashboard-worker-row{grid-template-columns:minmax(0,1fr) 94px 94px;gap:8px}.dashboard-digital-clock{min-width:0}.dashboard-clock-main{font-size:34px}.dashboard-clock-seconds{font-size:14px}}
@media(max-width:920px){.side-bottom{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.side-bottom{grid-template-columns:1fr}.dashboard-balance-row{grid-template-columns:minmax(68px,96px) 1fr auto}.dashboard-balance-value{font-size:12px}}

@media(max-width:560px){.dashboard-toolbar{flex-direction:row!important;align-items:center!important}.dashboard-digital-clock{padding:0}.dashboard-worker-columns,.dashboard-worker-row{grid-template-columns:minmax(0,1fr) 80px 80px;gap:6px}.dashboard-worker-columns{font-size:9px}.dashboard-time-main,.dashboard-duration-main{font-size:13px}.dashboard-time-seconds,.dashboard-duration-seconds{font-size:9px}}



/* V2.7.6 · exportación profesional de fichajes */
.toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.export-main{background:#fff;border-color:#cfd8e8;color:#1b2742;box-shadow:0 7px 18px rgba(15,23,42,.04)}
.export-main:hover{background:#f8faff;border-color:#b9c8ff;color:var(--blue)}
.export-modal{display:grid;gap:18px}
.export-modal h2{margin-bottom:0}
.export-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.export-preview>div{display:grid;gap:6px;padding:14px 15px;border:1px solid var(--line);border-radius:17px;background:#fafbfe}
.export-preview span{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#78859a}
.export-preview b{font-size:16px;color:#17213a;white-space:normal;overflow-wrap:anywhere}
.export-preview b.positive{color:var(--green)!important}.export-preview b.negative{color:var(--red)!important}
.export-note{margin:-4px 0 0;color:#7c889d;font-size:13px;line-height:1.45}
.export-buttons{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.export-buttons .small-btn,.export-buttons .secondary{min-height:48px}
.export-pdf{background:#eef2ff;border-color:#d4dcff;color:#2142f4}
.export-pdf:hover{background:#e5ebff}
html[data-admin-theme="dark"] .export-main{background:#192436;border-color:#344258;color:#eef4ff}
html[data-admin-theme="dark"] .export-main:hover{background:#202d43;border-color:#51627e;color:#8ca2ff}
html[data-admin-theme="dark"] .export-preview>div{background:#151f31;border-color:#33405a}
html[data-admin-theme="dark"] .export-preview b{color:#eef4ff}
html[data-admin-theme="dark"] .export-note{color:#9aa8bd}
html[data-admin-theme="dark"] .export-pdf{background:#1c2a4f;border-color:#334d9a;color:#9bb0ff}
@media(max-width:640px){.toolbar-actions{width:100%}.toolbar-actions button{flex:1}.export-preview{grid-template-columns:1fr}.export-buttons{display:grid;grid-template-columns:1fr}.export-buttons>*{width:100%}}


/* V2.7.10 · selectores de tema */
.theme-icon-btn{
  width:42px;height:42px;min-width:42px;min-height:42px;padding:0;
  display:grid;place-items:center;border-radius:14px;
  border:1px solid rgba(213,222,236,.92);
  background:rgba(255,255,255,.82);color:#56657c;
  box-shadow:0 8px 22px rgba(15,23,42,.07);
  backdrop-filter:blur(14px);
  transition:transform .14s ease,background .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.theme-icon-btn:hover{background:#fff;color:#2438a8;box-shadow:0 10px 26px rgba(15,23,42,.10)}
.theme-icon-btn:active{transform:scale(.94)}
.theme-icon-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-icon-btn svg path:first-child:last-child{fill:none}
.tablet-theme-toggle{
  position:absolute;z-index:58;
  top:18px;right:18px;
}
.screensaver-on .tablet-theme-toggle{display:none}
.side-bottom .admin-theme-toggle{
  width:42px;min-width:42px;min-height:42px;height:42px;
  justify-self:end;padding:0;border-radius:14px;
  background:#f2f5fa;
}

/* Terminal · modo oscuro */
html[data-tablet-theme="dark"] body{background:#08111c;color:#eef3f9}
html[data-tablet-theme="dark"] .tablet-home{
  background:#0f1a28;border-color:#223146;box-shadow:0 18px 48px rgba(0,0,0,.28)
}
html[data-tablet-theme="dark"] .home-left{background:linear-gradient(180deg,#101c2b 0%,#0d1825 100%)}
html[data-tablet-theme="dark"] .home-right{background:#0c1622;border-color:#223146}
html[data-tablet-theme="dark"] .gate-card,
html[data-tablet-theme="dark"] .view,
html[data-tablet-theme="dark"] .login-card{background:#101c2a;border-color:#25364a}
html[data-tablet-theme="dark"] .clock,
html[data-tablet-theme="dark"] .worker-name,
html[data-tablet-theme="dark"] .card-value,
html[data-tablet-theme="dark"] .success-title,
html[data-tablet-theme="dark"] .success-time,
html[data-tablet-theme="dark"] .modal h2,
html[data-tablet-theme="dark"] .pair-card h1{color:#f3f7fb}
html[data-tablet-theme="dark"] .clock-seconds,
html[data-tablet-theme="dark"] .date,
html[data-tablet-theme="dark"] .terminal-label,
html[data-tablet-theme="dark"] .success-meta,
html[data-tablet-theme="dark"] .subtle,
html[data-tablet-theme="dark"] .consult-period-note{color:#95a4b8}
html[data-tablet-theme="dark"] .segmented{background:#152234;border-color:#26364a}
html[data-tablet-theme="dark"] .segmented button{color:#97a6ba}
html[data-tablet-theme="dark"] .segmented button.active{background:#243248;color:#f6f8fb;box-shadow:0 8px 20px rgba(0,0,0,.22)}
html[data-tablet-theme="dark"] .subtle-title,
html[data-tablet-theme="dark"] .card-label{color:#92a1b7}
html[data-tablet-theme="dark"] .pin-dots i{border-color:#53647c}
html[data-tablet-theme="dark"] .pin-dots i.filled{background:#627cff;border-color:#627cff}
html[data-tablet-theme="dark"] .keypad button{
  background:#142131;border-color:#2a3b50;color:#f3f6fb;box-shadow:0 8px 18px rgba(0,0,0,.12)
}
html[data-tablet-theme="dark"] .keypad button:hover{background:#19283b}
html[data-tablet-theme="dark"] .keypad button.pressed{background:#21324a}
html[data-tablet-theme="dark"] .keypad button.ok{background:linear-gradient(180deg,#4567ff,#2e50ee);color:#fff;border-color:transparent}
html[data-tablet-theme="dark"] .back,
html[data-tablet-theme="dark"] .secondary,
html[data-tablet-theme="dark"] .ghost{
  background:#172436;border-color:#2b3b50;color:#edf2f8
}
html[data-tablet-theme="dark"] .card,
html[data-tablet-theme="dark"] .table-wrap,
html[data-tablet-theme="dark"] .consult-balance-panel,
html[data-tablet-theme="dark"] .modal,
html[data-tablet-theme="dark"] .empty{
  background:#111d2b;border-color:#29394d
}
html[data-tablet-theme="dark"] .data-table th{background:#142131;color:#9dabbe}
html[data-tablet-theme="dark"] .data-table td{color:#e7ecf3;border-color:rgba(255,255,255,.08)}
html[data-tablet-theme="dark"] .data-table th{border-color:rgba(255,255,255,.08)}
html[data-tablet-theme="dark"] .field label{color:#9eabc0}
html[data-tablet-theme="dark"] .field input,
html[data-tablet-theme="dark"] .field select,
html[data-tablet-theme="dark"] .field textarea{
  background:#0f1b29;border-color:#2a3b50;color:#f1f5f9;color-scheme:dark
}
html[data-tablet-theme="dark"] .worker-inline-status.inactive{background:#182536;border-color:#2b3a4f;color:#a5b1c2}
html[data-tablet-theme="dark"] .worker-inline-status.working{background:#123126;border-color:#255b48;color:#52d4a2}
html[data-tablet-theme="dark"] .worker-inline-status.offline-worker{background:#342816;border-color:#6c5225;color:#f0b75d}
html[data-tablet-theme="dark"] .terminal-mini{background:#172436;border-color:#2a3b50;color:#b8c4d5}
html[data-tablet-theme="dark"] .sync-action{background:#172436;border-color:#2a3b50;color:#bdc8d8}
html[data-tablet-theme="dark"] .sync-issue{background:#111d2b;border-color:#29394d}
html[data-tablet-theme="dark"] .sync-issue b{color:#eef3f9}
html[data-tablet-theme="dark"] .sync-issue span{color:#99a8bb}
html[data-tablet-theme="dark"] .theme-icon-btn{background:rgba(18,30,46,.88);border-color:#314158;color:#dbe5f2;box-shadow:0 10px 28px rgba(0,0,0,.22)}
html[data-tablet-theme="dark"] .theme-icon-btn:hover{background:#1a2a40;color:#fff}
html[data-tablet-theme="dark"] .network-note{background:#342816;border-color:#6c5225;color:#f0b75d}
html[data-tablet-theme="dark"] .positive,
html[data-tablet-theme="dark"] .data-table td.positive{color:#45d49e!important}
html[data-tablet-theme="dark"] .negative,
html[data-tablet-theme="dark"] .data-table td.negative{color:#ff6f89!important}
html[data-tablet-theme="dark"] .neutral,
html[data-tablet-theme="dark"] .data-table td.neutral{color:#e2e8f0!important}

/* Admin · botón de tema compacto */
html[data-admin-theme="dark"] .theme-icon-btn{background:#172436;border-color:#2b3b50;color:#e8edf4;box-shadow:0 10px 24px rgba(0,0,0,.18)}
html[data-admin-theme="dark"] .theme-icon-btn:hover{background:#1d2c41;color:#fff}

@media(max-width:700px){
  .tablet-theme-toggle{top:12px;right:12px;width:38px;height:38px;min-width:38px;min-height:38px;border-radius:13px}
  .tablet-theme-toggle svg{width:18px;height:18px}
  .hero-top,.view-head{padding-right:42px}
}




/* V2.7.13 · splash sobrio tipo app nativa */
.boot-splash{
  position:fixed;
  inset:0;
  z-index:120;
  min-height:100svh;
  display:grid;
  place-items:center;
  background:#f5f7fb;
  overflow:hidden;
  opacity:1;
  transition:opacity .30s cubic-bezier(.4,0,.2,1);
}
.boot-splash.boot-exit{opacity:0;pointer-events:none}
.boot-brand{
  width:min(390px,78vw);
  display:grid;
  justify-items:center;
  gap:13px;
  text-align:center;
  animation:bootNativeIn .68s cubic-bezier(.16,1,.3,1) both;
}
.boot-logo-wrap{padding:0}
.boot-logo{
  display:block;
  width:min(286px,62vw);
  height:auto;
  filter:drop-shadow(0 10px 24px rgba(33,66,244,.055));
}
.boot-tagline{
  color:#7d889a;
  font-size:clamp(11px,1.15vw,13px);
  font-weight:590;
  letter-spacing:.055em;
  opacity:0;
  animation:bootTaglineIn .44s ease .32s forwards;
}
@keyframes bootNativeIn{
  0%{opacity:0;transform:scale(.94)}
  58%{opacity:1;transform:scale(1.006)}
  100%{opacity:1;transform:scale(1)}
}
@keyframes bootTaglineIn{
  from{opacity:0;transform:translateY(3px)}
  to{opacity:.82;transform:translateY(0)}
}
html[data-tablet-theme="dark"] .boot-splash{background:#0b1420}
html[data-tablet-theme="dark"] .boot-tagline{color:#91a0b4}

/* Cambio de tema tipo Pixel / iOS */
html.theme-view-transition::view-transition-old(root),
html.theme-view-transition::view-transition-new(root){
  animation:none;
  mix-blend-mode:normal;
}
html.theme-view-transition::view-transition-old(root){z-index:1}
html.theme-view-transition::view-transition-new(root){
  z-index:9999;
  animation:themeRadialReveal .42s cubic-bezier(.2,.72,.22,1) both;
}
@keyframes themeRadialReveal{
  from{clip-path:circle(0 at var(--theme-x) var(--theme-y))}
  to{clip-path:circle(var(--theme-radius) at var(--theme-x) var(--theme-y))}
}

/* Fallback para Safari/iOS y navegadores sin View Transitions */
html.theme-soft-transition body,
html.theme-soft-transition .tablet-home,
html.theme-soft-transition .home-left,
html.theme-soft-transition .home-right,
html.theme-soft-transition .view,
html.theme-soft-transition .card,
html.theme-soft-transition .table-wrap,
html.theme-soft-transition .segmented,
html.theme-soft-transition .segmented button,
html.theme-soft-transition .keypad button,
html.theme-soft-transition .sidebar,
html.theme-soft-transition .admin-main,
html.theme-soft-transition .dashboard-card,
html.theme-soft-transition .stat,
html.theme-soft-transition .admin-scroll,
html.theme-soft-transition .modal,
html.theme-soft-transition .field input,
html.theme-soft-transition .field select,
html.theme-soft-transition .field textarea,
html.theme-soft-transition .theme-icon-btn{
  transition:
    background-color .30s cubic-bezier(.4,0,.2,1),
    border-color .30s cubic-bezier(.4,0,.2,1),
    color .26s ease,
    box-shadow .30s ease!important;
}

@media (prefers-reduced-motion:reduce){
  .boot-brand,.boot-tagline{animation:none!important;opacity:1}
  .boot-splash{transition:none}
  html.theme-view-transition::view-transition-old(root),
  html.theme-view-transition::view-transition-new(root){animation:none!important}
}


/* V2.7.14 · tipografía Admin más corporativa */
body.admin-body{
  font-family:"Segoe UI Variable","Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,sans-serif;
  font-weight:400;
  font-kerning:normal;
  text-rendering:optimizeLegibility;
}
body.admin-body .admin-title{
  font-size:clamp(28px,2.15vw,37px);
  font-weight:600;
  letter-spacing:-.022em;
  line-height:1.08;
}
body.admin-body .section-title{
  font-size:21px;
  font-weight:600;
  letter-spacing:-.015em;
}
body.admin-body .settings-card h2,
body.admin-body .dashboard-card-head h2,
body.admin-body .terminal-card h3,
body.admin-body .empty-state h2{
  font-weight:600;
  letter-spacing:-.012em;
}
body.admin-body .dashboard-card-head h2{font-size:17px}
body.admin-body .modal h2{
  font-size:27px;
  font-weight:600;
  letter-spacing:-.02em;
}
body.admin-body .nav button{
  font-weight:500;
  letter-spacing:0;
}
body.admin-body .nav button.active{font-weight:600}
body.admin-body .small-btn,
body.admin-body .primary,
body.admin-body .secondary{
  font-weight:600;
  letter-spacing:-.01em;
}
body.admin-body .admin-table th,
body.admin-body .data-table th{
  font-weight:600;
  letter-spacing:-.005em;
}
body.admin-body .field label{
  font-weight:600;
  letter-spacing:0;
}
body.admin-body .stat span{
  font-weight:500;
  letter-spacing:0;
}
body.admin-body .stat b{
  font-weight:600;
  letter-spacing:-.035em;
}
body.admin-body .dashboard-clock-main{font-weight:600;letter-spacing:-.03em}
body.admin-body .dashboard-clock-seconds{font-weight:500}
body.admin-body .dashboard-worker-name{font-weight:500}
body.admin-body .dashboard-time-main{font-weight:600}
body.admin-body .dashboard-duration-main{font-weight:600}
body.admin-body .dashboard-duration-seconds,
body.admin-body .dashboard-time-seconds{font-weight:500}
body.admin-body .dashboard-balance-name{font-weight:500}
body.admin-body .dashboard-balance-value{font-weight:600}
body.admin-body .export-preview span{font-weight:600}
body.admin-body .export-preview b{font-weight:600}
body.admin-body .chip{font-weight:600}
body.admin-body .pair-code-display{font-weight:600}


/* V2.7.15 · cambio claro/oscuro tipo iOS: sin barrido circular */
html.theme-view-transition::view-transition-old(root),
html.theme-view-transition::view-transition-new(root){
  animation:none!important;
  clip-path:none!important;
}
html.theme-ios-transition body,
html.theme-ios-transition .page,
html.theme-ios-transition .shell,
html.theme-ios-transition .tablet-home,
html.theme-ios-transition .home-left,
html.theme-ios-transition .home-right,
html.theme-ios-transition .view,
html.theme-ios-transition .card,
html.theme-ios-transition .stat,
html.theme-ios-transition .dashboard-card,
html.theme-ios-transition .sidebar,
html.theme-ios-transition .admin-main,
html.theme-ios-transition .admin-shell,
html.theme-ios-transition .admin-scroll,
html.theme-ios-transition .table-wrap,
html.theme-ios-transition .admin-table,
html.theme-ios-transition .data-table,
html.theme-ios-transition .segmented,
html.theme-ios-transition .segmented button,
html.theme-ios-transition .keypad button,
html.theme-ios-transition .field input,
html.theme-ios-transition .field select,
html.theme-ios-transition .field textarea,
html.theme-ios-transition .modal,
html.theme-ios-transition .theme-icon-btn,
html.theme-ios-transition .terminal-mini,
html.theme-ios-transition .sync-action{
  transition:
    background-color .34s cubic-bezier(.4,0,.2,1),
    border-color .34s cubic-bezier(.4,0,.2,1),
    color .28s cubic-bezier(.4,0,.2,1),
    box-shadow .34s cubic-bezier(.4,0,.2,1),
    opacity .28s cubic-bezier(.4,0,.2,1)!important;
}
.theme-icon-btn.theme-tap{
  animation:themeIconTap .34s cubic-bezier(.2,.8,.2,1);
}
.theme-icon-btn.theme-tap svg{
  animation:themeIconSwap .34s cubic-bezier(.2,.8,.2,1);
}
@keyframes themeIconTap{
  0%{transform:scale(1)}
  46%{transform:scale(.92)}
  100%{transform:scale(1)}
}
@keyframes themeIconSwap{
  0%{opacity:.55;transform:rotate(-10deg) scale(.86)}
  100%{opacity:1;transform:rotate(0) scale(1)}
}
@media (prefers-reduced-motion:reduce){
  .theme-icon-btn.theme-tap,
  .theme-icon-btn.theme-tap svg{animation:none!important}
}


/* V2.7.16 · arranque más fluido y tipografía tipo macOS/iOS */
.boot-splash{transition:opacity .42s cubic-bezier(.22,1,.36,1)}
.boot-brand{
  animation:bootNativeSmooth .96s cubic-bezier(.22,1,.36,1) both;
  will-change:transform,opacity;
}
.boot-tagline{
  animation:bootTaglineSmooth .62s cubic-bezier(.22,1,.36,1) .36s forwards;
}
@keyframes bootNativeSmooth{
  0%{opacity:0;transform:scale(.965) translateY(2px)}
  68%{opacity:1;transform:scale(1.002) translateY(0)}
  100%{opacity:1;transform:scale(1) translateY(0)}
}
@keyframes bootTaglineSmooth{
  from{opacity:0;transform:translateY(4px)}
  to{opacity:.78;transform:translateY(0)}
}
.admin-boot-splash{z-index:140}
html[data-admin-theme="dark"] .admin-boot-splash{background:#0b1420}
html[data-admin-theme="dark"] .admin-boot-splash .boot-tagline{color:#91a0b4}

/* Jerarquía tipo SF Pro: menos peso, más limpia */
body.admin-body{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue","Segoe UI Variable","Segoe UI",Arial,sans-serif;
  font-weight:400;
  letter-spacing:0;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
body.admin-body .admin-title{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Helvetica Neue","Segoe UI Variable Display","Segoe UI",Arial,sans-serif;
  font-size:clamp(28px,2.05vw,35px);
  font-weight:560;
  letter-spacing:-.016em;
  line-height:1.1;
}
body.admin-body .section-title{font-size:20px;font-weight:560;letter-spacing:-.01em}
body.admin-body .settings-card h2,
body.admin-body .dashboard-card-head h2,
body.admin-body .terminal-card h3,
body.admin-body .empty-state h2{font-weight:560;letter-spacing:-.008em}
body.admin-body .dashboard-card-head h2{font-size:16.5px}
body.admin-body .modal h2{font-size:25px;font-weight:580;letter-spacing:-.014em}
body.admin-body .nav button{font-weight:450}
body.admin-body .nav button.active{font-weight:560}
body.admin-body .small-btn,
body.admin-body .primary,
body.admin-body .secondary{font-weight:560;letter-spacing:-.004em}
body.admin-body .admin-table th,
body.admin-body .data-table th,
body.admin-body .field label{font-weight:550;letter-spacing:0}
body.admin-body .stat span{font-weight:450}
body.admin-body .stat b{font-weight:580;letter-spacing:-.022em}
body.admin-body .dashboard-clock-main{font-weight:570;letter-spacing:-.022em}
body.admin-body .dashboard-clock-seconds{font-weight:450}
body.admin-body .dashboard-worker-name,
body.admin-body .dashboard-balance-name{font-weight:450}
body.admin-body .dashboard-time-main,
body.admin-body .dashboard-duration-main,
body.admin-body .dashboard-balance-value{font-weight:560}
body.admin-body .dashboard-duration-seconds,
body.admin-body .dashboard-time-seconds{font-weight:450}
body.admin-body .export-preview span,
body.admin-body .export-preview b,
body.admin-body .chip,
body.admin-body .pair-code-display{font-weight:560}

@media (prefers-reduced-motion:reduce){
  .boot-brand,.boot-tagline{animation:none!important;opacity:1}
}


/* V2.7.17 · terminal: cambio de tema sincronizado + tipografía tipo macOS/iOS */

/* Fondos sólidos para que claro/oscuro pueda interpolar de forma uniforme */
body:not(.admin-body) .home-left{background:#f9fbfe}
html[data-tablet-theme="dark"] body:not(.admin-body) .home-left{background:#0f1a28}

/* Todos los elementos del terminal cambian con la misma duración y curva.
   Esto evita que unas tarjetas/textos terminen antes que otras. */
html.theme-ios-transition body:not(.admin-body),
html.theme-ios-transition body:not(.admin-body) *,
html.theme-ios-transition body:not(.admin-body) *::before,
html.theme-ios-transition body:not(.admin-body) *::after{
  transition-property:background-color,border-color,color,box-shadow,fill,stroke,opacity!important;
  transition-duration:.34s!important;
  transition-timing-function:cubic-bezier(.4,0,.2,1)!important;
  transition-delay:0s!important;
}

/* Jerarquía de display igual que en Admin */
body:not(.admin-body){
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue","Segoe UI Variable","Segoe UI",Arial,sans-serif;
  font-weight:400;
  letter-spacing:0;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
body:not(.admin-body) .worker-name,
body:not(.admin-body) .consult-name,
body:not(.admin-body) .clock-main,
body:not(.admin-body) .card-value,
body:not(.admin-body) .success-title,
body:not(.admin-body) .success-time,
body:not(.admin-body) .modal h2,
body:not(.admin-body) .pair-card h1{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Helvetica Neue","Segoe UI Variable Display","Segoe UI",Arial,sans-serif;
}
body:not(.admin-body) .worker-name,
body:not(.admin-body) .consult-name{
  font-weight:560;
  letter-spacing:-.022em;
}
body:not(.admin-body) .clock-main{
  font-weight:590;
  letter-spacing:-.038em;
}
body:not(.admin-body) .clock-seconds{
  font-weight:470;
  letter-spacing:-.015em;
}
body:not(.admin-body) .card-value{
  font-weight:580;
  letter-spacing:-.022em;
}
body:not(.admin-body) .success-title{
  font-weight:570;
  letter-spacing:-.018em;
}
body:not(.admin-body) .success-time{
  font-weight:580;
  letter-spacing:-.03em;
}
body:not(.admin-body) .modal h2,
body:not(.admin-body) .pair-card h1{
  font-weight:570;
  letter-spacing:-.016em;
}
body:not(.admin-body) .segmented button,
body:not(.admin-body) .primary,
body:not(.admin-body) .secondary,
body:not(.admin-body) .small-btn{
  font-weight:560;
  letter-spacing:-.004em;
}
body:not(.admin-body) .card-label,
body:not(.admin-body) .subtle-title{
  font-weight:560;
}


/* V2.7.18 · comportamiento kiosco únicamente en terminal */
body:not(.admin-body){
  -webkit-touch-callout:none;
}
body:not(.admin-body) img,
body:not(.admin-body) a,
body:not(.admin-body) button{
  -webkit-user-drag:none;
}


/* V2.7.19 · Foto automática de evidencia al fichar */
.camera-error-modal{width:min(600px,100%)}
.day-span-photo-line{min-height:34px;display:flex;align-items:center;gap:6px;white-space:nowrap}
.photo-stack{min-width:112px}
.photo-chip{height:29px;min-width:42px;border:1px solid #dbe3f1;background:#fff;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 8px;color:#2142f4;cursor:pointer;font:inherit;font-size:12px;font-weight:560;transition:transform .14s ease,background-color .18s ease,border-color .18s ease}
.photo-chip:hover{background:#f2f5ff;border-color:#bbc7ff}.photo-chip:active{transform:scale(.96)}
.photo-chip svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.photo-none{color:#a3adbc}
html[data-admin-theme="dark"] .photo-chip{background:#132238;border-color:#263b57;color:#92a5ff}
html[data-admin-theme="dark"] .photo-chip:hover{background:#182b46;border-color:#40577a}
.clock-photo-modal{width:min(760px,90vw)}
.clock-photo-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
.clock-photo-head h2{margin:0 0 6px}.clock-photo-head p{margin:0;color:var(--muted);font-size:14px}
.clock-photo-frame{border-radius:22px;overflow:hidden;background:#eef2f7;display:grid;place-items:center;max-height:65vh}
.clock-photo-frame img{display:block;width:100%;height:auto;max-height:65vh;object-fit:contain}
.clock-photo-meta{margin-top:14px;padding:12px 14px;border-radius:14px;background:#f6f8fb;display:flex;justify-content:space-between;gap:16px;font-size:13px}.clock-photo-meta span{color:var(--muted)}
.clock-photo-loading{min-height:120px}
html[data-admin-theme="dark"] .clock-photo-frame{background:#08121f}
html[data-admin-theme="dark"] .clock-photo-meta{background:#101d2d}
@media(max-width:760px){.camera-capture-card{width:min(410px,94vw)}.clock-photo-head{flex-direction:column}.photo-stack{min-width:94px}}


/* V2.7.22 · limpieza manual de fotos antiguas */
.photo-retention-card{grid-column:1/-1}
.photo-retention-actions{display:flex;justify-content:flex-start;align-items:center;margin-top:4px}
.photo-retention-actions .small-btn{min-height:42px}


/* V2.7.23 · evidencia de fichaje en vídeo */
.photo-chip.video-chip{min-width:44px}
.clock-photo-frame video{display:block;width:100%;height:auto;max-height:65vh;object-fit:contain;background:#000}
.clock-video-frame{background:#000}


/* V2.7.24 · Foto + vídeo, controles minimalistas tipo Apple */
.evidence-head{text-align:center;min-width:82px}
.evidence-stack{min-width:92px}
.day-span-evidence-line{min-height:34px;display:flex;align-items:center;gap:7px}
.evidence-icons{display:flex;align-items:center;gap:6px;min-width:66px}
.evidence-icon-btn{
  position:relative;
  width:31px;height:31px;min-width:31px;
  padding:0;border:1px solid #dce3ed;border-radius:9px;
  display:inline-grid;place-items:center;
  background:rgba(255,255,255,.88);
  color:#344054;cursor:pointer;
  box-shadow:0 1px 1px rgba(16,24,40,.025);
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .12s ease,box-shadow .16s ease;
  -webkit-tap-highlight-color:transparent
}
.evidence-icon-btn:hover{
  color:#2142f4;background:#f7f9ff;border-color:#c9d2f8;
  box-shadow:0 2px 7px rgba(33,66,244,.08)
}
.evidence-icon-btn:active{transform:scale(.94)}
.apple-evidence-svg{
  width:16px;height:16px;
  fill:none;stroke:currentColor;stroke-width:1.65;
  stroke-linecap:round;stroke-linejoin:round
}
.apple-evidence-svg .evidence-play{
  fill:currentColor;stroke:none
}
.evidence-action-badge{
  position:absolute;right:-4px;bottom:-4px;
  width:14px;height:14px;border-radius:999px;
  display:grid;place-items:center;
  background:#eef2ff;color:#2142f4;
  border:2px solid #fff;
  font-size:7.5px;font-weight:650;line-height:1;
  letter-spacing:-.02em
}
html[data-admin-theme="dark"] .evidence-icon-btn{
  background:#122033;border-color:#293b52;color:#c8d1de;
  box-shadow:none
}
html[data-admin-theme="dark"] .evidence-icon-btn:hover{
  background:#172842;border-color:#405a7e;color:#9aabff
}
html[data-admin-theme="dark"] .evidence-action-badge{
  background:#26365a;color:#aab7ff;border-color:#0d1724
}
@media(max-width:760px){
  .evidence-head{min-width:72px}
  .evidence-stack{min-width:82px}
  .evidence-icon-btn{width:30px;height:30px;min-width:30px}
}


/* V2.7.26 · selección múltiple de fichajes */
.span-select-head,.span-select-cell{width:58px;min-width:58px;text-align:center;padding-left:10px!important;padding-right:8px!important}
.select-stack{min-width:38px}
.day-span-select-line{min-height:34px;display:flex;align-items:center;justify-content:center;gap:5px}
.span-check-wrap{position:relative;display:inline-grid;place-items:center;width:28px;height:28px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.span-check-wrap input{position:absolute;opacity:0;pointer-events:none}
.span-check-ui{width:18px;height:18px;border-radius:6px;border:1.5px solid #c8d1df;background:#fff;display:block;position:relative;transition:background-color .14s ease,border-color .14s ease,box-shadow .14s ease,transform .1s ease}
.span-check-wrap:hover .span-check-ui{border-color:#9cacbf;background:#f8fafc}
.span-check-wrap input:checked+.span-check-ui,.span-check-wrap input:indeterminate+.span-check-ui{background:#2142f4;border-color:#2142f4;box-shadow:0 1px 5px rgba(33,66,244,.2)}
.span-check-wrap input:checked+.span-check-ui:after{content:'';position:absolute;left:5px;top:2.5px;width:5px;height:9px;border:solid #fff;border-width:0 1.8px 1.8px 0;transform:rotate(45deg)}
.span-check-wrap input:indeterminate+.span-check-ui:after{content:'';position:absolute;left:4px;right:4px;top:7px;height:2px;border-radius:2px;background:#fff}
.span-check-wrap:active .span-check-ui{transform:scale(.9)}
.bulk-delete-spans{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.bulk-delete-spans #selectedSpanCount{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:rgba(255,255,255,.72);font-size:11px;line-height:1}
.bulk-delete-spans.hidden{display:none!important}
html[data-admin-theme="dark"] .span-check-ui{background:#111d2b;border-color:#34475d}
html[data-admin-theme="dark"] .span-check-wrap:hover .span-check-ui{background:#172638;border-color:#536a84}
html[data-admin-theme="dark"] .span-check-wrap input:checked+.span-check-ui,html[data-admin-theme="dark"] .span-check-wrap input:indeterminate+.span-check-ui{background:#516cff;border-color:#516cff}
@media(max-width:760px){.span-select-head,.span-select-cell{width:50px;min-width:50px;padding-left:7px!important;padding-right:5px!important}.bulk-delete-spans{order:3}}


/* V2.8.0 · Tiempo en terminal */
.weather-chip{
  border:1px solid rgba(54,68,92,.10);
  background:rgba(255,255,255,.68);
  color:#445169;
  min-height:40px;
  padding:8px 12px 8px 10px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  box-shadow:0 3px 14px rgba(22,33,59,.045);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  font-family:inherit;
  cursor:pointer;
  transition:transform .16s ease,background-color .25s ease,border-color .25s ease,color .25s ease
}
.weather-chip:hover{background:rgba(255,255,255,.88)}
.weather-chip:active{transform:scale(.97)}
.weather-chip-icon{display:grid;place-items:center;width:22px;height:22px;color:#56647b}
.weather-chip-icon svg,.weather-now-icon svg,.weather-hour-card svg,.weather-day-state svg{
  width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round
}
.weather-chip-temp{font-size:16px;font-weight:570;letter-spacing:-.025em;color:#1d2940}
.weather-chip-sep{color:#9aa4b5}
.weather-chip-location{font-size:14px;font-weight:470;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.weather-chip-chevron{font-size:18px;line-height:1;color:#9aa4b5;margin-left:1px}

.weather-overlay{z-index:120;align-items:start;justify-content:center;padding:clamp(28px,12dvh,96px) 24px 24px}
.weather-panel{
  width:min(760px,94vw);
  max-height:calc(100dvh - clamp(28px,12dvh,96px) - 24px);
  overflow:hidden;
  border-radius:30px;
  background:rgba(253,254,255,.98);
  box-shadow:0 28px 80px rgba(19,30,52,.18);
  border:1px solid rgba(91,106,130,.12);
  color:#172238;
  display:flex;flex-direction:column;
  animation:weatherPanelIn .3s cubic-bezier(.22,1,.36,1) both
}
@keyframes weatherPanelIn{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
.weather-panel-head{display:flex;align-items:flex-start;justify-content:space-between;padding:25px 27px 14px}
.weather-eyebrow{display:block;color:#8793a6;text-transform:uppercase;letter-spacing:.08em;font-size:10px;font-weight:600;margin-bottom:3px}
.weather-panel-head h2{margin:0;font-size:27px;font-weight:570;letter-spacing:-.025em}
.weather-close{width:36px;height:36px;border:0;border-radius:50%;background:#eef2f7;color:#536176;font-size:25px;line-height:1;cursor:pointer}
.weather-tabs{margin:0 27px 16px;padding:3px;background:#eef2f7;border-radius:12px;display:grid;grid-template-columns:1fr 1fr}
.weather-tab{border:0;background:transparent;border-radius:9px;padding:8px 12px;color:#748096;font-weight:540;font-family:inherit;cursor:pointer}
.weather-tab.active{background:white;color:#172238;box-shadow:0 1px 5px rgba(22,33,59,.08)}
.weather-panel-body{padding:0 27px 24px;overflow:auto;flex:1;min-height:0}
.weather-now{display:flex;align-items:center;justify-content:space-between;gap:26px;padding:18px 4px 22px}
.weather-now-main{display:flex;align-items:center;gap:14px}
.weather-now-icon{width:52px;height:52px;color:#50617d}
.weather-now-temp{font-size:46px;font-weight:560;letter-spacing:-.05em;line-height:.95}
.weather-now-desc{margin-top:5px;color:#69768a;font-size:14px}
.weather-now-meta{display:flex;gap:24px;color:#8994a5;font-size:12px}
.weather-now-meta span{display:grid;gap:3px}
.weather-now-meta b{color:#3b485d;font-size:14px;font-weight:560}
.weather-hourly{display:flex;gap:9px;overflow-x:auto;padding:2px 1px 8px;scrollbar-width:none}
.weather-hourly::-webkit-scrollbar{display:none}
.weather-hour-card{min-width:83px;padding:12px 10px;border-radius:17px;background:#f5f7fa;display:grid;justify-items:center;gap:6px}
.weather-hour-card>span{font-size:11px;color:#7f8b9d}
.weather-hour-card i{width:25px;height:25px;color:#52627a}
.weather-hour-card b{font-size:17px;font-weight:570}
.weather-hour-card small{font-size:9.5px;color:#6480a7;white-space:nowrap}
.weather-hour-card small.weather-wind{color:#7d899b}
.weather-week-list{display:grid}
.weather-day-row{display:grid;grid-template-columns:70px minmax(160px,1fr) 64px 100px;gap:14px;align-items:center;padding:13px 5px;border-bottom:1px solid #edf0f4}
.weather-day-row:last-child{border-bottom:0}
.weather-day-name{text-transform:capitalize;font-weight:550}
.weather-day-state{display:flex;align-items:center;gap:10px;color:#667388;font-size:13px}
.weather-day-state>span{display:grid;gap:2px}.weather-day-state small{font-size:10px;color:#8a96a8;font-weight:500}
.weather-day-state i{width:25px;height:25px;color:#52627a}
.weather-day-rain{font-size:12px;color:#5f7ca5;text-align:right}
.weather-day-temp{display:flex;justify-content:flex-end;gap:12px;font-variant-numeric:tabular-nums}
.weather-day-temp span{color:#929cac}
.weather-day-temp b{font-weight:570}
.weather-panel-footer{padding:11px 27px 18px;color:#9aa4b3;font-size:10.5px;display:flex;justify-content:space-between;border-top:1px solid #f0f2f5}
.weather-empty{padding:40px;text-align:center;color:#8792a3}

html[data-tablet-theme="dark"] .weather-chip{background:rgba(22,35,52,.72);border-color:rgba(145,162,187,.13);color:#aab6c8;box-shadow:none}
html[data-tablet-theme="dark"] .weather-chip:hover{background:rgba(27,43,63,.9)}
html[data-tablet-theme="dark"] .weather-chip-temp{color:#f0f4fa}
html[data-tablet-theme="dark"] .weather-chip-icon{color:#aab9ce}
html[data-tablet-theme="dark"] .weather-panel{background:rgba(14,25,39,.985);border-color:#26374c;color:#edf2f8;box-shadow:0 28px 80px rgba(0,0,0,.38)}
html[data-tablet-theme="dark"] .weather-close,html[data-tablet-theme="dark"] .weather-tabs{background:#172638;color:#aab7c8}
html[data-tablet-theme="dark"] .weather-tab{color:#8493a7}
html[data-tablet-theme="dark"] .weather-tab.active{background:#25364b;color:#f4f7fb;box-shadow:none}
html[data-tablet-theme="dark"] .weather-now-desc,html[data-tablet-theme="dark"] .weather-day-state{color:#98a6b8}
html[data-tablet-theme="dark"] .weather-now-meta{color:#7f8da0}
html[data-tablet-theme="dark"] .weather-now-meta b{color:#d7dfe9}
html[data-tablet-theme="dark"] .weather-hour-card{background:#142336}
html[data-tablet-theme="dark"] .weather-day-row{border-color:#203044}
html[data-tablet-theme="dark"] .weather-day-temp span{color:#7f8da0}
html[data-tablet-theme="dark"] .weather-panel-footer{border-color:#203044;color:#718196}

/* Admin · configuración meteorológica por terminal */
.terminal-weather-meta{margin-top:8px}
.terminal-weather-config{margin-top:18px;padding:16px;border-radius:18px;background:#f6f8fb;border:1px solid #e7ebf1}
.terminal-weather-config-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.terminal-weather-config-head h3{margin:0 0 4px;font-size:15px;font-weight:570}
.terminal-weather-config-head p{margin:0;color:var(--muted);font-size:12px;max-width:430px}
.compact-switch{margin-top:2px}
.weather-location-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}
.weather-search-results{display:grid;gap:6px;margin-top:8px}
.weather-location-result{display:flex;justify-content:space-between;align-items:center;gap:14px;text-align:left;border:1px solid #e1e6ed;background:white;border-radius:12px;padding:10px 12px;color:#28364b;font-family:inherit;cursor:pointer}
.weather-location-result:hover{border-color:#bac7ed;background:#fafbff}
.weather-location-result span{font-weight:550}
.weather-location-result small{color:#8490a2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.weather-search-empty{padding:10px 12px;border-radius:11px;background:#fff4f2;color:#a54a3e;font-size:12px}
.weather-selected-location{margin-top:8px;padding:10px 12px;border-radius:12px;background:#edf7f1;display:flex;justify-content:space-between;gap:16px;font-size:12px}
.weather-selected-location span{color:#748779}
.weather-selected-location b{color:#275b3e;font-weight:560}
.field-help{margin:8px 0 0;color:var(--muted);font-size:11px}
.disabled-section{opacity:.42;pointer-events:none}
html[data-admin-theme="dark"] .terminal-weather-config{background:#101d2d;border-color:#25364a}
html[data-admin-theme="dark"] .weather-location-result{background:#152438;border-color:#293c53;color:#dfe6ef}
html[data-admin-theme="dark"] .weather-location-result:hover{background:#1a2b41;border-color:#415b7a}
html[data-admin-theme="dark"] .weather-selected-location{background:#132a21}
html[data-admin-theme="dark"] .weather-selected-location span{color:#83a291}
html[data-admin-theme="dark"] .weather-selected-location b{color:#b6dfc8}

@media(max-width:760px){
  .weather-chip{min-height:36px;padding:7px 10px}
  .weather-chip-location{max-width:120px}
  .weather-panel{border-radius:24px}
  .weather-panel-head{padding:20px 20px 12px}
  .weather-tabs{margin:0 20px 14px}
  .weather-panel-body{padding:0 20px 20px}
  .weather-now{align-items:flex-start;flex-direction:column;gap:14px}
  .weather-now-meta{width:100%;justify-content:space-between}
  .weather-day-row{grid-template-columns:52px minmax(120px,1fr) 46px 86px;gap:8px}
  .weather-day-state span{display:none}
  .weather-location-search{grid-template-columns:1fr}
}


/* V2.8.4 · Tiempo con pestañas y 24 horas completas */
.weather-hourly-full-day{
  scroll-snap-type:x proximity;
  padding-bottom:10px;
}
.weather-hourly-full-day .weather-hour-card{
  scroll-snap-align:start;
}
.weather-hour-card.current-hour{
  background:#eef3ff;
  box-shadow:inset 0 0 0 1px rgba(33,66,244,.16);
}
.weather-hour-card.current-hour>span{
  color:#2142f4;
  font-weight:600;
}
.weather-hourly-hint{
  margin-top:5px;
  padding-left:2px;
  color:#99a3b2;
  font-size:10.5px;
}
html[data-tablet-theme="dark"] .weather-hour-card.current-hour{
  background:#1c2e49;
  box-shadow:inset 0 0 0 1px rgba(143,158,255,.24);
}
html[data-tablet-theme="dark"] .weather-hour-card.current-hour>span{
  color:#aab7ff;
}
html[data-tablet-theme="dark"] .weather-hourly-hint{
  color:#718196;
}


/* V2.8.5 · AEMET oficial */
.weather-official-observation{
  margin:-10px 4px 18px;
  padding:9px 12px;
  border-radius:12px;
  background:#f5f7fa;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color:#7a8799
}
.weather-official-observation b{color:#445269;font-weight:560}
.weather-official-observation small{margin-left:auto;color:#9aa4b2}
html[data-tablet-theme="dark"] .weather-official-observation{background:#142336;color:#8290a3}
html[data-tablet-theme="dark"] .weather-official-observation b{color:#d3dbe6}
.settings-status-chip{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:27px;padding:4px 9px;border-radius:999px;font-size:10.5px;font-weight:600;white-space:nowrap
}
.settings-status-chip.ok{background:#eaf7ef;color:#2f6d48}
.settings-status-chip.warn{background:#fff4e8;color:#966020}
.aemet-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:10px}
.ghost-red{background:transparent}
html[data-admin-theme="dark"] .settings-status-chip.ok{background:#173426;color:#9ad0ac}
html[data-admin-theme="dark"] .settings-status-chip.warn{background:#3a2c18;color:#e8c58d}


/* V2.8.8 · Detalle al tocar un día de la previsión semanal */
.weather-day-row{
  width:100%;border:0;background:transparent;color:inherit;text-align:left;font-family:inherit;cursor:pointer;
  grid-template-columns:70px minmax(160px,1fr) 64px 100px 20px;
  transition:background .16s ease,transform .12s ease;
}
@media (hover:hover) and (pointer:fine){.weather-day-row:hover{background:#f8fafc}}
.weather-day-row:active{transform:scale(.992);background:#f5f7fa}
.weather-day-row:focus-visible{outline:2px solid #2142f4;outline-offset:-2px;border-radius:12px}
.weather-day-chevron{font-size:22px;line-height:1;color:#a7b0bd;text-align:right}
.weather-day-back{border:0;background:transparent;color:#5870a2;font:inherit;font-size:13px;font-weight:560;padding:4px 2px 10px;display:inline-flex;align-items:center;gap:4px;cursor:pointer}
.weather-day-back>span{font-size:12px}
.weather-day-detail-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:2px 2px 14px}
.weather-day-detail-head h3{margin:0;font-size:24px;font-weight:570;letter-spacing:-.025em;text-transform:capitalize}
.weather-day-detail-icon{width:48px;height:48px;color:#52627a;flex:0 0 auto}
.weather-day-detail-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.weather-day-detail-summary{display:grid;grid-template-columns:1.35fr repeat(4,1fr);gap:8px;margin:0 0 18px}
.weather-day-detail-summary>div{min-width:0;background:#f5f7fa;border-radius:14px;padding:11px 12px;display:grid;gap:4px}
.weather-day-detail-summary span{font-size:10px;color:#8994a5}
.weather-day-detail-summary b{font-size:13px;font-weight:570;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.weather-day-segments{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.weather-segment-card{min-width:0;background:#f5f7fa;border-radius:16px;padding:12px;display:grid;grid-template-columns:74px 30px minmax(0,1fr);align-items:center;gap:10px}
.weather-segment-card>span{font-size:11px;color:#7f8b9d}
.weather-segment-card>i{width:27px;height:27px;color:#52627a}
.weather-segment-card>i svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.weather-segment-card>div{min-width:0;display:grid;gap:3px}
.weather-segment-card b{font-size:12px;font-weight:560;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.weather-segment-card small{font-size:10px;color:#6480a7}
.weather-detail-note{margin-top:10px;color:#919cab;font-size:10.5px;line-height:1.45}
html[data-tablet-theme="dark"] .weather-day-row:hover,html[data-tablet-theme="dark"] .weather-day-row:active{background:#132235}
html[data-tablet-theme="dark"] .weather-day-back{color:#9dacdf}
html[data-tablet-theme="dark"] .weather-day-detail-summary>div,html[data-tablet-theme="dark"] .weather-segment-card{background:#142336}
html[data-tablet-theme="dark"] .weather-day-detail-icon,html[data-tablet-theme="dark"] .weather-segment-card>i{color:#a5b4c9}
html[data-tablet-theme="dark"] .weather-detail-note{color:#718196}
@media(max-width:760px){
  .weather-day-row{grid-template-columns:52px minmax(100px,1fr) 44px 82px 14px}
  .weather-day-detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .weather-day-detail-summary>div:last-child{grid-column:1/-1}
  .weather-day-segments{grid-template-columns:1fr}
}


/* V2.8.10 - Calendario semanal meteorológico */
.weather-day-name{display:flex;align-items:baseline;gap:7px;min-width:0;text-transform:none}
.weather-day-name>span{text-transform:capitalize;font-weight:560;white-space:nowrap}
.weather-day-name>small{font-size:10.5px;font-weight:500;color:#98a2b1;font-variant-numeric:tabular-nums;white-space:nowrap}
html[data-tablet-theme="dark"] .weather-day-name>small{color:#718196}
@media(max-width:760px){
  .weather-day-name{display:grid;gap:1px;align-items:start}
  .weather-day-name>small{font-size:9.5px}
}

/* V2.8.12 · incidencias de fichaje */
.worker-inline-status.incident{background:#fff1f2;border-color:#fecdd3;color:#be123c}
.worker-incident{margin:16px 0 4px;padding:14px 16px;border:1px solid #fecdd3;background:#fff7f7;border-radius:14px;display:flex;flex-direction:column;gap:4px;color:#9f1239}
.worker-incident b{font-size:14px}.worker-incident span{font-size:13px;line-height:1.45}
html[data-tablet-theme="dark"] .worker-inline-status.incident{background:#3a171e;border-color:#6d2937;color:#fb7185}
html[data-tablet-theme="dark"] .worker-incident{background:#2c161b;border-color:#66303b;color:#fda4af}


/* V2.8.12 · Auditoría e incidencias */
.dashboard-old-date{font-size:.78em;font-weight:650;color:var(--text-muted,#68758a)}
.audit-action{display:inline-flex;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:750;background:#eef3f8;color:#42526a}
.audit-action.login{background:#e7f7ef;color:#14795b}.audit-action.logout{background:#eef1f5;color:#536174}.audit-action.insert{background:#e9f1ff;color:#2854c9}.audit-action.update{background:#fff5df;color:#9a6715}.audit-action.delete{background:#ffecef;color:#b22f4a}
.audit-meta{margin:-4px 0 16px;color:var(--text-muted,#68758a);line-height:1.55}.audit-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.audit-detail-grid h3{font-size:13px;margin:0 0 7px}.audit-detail-grid pre{margin:0;max-height:340px;overflow:auto;white-space:pre-wrap;word-break:break-word;background:rgba(125,140,160,.09);border:1px solid rgba(125,140,160,.16);border-radius:12px;padding:12px;font:11px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace}
@media(max-width:760px){.audit-detail-grid{grid-template-columns:1fr}.audit-detail-grid pre{max-height:230px}}

/* V2.8.26 · el fondo queda físicamente congelado detrás de cualquier ventana */
html.foreground-window-open,
body.foreground-window-open{
  overflow:hidden!important;
  overscroll-behavior:none;
}
body.foreground-window-open .page,
body.admin-body.foreground-window-open #adminApp,
body.admin-body.foreground-window-open #loginScreen{
  touch-action:none;
  pointer-events:none;
}
.modal-overlay{
  overscroll-behavior:contain;
}
.weather-overlay{
  overscroll-behavior:contain;
  touch-action:none;
}
.weather-panel{
  overscroll-behavior:contain;
  touch-action:auto;
}
.weather-panel-body{
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
}
.weather-hourly{touch-action:pan-x}
@media(max-width:760px){
  .weather-overlay{padding:clamp(22px,11dvh,88px) 16px 16px}
  .weather-panel{max-height:calc(100dvh - clamp(22px,11dvh,88px) - 16px)}
}


/* V2.8.15 · Admin fijo, Auditoría y Ajustes ordenados */
@media(min-width:921px){
  body.admin-body .sidebar{
    position:sticky;
    top:18px;
    align-self:start;
    height:calc(100svh - 36px);
    max-height:calc(100svh - 36px);
    overflow:hidden;
  }
  body.admin-body .sidebar .nav{min-height:0;overflow-y:auto;overscroll-behavior:contain}
}
@media(max-width:920px){
  body.admin-body .sidebar{position:relative;top:auto;height:auto;max-height:none;overflow:visible}
}

.audit-toolbar{margin-bottom:16px}
.audit-card{background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow-soft);overflow:hidden}
.audit-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 20px 14px;border-bottom:1px solid var(--line)}
.audit-card-head h2{margin:0 0 4px;font-size:18px;font-weight:580;letter-spacing:-.012em;color:#16213b}
.audit-card-head p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.audit-table-scroll{overflow:auto}
.audit-table{width:100%;min-width:980px;border-collapse:collapse;table-layout:fixed}
.audit-table .audit-col-date{width:190px}.audit-table .audit-col-action{width:150px}.audit-table .audit-col-admin{width:120px}.audit-table .audit-col-area{width:180px}.audit-table .audit-col-record{width:auto}
.audit-table th,.audit-table td{padding:11px 16px;text-align:left;vertical-align:middle;border-bottom:1px solid #edf1f6}
.audit-table th{font-size:12px;font-weight:600;color:#64748b;background:#f8fafc;white-space:nowrap}
.audit-table td{font-size:13px;color:#1f2b44}
.audit-table tbody tr:last-child td{border-bottom:0}
.audit-row{cursor:pointer;transition:background .14s ease}
@media(hover:hover) and (pointer:fine){.audit-row:hover{background:#f8faff}}
.audit-row:focus-visible{outline:2px solid var(--blue);outline-offset:-2px;background:#f8faff}
.audit-date-cell{font-variant-numeric:tabular-nums;white-space:nowrap}
.audit-record{font:12px/1.35 ui-monospace,SFMono-Regular,Consolas,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#526178!important}
.audit-action{font-weight:600}

.settings-toolbar{margin-bottom:16px}
.settings-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.settings-group{background:#fff;border:1px solid var(--line);border-radius:26px;padding:22px;box-shadow:var(--shadow-soft)}
.settings-group-full{grid-column:1/-1}
.settings-group-head{margin-bottom:16px}
.settings-group-head-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.settings-eyebrow{display:block;margin-bottom:6px;font-size:10.5px;font-weight:700;letter-spacing:.10em;color:#789;}
.settings-group h2{margin:0 0 5px;font-size:21px;font-weight:580;letter-spacing:-.015em;color:#16213b}
.settings-group h3{margin:0 0 5px;font-size:16px;font-weight:580;letter-spacing:-.01em;color:#16213b}
.settings-group p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.settings-subgrid,.settings-maintenance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.settings-card.settings-card-compact,.settings-card.settings-card-flat{box-shadow:none;border-radius:18px;padding:18px;background:#f9fbfd}
.settings-card.settings-card-compact .settings-card-head,.settings-card.settings-card-flat .settings-card-head{margin-bottom:14px}
.settings-inline-actions{display:flex;justify-content:flex-end;margin-top:14px}
.settings-action-card{display:flex;align-items:center;justify-content:space-between;gap:16px}
.settings-action-title{font-size:15px;font-weight:580;color:#16213b;margin-bottom:4px}
.settings-danger-note{margin:2px 0 12px;padding:9px 11px;border-radius:12px;background:#fff1f3;color:#a53d54;font-size:12px;font-weight:560}
.weekend-work-note{margin-top:7px!important;color:#8a6123!important}
html[data-admin-theme="dark"] .audit-card,html[data-admin-theme="dark"] .settings-group{background:#101d2c;border-color:#26384d}
html[data-admin-theme="dark"] .audit-card-head{border-color:#26384d}
html[data-admin-theme="dark"] .audit-card-head h2,html[data-admin-theme="dark"] .settings-group h2,html[data-admin-theme="dark"] .settings-group h3,html[data-admin-theme="dark"] .settings-action-title{color:#edf3fa}
html[data-admin-theme="dark"] .audit-table th{background:#142235;color:#9fb0c5}
html[data-admin-theme="dark"] .audit-table th,html[data-admin-theme="dark"] .audit-table td{border-color:#26384d}
html[data-admin-theme="dark"] .audit-table td{color:#dbe5f0}
html[data-admin-theme="dark"] .audit-row:hover,html[data-admin-theme="dark"] .audit-row:focus-visible{background:#14243a}
html[data-admin-theme="dark"] .settings-card.settings-card-compact,html[data-admin-theme="dark"] .settings-card.settings-card-flat{background:#142235;border-color:#26384d}
html[data-admin-theme="dark"] .settings-danger-note{background:#2b1820;color:#ff9bb0}
html[data-admin-theme="dark"] .weekend-work-note{color:#d9b377!important}
@media(max-width:920px){.settings-sections{grid-template-columns:1fr}.settings-group-full{grid-column:auto}.settings-subgrid,.settings-maintenance-grid{grid-template-columns:1fr}}
@media(max-width:620px){.settings-group-head-row,.settings-action-card{flex-direction:column;align-items:stretch}.audit-card-head{padding:16px}.settings-group{padding:18px}}
@media(max-width:920px){body.admin-body .side-bottom{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){body.admin-body .side-bottom{grid-template-columns:1fr}}

/* V2.8.16 · Auditoría seleccionable + Ajustes centrados */
.audit-card-head-actions{align-items:center}
.audit-bulk-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.audit-selection-count{font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.audit-col-select{width:52px}
.audit-table .audit-col-date{width:190px}
.audit-table .audit-col-action{width:150px}
.audit-table .audit-col-admin{width:120px}
.audit-table .audit-col-area{width:180px}
.audit-table .audit-col-record{width:auto}
.audit-select-cell{width:52px!important;text-align:center!important;padding-left:12px!important;padding-right:12px!important}
.audit-select,.audit-table thead input[type="checkbox"]{width:17px;height:17px;margin:0;accent-color:var(--blue);cursor:pointer;vertical-align:middle}
.audit-row:has(.audit-select:checked){background:#f3f6ff}
.audit-row:has(.audit-select:checked) td{border-bottom-color:#e2e8ff}
.audit-delete-warning{display:grid;gap:5px;margin:2px 0 18px;padding:13px 14px;border:1px solid #ffd3dc;border-radius:14px;background:#fff5f7;color:#9f2440}
.audit-delete-warning b{font-size:14px}.audit-delete-warning span{font-size:12.5px;line-height:1.45}

.settings-layout{width:min(100%,1280px);margin:0 auto;display:grid;gap:16px}
.settings-block{width:100%;box-sizing:border-box;background:#fff;border:1px solid var(--line);border-radius:26px;padding:22px;box-shadow:var(--shadow-soft)}
.settings-block-head{margin-bottom:16px}
.settings-block-head-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.settings-block h2{margin:0 0 5px;font-size:21px;font-weight:580;letter-spacing:-.015em;color:#16213b}
.settings-block h3{margin:0 0 5px;font-size:16px;font-weight:580;letter-spacing:-.01em;color:#16213b}
.settings-block p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.settings-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
.settings-tile{min-width:0;box-sizing:border-box;background:#f9fbfd;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:none}
.settings-footer-actions{display:flex;justify-content:flex-end;margin-top:14px}
.settings-service-tile{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:end}
.settings-grow{min-width:0}
.settings-grow .field-help{margin-top:7px!important}
.settings-button-cluster{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.settings-button-cluster-left{justify-content:flex-start;margin-top:18px}
.settings-action-row{display:flex;align-items:center;justify-content:space-between;gap:20px}
.settings-maintenance-tile{display:flex;min-height:174px;flex-direction:column;justify-content:space-between;gap:18px}
.settings-danger-note{margin:0 0 10px;padding:9px 11px;border-radius:12px;background:#fff1f3;color:#a53d54;font-size:12px;font-weight:560}

html[data-admin-theme="dark"] .audit-row:has(.audit-select:checked){background:#172944}
html[data-admin-theme="dark"] .audit-delete-warning{background:#2b1820;border-color:#5a2c39;color:#ff9bb0}
html[data-admin-theme="dark"] .settings-block{background:#101d2c;border-color:#26384d}
html[data-admin-theme="dark"] .settings-block h2,html[data-admin-theme="dark"] .settings-block h3{color:#edf3fa}
html[data-admin-theme="dark"] .settings-tile{background:#142235;border-color:#26384d}

@media(max-width:980px){
  .settings-two-col,.settings-service-tile{grid-template-columns:1fr}
  .settings-button-cluster{justify-content:flex-start}
  .audit-card-head-actions{align-items:flex-start;flex-direction:column}
  .audit-bulk-actions{justify-content:flex-start}
}
@media(max-width:620px){
  .settings-layout{width:100%}
  .settings-block{padding:18px}
  .settings-block-head-row,.settings-action-row{flex-direction:column;align-items:stretch}
  .settings-footer-actions{justify-content:stretch}.settings-footer-actions .small-btn{width:100%}
  .audit-bulk-actions{width:100%}.audit-bulk-actions .small-btn{flex:1}
}
.settings-toolbar{width:min(100%,1280px);margin:0 auto 16px}

/* V2.8.17 · Admin móvil + Auditoría legible */
.admin-mobile-bar,.admin-mobile-overlay{display:none}
.audit-col-summary{width:auto}
.audit-summary-cell{color:#33425a;font-weight:520;white-space:normal;overflow-wrap:anywhere}
.audit-human-summary{display:grid;gap:4px;margin:2px 0 16px;padding:14px 15px;border:1px solid var(--line);border-radius:15px;background:#f8faff}
.audit-human-summary span{font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.audit-human-summary b{font-size:15px;font-weight:580;color:#16213b;line-height:1.4}
.audit-friendly-list{display:grid;gap:0;margin:0 0 16px;border:1px solid var(--line);border-radius:15px;overflow:hidden}
.audit-friendly-row{display:grid;grid-template-columns:minmax(120px,.65fr) minmax(0,1.35fr);gap:12px;padding:11px 14px;background:#fff;border-bottom:1px solid #edf1f6;align-items:start}
.audit-friendly-row:last-child{border-bottom:0}
.audit-friendly-row span{color:var(--muted);font-size:12.5px}
.audit-friendly-row b{color:#26344c;font-size:13px;font-weight:560;line-height:1.45;overflow-wrap:anywhere}
.audit-friendly-row em{font-style:normal;color:#8290a5;padding:0 5px}
.audit-friendly-empty{margin:0 0 16px;padding:13px 14px;border:1px solid var(--line);border-radius:15px;background:#fafbfd;color:var(--muted);font-size:13px}
.audit-tech{margin:0 0 8px;border:1px solid var(--line);border-radius:15px;background:#fafbfd;overflow:hidden}
.audit-tech summary{cursor:pointer;padding:12px 14px;color:#536174;font-size:13px;font-weight:580;list-style-position:inside}
.audit-tech[open] summary{border-bottom:1px solid var(--line)}
.audit-tech-id{display:grid;gap:5px;padding:12px 14px 0}
.audit-tech-id span{font-size:11.5px;color:var(--muted)}
.audit-tech-id code{font-size:11px;color:#607089;overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}
.audit-tech .audit-detail-grid{padding:12px 14px 14px}
html[data-admin-theme="dark"] .audit-summary-cell{color:#dbe5f0}
html[data-admin-theme="dark"] .audit-human-summary,html[data-admin-theme="dark"] .audit-tech,html[data-admin-theme="dark"] .audit-friendly-empty{background:#142235;border-color:#26384d}
html[data-admin-theme="dark"] .audit-human-summary b{color:#edf3fa}
html[data-admin-theme="dark"] .audit-friendly-list{border-color:#26384d}
html[data-admin-theme="dark"] .audit-friendly-row{background:#101d2c;border-color:#26384d}
html[data-admin-theme="dark"] .audit-friendly-row b{color:#dbe5f0}
html[data-admin-theme="dark"] .audit-tech[open] summary{border-color:#26384d}

@media(max-width:920px){
  body.admin-body{min-width:0;overflow-x:hidden;background:#eef3f8}
  body.admin-body .admin-shell{display:block;min-height:100svh;padding:0!important;background:transparent}
  body.admin-body .admin-mobile-bar{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;position:sticky;top:0;z-index:72;min-height:64px;padding:max(10px,env(safe-area-inset-top)) 14px 10px;background:rgba(246,249,252,.92);border-bottom:1px solid rgba(214,222,232,.9);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  body.admin-body .admin-mobile-menu-btn{width:42px;height:42px;display:grid;align-content:center;justify-items:center;gap:5px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow-soft)}
  body.admin-body .admin-mobile-menu-btn span{display:block;width:18px;height:2px;border-radius:2px;background:#27344d;transition:transform .18s ease,opacity .18s ease}
  body.admin-body .admin-mobile-logo{width:112px;max-height:34px;justify-self:start}
  body.admin-body .admin-mobile-view-title{font-size:13px;font-weight:580;color:#637188;white-space:nowrap}
  body.admin-body .admin-mobile-overlay{display:block;position:fixed;inset:0;z-index:80;background:rgba(18,28,44,.28);border:0;border-radius:0;opacity:0;pointer-events:none;transition:opacity .2s ease;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
  body.admin-body .sidebar{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;position:fixed!important;left:10px!important;right:auto!important;top:max(10px,env(safe-area-inset-top))!important;bottom:max(10px,env(safe-area-inset-bottom))!important;width:min(84vw,320px)!important;height:auto!important;max-height:none!important;z-index:90!important;padding:20px 14px!important;border-radius:28px!important;overflow:hidden!important;transform:translateX(calc(-100% - 24px));transition:transform .24s cubic-bezier(.22,1,.36,1);box-sizing:border-box}
  body.admin-body .sidebar .logo{display:block!important;width:132px!important;margin:5px auto 8px!important}
  body.admin-body .sidebar .nav{display:grid!important;grid-template-columns:1fr!important;gap:5px!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:4px 0!important}
  body.admin-body .sidebar .nav button{width:100%!important;justify-content:flex-start!important;padding:13px 14px!important;min-height:46px!important;border-radius:15px!important;text-align:left!important}
  body.admin-body .sidebar .nav button span:last-child{display:inline!important}
  body.admin-body .side-bottom{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;gap:9px!important;padding-top:8px!important}
  body.admin-body .side-bottom .admin-theme-toggle{width:48px!important;min-width:48px!important;height:46px!important}
  body.admin-body .side-bottom .nav-logout{width:100%!important;min-height:46px!important}
  body.admin-body .admin-shell.mobile-menu-open .sidebar{transform:translateX(0)}
  body.admin-body .admin-shell.mobile-menu-open .admin-mobile-overlay{opacity:1;pointer-events:auto}
  body.admin-body .admin-shell.mobile-menu-open .admin-mobile-menu-btn span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  body.admin-body .admin-shell.mobile-menu-open .admin-mobile-menu-btn span:nth-child(2){opacity:0}
  body.admin-body .admin-shell.mobile-menu-open .admin-mobile-menu-btn span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

  body.admin-body .admin-main{width:auto!important;margin:10px!important;padding:16px!important;border-radius:24px!important;overflow:visible!important;min-height:calc(100svh - 94px);box-sizing:border-box}
  body.admin-body .toolbar{gap:12px;margin-bottom:15px}
  body.admin-body .admin-title{font-size:30px!important;line-height:1.08}
  body.admin-body .toolbar .sub{font-size:13px;line-height:1.45}
  body.admin-body .toolbar>button,body.admin-body .toolbar-actions{align-self:flex-start}
  body.admin-body .stats{gap:12px}
  body.admin-body .stat{padding:17px 17px 16px;border-radius:22px}
  body.admin-body .stat span{margin-bottom:8px}
  body.admin-body .stat b{font-size:44px}
  body.admin-body .dashboard-grid{gap:12px}
  body.admin-body .dashboard-card{border-radius:22px}
  body.admin-body .dashboard-toolbar{gap:10px}
  body.admin-body .dashboard-clock-main{font-size:31px}
  body.admin-body .dashboard-clock-seconds{font-size:13px}
  body.admin-body .terminal-card,body.admin-body .settings-block,body.admin-body .audit-card{border-radius:22px}
  body.admin-body .settings-layout{gap:12px}
  body.admin-body .settings-block{padding:16px!important}
  body.admin-body .settings-tile{padding:15px;border-radius:16px}
  body.admin-body .settings-two-col{gap:10px}
  body.admin-body .settings-button-cluster,body.admin-body .settings-button-cluster-left{display:grid;grid-template-columns:1fr;gap:8px;width:100%;margin-top:12px}
  body.admin-body .settings-button-cluster .small-btn,body.admin-body .settings-button-cluster-left .small-btn{width:100%}
  body.admin-body .settings-footer-actions .small-btn{width:100%}
  body.admin-body .settings-maintenance-tile{min-height:0}
  body.admin-body .time-fields{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px}
  body.admin-body .time-fields .field input{padding-left:8px;padding-right:8px;text-align:center}

  body.admin-body .admin-scroll{max-width:100%;overflow-x:auto!important;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;border-radius:18px}
  body.admin-body .admin-table{min-width:760px}
  body.admin-body .admin-table th,body.admin-body .admin-table td{white-space:nowrap}
  body.admin-body .toolbar-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
  body.admin-body .toolbar-actions>*{width:100%;min-width:0}

  body.admin-body .audit-card-head{padding:15px!important}
  body.admin-body .audit-card-head-actions{gap:12px}
  body.admin-body .audit-bulk-actions{display:grid;grid-template-columns:1fr;gap:8px;width:100%}
  body.admin-body .audit-bulk-actions .small-btn{width:100%}
  body.admin-body .audit-table-scroll{overflow:visible!important}
  body.admin-body .audit-table{display:block;width:100%;min-width:0!important;table-layout:auto}
  body.admin-body .audit-table colgroup,body.admin-body .audit-table thead{display:none}
  body.admin-body .audit-table tbody{display:grid;gap:10px;padding:10px;background:#f7f9fc}
  body.admin-body .audit-table tbody tr.audit-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:6px 10px;padding:13px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 5px 18px rgba(24,43,76,.05)}
  body.admin-body .audit-table tbody tr.audit-row td{display:block;width:auto!important;padding:0!important;border:0!important;min-width:0}
  body.admin-body .audit-select-cell{grid-column:1;grid-row:1 / span 4;align-self:start;text-align:left!important;padding-top:2px!important}
  body.admin-body .audit-date-cell{grid-column:2;grid-row:1;color:#4c5a70;font-size:12px;font-variant-numeric:tabular-nums}
  body.admin-body .audit-action-cell{grid-column:3;grid-row:1;justify-self:end}
  body.admin-body .audit-area-cell{grid-column:2;grid-row:2;color:#24324a;font-size:13px;font-weight:580}
  body.admin-body .audit-admin-cell{grid-column:3;grid-row:2;color:#758198;font-size:12px;justify-self:end}
  body.admin-body .audit-summary-cell{grid-column:2 / 4;grid-row:3;color:#637188;font-size:12.5px;line-height:1.4}
  body.admin-body .audit-row:has(.audit-select:checked){background:#f3f6ff!important;border-color:#cfd9ff!important}
  body.admin-body .audit-human-summary{padding:12px 13px}
  body.admin-body .audit-friendly-row{grid-template-columns:1fr;gap:4px}
  body.admin-body .audit-tech .audit-detail-grid{grid-template-columns:1fr}

  body.admin-body .modal-backdrop{padding:12px!important;align-items:center}
  body.admin-body .modal{width:100%!important;max-width:560px!important;max-height:calc(100svh - 24px)!important;padding:18px!important;border-radius:22px!important;overflow:auto!important}
  body.admin-body .modal h2{font-size:23px!important}
  body.admin-body .modal-actions{display:grid;grid-template-columns:1fr;gap:8px}
  body.admin-body .modal-actions>*{width:100%}
}

@media(max-width:390px){
  body.admin-body .admin-mobile-logo{width:102px}
  body.admin-body .admin-mobile-view-title{font-size:12px}
  body.admin-body .admin-main{margin:8px!important;padding:14px!important}
  body.admin-body .admin-title{font-size:28px!important}
  body.admin-body .time-fields{grid-template-columns:1fr!important}
  body.admin-body .toolbar-actions{grid-template-columns:1fr}
}

html[data-admin-theme="dark"] body.admin-body .admin-mobile-bar{background:rgba(11,20,32,.92);border-color:#26384d}
html[data-admin-theme="dark"] body.admin-body .admin-mobile-menu-btn{background:#142235;border-color:#26384d}
html[data-admin-theme="dark"] body.admin-body .admin-mobile-menu-btn span{background:#dbe5f0}
html[data-admin-theme="dark"] body.admin-body .admin-mobile-view-title{color:#a8b5c6}
@media(max-width:920px){
  html[data-admin-theme="dark"] body.admin-body{background:#08111d}
  html[data-admin-theme="dark"] body.admin-body .audit-table tbody{background:#0d1928}
  html[data-admin-theme="dark"] body.admin-body .audit-table tbody tr.audit-row{background:#101d2c;border-color:#26384d;box-shadow:none}
  html[data-admin-theme="dark"] body.admin-body .audit-area-cell{color:#dbe5f0}
  html[data-admin-theme="dark"] body.admin-body .audit-date-cell,html[data-admin-theme="dark"] body.admin-body .audit-admin-cell,html[data-admin-theme="dark"] body.admin-body .audit-summary-cell{color:#9aa8ba}
  html[data-admin-theme="dark"] body.admin-body .audit-row:has(.audit-select:checked){background:#172944!important;border-color:#395786!important}
}


/* V2.8.23 · PRUEBA TIPOGRÁFICA — Inter
   Cambio exclusivamente tipográfico. Logos, iconos, medidas, colores y layouts permanecen intactos. */
:root{
  --font:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
body,
body.admin-body,
body:not(.admin-body){
  font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-optical-sizing:auto;
  font-synthesis:none;
}
body.admin-body .admin-title,
body.admin-body .section-title,
body.admin-body .settings-card h2,
body.admin-body .dashboard-card-head h2,
body.admin-body .terminal-card h3,
body.admin-body .empty-state h2,
body.admin-body .modal h2,
body:not(.admin-body) .worker-name,
body:not(.admin-body) .consult-name,
body:not(.admin-body) .clock-main,
body:not(.admin-body) .card-value,
body:not(.admin-body) .success-title,
body:not(.admin-body) .success-time,
body:not(.admin-body) .modal h2,
body:not(.admin-body) .pair-card h1{
  font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
/* Los datos técnicos siguen siendo monoespaciados para conservar legibilidad. */
.audit-record,
.audit-detail-grid pre,
.audit-tech-code,
code,pre,kbd,samp{
  font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
}


/* V2.8.23 · navegación móvil sin pantallazo de carga
   Al cambiar de sección se conserva la vista actual durante la carga y se sustituye solo cuando la siguiente está lista. */
#adminContent[aria-busy="true"]{cursor:progress}


/* V2.8.23 · panel meteorológico estable + viento por hora/día */


/* V2.8.23 · controles de foto/vídeo desde Ajustes */
.evidence-capture-settings{margin-top:14px}
.evidence-setting-list{display:grid;gap:10px;margin-top:12px}
.evidence-setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 16px;border:1px solid #e5eaf1;border-radius:16px;background:#f8fafc}
.evidence-setting-row>div{display:grid;gap:3px;min-width:0}
.evidence-setting-row b{font-size:14px;font-weight:620;color:#172033}
.evidence-setting-row span{font-size:12px;color:var(--muted)}
.evidence-toggle{position:relative;display:inline-flex;flex:0 0 auto;width:50px;height:30px;cursor:pointer}
.evidence-toggle input{position:absolute;opacity:0;pointer-events:none}
.evidence-toggle>span{position:absolute;inset:0;border-radius:999px;background:#dfe5ed;border:1px solid #d3dae5;transition:background-color .18s ease,border-color .18s ease}
.evidence-toggle>span::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(26,36,54,.18);transition:transform .18s ease}
.evidence-toggle input:checked+span{background:var(--blue);border-color:var(--blue)}
.evidence-toggle input:checked+span::after{transform:translateX(20px)}
.evidence-toggle input:focus-visible+span{outline:3px solid rgba(33,66,244,.18);outline-offset:2px}
.evidence-save-actions{margin-top:12px}
html[data-admin-theme="dark"] .evidence-setting-row{background:#101d2d;border-color:#25364a}
html[data-admin-theme="dark"] .evidence-setting-row b{color:#eef3f9}
html[data-admin-theme="dark"] .evidence-toggle>span{background:#2b3b50;border-color:#34495f}
@media(max-width:760px){
  .evidence-setting-row{padding:13px 14px;gap:14px}
  .evidence-setting-row span{line-height:1.35}
}


/* V2.8.23 · perfil de pantalla por terminal + adaptación automática vertical/horizontal */
.terminal-display-config{margin-top:18px;padding:16px;border-radius:18px;background:#f6f8fb;border:1px solid #e7ebf1}
.terminal-display-config-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.terminal-display-config-head h3{margin:0 0 4px;font-size:15px;font-weight:620}
.terminal-display-config-head p{margin:0;color:var(--muted);font-size:12px;max-width:430px;line-height:1.4}
.terminal-display-mode-chip{display:inline-flex;align-items:center;min-height:26px;padding:0 10px;border-radius:999px;font-size:11px;font-weight:650;white-space:nowrap}
.terminal-display-mode-chip.auto{background:#e9f7ef;color:#28734f}.terminal-display-mode-chip.manual{background:#eef2ff;color:#2a50df}
.terminal-display-section-label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#8995a7;font-weight:650;margin-bottom:8px}
.terminal-display-detected{margin-bottom:14px}
.terminal-display-detected-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.terminal-display-detected-grid>div{display:grid;gap:2px;padding:10px 11px;border:1px solid #e5eaf1;border-radius:12px;background:#fff}
.terminal-display-detected-grid span{font-size:10px;color:#8a96a8}.terminal-display-detected-grid b{font-size:12px;font-weight:600;color:#1a253a;font-variant-numeric:tabular-nums}
.terminal-display-empty{padding:12px;border:1px dashed #d7dee9;border-radius:12px;background:#fff;color:#7e8a9d;font-size:12px;line-height:1.45}
.terminal-display-manual-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.terminal-display-ratio-preview{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:8px;padding:10px 12px;border-radius:12px;background:#eef2ff;color:#5c6880;font-size:12px}.terminal-display-ratio-preview b{color:#294bd8;font-size:14px;font-weight:650}
.terminal-display-meta b{font-size:14px;line-height:1.35}
html[data-admin-theme="dark"] .terminal-display-config{background:#101d2d;border-color:#25364a}
html[data-admin-theme="dark"] .terminal-display-detected-grid>div,html[data-admin-theme="dark"] .terminal-display-empty{background:#142235;border-color:#2b3c50}
html[data-admin-theme="dark"] .terminal-display-detected-grid b{color:#edf3fa}html[data-admin-theme="dark"] .terminal-display-ratio-preview{background:#172944;color:#a9b6c8}
@media(max-width:720px){.terminal-display-detected-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.terminal-display-manual-grid{grid-template-columns:1fr}.terminal-display-config-head{align-items:center}}

/* El terminal usa un perfil calculado por JS. En automático sigue el viewport real; en manual usa el perfil configurado. */
html[data-terminal-orientation="landscape"] body:not(.admin-body) .tablet-home{grid-template-columns:minmax(0,1.12fr) minmax(330px,.88fr);min-height:calc(100svh - 28px)}
html[data-terminal-orientation="landscape"] body:not(.admin-body) .home-left{min-height:0}
html[data-terminal-orientation="landscape"] body:not(.admin-body) .home-right{min-height:0;border-left:1px solid rgba(221,228,239,.68);border-top:0}
html[data-terminal-orientation="landscape"] body:not(.admin-body) .hero-center{padding:12px 0 0}
html[data-terminal-orientation="landscape"] body:not(.admin-body) .cards.four{grid-template-columns:repeat(4,minmax(0,1fr))}
html[data-terminal-orientation="landscape"] body:not(.admin-body) .cards.two,html[data-terminal-orientation="landscape"] body:not(.admin-body) .action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

html[data-terminal-orientation="portrait"] body:not(.admin-body) .page{padding:10px;min-height:100svh}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .shell{min-height:calc(100svh - 20px);max-width:760px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .tablet-home{grid-template-columns:1fr;min-height:calc(100svh - 20px);border-radius:28px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .home-left{min-height:36svh;padding:24px 22px 18px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .home-right{min-height:64svh;padding:18px 22px 24px;border-left:0;border-top:1px solid rgba(221,228,239,.68)}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .hero-center{padding:18px 0 0;gap:10px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .clock-main{font-size:clamp(76px,21vw,118px)}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .clock-seconds{font-size:clamp(25px,7vw,38px)}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .date{font-size:clamp(18px,5vw,24px)}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .pin-shell{width:100%;max-width:460px;padding:0;gap:14px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .home-right.consult-disabled{place-items:start center;padding-top:14px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .home-right.consult-disabled .pin-shell{padding-top:0;gap:10px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .home-right.consult-disabled .identity-list{max-height:min(70svh,700px)}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .segmented button{min-height:50px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .keypad{gap:10px}
html[data-terminal-orientation="portrait"] body:not(.admin-body) .keypad button{min-height:68px;border-radius:20px;font-size:28px}
html[data-terminal-orientation="portrait"][data-terminal-size="medium"] body:not(.admin-body) .cards.four,
html[data-terminal-orientation="portrait"][data-terminal-size="medium"] body:not(.admin-body) .cards.two{grid-template-columns:repeat(2,minmax(0,1fr))}

html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .page{padding:8px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .shell{min-height:calc(100svh - 16px)}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .tablet-home{min-height:calc(100svh - 16px);border-radius:24px;grid-template-columns:minmax(0,1.08fr) minmax(300px,.92fr)}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .home-left,
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .home-right{padding:16px 18px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .logo{width:150px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .status-pill{padding:7px 10px;font-size:12px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .terminal-label{font-size:12px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .hero-center{gap:7px;padding:6px 0 0}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .clock-main{font-size:clamp(54px,10vw,92px)}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .clock-seconds{font-size:clamp(20px,3.4vw,32px)}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .date{font-size:clamp(15px,2.3vw,20px)}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .pin-shell{gap:8px;padding:6px 8px;max-width:400px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .segmented{padding:4px;border-radius:16px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .segmented button{min-height:42px;border-radius:13px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .subtle-title{margin-top:1px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .pin-dots{min-height:18px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .keypad{gap:7px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .keypad button{min-height:clamp(46px,9.5svh,66px);border-radius:16px;font-size:24px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .cards.four{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .view{padding:16px 18px;border-radius:24px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .view-head{margin-bottom:14px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .worker-name{font-size:30px}

html[data-terminal-orientation="portrait"][data-terminal-size="compact"] body:not(.admin-body) .home-left{padding:18px 16px 14px}
html[data-terminal-orientation="portrait"][data-terminal-size="compact"] body:not(.admin-body) .home-right{padding:14px 16px 18px}
html[data-terminal-orientation="portrait"][data-terminal-size="compact"] body:not(.admin-body) .home-right.consult-disabled{padding-top:10px}
html[data-terminal-orientation="portrait"][data-terminal-size="compact"] body:not(.admin-body) .home-right.consult-disabled .identity-list{max-height:min(74svh,720px)}
html[data-terminal-orientation="portrait"][data-terminal-size="compact"] body:not(.admin-body) .cards.four,
html[data-terminal-orientation="portrait"][data-terminal-size="compact"] body:not(.admin-body) .cards.two,
html[data-terminal-orientation="portrait"][data-terminal-size="compact"] body:not(.admin-body) .action-grid{grid-template-columns:1fr}


/* V2.8.26 · Modal background stability: no layout/viewport reflow is allowed behind an open foreground window. */

/* V2.8.26 · Los modales de Administración mantienen el fondo congelado,
   pero disponen de su propio desplazamiento cuando superan la altura visible. */
body.admin-body .modal-overlay{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
body.admin-body .modal{
  margin:auto 0;
  max-height:calc(100dvh - 48px);
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
@supports not (height:100dvh){
  body.admin-body .modal{max-height:calc(100vh - 48px)}
}

/* V2.8.27 · identificación previa y bloqueo individual por trabajador */
.identity-stage,.pin-stage{width:100%;display:grid;gap:16px}
.identity-heading{font-size:clamp(22px,2.2vw,28px);font-weight:650;letter-spacing:-.025em;color:#182238;text-align:center;margin:2px 0 4px}
.identity-list{width:100%;display:grid;grid-template-columns:1fr;gap:12px;max-height:min(56svh,520px);overflow-y:auto;overscroll-behavior:contain;padding:2px 3px 4px;scrollbar-width:thin}
.identity-person{width:100%;min-height:88px;border:1px solid #e1e7f0;border-radius:22px;background:#fff;display:grid;grid-template-columns:48px minmax(0,1fr) 20px;align-items:center;gap:14px;padding:14px 16px;text-align:left;box-shadow:0 8px 20px rgba(15,23,42,.045);transition:transform .1s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease}
.identity-person:hover{border-color:#cfd8e7;background:#fbfcff;box-shadow:0 12px 26px rgba(15,23,42,.065)}
.identity-person:active,.identity-person.pressed{transform:scale(.985)}
.identity-avatar{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#eef3ff;color:#2c53f4;font-size:15px;font-weight:750;letter-spacing:.02em}
.identity-person-main{min-width:0;display:flex;flex-direction:column;gap:4px}
.identity-person-name{font-size:17px;line-height:1.25;font-weight:620;color:#182238;overflow-wrap:anywhere}
.identity-absence{font-size:12px;line-height:1.25;font-weight:650;color:#58709a;white-space:normal}
.identity-person.unavailable{opacity:.7;background:#f7f9fc;border-style:dashed;cursor:not-allowed;box-shadow:none}
.identity-person.unavailable:hover{background:#f7f9fc;border-color:#d7dfeb;box-shadow:none}
.identity-person.unavailable .identity-avatar{background:#eef2f7;color:#7b8aa3}
.identity-person.unavailable .identity-chevron{color:#9aa7ba}
.identity-chevron{font-size:28px;line-height:1;color:#98a5b8;text-align:right;font-weight:350}
.identity-empty{padding:24px 12px;text-align:center;color:#7a8799;font-size:14px}
.selected-identity{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-radius:18px;background:#f5f7fb;border:1px solid #e5eaf1}
.selected-identity-copy{min-width:0;display:grid;gap:3px}
.selected-identity-copy span{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:#8a96a8;font-weight:700}
.selected-identity-copy strong{font-size:16px;line-height:1.25;font-weight:650;color:#182238;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.change-identity{border:0;background:#fff;color:#3158f4;font:inherit;font-size:13px;font-weight:650;border-radius:12px;padding:9px 12px;box-shadow:inset 0 0 0 1px #dde5f2;white-space:nowrap}
.change-identity:hover{background:#f9fbff}
.pin-lock-note{width:100%;padding:10px 12px;border-radius:13px;background:#fff4e8;border:1px solid #ffd8ad;color:#a35400;text-align:center;font-size:13px;font-weight:650}
.pin-keypad-locked button:disabled{opacity:.42;cursor:not-allowed;transform:none!important;box-shadow:none}

html[data-tablet-theme="dark"] .identity-heading,
html[data-tablet-theme="dark"] .identity-person-name,
html[data-tablet-theme="dark"] .selected-identity-copy strong{color:#eef4ff}
html[data-tablet-theme="dark"] .identity-person{background:#111d2b;border-color:#28384d;box-shadow:none}
html[data-tablet-theme="dark"] .identity-person:hover{background:#162438;border-color:#344761}
html[data-tablet-theme="dark"] .identity-absence{color:#9fb1cc}
html[data-tablet-theme="dark"] .identity-person.unavailable,html[data-tablet-theme="dark"] .identity-person.unavailable:hover{background:#0d1724;border-color:#2b394b}
html[data-tablet-theme="dark"] .identity-avatar{background:#1c2d4d;color:#8da4ff}
html[data-tablet-theme="dark"] .identity-chevron{color:#71839b}
html[data-tablet-theme="dark"] .selected-identity{background:#111d2b;border-color:#28384d}
html[data-tablet-theme="dark"] .selected-identity-copy span{color:#8fa0b8}
html[data-tablet-theme="dark"] .change-identity{background:#17263a;color:#9db1ff;box-shadow:inset 0 0 0 1px #2d405b}
html[data-tablet-theme="dark"] .pin-lock-note{background:#332413;border-color:#69471f;color:#ffbd73}

html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .identity-stage,
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .pin-stage{gap:8px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .identity-heading{font-size:20px;margin:0}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .identity-list{gap:7px;max-height:52svh}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .identity-person{min-height:58px;border-radius:16px;grid-template-columns:38px minmax(0,1fr) 16px;gap:10px;padding:8px 11px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .identity-avatar{width:38px;height:38px;border-radius:12px;font-size:13px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .identity-person-name{font-size:14px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .selected-identity{padding:8px 10px;border-radius:14px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .selected-identity-copy strong{font-size:14px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .change-identity{font-size:12px;padding:7px 9px}
html[data-terminal-orientation="landscape"][data-terminal-size="compact"] body:not(.admin-body) .pin-lock-note{padding:7px 9px;font-size:12px}

/* V2.8.28 · orden alfabético y comportamiento de app nativa */
html,body,
body *,
body *::before,
body *::after{
  -webkit-user-select:none!important;
  user-select:none!important;
  -webkit-touch-callout:none!important;
}
body img,
body a,
body button,
body svg{
  -webkit-user-drag:none!important;
  user-drag:none!important;
}
button,a,[role="button"],.identity-person,.photo-chip,.evidence-icon-btn{
  -webkit-tap-highlight-color:transparent;
}



/* V2.8.29 · notificaciones persistentes de Fichajes y Auditoría */
body.admin-body .nav button{position:relative}
body.admin-body .nav-badge{
  display:inline-flex!important;align-items:center;justify-content:center;
  min-width:20px;height:20px;padding:0 6px;margin-left:auto;border-radius:999px;
  background:#e5484d;color:#fff;font-size:11px;font-weight:720;line-height:1;
  letter-spacing:-.01em;box-shadow:0 2px 8px rgba(194,38,48,.22);
  font-variant-numeric:tabular-nums;flex:0 0 auto;
}
body.admin-body .nav-badge.hidden{display:none!important}
body.admin-body .nav-badge-pop{animation:navBadgePop .36s cubic-bezier(.22,1,.36,1)}
@keyframes navBadgePop{0%{transform:scale(.72);opacity:.55}58%{transform:scale(1.13);opacity:1}100%{transform:scale(1);opacity:1}}
html[data-admin-theme="dark"] body.admin-body .nav-badge{background:#ff5d62;color:#fff;box-shadow:0 2px 10px rgba(255,93,98,.18)}
@media (max-width:920px){body.admin-body .sidebar .nav .nav-badge{margin-left:auto!important}}

/* 2.8.31 base */
.pwa-update-notice{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);z-index:9999;display:flex;gap:16px;align-items:center;max-width:calc(100vw - 24px);padding:12px 16px;border-radius:16px;background:#101a30;color:white;box-shadow:0 8px 30px #0003;font-size:13px;}
.pwa-update-notice button{flex-shrink:0;}
.modal[role="dialog"]:focus{outline:none;}


/* V2.9.5.5 · Consulta terminal: H. trabajadas reconstruida desde tramos */
.settings-search-wrap{width:min(100%,1280px);margin:0 auto 16px;display:flex;align-items:center;gap:10px;padding:10px 12px 10px 15px;box-sizing:border-box;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow-soft)}
.settings-search-icon{font-size:22px;line-height:1;color:#708098;transform:rotate(-12deg)}
.settings-search{flex:1;min-width:0;border:0!important;background:transparent!important;box-shadow:none!important;padding:8px 2px!important;font-size:14px;color:#1a2740;outline:0}
.settings-search::placeholder{color:#8d99aa}
.settings-search-clear{border:0;background:#eef3f8;color:#536174;border-radius:10px;padding:8px 11px;font-size:12px;font-weight:600;cursor:pointer}
.settings-option-tile{margin-top:14px}
.settings-option-list{gap:10px}
.settings-option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.settings-option-grid .evidence-setting-row{height:100%;box-sizing:border-box}
.settings-inline-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:13px}
.settings-inline-fields .field{margin:0}
.settings-preview-note{margin-top:14px;padding:12px 14px;border:1px solid #d7e0ff;border-radius:14px;background:#f4f6ff;color:#4c5c7a;font-size:12.5px;line-height:1.5}
.settings-preview-note b{color:#2342b6}
.settings-diagnostics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.settings-diag-card{display:grid;gap:7px;padding:16px 17px;border:1px solid var(--line);border-radius:17px;background:#f9fbfd}
.settings-diag-card span{font-size:11px;letter-spacing:.055em;text-transform:uppercase;color:var(--muted);font-weight:650}
.settings-diag-card b{font-size:15px;font-weight:600;color:#1c2a42}
.diag-ok{color:#15926c!important}.diag-warn{color:#bd7b15!important}.diag-bad{color:#c53c55!important}
.settings-system-actions{margin-top:12px}
.settings-no-results{width:min(100%,1280px);margin:0 auto;padding:28px;text-align:center;border:1px dashed var(--line);border-radius:20px;color:var(--muted);background:#fff}
html[data-admin-theme="dark"] .settings-search-wrap,html[data-admin-theme="dark"] .settings-no-results{background:#101d2c;border-color:#26384d}
html[data-admin-theme="dark"] .settings-search{color:#edf3fa}
html[data-admin-theme="dark"] .settings-search-clear{background:#1d2d41;color:#d4dfeb}
html[data-admin-theme="dark"] .settings-preview-note{background:#142342;border-color:#29406c;color:#b9c9e7}
html[data-admin-theme="dark"] .settings-preview-note b{color:#9fb6ff}
html[data-admin-theme="dark"] .settings-diag-card{background:#142235;border-color:#26384d}
html[data-admin-theme="dark"] .settings-diag-card b{color:#edf3fa}
@media(max-width:980px){.settings-option-grid,.settings-diagnostics{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.settings-search-wrap{border-radius:15px}.settings-option-grid,.settings-diagnostics,.settings-inline-fields{grid-template-columns:1fr}.settings-diag-card{padding:14px}.settings-search-clear{display:none!important}}


/* V2.9.5.3 · Kiosk + terminal premium */
body.kiosk-mode{-webkit-user-select:none;user-select:none;overscroll-behavior:none;touch-action:manipulation}
body.kiosk-mode.kiosk-cursor-hidden,body.kiosk-mode.kiosk-cursor-hidden *{cursor:none!important}
.kiosk-status{position:fixed;left:50%;bottom:max(12px,env(safe-area-inset-bottom));z-index:80;transform:translateX(-50%) translateY(12px);display:flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid rgba(170,185,210,.38);border-radius:999px;background:rgba(255,255,255,.78);backdrop-filter:blur(18px);box-shadow:0 10px 26px rgba(28,45,78,.10);font-size:10.5px;color:#64738a;opacity:0;pointer-events:none;transition:opacity .22s ease,transform .22s cubic-bezier(.22,1,.36,1)}.kiosk-status.show{opacity:1;transform:translateX(-50%) translateY(0)}.kiosk-status-dot{width:7px;height:7px;border-radius:50%;background:#21a67a}
.worker-view .card,.pin-shell,.identity-item,.weather-chip,.secondary,.primary{transition:transform .16s cubic-bezier(.22,1,.36,1),box-shadow .18s ease,border-color .18s ease,background-color .18s ease}
@media(hover:hover){.identity-item:hover,.worker-view .card:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(32,51,91,.09)}}
.primary:active,.secondary:active,.key:active,.identity-item:active{transform:scale(.985)}
.view:not(.hidden){animation:tablet-premium-in .32s cubic-bezier(.22,1,.36,1) both}@keyframes tablet-premium-in{from{opacity:.2;transform:translateY(8px) scale(.997)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.view:not(.hidden){animation:none!important}}
