/* =========================================================
   Comedor FUCHS — hoja de estilos
   Marca: azul #004E9E · azul oscuro #00305C · rojo #E3000F
   ========================================================= */
:root {
  --blue: #004E9E;
  --blue-d: #00305C;
  --blue-m: #0A5FB0;
  --blue-l: #CFE0F2;
  --blue-xl: #E8EFF8;
  --red: #E3000F;
  --ink: #1B2430;
  --ink-2: #3A4656;
  --muted: #5C6878;
  --line: #DCE3EE;
  --line-2: #EDF1F7;
  --bg: #F2F5FA;
  --card: #FFFFFF;
  --ok: #0E7C45;
  --ok-bg: #E3F4EA;
  --warn: #9A5B00;
  --warn-bg: #FFF2DB;
  --err: #C1121F;
  --err-bg: #FDE7E8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 48, 92, .06), 0 4px 16px rgba(0, 48, 92, .06);
  --shadow-lg: 0 10px 40px rgba(0, 48, 92, .18);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; }
p { margin: 0 0 .75em; }
code { font-family: var(--mono); font-size: .9em; background: var(--line-2); padding: 1px 6px; border-radius: 6px; }
.i { flex: none; display: inline-block; vertical-align: middle; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: .92em; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
:focus-visible { outline: 3px solid rgba(0, 78, 158, .35); outline-offset: 2px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: 600 14.5px var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(0, 78, 158, .25); }
.btn-primary:hover { background: var(--blue-m); }
.btn-ghost { background: var(--card); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: #b9c6d8; background: #fafcff; }
.btn-light { background: #fff; color: var(--blue-d); }
.btn-ghost-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-lg { height: 50px; font-size: 16px; padding: 0 24px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.icon-btn.ok { color: var(--ok); background: var(--ok-bg); }
.icon-btn.err { color: var(--err); background: var(--err-bg); }
.icon-btn.light { color: rgba(255, 255, 255, .85); }
.icon-btn.light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.link { font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 14px; }
legend { font-weight: 700; font-size: 15px; margin-bottom: 4px; padding: 0; color: var(--blue-d); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: 15px var(--font); color: var(--ink); width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 78, 158, .15); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--blue); margin: 0; }
input[type=file] { padding: 8px; }
.hint { font-size: 12.5px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--line-2); color: var(--ink-2); font: 600 12px var(--font); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.code-input { font-family: var(--mono); letter-spacing: .25em; text-transform: uppercase; font-size: 18px; text-align: center; }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-inline input, .field-inline select { width: auto; min-height: 40px; }
.field-inline.light { color: rgba(255, 255, 255, .85); }
.field-inline.light input { width: 80px; background: rgba(255, 255, 255, .95); }

/* ---------- Badges, alertas, avisos ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-muted { background: var(--line-2); color: var(--muted); }
.badge-blue { background: var(--blue-xl); color: var(--blue); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pill { font-style: normal; margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 14px; }
.alert .i { margin-top: 1px; }
.alert-ok { background: var(--ok-bg); color: #0a5a33; }
.alert-err { background: var(--err-bg); color: #8e0d17; }
.alert-warn { background: var(--warn-bg); color: #6e4100; }
.alert-info { background: var(--blue-xl); color: var(--blue-d); }
.toast { position: fixed; z-index: 100; left: 50%; top: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2); cursor: pointer; transition: opacity .3s, transform .3s; }
.toast + .toast { top: 70px; }
.toast-ok .i { color: #5ee29a; }
.toast-err { background: #8e0d17; }
.toast-info .i { color: #8ec5ff; }
.toast.out { opacity: 0; transform: translate(-50%, -20px); pointer-events: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -16px); } }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .i { color: #a8b6c9; margin-bottom: 4px; }
.empty b { color: var(--ink-2); font-size: 15px; }
.empty p { margin: 0; font-size: 13.5px; max-width: 320px; }
.code { font-family: var(--mono); background: var(--line-2); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
pre.code { white-space: pre; margin: 8px 0 12px; font-size: 13px; }
.center-msg { display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 460px; margin: 12vh auto; padding: 24px; }
.center-msg .i { color: var(--blue); }

/* ---------- Avatar ---------- */
.avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; display: inline-grid; place-items: center; font-size: 13.5px; font-weight: 700; letter-spacing: .02em; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; font-size: 12.5px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar.xl { width: 96px; height: 96px; font-size: 32px; box-shadow: 0 0 0 5px #fff, var(--shadow); }

/* =========================================================
   ACCESO (login / activar)
   ========================================================= */
.layout-auth { background: #fff; }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, #0A5FB0 0%, #004E9E 40%, #00305C 100%); color: #fff; }
.auth-art::before { content: ""; position: absolute; width: 900px; height: 900px; right: -420px; bottom: -480px; border-radius: 50%; border: 90px solid rgba(255, 255, 255, .06); }
.auth-art::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; border: 46px solid rgba(227, 0, 15, .55); clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%); transform: rotate(-28deg); }
.auth-art-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: 48px 56px; }
.auth-logo { width: 230px; }
.auth-claim { margin-top: auto; max-width: 440px; }
.auth-claim h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
.auth-claim p { margin-top: 14px; font-size: 17px; opacity: .85; }
.auth-tickets { display: flex; gap: 10px; margin-top: 36px; }
.auth-tickets span { width: 74px; height: 42px; border-radius: 8px; background: rgba(255, 255, 255, .14); position: relative; -webkit-mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.auth-tickets span:first-child { background: #fff; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-logo-sm { width: 150px; margin-bottom: 36px; }
.auth-title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); margin: 6px 0 24px; }
.auth-links { margin-top: 22px; display: grid; gap: 8px; font-size: 14px; }
.auth-links a { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.auth-links span { color: var(--muted); font-size: 13px; }
.auth-foot { margin-top: 40px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { justify-content: flex-start; padding-top: 48px; }
}
.install { max-width: 640px; margin: 0 auto; padding: 40px 16px 60px; }
.install h1 { font-size: 26px; margin-bottom: 20px; }
.install fieldset { background: var(--bg); border-radius: var(--radius); padding: 18px; margin-bottom: 4px; }

/* =========================================================
   PANEL RRHH
   ========================================================= */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--blue-d) 0%, #002447 100%); color: #fff; padding: 18px 14px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; color: #fff; text-decoration: none !important; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 14px; }
.brand img { width: 52px; }
.brand span { display: grid; line-height: 1.2; }
.brand b { font-size: 16px; }
.brand small { font-size: 12px; opacity: .65; }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav a, .side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .78); font-weight: 550; font-size: 14.5px; text-decoration: none !important; transition: background .15s, color .15s; }
.sidebar nav a:hover, .side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar nav a.active { background: #fff; color: var(--blue-d); box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.sidebar nav a.active .i { color: var(--blue); }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
.me > div { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.me b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { font-size: 12px; opacity: .65; }
.me .avatar { background: rgba(255, 255, 255, .15); }
.me .icon-btn { color: rgba(255, 255, 255, .7); }
.me .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(242, 245, 250, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.topbar h1 { font-size: 22px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; }
.menu-btn { display: none; }
.content { padding: 8px 28px 48px; max-width: 1280px; width: 100%; display: grid; gap: 18px; align-content: start; }
.scrim { display: none; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.panel > h2 { margin-bottom: 14px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head p { margin: 2px 0 0; }
.panel-head.pad { padding: 18px 20px 4px; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-emp { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpis-sm { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 4px; }
.kpi { display: grid; gap: 2px; padding: 18px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; position: relative; overflow: hidden; }
.kpis-sm .kpi { padding: 14px 16px; box-shadow: none; background: var(--bg); }
.kpi-l { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-n { font-size: 34px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpis-sm .kpi-n { font-size: 24px; }
.kpi-s { font-size: 13px; color: var(--muted); }
.kpi-hero { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%); color: #fff; }
.kpi-hero .kpi-l, .kpi-hero .kpi-s { color: rgba(255, 255, 255, .8); }
.kpi-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; border: 18px solid rgba(255, 255, 255, .08); }
.kpi-alert { box-shadow: inset 0 0 0 2px var(--red), var(--shadow); }
.kpi-alert .kpi-n { color: var(--red); }
a.kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* Gráfico de barras (una serie: azul FUCHS) */
.chart { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; height: 220px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 11.5px; color: var(--muted); padding-bottom: 22px; font-variant-numeric: tabular-nums; }
.chart-y span { transform: translateY(-50%); }
.chart-y span:last-child { transform: translateY(50%); }
.chart-plot { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) 22px; }
.chart-grid { position: absolute; inset: 0 0 22px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { border-top: 1px solid var(--line-2); }
.chart-grid i:last-child { border-top: 1px solid var(--line); }
.chart-bars { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; height: 100%; }
.bar-slot { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0 1px; outline: none; cursor: default; }
.bar { width: 100%; max-width: 18px; min-height: 0; background: var(--blue); border-radius: 4px 4px 0 0; transition: background .15s; }
.bar-slot.we .bar { background: #8FB3DA; }
.bar-slot.is-today .bar { background: var(--blue-d); }
.bar-slot:hover .bar, .bar-slot:focus .bar { background: var(--blue-m); }
.bar-slot:hover::before, .bar-slot:focus::before { content: ""; position: absolute; inset: 0; background: rgba(0, 78, 158, .06); border-radius: 6px; }
.bar-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; display: none; z-index: 5; box-shadow: var(--shadow-lg); pointer-events: none; text-align: center; }
.bar-tip b { display: block; font-size: 13px; }
.bar-slot:hover .bar-tip, .bar-slot:focus .bar-tip { display: block; bottom: auto; top: -46px; }
.bar-slot:first-child .bar-tip, .bar-slot:nth-child(2) .bar-tip { left: 0; transform: none; }
.bar-slot:last-child .bar-tip, .bar-slot:nth-last-child(2) .bar-tip { left: auto; right: 0; transform: none; }
.chart-x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); font-size: 11px; color: var(--muted); padding-top: 6px; white-space: nowrap; }
.chart-x span { text-align: center; overflow: visible; }
.table-view { margin-top: 10px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.table-view table { margin-top: 8px; max-height: 260px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 40px; align-items: center; gap: 10px; font-size: 13.5px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.hb-track { height: 12px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.hb-bar { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; }
.hb-n { text-align: right; font-variant-numeric: tabular-nums; }

/* Listas */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list li > .grow { display: grid; line-height: 1.3; }
.list li > .grow small { font-size: 12.5px; }
.list.compact li { padding: 8px 0; }
.list li.is-void { opacity: .55; }
.list li.is-void b { text-decoration: line-through; }
.inline-actions { display: flex; gap: 6px; }

/* Tablas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; background: #F8FAFD; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { font-weight: 700; background: #F8FAFD; border-top: 1px solid var(--line); }
.table.compact td, .table.compact th { padding: 8px 12px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .w-check { width: 44px; }
.table .w-act { width: 52px; text-align: right; }
.rows-link tbody tr { cursor: pointer; transition: background .1s; }
.rows-link tbody tr:hover, .table tbody tr:hover { background: #F8FAFD; }
.table tr.is-void td { color: var(--muted); }
.table tr.is-void td:not(:last-child) { text-decoration: line-through; text-decoration-color: rgba(92, 104, 120, .4); }
.table tr.is-muted td { color: var(--muted); }
.table tr.is-error td { background: #fff8f8; }
.cell-user { display: flex; align-items: center; gap: 12px; }
.cell-user > div { display: grid; line-height: 1.3; min-width: 0; }
.cell-user a { color: var(--ink); }
.tickets-pill { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--blue-xl); color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }
.tickets-pill.low { background: var(--warn-bg); color: var(--warn); }
.tickets-pill.zero { background: var(--line-2); color: var(--muted); }
.quote { font-style: italic; color: var(--ink-2); }

/* Filtros, pestañas, paginación */
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filters select, .filters input[type=date], .filters input[type=month] { width: auto; min-height: 40px; }
.filters .btn { height: 40px; }
.filters-title { font-size: 20px; margin-left: 8px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; display: block; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 40px; min-height: 40px; border-radius: 999px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 14px; border-radius: 999px; background: var(--blue-xl); color: var(--blue-d); font-size: 13.5px; }
.chip a { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.chip a:hover { background: rgba(0, 78, 158, .12); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; }
.tabs a.active { color: var(--blue); border-color: var(--blue); }
.tabs .pill { margin: 0; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); }
.pager a:hover { background: var(--line-2); text-decoration: none; }
.pager a.active { background: var(--blue); color: #fff; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: #F8FAFD; border-bottom: 1px solid var(--line); }
.bulk-bar input:not([type=checkbox]) { min-height: 40px; flex: 1 1 200px; }
.bulk-bar .btn { height: 40px; }

/* Acciones rápidas, ficha de empleado */
.quick { display: grid; gap: 6px; }
.quick h2 { margin-bottom: 8px; }
.quick a, .action, .export, .menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; color: var(--ink); text-decoration: none !important; transition: background .15s; }
.quick a:hover, .action:hover, .export:hover, .menu-list a:hover, .menu-list button:hover { background: var(--bg); }
.quick a > .i, .action > .i, .export > .i, .action label > .i { width: 40px; height: 40px; padding: 10px; border-radius: 11px; background: var(--blue-xl); color: var(--blue); }
.quick span, .action span, .export span { display: grid; line-height: 1.3; }
.quick small, .action small, .export small { color: var(--muted); font-size: 12.5px; }
.action-list { display: grid; gap: 2px; margin: -4px -8px 10px; }
.action-list form { margin: 0; }
button.action { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
button.action:disabled { opacity: .45; cursor: not-allowed; }
.action.danger > .i { background: var(--err-bg); color: var(--err); }
.action.danger b { color: var(--err); }
.foto-form label { display: flex; align-items: center; gap: 14px; cursor: pointer; width: 100%; }
.emp-hero { display: flex; align-items: center; gap: 18px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.emp-hero h2 { font-size: 22px; }
.emp-hero p { margin: 2px 0 0; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%); color: #fff; box-shadow: var(--shadow); }
.code-box > div:first-child { display: grid; gap: 4px; max-width: 640px; }
.code-box small { opacity: .85; font-size: 13px; }
.code-box .code { background: rgba(255, 255, 255, .14); color: #fff; font-size: 30px; letter-spacing: .18em; padding: 6px 14px; width: fit-content; font-weight: 700; }
.code-box b:not(.code) { font-size: 22px; }
.taco-form { display: grid; grid-template-columns: minmax(0, 1fr) 80px auto; gap: 8px; margin-bottom: 12px; }
.taco-form select, .taco-form input { min-height: 42px; }
.export-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.export { background: var(--card); box-shadow: var(--shadow); }
.export:hover { background: #fff; box-shadow: var(--shadow-lg); }
.assign-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%); color: #fff; box-shadow: var(--shadow); margin-bottom: 18px; }
.assign-hero > div { flex: 1 1 220px; }
.assign-hero h2 { font-size: 26px; }
.assign-hero p { margin: 4px 0 0; opacity: .85; }
.dropzone { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 16px; border: 2px dashed #b9c9de; border-radius: var(--radius); background: #F8FAFD; color: var(--muted); cursor: pointer; position: relative; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--blue); background: var(--blue-xl); }
.dropzone .i { color: var(--blue); }
.dropzone b { color: var(--ink); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.bullets { padding-left: 18px; margin: 10px 0; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 10px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .grid-main, .grid-emp { grid-template-columns: minmax(0, 1fr); }
  .hide-md { display: none; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 20, 40, .45); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 19px; }
  .content { padding: 6px 16px 40px; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-n { font-size: 26px; }
  .kpis-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis-sm .kpi-n { font-size: 19px; }
  .panel { padding: 16px; }
  .chart { height: 180px; }
  .search { max-width: none; }
  .filters > * { flex: 1 1 auto; }
  .emp-hero { padding: 16px; gap: 14px; }
  .emp-hero .avatar.lg { width: 56px; height: 56px; font-size: 19px; }
  .emp-hero h2 { font-size: 18px; }
  .code-box .code { font-size: 24px; }
  .taco-form { grid-template-columns: minmax(0, 1fr) 70px; }
  .taco-form .btn { grid-column: 1 / -1; }
  .top-actions .btn { padding: 0 12px; }
  .table td, .table th { padding: 10px; }
  .assign-hero .btn { width: 100%; }
}

/* =========================================================
   APP DEL EMPLEADO (móvil primero)
   ========================================================= */
.layout-app { background: var(--bg); padding-bottom: calc(76px + var(--safe-b)); }
.app-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.app-logo { width: 44px; }
.app-top-title { flex: 1; font-weight: 700; color: var(--blue-d); font-size: 15px; }
.chip-link { font-size: 12.5px; font-weight: 650; padding: 6px 12px; border-radius: 999px; background: var(--blue-xl); }
.app-avatar { text-decoration: none !important; }
.app-main { max-width: 520px; margin: 0 auto; padding: 18px 16px 24px; display: grid; gap: 16px; }
.app-h1 { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin: 4px 2px 0; }
.hello p { margin: 0; color: var(--muted); font-size: 14px; }
.hello h1 { font-size: 27px; font-weight: 750; letter-spacing: -.02em; }
.card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card > h2 { margin-bottom: 12px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + var(--safe-b)); }
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none !important; border-radius: 12px; }
.tabbar a.active { color: var(--blue); }
.tabbar a.active .i { background: var(--blue-xl); border-radius: 999px; padding: 3px 14px; box-sizing: content-box; }
@media (min-width: 700px) {
  .tabbar { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: 440px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding-bottom: 6px; }
  .layout-app { padding-bottom: 110px; }
}

/* El ticket */
.ticket { position: relative; background: #fff; border-radius: 22px; box-shadow: 0 1px 2px rgba(0, 48, 92, .08), 0 18px 48px rgba(0, 48, 92, .16); overflow: hidden; }
.ticket::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 132px; background: radial-gradient(120% 140% at 0% 0%, #0A5FB0 0%, #004E9E 45%, #00305C 100%); }
.ticket::after { content: ""; position: absolute; right: -70px; top: -90px; width: 210px; height: 210px; border-radius: 50%; border: 22px solid rgba(227, 0, 15, .8); clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); transform: rotate(-24deg); opacity: .85; }
.ticket-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; color: #fff; }
.ticket-head small { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; opacity: .75; font-weight: 600; }
.ticket-head b { font-size: 18px; display: block; line-height: 1.25; }
.ticket-num { font-family: var(--mono); font-size: 13px; background: rgba(255, 255, 255, .16); padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.ticket-qr { position: relative; z-index: 1; width: min(272px, calc(100% - 48px)); aspect-ratio: 1; margin: 18px auto 0; padding: 4px; background: #fff; border-radius: 18px; box-shadow: 0 6px 24px rgba(0, 48, 92, .18); }
.ticket-qr canvas { width: 100%; height: 100%; display: block; border-radius: 14px; image-rendering: pixelated; }
.qr-overlay { position: absolute; inset: 0; border-radius: 18px; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 18px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.qr-overlay b { font-size: 19px; }
.qr-overlay small { color: var(--muted); }
.ticket-qr.is-done .qr-done { display: flex; cursor: pointer; animation: pop .4s cubic-bezier(.2, .9, .3, 1.3); }
.ticket-qr.is-empty:not(.is-done) .qr-empty { display: flex; }
.big-check { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--ok); color: #fff; box-shadow: 0 0 0 10px var(--ok-bg); margin-bottom: 8px; }
.big-check.warn { background: var(--warn); box-shadow: 0 0 0 10px var(--warn-bg); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.qr-timer { width: min(220px, 60%); height: 4px; margin: 14px auto 0; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.qr-timer span { display: block; height: 100%; width: 100%; background: var(--blue); border-radius: 4px; }
.qr-hint { display: block; margin: 8px 24px 0; font-size: 12px; color: var(--muted); text-align: center; }
.ticket-cut { position: relative; height: 28px; margin-top: 10px; }
.ticket-cut::before { content: ""; position: absolute; left: 22px; right: 22px; top: 50%; border-top: 2px dashed var(--line); }
.ticket-cut::after { content: ""; position: absolute; left: -14px; right: -14px; top: 0; height: 28px; background: radial-gradient(circle 14px at 0 50%, var(--bg) 98%, transparent) left / 50% 100% no-repeat, radial-gradient(circle 14px at 100% 50%, var(--bg) 98%, transparent) right / 50% 100% no-repeat; }
.ticket-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 20px 20px; }
.saldo { display: flex; align-items: center; gap: 10px; }
.saldo-n { font-size: 44px; font-weight: 800; letter-spacing: -.04em; color: var(--blue-d); line-height: 1; font-variant-numeric: tabular-nums; }
.saldo-l { font-size: 12.5px; line-height: 1.25; color: var(--muted); font-weight: 600; }
.today { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--blue-xl); color: var(--blue); font-size: 13px; font-weight: 650; }
.today-done { background: var(--ok-bg); color: var(--ok); }
.taco-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.taco-dots i { aspect-ratio: 1.6; border-radius: 5px; background: var(--blue); -webkit-mask: radial-gradient(circle 3px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 3px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle 3px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 3px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.taco-dots i.used { background: var(--line); }
.notice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--blue-xl); color: var(--blue-d); font-weight: 600; font-size: 14px; text-decoration: none !important; }
.notice span { flex: 1; }
.notice-warn { background: var(--warn-bg); color: #6e4100; }
.tip { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin: 0; text-align: center; }
.taco-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.taco-row:last-child { border-bottom: 0; }
.taco-row .grow { display: grid; gap: 4px; }
.taco-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-xl); color: var(--blue); }
.big-num { font-size: 26px; font-weight: 800; color: var(--blue-d); font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 6px; background: var(--blue-xl); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--blue); border-radius: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span { display: grid; gap: 2px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); transition: border-color .15s, background .15s; }
.seg-opt small { color: var(--muted); font-size: 12.5px; }
.seg-opt input:checked + span { border-color: var(--blue); background: var(--blue-xl); }
.seg-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 78, 158, .25); }
.seg-opt.disabled { opacity: .5; cursor: not-allowed; }
.date-tile { width: 44px; height: 48px; border-radius: 12px; background: var(--blue-xl); color: var(--blue-d); display: grid; place-items: center; align-content: center; line-height: 1.05; flex: none; }
.date-tile b { font-size: 18px; }
.date-tile small { font-size: 10.5px; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; opacity: .75; }
.profile { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 0 4px; }
.profile h1 { font-size: 22px; margin-top: 12px; }
.profile p { margin: 0; }
.stats-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats-2 > div { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; }
.stats-2 b { font-size: 26px; font-weight: 800; color: var(--blue-d); }
.stats-2 small { color: var(--muted); font-size: 12.5px; }
.menu-list { padding: 8px; display: grid; }
.menu-list a, .menu-list button { border: 0; background: none; font: inherit; width: 100%; text-align: left; cursor: pointer; }
.menu-list span { flex: 1; font-weight: 600; }
.menu-list > * > .i:first-child { color: var(--blue); }
.menu-list .danger, .menu-list .danger > .i:first-child { color: var(--err); }
.help ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }

/* =========================================================
   CANTINA (pantalla oscura, a pantalla completa)
   ========================================================= */
.layout-cantina { background: #001B33; color: #fff; overscroll-behavior: none; }
.cz { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.cz-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--blue-d); }
.cz-logo { width: 46px; }
.cz-title { flex: 1; display: grid; line-height: 1.2; min-width: 0; }
.cz-title b { font-size: 16px; }
.cz-title small { font-size: 12px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-count { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 18px; font-variant-numeric: tabular-nums; }
.cz-menu { position: relative; }
.cz-menu summary { list-style: none; }
.cz-menu summary::-webkit-details-marker { display: none; }
.cz-menu-pop { position: absolute; right: 0; top: 44px; z-index: 50; min-width: 220px; display: grid; gap: 2px; padding: 8px; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg); }
.cz-menu-pop > span { padding: 6px 10px; }
.cz-menu-pop a, .cz-menu-pop button { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; color: var(--ink); border: 0; background: none; font: inherit; font-size: 14px; cursor: pointer; text-align: left; text-decoration: none !important; }
.cz-menu-pop a:hover, .cz-menu-pop button:hover { background: var(--bg); }
.cz-view { display: none; min-height: 0; overflow-y: auto; }
.cz-view.active { display: flex; flex-direction: column; }
.cz-view[data-view=scan] { padding: 16px; align-items: center; justify-content: center; gap: 14px; overflow: hidden; }
.cz-cam { position: relative; width: min(100%, 460px, 62vh); aspect-ratio: 1; border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 60px rgba(0, 0, 0, .5); }
.cz-cam video { width: 100%; height: 100%; object-fit: cover; }
.cz-frame { position: absolute; inset: 14%; pointer-events: none; }
.cz-frame i { position: absolute; width: 44px; height: 44px; border: 5px solid #fff; border-radius: 4px; }
.cz-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.cz-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.cz-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.cz-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
.cz-laser { position: absolute; left: 6%; right: 6%; height: 3px; top: 50%; background: var(--red); border-radius: 3px; box-shadow: 0 0 14px 2px rgba(227, 0, 15, .7); animation: laser 2.2s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 8%; } 50% { top: 92%; } }
.cz-cam-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: radial-gradient(circle at 50% 40%, #0A3A6B, #001B33); }
.cz-cam-msg p { margin: 0; opacity: .85; max-width: 260px; }
.cz-cam-msg.loading { opacity: .6; pointer-events: none; }
.cz-hint { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; opacity: .85; }
.cz-cam-tools { display: flex; gap: 10px; }
.cz-tool { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font: 600 14px var(--font); cursor: pointer; }
.cz-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 12px calc(8px + var(--safe-b)); background: #00254A; border-top: 1px solid rgba(255, 255, 255, .08); }
.cz-tabs button { display: grid; justify-items: center; gap: 2px; padding: 8px 0; border: 0; border-radius: 14px; background: transparent; color: rgba(255, 255, 255, .6); font: 600 12.5px var(--font); cursor: pointer; }
.cz-tabs button.active { background: rgba(255, 255, 255, .12); color: #fff; }
.cz-pad { width: 100%; max-width: 640px; margin: 0 auto; padding: 16px; }
.cz-search { position: relative; display: block; }
.cz-search .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cz-search input { min-height: 56px; padding-left: 48px; font-size: 17px; border-radius: 16px; border: 0; }
.cz-note { font-size: 13px; opacity: .65; margin: 10px 4px 14px; }
.cz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cz-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.cz-list li .grow { display: grid; line-height: 1.3; }
.cz-list li small { font-size: 12.5px; opacity: .7; }
.cz-list li small.neg { color: #ff9aa2; opacity: 1; }
.cz-list .cz-empty { justify-content: center; opacity: .6; background: none; padding: 30px; }
.cz-time { font-family: var(--mono); font-size: 14px; opacity: .8; width: 46px; }
.cz-today-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cz-today-head h2 { font-size: 22px; }
.cz-today-head span { opacity: .7; }
.cz-avatar { flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: rgba(255, 255, 255, .2); color: #fff; font-size: 34px; font-weight: 750; }
.cz-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cz-avatar.sm { width: 40px; height: 40px; font-size: 14px; background: rgba(255, 255, 255, .14); }
.cz-result { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.cz-result.cz-ok { background: #0B7A43; }
.cz-result.cz-warn { background: #B86E00; }
.cz-result.cz-err { background: #B3101D; }
@keyframes fade { from { opacity: 0; } }
.cz-result-card { width: 100%; max-width: 440px; display: grid; justify-items: center; gap: 14px; text-align: center; }
.cz-result-icon { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); box-shadow: 0 0 0 14px rgba(255, 255, 255, .08); animation: pop .35s cubic-bezier(.2, .9, .3, 1.4); }
.cz-result-msg { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.cz-person { display: grid; justify-items: center; gap: 10px; padding: 18px; width: 100%; border-radius: 22px; background: rgba(0, 0, 0, .14); }
.cz-person > div:last-child { display: grid; }
.cz-person b { font-size: 24px; line-height: 1.2; }
.cz-person small { opacity: .85; font-size: 15px; }
.cz-saldo { font-size: 18px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.cz-saldo b { font-size: 22px; }
.cz-saldo.low { background: #fff; color: #8a5200; }
.cz-result-actions { display: flex; gap: 10px; margin-top: 6px; }
.cz-result-actions .btn { height: 52px; padding: 0 26px; font-size: 16px; }
.cz-result-timer { width: 60%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); overflow: hidden; margin-top: 4px; }
.cz-result-timer span { display: block; height: 100%; width: 100%; background: #fff; }
@media (min-width: 900px) and (orientation: landscape) {
  .cz-cam { width: min(460px, 60vh); }
}

/* =========================================================
   IMPRESIÓN (cartas y tarjetas)
   ========================================================= */
.layout-print { background: #e9edf3; }
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: #fff; box-shadow: var(--shadow); }
.letter { width: 210mm; min-height: 297mm; margin: 24px auto; padding: 22mm 20mm; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; page-break-after: always; break-after: page; }
.letter header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18mm; }
.letter header img { width: 58mm; }
.letter header span { text-align: right; font-size: 12px; color: var(--muted); }
.letter h1 { font-size: 26px; color: var(--blue-d); margin-bottom: 10mm; }
.letter p { font-size: 14.5px; }
.letter-grid { display: grid; grid-template-columns: 1fr auto; gap: 10mm; align-items: center; margin: 8mm 0; padding: 8mm; border-radius: 14px; background: var(--blue-xl); }
.letter-steps h2 { color: var(--blue-d); margin-bottom: 4mm; }
.letter-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14.5px; }
.letter-steps .code { font-size: 22px; letter-spacing: .15em; background: #fff; padding: 2px 10px; display: inline-block; }
.letter-qr { display: grid; justify-items: center; gap: 4px; }
.letter-qr canvas { width: 45mm; height: 45mm; background: #fff; border-radius: 8px; }
.letter footer { margin-top: auto; padding-top: 8mm; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cards-sheet { width: 210mm; margin: 24px auto; padding: 12mm; background: #fff; display: grid; grid-template-columns: repeat(2, 85.6mm); gap: 6mm; justify-content: center; box-shadow: var(--shadow); }
.id-card { width: 85.6mm; height: 54mm; border-radius: 3.5mm; overflow: hidden; display: grid; grid-template-columns: 1fr 36mm; align-items: center; gap: 2mm; padding: 4mm; border: .3mm solid #c9d3e0; background: linear-gradient(135deg, #fff 55%, var(--blue-xl)); position: relative; break-inside: avoid; }
.id-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2mm; background: var(--blue); }
.id-card-l { display: grid; gap: 1.2mm; padding-left: 2mm; align-content: start; height: 100%; }
.id-logo { width: 30mm; margin-bottom: 3mm; }
.id-name { font-weight: 750; font-size: 12.5pt; line-height: 1.15; color: var(--blue-d); }
.id-meta { font-size: 8pt; color: var(--muted); }
.id-tag { margin-top: auto; font-size: 7pt; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--red); }
.id-card canvas { width: 36mm; height: 36mm; }
@media print {
  @page { margin: 0; size: A4; }
  .no-print { display: none !important; }
  body.layout-print { background: #fff; }
  .letter { margin: 0; box-shadow: none; }
  .cards-sheet { margin: 0; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.qr-hint .i { margin: -2px 4px 0 0; }

/* ---------- QR fijo para guardar / imprimir ---------- */
.pass { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 48, 92, .08), 0 18px 48px rgba(0, 48, 92, .16); }
.pass-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: linear-gradient(135deg, #0A5FB0, #00305C); color: #fff; overflow: hidden; }
.pass-head::after { content: ""; position: absolute; right: -60px; top: -80px; width: 180px; height: 180px; border-radius: 50%; border: 18px solid rgba(227, 0, 15, .85); clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); transform: rotate(-24deg); }
.pass-head img { width: 120px; position: relative; z-index: 1; }
.pass-head span { position: relative; z-index: 1; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; opacity: .9; }
.pass-body { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 18px 20px 22px; }
.pass-body > small { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.pass-body > b { font-size: 21px; color: var(--blue-d); }
.pass-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 6px 0 14px; }
.pass-meta span { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--blue-xl); color: var(--blue-d); font-weight: 600; }
.pass canvas { width: min(240px, 70vw); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.pass-foot { margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.save-btns { display: grid; gap: 10px; }
@media print {
  .layout-app .app-top, .layout-app .tabbar, .layout-app .save-btns, .layout-app .card, .layout-app .tip, .layout-app .app-main > p, .layout-app .toast { display: none !important; }
  .layout-app { background: #fff; padding: 0; }
  .layout-app .pass { width: 90mm; margin: 15mm auto; box-shadow: none; border: .3mm solid #c9d3e0; }
}
.fixed-note { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); font-size: 13.5px; }
.baja-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-bg); color: #6e4100; font-size: 13.5px; }

/* ---------- Usuarios y accesos ---------- */
.role-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.role-card { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; border: 2px solid transparent; transition: border-color .15s, transform .1s; }
.role-card:hover { transform: translateY(-1px); }
.role-card.active { border-color: var(--blue); }
.role-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.role-admin .role-ico { background: #E9E5F7; color: #4B3A9C; }
.role-rrhh .role-ico { background: var(--blue-xl); color: var(--blue); }
.role-cantina .role-ico { background: var(--warn-bg); color: var(--warn); }
.role-txt { display: grid; gap: 3px; min-width: 0; }
.role-txt b { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.role-txt em { font-style: normal; font-size: 12.5px; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); display: inline-grid; place-items: center; }
.role-txt small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.role-lock { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; color: var(--muted); }
.role-badge-admin { background: #E9E5F7; color: #4B3A9C; }
.role-badge-rrhh { background: var(--blue-xl); color: var(--blue); }
.role-badge-cantina { background: var(--warn-bg); color: var(--warn); }
.role-badge-empleado { background: var(--line-2); color: var(--muted); }
.tabs-inline { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs-inline a { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none !important; }
.tabs-inline a:hover { background: var(--line-2); }
.tabs-inline a.active { background: var(--blue); color: #fff; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; gap: 4px; padding: 16px; border: 2px solid var(--line); border-radius: 14px; height: 100%; transition: border-color .15s, background .15s; }
.choice span .i { color: var(--blue); margin-bottom: 4px; }
.choice small { color: var(--muted); font-size: 12.5px; }
.choice input:checked + span { border-color: var(--blue); background: var(--blue-xl); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 78, 158, .25); }
.radio-list { display: grid; gap: 8px; margin-bottom: 4px; }
.radio-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-row input { margin-top: 3px; }
.radio-row span { display: grid; }
.radio-row small { color: var(--muted); font-size: 12.5px; }
.radio-row:has(input:checked) { border-color: var(--blue); background: var(--blue-xl); }
.new-user .panel > h2 { margin-bottom: 14px; }
.new-user .seg { margin-bottom: 14px; }
.role-switch { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.role-switch .seg-opt span { padding: 10px 14px; }
.role-switch .btn { height: auto; min-height: 44px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; }
.timeline li > div { display: grid; line-height: 1.3; }
.timeline b { font-size: 14px; font-weight: 600; }
.timeline small { font-size: 12.5px; }
.t-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--blue-l); box-shadow: 0 0 0 3px var(--blue-xl); }
.t-dot.warn { background: #F2B544; box-shadow: 0 0 0 3px var(--warn-bg); }
.device { display: flex; gap: 20px; align-items: flex-start; }
.device-qr { flex: none; padding: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.device-qr canvas { display: block; width: 150px; height: 150px; image-rendering: pixelated; }
.device ol { margin: 8px 0 10px; padding-left: 18px; display: grid; gap: 6px; }
.mini-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-stats span { padding: 6px 12px; border-radius: 10px; background: var(--bg); font-size: 13px; color: var(--muted); }
.mini-stats b { color: var(--ink); font-size: 15px; }
.action-details > summary { list-style: none; cursor: pointer; }
.action-details > summary::-webkit-details-marker { display: none; }
.action-details[open] > summary { background: var(--bg); }
.pad-form { padding: 6px 12px 14px 66px; gap: 10px; }
.quick-link { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--bg); color: var(--ink); text-decoration: none !important; margin-bottom: 10px; }
.quick-link:hover { background: var(--blue-xl); }
.quick-link > .i:first-child { color: var(--blue); }
.quick-link span { flex: 1; display: grid; }
.quick-link small { color: var(--muted); font-size: 12.5px; }
.fixed-note.neutral { background: var(--bg); color: var(--ink-2); }
@media (max-width: 900px) { .role-cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .device { flex-direction: column; align-items: center; text-align: left; }
  .pad-form { padding-left: 12px; }
  .role-switch .seg-opt { flex: 1 1 100%; }
}

/* =========================================================
   APP DEL EMPLEADO EN EL PC + MÓVIL VINCULADO
   ========================================================= */
.app-side { display: none; }
.app-cols { display: grid; gap: 16px; }
.col-main, .col-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 960px) {
  .layout-app { padding: 0 0 0 248px; }
  .app-top, .tabbar { display: none !important; }
  .app-side { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 248px; padding: 20px 14px; background: #fff; border-right: 1px solid var(--line); z-index: 30; }
  .app-side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; margin-bottom: 12px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; }
  .app-side-brand img { width: 52px; }
  .app-side-brand span { display: grid; line-height: 1.2; }
  .app-side-brand b { color: var(--blue-d); font-size: 16px; }
  .app-side-brand small { color: var(--muted); font-size: 12px; }
  .app-side nav { display: grid; gap: 2px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
  .app-side .nav-h { display: block; padding: 12px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .app-side nav a { padding: 8px 12px !important; }
  .app-side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 550; text-decoration: none !important; }
  .app-side nav a:hover { background: var(--bg); }
  .app-side nav a.active { background: var(--blue-xl); color: var(--blue-d); }
  .app-side nav a.active .i { color: var(--blue); }
  .app-side-foot { margin-top: auto; display: grid; gap: 10px; }
  .side-pill { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--blue-d); font-weight: 600; font-size: 13.5px; text-decoration: none !important; }
  .app-side-me { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-2); }
  .app-side-me > div { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
  .app-side-me b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-side-me small { font-size: 12px; color: var(--muted); }
  .app-main { max-width: 1040px; margin: 0; padding: 32px 40px 48px; }
  .app-cols { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .pair-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}
.link-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; text-decoration: none !important; box-shadow: var(--shadow); }
.link-card > span:nth-child(2) { flex: 1; display: grid; }
.link-card small { opacity: .85; font-size: 13px; }
.link-card-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }

/* Vincular móvil */
.pair-grid { display: grid; gap: 16px; align-items: start; }
.pair-main h2 { font-size: 20px; margin-bottom: 6px; }
.pair-steps { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 14px; }
.pair-steps li { display: flex; gap: 14px; align-items: flex-start; }
.pair-steps li > span { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-xl); color: var(--blue); font-weight: 700; }
.pair-steps li > div { display: grid; }
.pair-steps small { color: var(--muted); font-size: 13px; }
.pair-here { margin-top: 10px; }
.pair-live, .pair-ok, .pair-exp { display: grid; justify-items: center; text-align: center; gap: 8px; }
.pair-qr { padding: 12px; border-radius: 20px; background: #fff; box-shadow: 0 6px 24px rgba(0, 48, 92, .14); border: 1px solid var(--line-2); margin: 8px 0; }
.pair-qr canvas { display: block; width: min(260px, 68vw); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.pair-code-l { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.pair-code { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: .14em; color: var(--blue-d); background: var(--blue-xl); padding: 6px 18px; border-radius: 12px; }
.pair-code span { opacity: .4; margin: 0 2px; }
.pair-code.small-code { font-size: 26px; text-align: center; margin-bottom: 4px; }
.pair-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 6px 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--blue-l); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pair-done { display: grid; justify-items: center; text-align: center; gap: 10px; }
.pair-done form, .pair-done .btn { width: 100%; }
.pair-hero { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--blue-xl); color: var(--blue); margin-bottom: 18px; }
.pair-login { margin-top: 10px; }
.device-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg); margin-bottom: 12px; }
.device-row .grow { display: grid; line-height: 1.3; }
.device-ico { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--line-2); color: var(--muted); }
.device-ico.on { background: var(--ok-bg); color: var(--ok); }
.vinc-cam { position: relative; width: 100%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #000; }
.vinc-cam video { width: 100%; height: 100%; object-fit: cover; }
.vinc-close { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, .9); color: var(--ink); }

/* Instalar la app */
.install { display: grid; gap: 16px; max-width: 520px; }
.install-ok { display: grid; justify-items: center; text-align: center; gap: 6px; padding-top: 8px; }
.install-ok h1 { font-size: 26px; }
.install-ok p { margin: 0; }
.install-card { display: grid; gap: 14px; }
.install-app { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.install-app img { border-radius: 16px; box-shadow: var(--shadow); }
.install-app div { display: grid; }
.install-app small { color: var(--muted); font-size: 13px; }
.install-lead { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0 0 4px; }
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; }
.install-steps .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; }
.install-steps li > div { line-height: 1.5; }
.install-steps small { display: block; color: var(--muted); font-size: 12.5px; }
.ios-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 0 4px; border-radius: 8px; background: var(--blue-xl); color: var(--blue); vertical-align: middle; }
.ios-arrow { display: grid; place-items: center; color: var(--blue); transform: rotate(90deg); animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: rotate(90deg) translateX(6px); } }

/* =========================================================
   ASISTENCIA («¿vienes a comer?»), AVISOS Y VISITAS
   ========================================================= */
.asis { display: grid; gap: 12px; border-radius: 18px; text-decoration: none !important; }
.asis-ask { padding: 18px; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%); color: #fff; box-shadow: var(--shadow); }
.asis-q { display: flex; gap: 12px; align-items: center; }
.asis-q > div { display: grid; line-height: 1.25; }
.asis-q b { font-size: 18px; }
.asis-q small { opacity: .85; font-size: 13px; }
.asis-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.asis-btns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.asis-btns .btn { width: 100%; }
.asis-link { color: #fff; opacity: .85; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; justify-self: start; }
.asis-done { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); background: var(--card); box-shadow: var(--shadow); }
.asis-done > span:nth-child(2) { flex: 1; display: grid; line-height: 1.3; }
.asis-done small { color: var(--muted); font-size: 12.5px; }
.asis-done .asis-ico { width: 38px; height: 38px; }
.asis-done.si .asis-ico { background: var(--ok-bg); color: var(--ok); }
.asis-done.no .asis-ico { background: var(--line-2); color: var(--muted); }

.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.day { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); }
.day .grow { display: grid; line-height: 1.3; }
.day .grow small { font-size: 12.5px; }
.day.is-si { background: var(--ok-bg); border-color: transparent; }
.day.is-no { background: var(--bg); border-color: transparent; }
.day.is-pend { border-color: var(--warn-bg); border-width: 2px; }
.day-date { width: 44px; height: 48px; border-radius: 12px; background: #fff; color: var(--blue-d); display: grid; place-items: center; align-content: center; line-height: 1.05; flex: none; box-shadow: 0 0 0 1px var(--line-2); }
.day-date b { font-size: 18px; }
.day-date small { font-size: 10.5px; text-transform: uppercase; font-weight: 700; opacity: .75; }
.yn { display: flex; gap: 6px; }
.yn-btn { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: 600 13.5px var(--font); cursor: pointer; }
.yn-btn.yes.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.yn-btn.no.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.yn-btn:hover:not(.on) { border-color: #b9c6d8; }
@media (max-width: 380px) { .yn-btn span { display: none; } }
.push-card .btn { margin-top: 6px; }

.visit-card { display: grid; gap: 12px; }
.visit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.visit-head h2 { font-size: 22px; }
.center-qr { justify-self: center; }

/* Ajustes */
.days-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.days-pick label { position: relative; cursor: pointer; }
.days-pick input { position: absolute; opacity: 0; }
.days-pick span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; color: var(--muted); }
.days-pick input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.days-pick input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 78, 158, .25); }
.cron-box { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--bg); display: grid; gap: 6px; }
.cron-box > b { display: flex; align-items: center; gap: 6px; }
.cron-box > * { min-width: 0; }
.cron-box p { margin: 0; }
.cron-url { display: flex; gap: 8px; align-items: center; min-width: 0; }
.cron-url code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 8px 10px; background: #fff; border: 1px solid var(--line); }
.kpi-of { font-size: 16px; font-weight: 600; opacity: .8; letter-spacing: 0; }
.warn-text { color: var(--warn); font-weight: 700; }

/* Cantina: previsión y visitas */
.cz-count small { font-size: 14px; opacity: .75; margin-left: 2px; }
.cz-prev { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.cz-prev:empty { display: none; }
.cz-prev-card { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .08); display: grid; gap: 6px; }
.cz-prev-card.next { background: rgba(255, 255, 255, .04); border: 1px dashed rgba(255, 255, 255, .2); }
.cz-prev-card small { opacity: .7; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.cz-prev-n { display: flex; align-items: baseline; gap: 8px; }
.cz-prev-n b { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cz-prev-n span { opacity: .75; }
.cz-prev-det { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; opacity: .85; }
.cz-prev-det .warn { color: #ffcf7a; }
.cz-prev-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.cz-prev-bar i { display: block; height: 100%; background: #5ee29a; border-radius: 6px; }
#cz-visitas .cz-list { margin-bottom: 18px; }
#cz-visitas .btn { flex: none; }
.cz-result.cz-visit { background: #0A5FB0; }
.cz-tag { padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .2); font-weight: 600; font-size: 15px; }
.cz-vblock { display: grid; justify-items: center; gap: 8px; width: 100%; padding: 18px; border-radius: 22px; background: rgba(0, 0, 0, .14); }
.cz-vblock > b { font-size: 24px; }
.cz-vblock > small { opacity: .85; font-size: 15px; }
.cz-vblock-count { font-size: 16px; }
.cz-vblock-count b { font-size: 22px; }
.cz-vblock-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* Cantina: avisos de visitas tardías */
.cz-alerts { position: fixed; z-index: 55; left: 12px; right: 12px; top: 70px; display: grid; gap: 8px; pointer-events: none; }
.cz-alert { pointer-events: auto; display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 0; color: #fff; font: inherit; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: pop .35s cubic-bezier(.2, .9, .3, 1.3); }
.cz-alert.new { background: #E3000F; }
.cz-alert.off { background: #5C6878; }
.cz-alert b { font-size: 15px; }
.cz-alert span { font-size: 17px; font-weight: 600; }
.cz-alert small { opacity: .8; font-size: 12px; }
.cz-next-vis { list-style: none; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 4px; font-size: 13px; opacity: .9; }

/* =========================================================
   MENÚ, ELECCIÓN DE SEGUNDO, VALORACIONES, SIN CONEXIÓN
   ========================================================= */
.cz-tabs { grid-template-columns: repeat(4, 1fr); }
.cz-tab-link { display: grid; justify-items: center; gap: 2px; padding: 8px 0; border-radius: 14px; color: rgba(255, 255, 255, .6); font: 600 12.5px var(--font); text-decoration: none !important; }
.cz-net { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.cz-net.off { background: #E3000F; color: #fff; }
.cz-net.sync { background: #F2B544; color: #3b2a00; }
.cz-result.cz-off { background: #8a5a00; }
.cz-alert.sync { background: #0B7A43; }
.cz-elec { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cz-elec span { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 13px; }
.cz-menu-warn { display: inline-block; margin-top: 6px; color: #ffcf7a; font-size: 13px; font-weight: 600; }

/* Editor del menú (cantina) */
.layout-cantina.cz-page { min-height: 100vh; }
.cz-page .cz-top { position: sticky; top: 0; z-index: 5; }
.menu-ed { display: grid; gap: 16px; padding-bottom: 40px; }
.day-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day-chips a { flex: none; display: grid; text-align: center; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none !important; line-height: 1.2; }
.day-chips a small { font-size: 11px; opacity: .65; }
.day-chips a.active { background: #fff; color: var(--blue-d); }
.menu-sec { display: grid; gap: 10px; }
.menu-sec h2 { font-size: 17px; }
.menu-sec h2 small { opacity: .6; font-weight: 400; }
.menu-sec input:not([type]), .menu-sec input[name] { background: rgba(255, 255, 255, .95); }
.alg-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.alg { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #FFF2DB; color: #7a4700; }
.alg-row small { font-size: 11.5px; opacity: .6; }
.alg-pick summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.alg-pick summary small { opacity: .65; font-weight: 400; }
.alg-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.alg-grid label { position: relative; cursor: pointer; }
.alg-grid input { position: absolute; opacity: 0; }
.alg-grid span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); font-size: 13px; }
.alg-grid input:checked + span { background: #F2B544; border-color: #F2B544; color: #3b2a00; font-weight: 700; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg3 label { position: relative; cursor: pointer; }
.seg3 input { position: absolute; opacity: 0; }
.seg3 span { display: block; text-align: center; padding: 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, .08); font-weight: 600; }
.seg3 input:checked + span { background: #fff; color: var(--blue-d); }
.menu-foto { width: 100%; max-height: 260px; object-fit: cover; border-radius: 16px; }
.check.light { color: #fff; margin-bottom: 10px; }
.menu-pub { padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .12); }

/* Menú en la app del empleado */
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.day-tabs a { flex: none; width: 56px; display: grid; justify-items: center; padding: 8px 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); text-decoration: none !important; line-height: 1.1; }
.day-tabs a small { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.day-tabs a b { font-size: 19px; }
.day-tabs a.active { background: var(--blue); color: #fff; }
.day-tabs a.active small { color: rgba(255, 255, 255, .8); }
.menu-card { display: grid; gap: 10px; }
.menu-card .menu-foto { max-height: 220px; }
.menu-nota { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--blue-xl); color: var(--blue-d); font-size: 14px; }
.menu-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 0; }
.menu-dishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu-dishes li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.menu-dishes li .grow { display: grid; }
.menu-dishes li.chosen { background: var(--ok-bg); }
.menu-dishes .yn-btn { flex: none; }
.menu-mini { display: grid; gap: 2px; color: var(--ink); text-decoration: none !important; }
.menu-mini .card-row { margin-bottom: 6px; }
.pick-card { display: grid; gap: 8px; }
.pick-2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.day .pick-2 { flex-basis: 100%; padding-left: 56px; }
.day { flex-wrap: wrap; }
.chip-btn { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: 600 13px var(--font); cursor: pointer; }
.chip-btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.rate-card { display: grid; gap: 10px; }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 34px; line-height: 1; color: var(--line); cursor: pointer; transition: color .1s, transform .1s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #F2B544; }
.stars input:focus-visible + label { transform: scale(1.15); }
.avisos-pref { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.avisos-pref .check { font-size: 13.5px; }
.avisos-pref .btn { justify-self: start; }

/* Conciliación, valoraciones y fiabilidad (RRHH) */
.conc-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; }
.conc-arrow { color: var(--muted); display: grid; place-items: center; }
@media (max-width: 900px) { .conc-flow { grid-template-columns: 1fr; } .conc-arrow { transform: rotate(90deg); } }
.print-only { display: none; }
.rating-big { display: grid; justify-items: end; line-height: 1; }
.rating-big b { font-size: 32px; font-weight: 800; color: var(--blue-d); }
.stars-ro { font-size: 16px; letter-spacing: 2px; background: linear-gradient(90deg, #F2B544 var(--v), var(--line) var(--v)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 4px; }
.comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 420px; overflow-y: auto; }
.comments li { padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.comments p { margin: 4px 0 0; font-size: 14px; }
.comments .muted.small { color: #b07a00; }
@media print {
  .layout-rrhh .sidebar, .layout-rrhh .topbar, .layout-rrhh .no-print, .layout-rrhh .toast { display: none !important; }
  .layout-rrhh .shell { display: block; }
  .layout-rrhh .content { padding: 12mm; max-width: none; }
  .layout-rrhh .panel, .layout-rrhh .kpi { box-shadow: none; border: 1px solid #dce3ee; }
  .layout-rrhh .grid-main { display: block; }
  .print-only { display: block; margin-bottom: 10px; }
  .kpi-hero { background: #fff !important; color: var(--ink) !important; border: 2px solid var(--blue) !important; }
  .kpi-hero .kpi-l, .kpi-hero .kpi-s { color: var(--muted) !important; }
}
.menu-mini { gap: 8px; }
.mm-row { display: grid; gap: 1px; font-size: 14px; line-height: 1.35; }
.mm-row small { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

/* =========================================================
   CARRUSEL «MI QR» + VISITAS + INVITACIÓN
   ========================================================= */
.tabbar { grid-template-columns: repeat(5, 1fr); }
.tabbar a span { white-space: nowrap; font-size: 11px; }
.qr-car { display: grid; gap: 10px; min-width: 0; }
.qr-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none; border-radius: 22px; }
.qr-track::-webkit-scrollbar { display: none; }
.qr-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; min-width: 0; padding: 4px 10px 34px; display: flex; }
.qr-track { margin: -4px -10px -24px; }
.qr-slide > * { flex: 1; }
.qr-nav { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: -4px; }
.qr-dots { display: flex; gap: 6px; }
.qr-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: width .2s, background .2s; }
.qr-dot.on { width: 22px; background: var(--blue); }
.qr-nav .icon-btn { width: 32px; height: 32px; }
@media (hover: none) { .qr-nav .icon-btn { display: none; } }

.vticket { display: grid; gap: 10px; align-content: start; padding: 0 0 18px; border-radius: 22px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 48, 92, .08), 0 18px 48px rgba(0, 48, 92, .16); text-decoration: none !important; color: var(--ink); }
.vticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 20px 52px; background: linear-gradient(135deg, #0A5FB0 0%, #00305C 100%); color: #fff; }
.vticket-head > div { display: grid; line-height: 1.25; min-width: 0; }
.vticket-head small { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; opacity: .75; font-weight: 600; }
.vticket-head b { font-size: 18px; overflow-wrap: anywhere; }
.vticket-qr { width: min(240px, calc(100% - 48px)); aspect-ratio: 1; margin: -40px auto 0; padding: 4px; background: #fff; border-radius: 18px; box-shadow: 0 6px 24px rgba(0, 48, 92, .18); }
.vticket-qr canvas { width: 100%; height: 100%; display: block; border-radius: 14px; image-rendering: pixelated; }
.vticket .share { padding: 0 16px; }
.vticket-more { justify-self: center; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.vadd { justify-items: center; text-align: center; align-content: center; gap: 12px; padding: 34px 26px; min-height: 380px; border: 2px dashed var(--blue-l); box-shadow: none; background: linear-gradient(180deg, #fff, var(--blue-xl)); }
.vadd-ico { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: 0 8px 22px rgba(0, 78, 158, .3); }
.vadd b { font-size: 19px; color: var(--blue-d); }
.vadd small { color: var(--muted); font-size: 13.5px; max-width: 280px; }

.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share .btn { flex: 1 1 auto; }
.share [data-share] { flex-basis: 100%; }
.share-sm .btn { height: 38px; font-size: 13.5px; padding: 0 12px; }
.share-wa { color: #128C7E; }
.share-box { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: var(--bg); }
.share-box small { font-size: 12.5px; }

/* Página pública de la invitación */
.layout-guest { background: var(--bg); }
.guest { max-width: 460px; margin: 0 auto; padding: 24px 16px 40px; display: grid; gap: 16px; }
.guest-logo { width: 150px; justify-self: center; margin-bottom: 4px; }
.guest-card { display: grid; gap: 12px; }
.guest-card.center { justify-items: center; text-align: center; padding: 32px 22px; }
.guest-card.center .i { color: var(--warn); }
.guest-head { display: grid; gap: 2px; text-align: center; }
.guest-head small { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.guest-head h1 { font-size: 26px; color: var(--blue-d); }
.guest-head p { margin: 0; color: var(--ink-2); }
.guest-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.qr-slide > .ticket, .qr-slide > .vticket { box-shadow: 0 1px 2px rgba(0, 48, 92, .08), 0 10px 24px rgba(0, 48, 92, .12); }

/* =========================================================
   VACACIONES
   ========================================================= */
:root { --vac: #0E7C45; --vac-bg: #E3F4EA; --prop: #B45F00; --prop-bg: #FFF0DC; }
.vac-hero { display: grid; gap: 12px; padding: 20px; border-radius: 20px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #1E9A5C 0%, transparent 55%), linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%); box-shadow: var(--shadow); }
.vac-big { display: flex; align-items: center; gap: 14px; }
.vac-big b { font-size: 56px; line-height: 1; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.vac-big span { font-size: 14.5px; line-height: 1.3; opacity: .9; }
.vac-calc { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vac-calc li { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .13); font-size: 12.5px; }
.vac-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vac-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; background: #fff; color: var(--blue-d); font-size: 13px; font-weight: 600; }
.vac-chip.ok { color: var(--vac); }
.vac-chip.warn { color: var(--warn); }
.vac-apr { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; opacity: .85; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); }
.seg2 label { position: relative; cursor: pointer; }
.seg2 input { position: absolute; opacity: 0; }
.seg2 span { display: block; text-align: center; padding: 9px 6px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.seg2 input:checked + span { background: #fff; color: var(--blue-d); box-shadow: var(--shadow); }
.seg2 input:disabled + span { opacity: .45; cursor: not-allowed; }
.seg2 input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.vac-count { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 13.5px; color: var(--ink-2); }
.vac-count.ok { background: var(--ok-bg); color: #0a5a33; }
.vac-count.err { background: var(--err-bg); color: #8e0d17; }
.date-tile.dt-p { background: var(--prop-bg); color: var(--prop); }
.day.is-vac { background: var(--vac-bg); border-color: transparent; }
.day.is-vac .yn { opacity: .55; }
.asis-done.vac .asis-ico { background: var(--vac-bg); color: var(--vac); }
.vac-link { background: linear-gradient(135deg, #12804A, #0B5A35); }
.vac-edit summary { cursor: pointer; font-weight: 600; color: var(--blue); margin-top: 12px; }
.vac-edit .form { margin-top: 12px; }

/* Calendario anual (como el de la empresa) */
.ycal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 12px; }
@media (min-width: 700px) { .ycal { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 18px; } }
.num-in { width: 76px; min-height: 34px; text-align: right; }
.ycal-m > b { display: block; padding: 4px 0; margin-bottom: 4px; border-radius: 8px; background: var(--blue); color: #fff; text-align: center; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.ycal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ycal-g i { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--blue); }
.ycal-g span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; }
.ycal-g .k-w { color: var(--muted); background: var(--line-2); border-radius: 6px; }
.ycal-g .k-f { background: var(--blue-d); color: #fff; }
.ycal-g .k-v { background: var(--vac); color: #fff; font-weight: 700; }
.ycal-g .k-vq { box-shadow: inset 0 0 0 2px var(--vac); color: var(--vac); font-weight: 700; }
.ycal-g .k-p { background: var(--prop); color: #fff; font-weight: 700; }
.ycal-g .k-pq { box-shadow: inset 0 0 0 2px var(--prop); color: var(--prop); font-weight: 700; }
.ycal-g .k-hoy { outline: 2px solid var(--red); outline-offset: -1px; }
.ycal-ley { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.ycal-ley span { display: inline-flex; align-items: center; gap: 6px; }
.ycal-ley i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.ycal-ley .k-v { background: var(--vac); }
.ycal-ley .k-vq { box-shadow: inset 0 0 0 2px var(--vac); }
.ycal-ley .k-p { background: var(--prop); }
.ycal-ley .k-f { background: var(--blue-d); }

/* Tabla mensual del equipo */
.mcal-wrap { overflow-x: auto; margin: 0 -4px 12px; padding: 0 4px; }
.mcal { border-collapse: separate; border-spacing: 2px; font-size: 12px; min-width: 100%; }
.mcal th, .mcal td { min-width: 24px; height: 26px; padding: 0; text-align: center; font-weight: 600; border-radius: 5px; }
.mcal thead th { color: var(--ink-2); line-height: 1.05; font-variant-numeric: tabular-nums; }
.mcal thead th small { display: block; font-size: 9.5px; color: var(--muted); }
.mcal thead th.k-w { color: var(--muted); }
.mcal thead th.k-hoy { background: var(--red); color: #fff; }
.mcal thead th.k-hoy small { color: #fff; }
.mcal .mcal-n { position: sticky; left: 0; z-index: 1; min-width: 110px; max-width: 150px; padding: 0 8px 0 2px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--card); font-weight: 600; }
.mcal tbody td { background: #E9EEF6; }
.mcal tbody td.k-w { background: transparent; }
.mcal tbody td.k-f { background: var(--blue-l); }
.mcal tbody td.k-v { background: var(--vac); }
.mcal tbody td.k-vq { background: repeating-linear-gradient(45deg, var(--vac-bg) 0 4px, #A8DABD 4px 8px); }
.mcal tbody td.k-p { background: var(--prop); }
.mcal tbody td.k-pq { background: repeating-linear-gradient(45deg, var(--prop-bg) 0 4px, #F2C98F 4px 8px); }
.mcal .mcal-t { min-width: 46px; color: var(--muted); }
.mcal tfoot td { color: var(--ink-2); }
.mcal tfoot td.mcal-alto { background: var(--warn-bg); color: var(--warn); }

/* Solicitudes por aprobar (responsable) */
.vac-reqs { display: grid; gap: 12px; }
.vac-req { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); }
.vac-req header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.vac-req header > div { display: grid; line-height: 1.3; }
.vac-req header small { font-size: 12.5px; }
.vac-req p { margin: 0; }
.vac-req-when { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--blue-d); }
.vac-co { display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); color: #6e4100; font-size: 13px; }
.vac-co .i { margin-top: 2px; flex: none; }
.vac-req-act { display: grid; gap: 8px; }
.vac-req-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* =========================================================
   INICIO DE ATENEA: un bloque por apartado
   ========================================================= */
.sec-grid { display: grid; gap: 16px; }
@media (min-width: 960px) { .sec-grid { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.sec { display: grid; gap: 12px; align-content: start; padding: 18px; border-radius: 22px; color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.sec::after { content: ""; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .07); pointer-events: none; }
.sec-comedor { background: linear-gradient(135deg, #0A5FB0 0%, var(--blue-d) 100%); }
.sec-vac { background: linear-gradient(135deg, #16934F 0%, #0B5A35 100%); }
.sec-head { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.sec-head b { flex: 1; font-size: 19px; letter-spacing: -.01em; }
.sec-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.sec-big { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sec-big > div { display: flex; align-items: center; gap: 12px; }
.sec-big b { font-size: 52px; line-height: 1; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.sec-big span { font-size: 14px; line-height: 1.25; opacity: .9; }
.sec-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .15); font-size: 12.5px !important; font-weight: 600; opacity: 1 !important; }
.sec-line { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 13.5px; text-decoration: none !important; }
.sec-line span { flex: 1; min-width: 0; }
.sec-ask { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: #fff; color: var(--ink); }
.sec-ask > span { display: grid; line-height: 1.25; }
.sec-ask small { color: var(--muted); font-size: 12px; }
.sec-ask > div { display: flex; gap: 6px; }
.sec .sec-ask .btn-light { background: var(--blue); color: #fff; }
.sec-ask .btn-ghost-light { color: var(--ink-2); border-color: var(--line); }
.sec .btn-light { color: var(--blue-d); }
.sec-vac .btn-light { color: #0B5A35; }
.sec-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.sec-more { display: grid; gap: 12px; margin-top: 16px; }

.vac-hab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 13.5px; }
.vac-hab span { flex: 1; }
.vac-hab.on { background: var(--vac-bg); color: #0a5a33; font-weight: 600; }

/* Firma al pie */
.firma { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin: 18px 0 4px; padding: 6px 0; font-size: 12px; color: var(--muted); opacity: .85; text-align: center; letter-spacing: .01em; }
.firma b { font-weight: 650; color: var(--ink-2); }
.firma span { display: inline-flex; align-items: center; gap: 4px; }
.firma-heart { color: var(--red); vertical-align: -2px; animation: latido 2.4s ease-in-out infinite; }
@keyframes latido { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.22); } 90% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .firma-heart { animation: none; } }
.auth-panel .firma { margin-top: 6px; }
@media print { .firma { display: none; } }

/* =========================================================
   ATENEA: logo (lechuza) y MATERIAL
   ========================================================= */
.brand-owl { border-radius: 22%; }
.app-logo.brand-owl { width: 34px; height: 34px; }
.app-side-brand img.brand-owl { width: 44px; height: 44px; }
.brand img.brand-owl { width: 40px; height: 40px; }
.auth-owl { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-owl img { width: 64px; height: 64px; border-radius: 22%; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); outline: 2px solid rgba(255, 255, 255, .25); }
.auth-owl b { font-size: 30px; letter-spacing: -.02em; }
.auth-feats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.auth-feats span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-weight: 600; font-size: 14px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin: -16px 0 22px; }
.auth-brand img { width: 46px; height: 46px; border-radius: 22%; }
.auth-brand span { display: grid; line-height: 1.2; }
.auth-brand b { font-size: 20px; color: var(--blue-d); }
.auth-brand small { color: var(--muted); font-size: 12.5px; }
.sec-mat { background: linear-gradient(135deg, #4A5A70 0%, #26313F 100%); }
.sec-mat .btn-light { color: #26313F; }
@media (min-width: 960px) { .sec-grid:has(.sec-mat) { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.mat-list .mat-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--blue-xl); color: var(--blue); }
.mat-list .mat-epi { background: #FFF2DB; color: #9A5B00; }
.mat-list .mat-tarjetas { background: #FDE7E8; color: #C1121F; }
.mat-list .mat-vehiculo { background: #E3F4EA; color: #0E7C45; }
.mat-list .mat-llaves { background: #EEE8F8; color: #5B3FA0; }
.mat-list li { flex-wrap: wrap; }
.mat-reqs { display: grid; gap: 12px; }
.mat-req { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); }
.mat-req.is-dev { border-color: var(--err-bg); background: #FFF8F8; }
.mat-req header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mat-req header > div { display: grid; line-height: 1.3; }
.mat-req p { margin: 0; }
.mat-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mat-act input, .mat-act select { min-height: 34px; flex: 1 1 140px; width: auto; }
.mat-kits { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.mat-kits .chip-btn.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.mat-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; }
.mat-cat input, .mat-cat select { min-height: 34px; font-size: 13.5px; }
.mat-kit-ed { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.mat-kit-ed summary { cursor: pointer; font-weight: 600; }
.mat-kit-ed .form { margin-top: 10px; }
.acta-t { width: 100%; border-collapse: collapse; margin: 8mm 0; font-size: 12.5px; }
.acta-t th, .acta-t td { border: 1px solid #CBD3DF; padding: 6px 8px; text-align: left; vertical-align: top; }
.acta-t th { background: var(--blue-xl); color: var(--blue-d); }
.acta-firmas { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 16mm; padding-top: 20mm; }
.acta-firmas div { border-top: 1px solid #333; padding-top: 6px; font-size: 12px; color: var(--muted); }

.mat-list li { align-items: flex-start; }
.mat-list .mat-badge { margin-top: 4px; }
.mat-list .mat-ok { margin-left: auto; align-self: center; }
@media (max-width: 520px) { .mat-list .mat-ok { flex-basis: 100%; padding-left: 50px; } .mat-list .mat-ok .btn { width: 100%; } }
@media (min-width: 861px) { .auth-brand { display: none; } }

/* Buscador de personas */
.pp { position: relative; min-width: 0; }
.pp-in { width: 100%; }
.pp-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.pp-list li { display: grid; padding: 8px 10px; border-radius: 8px; cursor: pointer; line-height: 1.25; }
.pp-list li small { color: var(--muted); font-size: 12px; }
.pp-list li.on, .pp-list li:hover { background: var(--blue-xl); }
.pp-list li.pp-vacio b { font-weight: 500; color: var(--muted); font-style: italic; }
.pp-list li.pp-nada { color: var(--muted); cursor: default; }
.filters .pp { flex: 1 1 260px; max-width: 420px; }
.filters .pp-in { min-height: 40px; }

.mat-rows { display: grid; gap: 2px; }
.mat-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4px 12px; align-items: center; padding: 3px 0; }
.mat-row-who { visibility: hidden; }
.mat-row:has(input[type=checkbox]:checked) .mat-row-who { visibility: visible; }
.mat-row:has(input[type=checkbox]:checked) { background: var(--blue-xl); border-radius: 10px; padding: 3px 6px; margin: 0 -6px; }
.mat-row-who .pp-in { min-height: 34px; font-size: 13px; }
@media (max-width: 700px) { .mat-row { grid-template-columns: 1fr; } .mat-row-who { display: none; } .mat-row:has(input:checked) .mat-row-who { display: block; } }
.mat-who { display: grid; gap: 2px; margin-top: 6px; min-width: 190px; }
.mat-who .pp-in, .mat-gestor .pp-in { min-height: 32px; font-size: 13px; }
.mat-gestor { min-width: 200px; }

/* Permisos, justificantes y calendario */
.seg2.seg2-3 { grid-template-columns: repeat(3, 1fr); }
.vac-permiso { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #F4F0FB; }
.vac-permiso[hidden] { display: none; }
.date-tile.dt-x { background: #EEE8F8; color: #5B3FA0; }
:root { --perm: #6B4FBB; }
.ycal-g .k-x { background: var(--perm); color: #fff; font-weight: 700; }
.ycal-g .k-xq { box-shadow: inset 0 0 0 2px var(--perm); color: var(--perm); font-weight: 700; }
.ycal-ley .k-x { background: var(--perm); }
.mcal tbody td.k-x { background: var(--perm); }
.mcal tbody td.k-xq { background: repeating-linear-gradient(45deg, #EEE8F8 0 4px, #CDBFEA 4px 8px); }
.just-up { margin-top: 4px; }
.just-up label { cursor: pointer; }
.cal-sync h2 { display: flex; align-items: center; gap: 8px; }
.cal-links { display: grid; gap: 8px; margin: 10px 0; }
.cal-links .cron-url code { word-break: break-all; }

.faltan h2 { display: flex; align-items: center; gap: 8px; }
.faltan-cols { display: grid; gap: 4px 20px; }
@media (min-width: 700px) { .faltan-cols { grid-template-columns: 1fr 1fr; } }
.faltan-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.faltan-l li { display: grid; line-height: 1.25; }
.faltan-l small { font-size: 12.5px; }

/* Caducidades, firma y procesos */
.mat-cad { box-shadow: inset 0 0 0 2px var(--warn-bg), var(--shadow); }
.mat-cad h2 { display: flex; align-items: center; gap: 8px; }
.acta-firma-dig { display: flex; gap: 14px; align-items: center; margin: 4mm 0; padding: 8px 10px; border: 1px solid #CBD3DF; border-radius: 8px; font-size: 12px; }
.acta-firma-dig img { width: 60mm; height: auto; border-bottom: 1px solid #333; }
.prog { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; min-width: 90px; }
.prog span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #1E9A5C); border-radius: 99px; }
.prog-lg { height: 12px; margin: 6px 0 4px; }
.proc-who { min-width: 200px; }
.proc-who .pp-in { min-height: 32px; font-size: 13px; }
.proc-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto auto; gap: 8px; align-items: center; border-top: 1px solid var(--line-2); padding: 12px 16px; }
@media (max-width: 800px) { .proc-add { grid-template-columns: 1fr; } }
.pl-tareas { display: grid; gap: 8px; }
.pl-t { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.2fr) 70px auto; gap: 6px; align-items: center; padding: 8px; border-radius: 10px; background: var(--bg); }
.pl-t .pl-usr { grid-column: 3 / 4; }
.pl-t input, .pl-t select { min-height: 34px; font-size: 13.5px; }
@media (max-width: 900px) { .pl-t { grid-template-columns: 1fr 1fr; } .pl-t .pl-usr { grid-column: auto; } }
.pl-borrar { font-size: 12.5px; }
.tareas { display: grid; gap: 12px; }
.tarea { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); }
.tarea.is-tarde { border-color: var(--warn-bg); background: #FFFBF3; }
.tarea header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.tarea header > div { display: grid; line-height: 1.3; }
.tarea p { margin: 0; }
.tarea-act { display: grid; gap: 8px; }
.tarea-btns { display: flex; gap: 8px; justify-content: flex-end; }
.firma-pad { position: relative; height: 200px; border-radius: 14px; background: #fff; border: 2px dashed var(--blue-l); margin-bottom: 12px; touch-action: none; }
.firma-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.firma-linea { position: absolute; left: 16px; right: 16px; bottom: 34px; border-top: 1px solid var(--line); padding-top: 4px; font-size: 12px; color: var(--muted); pointer-events: none; }

.perm-t input, .perm-t select { min-height: 32px; font-size: 13px; }
.perm-t .perm-desc { margin-top: 4px; font-size: 12px; min-height: 28px; }
.seg2.seg2-3 span { font-size: 13.5px; padding: 9px 2px; white-space: nowrap; }
.grid-main.proc-wide { grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-main.proc-wide { grid-template-columns: 1fr; } }
.proc-t td:first-child { min-width: 240px; }

/* Cabeceras: manda el logo de FUCHS; la lechuza va pequeña junto al nombre */
.brand-name { display: inline-flex; align-items: center; gap: 6px; }
.owl-mini { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.app-top-title .owl-mini { width: 22px; height: 22px; }
.app-logo { width: 44px; height: auto; }
.app-side-brand img.owl-mini, .brand img.owl-mini, .app-top img.owl-mini { width: 20px; height: 20px; }

/* Pendientes de material agrupados por persona */
.mat-grp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mat-grp-bar > span { margin-right: auto; }
.mat-grps { display: grid; gap: 10px; }
.mat-grp { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mat-grp.is-tarde { box-shadow: inset 4px 0 0 var(--err), var(--shadow); }
.mat-grp summary { display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.mat-grp summary::-webkit-details-marker { display: none; }
.mat-grp summary:hover { background: #F8FAFD; }
.mat-grp-chev { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--bg); color: var(--muted); transition: transform .15s; flex: none; }
.mat-grp[open] .mat-grp-chev { transform: rotate(90deg); color: var(--blue); }
.mat-grp-who { display: grid; line-height: 1.25; flex: 1 1 220px; min-width: 0; }
.mat-grp-who small { font-size: 12.5px; }
.mat-grp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mat-grp-body { border-top: 1px solid var(--line-2); }
.mat-grp-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: #F8FAFD; border-bottom: 1px solid var(--line-2); }
.mat-grp-act { width: 1%; white-space: nowrap; }
.mat-grp-act .mat-act { flex-wrap: nowrap; justify-content: flex-end; }
.mat-grp-act .mat-act input { width: 210px; flex: 0 0 auto; }
/* El contenido aprovecha las pantallas anchas */
.content { max-width: 1760px; }
@media (min-width: 960px) { .layout-app .app-main { max-width: 1200px; margin: 0 auto; } }

/* Valorar la comida */
.rate-quick { gap: 6px; box-shadow: inset 0 0 0 2px #F7E1A8, var(--shadow); }
.rate-quick-head { display: flex; align-items: center; gap: 10px; }
.rate-quick-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #FFF4D6; color: #9A5B00; flex: none; }
.rate-quick .stars label { font-size: 38px; }
.rate-big .stars { justify-content: center; }
.rate-big .stars label { font-size: 52px; }
.qr-done-rate { margin-top: 6px; font-size: 12.5px; opacity: .85; }

/* Empezar de cero */
.reset-panel { box-shadow: inset 0 0 0 2px var(--err-bg), var(--shadow); }
.reset-panel h2 { display: flex; align-items: center; gap: 8px; color: var(--err); }
.reset-cuentas { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.btn-danger { background: var(--err); color: #fff; border-color: var(--err); }
.btn-danger:hover { background: #A30F1A; }

/* Mis avisos: interruptores */
.switches { display: grid; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row > span { display: grid; line-height: 1.3; }
.switch-row small { font-size: 12.5px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch:checked { background: var(--blue); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch-sub { margin: -4px 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.switch-row:has(.switch:not(:checked)) + .switch-sub { display: none; }
.avisos-form { display: grid; gap: 16px; }
.switch-row input.switch { width: 46px; min-width: 46px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 99px; box-shadow: none; background: var(--line); }
.switch-row input.switch:checked { background: var(--blue); }

.code-big { font-size: 28px; font-weight: 750; letter-spacing: .08em; color: var(--blue-d); margin: 8px 0 2px; }
.device-ico-big { width: 120px; height: 120px; border-radius: 24px; display: grid; place-items: center; background: var(--bg); color: var(--muted); flex: none; }
.device-ico-big.on { background: var(--ok-bg); color: var(--ok); }

/* QR de un día */
.qr-dia { display: grid; gap: 14px; }
.qr-dia-box { display: grid; justify-items: center; gap: 4px; padding: 18px; border-radius: 18px; background: var(--bg); }
.qr-dia-box canvas { width: 260px; height: 260px; border-radius: 14px; background: #fff; image-rendering: pixelated; }
.qr-dia-acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media print { .layout-app .app-top, .layout-app .tabbar, .layout-app .app-side, .qr-dia-acts, .qr-dia > p, .firma, .sidebar, .topbar { display: none !important; } }

/* Pendientes de material agrupados por persona */
.mat-grp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mat-grp-bar > span { margin-right: auto; }
.mat-grps { display: grid; gap: 10px; }
.mat-grp { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mat-grp.is-tarde { box-shadow: inset 4px 0 0 var(--err), var(--shadow); }
.mat-grp summary { display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.mat-grp summary::-webkit-details-marker { display: none; }
.mat-grp summary:hover { background: #F8FAFD; }
.mat-grp-chev { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--bg); color: var(--muted); transition: transform .15s; flex: none; }
.mat-grp[open] .mat-grp-chev { transform: rotate(90deg); color: var(--blue); }
.mat-grp-who { display: grid; line-height: 1.25; flex: 1 1 220px; min-width: 0; }
.mat-grp-who small { font-size: 12.5px; }
.mat-grp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mat-grp-body { border-top: 1px solid var(--line-2); }
.mat-grp-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: #F8FAFD; border-bottom: 1px solid var(--line-2); }
.mat-grp-act { width: 1%; white-space: nowrap; }
.mat-grp-act .mat-act { flex-wrap: nowrap; justify-content: flex-end; }
.mat-grp-act .mat-act input { width: 210px; flex: 0 0 auto; }
/* El contenido aprovecha las pantallas anchas */
.content { max-width: 1760px; }

/* Pendientes de material agrupados por persona */
.mat-grp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mat-grp-bar > span { margin-right: auto; }
.mat-grps { display: grid; gap: 10px; }
.mat-grp { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mat-grp.is-tarde { box-shadow: inset 4px 0 0 var(--err), var(--shadow); }
.mat-grp summary { display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.mat-grp summary::-webkit-details-marker { display: none; }
.mat-grp summary:hover { background: #F8FAFD; }
.mat-grp-chev { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--bg); color: var(--muted); transition: transform .15s; flex: none; }
.mat-grp[open] .mat-grp-chev { transform: rotate(90deg); color: var(--blue); }
.mat-grp-who { display: grid; line-height: 1.25; flex: 1 1 220px; min-width: 0; }
.mat-grp-who small { font-size: 12.5px; }
.mat-grp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mat-grp-body { border-top: 1px solid var(--line-2); }
.mat-grp-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: #F8FAFD; border-bottom: 1px solid var(--line-2); }
.mat-grp-act { width: 1%; white-space: nowrap; }
.mat-grp-act .mat-act { flex-wrap: nowrap; justify-content: flex-end; }
.mat-grp-act .mat-act input { width: 210px; flex: 0 0 auto; }
/* El contenido aprovecha las pantallas anchas */
.content { max-width: 1760px; }

/* Menú lateral de RRHH por áreas */
.side-nav { display: grid; gap: 2px; overflow-y: auto; margin: 0 -6px; padding: 0 6px 8px; }
.side-grp { margin-top: 10px; }
.side-grp summary { display: flex; align-items: center; gap: 6px; padding: 6px 12px 4px; cursor: pointer; list-style: none; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .5); border-radius: 8px; user-select: none; }
.side-grp summary::-webkit-details-marker { display: none; }
.side-grp summary span { flex: 1; }
.side-grp summary:hover { color: rgba(255, 255, 255, .85); }
.side-grp summary .i { transition: transform .15s; opacity: .7; }
.side-grp[open] summary .i { transform: rotate(90deg); }
.side-grp[open] summary .pill-sm { display: none; }
.side-grp > a { margin-top: 2px; }
.pill-sm { font-size: 10.5px; min-width: 18px; height: 18px; padding: 0 5px; }
.sidebar .side-grp > a { padding: 9px 12px; }

/* Entrar con Microsoft */
.btn-ms { background: #fff; color: #1B1B1B; border: 1px solid #8C8C8C; gap: 10px; font-weight: 600; margin: 4px 0 4px; }
.btn-ms:hover { background: #F3F3F3; }
.auth-o { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 13px; }
.auth-o::before, .auth-o::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-pasos { display: grid; gap: 8px; margin: 8px 0 14px; padding-left: 20px; }
#sso h2 { display: flex; align-items: center; gap: 8px; }

/* Ajustes por pestañas */
.aj-tabs { margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.aj-tabs::-webkit-scrollbar { display: none; }
.aj-tabs a { white-space: nowrap; flex: 0 0 auto; }
.aj { display: grid; gap: 18px; max-width: 920px; }
.aj > .quick-link.panel { margin: 0; padding: 18px 20px; background: var(--card); }
.aj > .quick-link.panel:hover { background: var(--blue-xl); }
.aj .panel > h2, .aj .panel-head h2 { display: flex; align-items: center; gap: 8px; }
.aj .panel > h2 .i, .aj .panel-head h2 .i { color: var(--blue); }
.aj .panel-head { align-items: center; margin-bottom: 8px; }
.aj .panel-head h2 { margin: 0; }
.aj-intro { margin: -6px 0 14px; }
.aj .form-actions { margin-top: 4px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.aj-ayuda { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--bg); }
.aj-ayuda summary { cursor: pointer; font-weight: 600; color: var(--blue); font-size: 14px; }
.aj-ayuda .sso-pasos { margin: 10px 0 4px; }
.aj-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.aj-peligro > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.aj-peligro > summary::-webkit-details-marker { display: none; }
.aj-peligro > summary h2 { margin: 0; }
.aj-peligro[open] > summary { margin-bottom: 12px; }

/* Menú lateral más compacto: que quepa entero (Administración incluida) sin tener que hacer scroll */
.side-nav { flex: 1 1 auto; min-height: 0; align-content: start; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.sidebar .side-nav a { padding: 7px 12px; font-size: 14px; }
.sidebar .side-grp { margin-top: 6px; }
.side-grp summary { padding: 5px 12px 3px; }
.sidebar .brand { margin-bottom: 10px; padding-bottom: 14px; }
@media (max-height: 700px) { .sidebar .side-nav a { padding: 5px 12px; } .sidebar .side-grp { margin-top: 2px; } }

/* Certificado de la app de Microsoft */
.sso-cert { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 16px; border-radius: 12px; border: 1px solid var(--line); }
.sso-cert > div:first-child { display: grid; gap: 2px; min-width: 0; }
.sso-cert b { display: flex; align-items: center; gap: 6px; }
.sso-cert code { word-break: break-all; }
.sso-cert-acc { display: flex; gap: 8px; flex-wrap: wrap; }

/* Ficha: entrar con Microsoft */
.sso-user { display: grid; gap: 8px; padding: 12px 14px; margin: 0 0 14px; border-radius: 12px; background: var(--bg); }
.sso-user-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sso-user-h .i { color: var(--blue); }
.sso-user-h .badge { margin-left: auto; }
.sso-user select { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; text-decoration: underline; }
.link-btn.small { font-size: 13px; }

/* Verificación en dos pasos */
.mfa-pasos { display: grid; gap: 10px; padding-left: 20px; margin: 0 0 14px; font-size: 14.5px; }
.mfa-qr { display: grid; place-items: center; margin: 12px 0 6px; }
.mfa-qr canvas { width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.mfa-manual summary { cursor: pointer; color: var(--blue); font-size: 13px; }
.mfa-manual code { display: block; margin-top: 6px; padding: 8px 10px; font-size: 15px; letter-spacing: .08em; word-break: break-all; }
.mfa-codigo { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.mfa-respaldo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.mfa-respaldo code { display: block; padding: 10px; text-align: center; font-size: 17px; letter-spacing: .06em; }
