/* ==========================================================================
   Atempio — estilos (móvil primero)
   Estética minimalista inspirada en Apple: superficies limpias, separadores sutiles,
   sin sombras innecesarias. Modo oscuro neutro (negros y grises, sin tonos azulados).
   Cortes: < 768px móvil · 768–1023px tablet · ≥ 1024px escritorio
   ========================================================================== */
/* Tipografía de Atempio: SFT Schrifted Round (variable: peso 200–900, ancho 75–100 %, inclinación) */
@font-face {
  font-family: 'SFT Schrifted Round';
  src: url('/fonts/SFTSchriftedRoundTRIALVar.ttf') format('truetype-variations'), url('/fonts/SFTSchriftedRoundTRIALVar.ttf') format('truetype');
  font-weight: 200 900; font-stretch: 75% 100%; font-style: normal oblique 0deg 12deg; font-display: swap;
}
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #e8e8ed;
  --w-deep: #e0244b; --w-main: #ff345f; --w-sec: #fe6864; --w-soft: #feb2af; --w-light: #fbe3e4;
  --btn-hover: #d9d9df;
  --sidebar: rgba(245, 245, 247, .82);
  --border: rgba(0, 0, 0, .08);
  --separator: rgba(60, 60, 67, .16);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --success: #1f7a37; --warning: #a64b00; --danger: #c4001a; --info: #0062c4;
  /* Colores de marca: se recalculan con contraste garantizado (ver js/color.js) */
  --accent: #ce2a4d; --accent-fill: #de2d53; --on-accent: #ffffff; --accent-soft: #ffebef; --accent-2: #f66561;
  /* Paleta Atempio */
  --at-coral: #ff345f; --at-coral-deep: #e0244b; --at-peach: #fe6864; --at-apricot: #f78f82; --at-pink: #ea8ba5; --at-mauve: #dbbfdb; --at-lavender: #d3d6f5; --at-lavender-2: #e7e8f6;
  --radius: 14px; --radius-sm: 10px;
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .06);
  --tap: 44px;
  --gutter: 16px;
  --sidebar-w: 248px; --rail-w: 84px;
  --topbar-h: 56px; --bottomnav-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --font: "SFT Schrifted Round", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c; --btn-hover: #48484a;
    --sidebar: rgba(28, 28, 30, .86); --border: rgba(255, 255, 255, .08); --separator: rgba(84, 84, 88, .55);
    --text: #f5f5f7; --muted: #98989d;
    --success: #30d158; --warning: #ffa733; --danger: #ff6961; --info: #64d2ff;
    --accent: #ff597c; --accent-fill: #de2d53; --on-accent: #ffffff; --accent-soft: #49212b; --accent-2: #fe6864;
    --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6), 0 0 0 .5px rgba(255, 255, 255, .1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c; --btn-hover: #48484a;
  --sidebar: rgba(28, 28, 30, .86); --border: rgba(255, 255, 255, .08); --separator: rgba(84, 84, 88, .55);
  --text: #f5f5f7; --muted: #98989d;
  --success: #30d158; --warning: #ffa733; --danger: #ff6961; --info: #64d2ff;
  --accent: #ff597c; --accent-fill: #de2d53; --on-accent: #ffffff; --accent-soft: #49212b; --accent-2: #fe6864;
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6), 0 0 0 .5px rgba(255, 255, 255, .1);
  color-scheme: dark;
}
@media (pointer: coarse) { :root { --tap: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: clamp(15px, .9rem + .15vw, 16px); line-height: 1.47; letter-spacing: 0;
  overflow-x: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img, svg, canvas, iframe { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.022em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); }
h2 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem); font-weight: 650; }
h3 { font-size: 1.02rem; font-weight: 650; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

/* ── Estructura ─────────────────────────────────────────────── */
.shell { min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 60;
  background: var(--surface); border-right: .5px solid var(--separator);
  display: flex; flex-direction: column; padding-top: var(--safe-t);
  transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; overscroll-behavior: contain;
}
.shell.drawer-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
.shell.drawer-open .scrim { opacity: 1; pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; min-width: 0; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--at-coral), var(--at-peach) 60%, var(--at-lavender)); color: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.brand-logo svg { width: 18px; height: 18px; }
.brand-logo.img { background: transparent; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 10px 12px; }
.nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 14px 10px 4px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 10px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500; position: relative;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 99px; padding: 0 6px; line-height: 18px; min-width: 18px; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 8px 10px 12px; border-top: .5px solid var(--separator); }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 6px;
  min-height: calc(var(--topbar-h) + var(--safe-t)); padding: var(--safe-t) var(--gutter) 0;
  background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom: .5px solid var(--separator);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
}
@supports not (background: color-mix(in srgb, red, blue)) { .topbar { background: var(--bg); } }
.topbar-title { font-weight: 600; font-size: 1.02rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view { padding: var(--gutter); padding-bottom: calc(var(--bottomnav-h) + var(--safe-b) + 28px); width: 100%; max-width: 1360px; margin: 0 auto; flex: 1; }
.acting-bar { background: var(--text); color: var(--bg); font-size: .85rem; padding: 6px var(--gutter); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.acting-bar button { background: none; border: 1px solid currentColor; color: inherit; border-radius: 99px; padding: 2px 12px; font: inherit; cursor: pointer; min-height: 30px; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottomnav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 86%, transparent); border-top: .5px solid var(--separator);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
}
.bottomnav a, .bottomnav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none;
  color: var(--muted); text-decoration: none; font: inherit; font-size: .66rem; font-weight: 500; position: relative; cursor: pointer; min-width: 0; letter-spacing: 0;
}
.bottomnav svg { width: 24px; height: 24px; }
.bottomnav .active { color: var(--accent); }
.bottomnav a:hover { text-decoration: none; }
.bottomnav .fab span.fab-circle {
  width: 50px; height: 50px; margin-top: -20px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent);
  display: grid; place-items: center; border: 4px solid var(--bg);
}
.bottomnav .fab.st-in span.fab-circle { background: #248a3d; color: #fff; }
.bottomnav .fab.st-break span.fab-circle { background: #b25000; color: #fff; }
.bottomnav .dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .6rem; display: grid; place-items: center; font-weight: 700; }

@media (min-width: 768px) {
  :root { --gutter: 28px; }
  .bottomnav { display: none; }
  .view { padding-top: 28px; padding-bottom: 48px; }
  .shell { padding-left: var(--rail-w); }
  .sidebar { transform: none; width: var(--rail-w); z-index: 45; background: var(--sidebar); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); }
  .sidebar .brand-name, .sidebar .nav-section, .sidebar .user-mini-text { display: none; }
  .sidebar .brand { justify-content: center; padding: 16px 0 10px; }
  .sidebar .nav { padding: 4px 8px; }
  .sidebar .nav a { flex-direction: column; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; font-size: .66rem; text-align: center; letter-spacing: 0; }
  .sidebar .nav a .count { position: absolute; top: 4px; right: 8px; margin: 0; }
  .menu-btn { display: none !important; }
  .shell.drawer-open .scrim { opacity: 0; pointer-events: none; }
}
@media (min-width: 1024px) {
  :root { --gutter: 36px; }
  .shell { padding-left: var(--sidebar-w); }
  .sidebar { width: var(--sidebar-w); }
  .sidebar .brand-name, .sidebar .nav-section, .sidebar .user-mini-text { display: initial; }
  .sidebar .brand { justify-content: flex-start; padding: 20px 20px 12px; }
  .sidebar .nav { padding: 4px 12px; }
  .sidebar .nav a { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 36px; padding: 0 10px; font-size: .92rem; text-align: left; letter-spacing: -.01em; }
  .sidebar .nav a .count { position: static; margin-left: auto; }
}

/* ── Componentes ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 16px;
  border-radius: var(--radius-sm); border: 0; background: var(--surface-3); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background .15s, opacity .15s, transform .08s; touch-action: manipulation;
}
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-fill); opacity: .88; }
.btn-success { background: #248a3d; color: #fff; }
.btn-success:hover { background: #1e7834; }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-danger-solid { background: #c4001a; color: #fff; }
.btn-danger-solid:hover { background: #a80016; }
.btn-warning { background: #b25000; color: #fff; }
.btn-warning:hover { background: #994500; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { background: none; color: var(--accent); padding: 0 6px; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .875rem; }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }
.btn-block { width: 100%; }
.icon-btn { width: var(--tap); height: var(--tap); padding: 0; border-radius: 50%; position: relative; }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .64rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }

.card { background: var(--surface); border: .5px solid var(--border); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 767px) { .page-head h1 { font-size: 1.75rem; } .page-head { margin-bottom: 14px; } .page-actions { width: 100%; } .page-actions .btn { flex: 1 1 auto; } }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin: 28px 0 10px; }

.grid { display: grid; gap: 16px; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } .span-2 { grid-column: span 2; } }
.stat { background: var(--surface); border: .5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; text-decoration: none; color: inherit; display: block; transition: background .15s; }
a.stat:hover { background: var(--surface-2); text-decoration: none; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat .value { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.8rem); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 2px; }
.stat .sub { font-size: .78rem; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 99px; font-size: .76rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); line-height: 1.6; }
.badge.ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.badge.warn { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }
.badge.err { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.badge.info { background: color-mix(in srgb, var(--info) 13%, transparent); color: var(--info); }
.badge.primary { background: var(--accent-soft); color: var(--accent); }

/* Control segmentado */
.tabs { display: flex; gap: 2px; background: var(--surface-3); padding: 2px; border-radius: 9px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { flex: 1 0 auto; text-align: center; min-height: 32px; display: grid; place-items: center; padding: 0 14px; border-radius: 7px; text-decoration: none; color: var(--text); font-weight: 500; font-size: .88rem; border: 0; background: none; font-family: inherit; cursor: pointer; }
.tabs a:hover { text-decoration: none; }
.tabs .active { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); font-weight: 600; }
:root[data-theme="dark"] .tabs .active { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs .active { background: #636366; } }
@media (pointer: coarse) { .tabs a, .tabs button { min-height: 44px; } }

/* Formularios (estilo relleno, como iOS) */
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-weight: 500; font-size: .85rem; color: var(--muted); }
.field small { color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 16px; letter-spacing: -.01em;
  width: 100%; min-height: var(--tap); padding: 10px 12px; color: var(--text);
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent-fill); appearance: auto; -webkit-appearance: auto; flex: none; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
input[type="color"] { padding: 4px; height: var(--tap); width: 64px; cursor: pointer; }
input[type="file"] { padding: 9px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar > * { flex: 1 1 160px; min-width: 0; }
.toolbar > .btn { flex: 0 0 auto; }

/* Tablas: pasan a tarjetas según el ancho disponible */
.tcq { container: tbl / inline-size; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: .5px solid var(--border); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
.t th, .t td { padding: 11px 14px; text-align: left; border-bottom: .5px solid var(--separator); vertical-align: middle; }
.t th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable::after { content: ' ↕'; opacity: .35; }
.t th.sort-asc::after { content: ' ↑'; opacity: 1; }
.t th.sort-desc::after { content: ' ↓'; opacity: 1; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--surface-2); }
.t tr.clickable { cursor: pointer; }
.t tr.selected td { background: var(--accent-soft); }
.t .actions { text-align: right; white-space: nowrap; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) and (max-width: 1279px) {
  .t td.actions { white-space: normal; }
  .t td.actions .btn { margin: 2px 0; }
  .t th, .t td { padding: 10px; }
  .t .hide-md { display: none; }
}
@media (min-width: 768px) and (max-width: 1439px) { .t .hide-lg { display: none; } }
@supports (container-type: inline-size) {
  @container tbl (max-width: 700px) {
    .table-wrap.responsive { border: 0; background: none; overflow: visible; }
    .responsive table.t, .responsive .t tbody, .responsive .t tr, .responsive .t td { display: block; width: 100%; }
    .responsive .t thead { display: none; }
    .responsive .t tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
    .responsive .t tr { background: var(--surface); border: .5px solid var(--border); border-radius: var(--radius); padding: 10px 4px; position: relative; min-width: 0; }
    .responsive .t td { border: 0; padding: 4px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; min-width: 0; overflow-wrap: anywhere; }
    .responsive .t td > * { min-width: 0; }
    .responsive .t td.hide-md, .responsive .t td.hide-lg { display: flex; }
    .responsive .t td.no-card { display: none; }
    .responsive .t tr.clickable::after { content: '›'; position: absolute; right: 16px; top: 12px; color: var(--muted); font-size: 1.5rem; line-height: 1; }
    .responsive .t tr.clickable:not(.has-check) td.primary-cell { padding-right: 36px; }
    .responsive .t td::before { content: attr(data-label); font-weight: 500; color: var(--muted); font-size: .8rem; text-align: left; flex: none; }
    .responsive .t td.primary-cell { font-weight: 600; font-size: 1rem; text-align: left; justify-content: flex-start; padding-bottom: 6px; }
    .responsive .t td.primary-cell::before, .responsive .t td.check-cell::before, .responsive .t td.actions::before { display: none; }
    .responsive .t td.check-cell { position: absolute; top: 8px; right: 4px; width: auto; padding: 4px 8px; }
    .responsive .t tr.has-check td.primary-cell { padding-right: 48px; }
    .responsive .t td.actions { justify-content: flex-end; flex-wrap: wrap; padding-top: 8px; white-space: normal; }
    .responsive .t tbody tr:hover td { background: none; }
    .responsive .t tr.selected { outline: 2px solid var(--accent); }
  }
}
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .45; display: block; margin: 0 auto 10px; }

/* Listas agrupadas (estilo Ajustes) */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: .5px solid var(--separator); min-width: 0; color: inherit; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 500; overflow-wrap: anywhere; }
.list-item.unread .title { font-weight: 650; }
.list-item.unread .title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
a.list-item:hover { text-decoration: none; background: var(--surface-2); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); color: var(--text); display: grid; place-items: center; font-weight: 600; flex: none; font-size: .8rem; letter-spacing: 0; }

/* Fichaje */
.clock-card { text-align: center; padding: 28px 20px; }
.clock-time { font-size: clamp(2.8rem, 2.2rem + 4vw, 4.2rem); font-weight: 200; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.clock-date { color: var(--muted); margin-bottom: 10px; }
.clock-date::first-letter { text-transform: uppercase; }
.clock-state { margin: 10px 0 20px; }
.clock-actions { display: grid; gap: 10px; grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
.clock-actions.two { grid-template-columns: 1fr 1fr; }
.clock-actions .btn { min-height: 58px; font-size: 1.05rem; border-radius: 14px; font-weight: 600; }
.clock-worked { display: flex; justify-content: center; gap: 32px; margin-top: 20px; flex-wrap: wrap; }
.clock-worked b { display: block; font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: .5px solid var(--separator); }
.timeline li:last-child { border: 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Calendario */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head .cal-title { font-weight: 650; font-size: 1.1rem; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.02em; }
.cal-head .cal-title::first-letter { text-transform: uppercase; }
@media (max-width: 767px) { .cal-head select { flex: 1 1 100%; } }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: .5px solid var(--separator); }
.cal .dow { padding: 8px 4px; text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.cal .day { min-height: 104px; padding: 6px; min-width: 0; display: flex; flex-direction: column; gap: 3px; border-top: .5px solid var(--separator); cursor: pointer; }
.cal .day.out .n { opacity: .35; }
.cal .day.today .n { background: var(--danger); color: #fff; }
.cal .day.selected .n { background: var(--text); color: var(--bg); }
.cal .day.today.selected .n { background: var(--danger); color: #fff; }
.cal .day .n { font-size: .82rem; font-weight: 600; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.chip { display: block; font-size: .72rem; font-weight: 600; padding: 2px 6px; border-radius: 5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; text-align: left; font-family: inherit; cursor: default; }
button.chip { cursor: pointer; }
.chip.leave { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
@media (max-width: 767px) {
  .cal .day { min-height: 52px; padding: 3px; align-items: center; }
  .cal .day .chip { width: 6px; height: 6px; padding: 0; border-radius: 50%; font-size: 0; display: inline-block; }
  .cal .day .chips { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
}
.agenda { margin-top: 14px; }
.agenda-day { display: flex; gap: 14px; padding: 12px 0; border-bottom: .5px solid var(--separator); }
.agenda-date { width: 50px; flex: none; text-align: center; }
.agenda-date b { display: block; font-size: 1.45rem; line-height: 1; font-weight: 600; }
.agenda-date span { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.shift-pill { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--accent); margin-bottom: 6px; }

/* Planificación */
.plan-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: .5px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.plan { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
.plan th, .plan td { border-bottom: .5px solid var(--separator); border-right: .5px solid var(--separator); padding: 6px; vertical-align: top; font-size: .82rem; }
.plan th { background: var(--surface); position: sticky; top: 0; z-index: 1; text-align: center; font-weight: 600; color: var(--muted); }
.plan th:first-letter { text-transform: uppercase; }
.plan th.today { color: var(--danger); }
.plan td.emp, .plan th.emp { position: sticky; left: 0; background: var(--surface); z-index: 2; width: 112px; font-weight: 500; text-align: left; color: var(--text); }
.plan td.cell { height: 56px; }
.plan td.cell.can { cursor: pointer; }
.plan td.cell.can:hover { background: var(--surface-2); }
.plan .chip { margin-bottom: 2px; cursor: pointer; font-size: .7rem; padding: 2px 4px; white-space: normal; line-height: 1.25; text-align: center; }
.plan .add-hint { color: var(--muted); opacity: 0; font-size: 1.1rem; text-align: center; }
.plan td.cell.can:hover .add-hint { opacity: .6; }
@media (pointer: coarse) { .plan td.can .add-hint { opacity: .3; } }
@media (min-width: 1280px) { .plan td.emp, .plan th.emp { width: 180px; } .plan .chip { font-size: .76rem; } }

/* Gráficos */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 36px; background: var(--accent-2); border-radius: 6px; min-height: 2px; }
.bar span { font-size: .72rem; color: var(--muted); }
.bar span::first-letter { text-transform: uppercase; }
.bar b { font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar { display: grid; grid-template-columns: minmax(80px, 140px) 1fr 32px; gap: 10px; align-items: center; padding: 6px 0; font-size: .875rem; }
.hbar .track { background: var(--surface-2); border-radius: 99px; height: 8px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--accent-2); border-radius: 99px; }

/* Diálogos (hoja inferior en móvil) */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.modal {
  background: var(--surface); width: 100%; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column;
  border-radius: 14px 14px 0 0; box-shadow: var(--shadow-pop); animation: up .25s cubic-bezier(.2, .8, .2, 1); padding-bottom: var(--safe-b);
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 20px; border-bottom: .5px solid var(--separator); }
.modal-head h2 { margin: 0; flex: 1; font-size: 1.05rem; font-weight: 650; }
.modal-body { padding: 18px 20px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-foot { display: flex; gap: 10px; padding: 12px 20px 16px; border-top: .5px solid var(--separator); flex-wrap: wrap; }
.modal-foot .btn { flex: 1 1 auto; }
@media (min-width: 768px) {
  .modal-back { align-items: center; padding: 24px; }
  .modal { width: min(560px, 100%); border-radius: 14px; max-height: 88vh; padding-bottom: 0; }
  .modal.wide { width: min(940px, 100%); }
  .modal-foot { justify-content: flex-end; }
  .modal-foot .btn { flex: 0 0 auto; }
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes sheet { from { transform: translateY(100%); } }
@media (max-width: 767px) {
  .modal { animation: sheet .3s cubic-bezier(.2, .8, .2, 1); }
  .modal::before { content: ''; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 8px auto 0; flex: none; }
}
@keyframes fade { from { opacity: 0; } }
.viewer { width: 100%; height: 62vh; border: .5px solid var(--border); border-radius: 10px; background: #fff; }
.viewer-img { max-height: 62vh; display: block; margin: 0 auto; border-radius: 10px; }
.sigpad { width: 100%; height: 200px; border: 1px dashed var(--separator); border-radius: 12px; background: #fff; touch-action: none; display: block; cursor: crosshair; }
.receipt-preview { max-height: 220px; border-radius: 10px; display: block; margin-top: 8px; }

.bulkbar { position: sticky; top: calc(var(--topbar-h) + var(--safe-t) + 8px); z-index: 30; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 12px; margin-bottom: 12px; box-shadow: var(--shadow-pop); }
.bulkbar .btn { background: transparent; color: inherit; }
.bulkbar .btn:hover { background: color-mix(in srgb, var(--bg) 16%, transparent); }
.bulkbar b { margin-right: auto; font-weight: 600; }
@media (max-width: 767px) { .bulkbar { position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(var(--bottomnav-h) + var(--safe-b) + 10px); } }

.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 12px); display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-pop); font-weight: 500; animation: up .2s; pointer-events: auto;
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); display: flex; gap: 10px; align-items: center; }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.toast.ok::before { background: var(--success); }
.toast.err::before { background: var(--danger); }

/* Acceso */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.login-card { width: min(400px, 100%); }
.login-card .brand { justify-content: center; font-size: 1.3rem; padding: 0 0 22px; }
.login-card .brand-logo { width: 44px; height: 44px; border-radius: 11px; }
.login-card .brand-logo svg { width: 24px; height: 24px; }
.demo-accounts { display: grid; gap: 4px; margin-top: 16px; }
.demo-accounts button { justify-content: flex-start; white-space: normal; text-align: left; flex-wrap: wrap; height: auto; padding-top: 6px; padding-bottom: 6px; }

/* Permisos */
.perm-group { border: .5px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.perm-group h4 { margin: 0; padding: 10px 14px; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); font-weight: 600; }
.perm-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 10px 14px; border-top: .5px solid var(--separator); }
.perm-row:first-of-type { border-top: 0; }
.perm-row .perm-label { min-width: 0; }
.perm-row .perm-label small { display: block; color: var(--muted); font-size: .78rem; }
.perm-row select { width: auto; min-width: 190px; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 15px; }
@media (max-width: 600px) { .perm-row { grid-template-columns: 1fr; } .perm-row select { width: 100%; } }
.eff { font-size: .75rem; }

/* Identidad visual */
.swatch-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.preview-pair { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .preview-pair { grid-template-columns: 1fr 1fr; } }
.preview { border-radius: var(--radius); padding: 16px; border: .5px solid var(--border); }
.preview .p-btn { display: inline-flex; padding: 8px 14px; border-radius: 10px; font-weight: 600; margin: 4px 6px 4px 0; }
.preview .p-soft { display: inline-flex; padding: 6px 12px; border-radius: 8px; font-weight: 600; margin: 4px 6px 4px 0; }
.ratio { font-size: .75rem; font-variant-numeric: tabular-nums; }
.logo-box { width: 88px; height: 88px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 16px; margin: 10px 0; }
@keyframes sk { to { background-position: -200% 0; } }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 300; background: #b25000; color: #fff; text-align: center; font-weight: 600; padding: calc(var(--safe-t) + 4px) 8px 4px; font-size: .85rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.notice { border-radius: var(--radius); padding: 12px 16px; background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--text); margin-bottom: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .bottomnav, .page-actions { display: none !important; } .shell { padding: 0 !important; } }

/* Invitaciones */
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.invite-done { display: flex; align-items: center; gap: 8px; color: var(--success); margin: 4px 0 10px; }
.invite-done svg { width: 20px; height: 20px; }
details.invite-options { background: var(--surface-2); border-radius: var(--radius-sm); padding: 0 14px; }
details.invite-options summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 500; list-style: none; }
details.invite-options summary::-webkit-details-marker { display: none; }
details.invite-options summary::after { content: '›'; margin-left: auto; transform: rotate(90deg); transition: transform .2s; font-size: 1.3rem; color: var(--muted); }
details.invite-options[open] summary::after { transform: rotate(-90deg); }
details.invite-options[open] { padding-bottom: 14px; }
details.invite-options input, details.invite-options select { background: var(--surface); }
.join { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.join-card { width: min(440px, 100%); }
.join-logo { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--at-coral), var(--at-peach) 60%, var(--at-lavender)); color: #fff; }
.join-logo img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.join-logo svg { width: 30px; height: 30px; }
.tabs svg { width: 16px; height: 16px; flex: none; }
.tabs a:has(svg), .tabs button:has(svg) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* Barra de jornada en la cabecera */
.clockbar { display: flex; align-items: center; gap: 6px; background: var(--surface); border: .5px solid var(--border); border-radius: 12px; padding: 4px 4px 4px 12px; margin-right: 4px; min-width: 0; }
.cb-time { display: flex; align-items: center; gap: 6px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; min-height: 34px; }
.cb-time:hover { text-decoration: none; }
.cb-time b { font-weight: 600; }
.cb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.clockbar.st-in .cb-dot { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.clockbar.st-break .cb-dot { background: var(--warning); }
.cb-track { width: 56px; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-left: 4px; }
.cb-track i { display: block; height: 100%; background: var(--accent-2); border-radius: 99px; }
.cb-actions { display: flex; gap: 4px; }
.cb-actions .btn { min-height: 34px; }
.btn.cb-pause { background: color-mix(in srgb, #ff9f0a 22%, transparent); color: var(--warning); }
@media (max-width: 767px) {
  .clockbar { padding: 2px 10px; border-radius: 99px; }
  .cb-actions, .cb-track, .cb-time .muted { display: none; }
}
@media (min-width: 768px) and (max-width: 1023px) { .cb-track { display: none; } }

/* Inicio: tarjetas de resumen */
.dash { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
.dash-col { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 768px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-col:last-child { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .dash { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-col:last-child { grid-column: auto; grid-template-columns: 1fr; } }
.welcome {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px 26px 28px; color: #fff; min-height: 168px;
  display: flex; flex-direction: column; justify-content: center;
  /* Degradado de marca: coral intenso a la izquierda, brillo melocotón arriba, rosa y lavanda a la derecha.
     La zona del texto usa un coral algo más profundo para mantener el contraste del texto blanco (≥ 4,5:1). */
  isolation: isolate;
  background: linear-gradient(100deg, var(--w-deep) 0%, var(--w-deep) 40%, var(--w-main) 54%, var(--w-sec) 68%, var(--w-soft) 84%, var(--w-light) 100%);
}
/* Capa de luz que se desplaza muy despacio sobre el degradado (se desactiva si el usuario pide reducir el movimiento) */
.welcome::before {
  content: ''; position: absolute; inset: -60% -30%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(28% 42% at 62% 30%, color-mix(in srgb, var(--w-sec) 85%, transparent) 0%, transparent 70%),
    radial-gradient(30% 48% at 88% 64%, color-mix(in srgb, var(--w-light) 90%, transparent) 0%, transparent 72%),
    radial-gradient(22% 36% at 40% 78%, color-mix(in srgb, var(--w-main) 60%, transparent) 0%, transparent 70%);
  animation: welcome-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes welcome-drift {
  0% { transform: translate3d(-4%, -3%, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3%, 4%, 0) rotate(4deg) scale(1.06); }
  100% { transform: translate3d(6%, -2%, 0) rotate(-3deg) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) { .welcome::before { animation: none; } }
.welcome::after { content: none; }
.welcome > * { position: relative; max-width: 66%; }
.welcome p, .welcome-role { max-width: 50%; }
.welcome h2 { font-size: clamp(1.55rem, 1.25rem + 1vw, 2rem); margin: 0 0 8px; font-weight: 700; color: inherit; letter-spacing: -.01em; }
.welcome p { margin: 0; font-size: 1.05rem; font-weight: 500; line-height: 1.45; }
.welcome p::first-letter { text-transform: uppercase; }
.welcome-mark { position: absolute; top: 20px; right: 22px; width: 30px; height: 30px; color: #fff; max-width: none; }
.welcome-mark svg { width: 100%; height: 100%; }
.welcome-role { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .9; margin-bottom: 4px; }
@media (max-width: 480px) { .welcome { min-height: 150px; padding: 22px 20px 24px; border-radius: 22px; } }
.avatars { display: flex; flex-wrap: wrap; }
.avatars .avatar { width: 42px; height: 42px; border: 3px solid var(--surface); margin-right: -8px; background: var(--accent-soft); color: var(--accent); font-size: .78rem; }
.avatars .avatar:nth-child(3n+2) { background: color-mix(in srgb, var(--accent-2) 18%, var(--surface)); color: var(--text); }
.avatars .avatar:nth-child(3n) { background: var(--surface-3); color: var(--text); }
.avatars .avatar.more { background: var(--surface-2); color: var(--accent); }
.kpi-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: .5px solid var(--separator); }
.kpi-row > span:first-child { flex: 1; color: var(--muted); font-size: .9rem; }
.kpi-row b { font-weight: 600; font-size: .9rem; }
.digits { display: inline-flex; gap: 4px; }
.digits span { min-width: 34px; height: 44px; display: grid; place-items: center; background: var(--surface-2); border-radius: 8px; font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 14px; }
.progress i { display: block; height: 100%; border-radius: 99px; background: var(--accent-2); }
.kpi-big { font-size: 2.2rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick a { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 500; font-size: .9rem; min-height: 88px; }
.quick a:hover { text-decoration: none; background: var(--surface-3); }
.quick a span { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.quick a span svg { width: 18px; height: 18px; }
.quick em { font-style: normal; font-size: .75rem; color: var(--warning); font-weight: 600; }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head h3 svg { color: var(--accent); }
@media (min-width: 768px) { .mobile-only { display: none !important; } }

/* Fichajes: línea de tiempo */
.tl-row { display: grid; grid-template-columns: 130px 120px 1fr; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: .5px solid var(--separator); cursor: pointer; }
.tl-row:last-of-type { border-bottom: 0; }
.tl-row[data-i]:hover { background: var(--surface-2); }
.tl-head { cursor: default; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding-top: 12px; padding-bottom: 12px; }
.tl-head .tl-track { height: 16px; background: none; }
.tl-head .tl-track span { position: absolute; transform: translateX(-50%); font-size: .7rem; text-transform: none; letter-spacing: 0; white-space: nowrap; font-weight: 500; }
.tl-head .tl-track span:first-child { transform: none; }
.tl-head .tl-track span:last-child { transform: translateX(-100%); }
.tl-date { font-weight: 500; font-size: .9rem; }
.tl-date::first-letter { text-transform: uppercase; }
.tl-date small { display: block; color: var(--muted); font-weight: 400; }
.tl-hours { font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
.tl-hours b { font-weight: 600; }
.tl-track { position: relative; height: 12px; border-radius: 99px; background: var(--surface-2); min-width: 0; }
.tl-track .tick { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--separator); opacity: .6; }
.seg { position: absolute; top: 0; bottom: 0; border-radius: 99px; display: inline-block; }
.seg.work { background: var(--accent-2); }
.seg.break { background: #ffb340; }
.seg.live { background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.35) 6px 12px); }
.tl-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 16px; font-size: .8rem; border-top: .5px solid var(--separator); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend .seg { position: static; width: 18px; height: 8px; }
@media (max-width: 767px) {
  .tl-row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 14px; }
  .tl-row .tl-track { grid-column: 1 / -1; }
  .tl-head { grid-template-columns: 1fr; }
  .tl-head > div:not(.tl-track) { display: none; }
  .tl-hours { text-align: right; }
}

/* Ausencias: vista anual */
.yc-wrap { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .yc-wrap { grid-template-columns: 1fr 180px; } }
.year-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.ym { border: .5px solid var(--border); border-radius: var(--radius); padding: 12px; }
.ym h4 { margin: 0 0 8px; text-align: center; font-size: .92rem; font-weight: 600; }
.ym h4::first-letter { text-transform: uppercase; }
.yg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-size: .72rem; font-variant-numeric: tabular-nums; }
.yg b { color: var(--muted); font-weight: 600; font-size: .66rem; }
.yd { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.yd.we { color: var(--muted); }
.yd.today { box-shadow: inset 0 0 0 1.5px var(--danger); color: var(--danger); font-weight: 700; }
.yd.on { background: var(--c); color: #fff; font-weight: 600; }
.yd.pend { box-shadow: inset 0 0 0 2px var(--c); font-weight: 600; }
.legend { display: flex; flex-direction: column; gap: 2px; }
.legend > b { font-size: .85rem; margin-bottom: 4px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: none; }
.legend .pend-sample { box-shadow: inset 0 0 0 2px var(--muted); vertical-align: middle; margin-right: 6px; }
@media (max-width: 1099px) { .legend { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; align-items: center; } .legend > b { margin: 0; } }

/* Calendario mensual: días de ausencia y fines de semana */
.cal .day.weekend { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.cal .day.leave-day { background: color-mix(in srgb, var(--accent-2) 14%, transparent); }
.cal .day.leave-day .chip.leave { background: transparent; color: var(--text); font-weight: 600; text-align: center; white-space: normal; }

/* Asistente de IA */
.ai { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; height: calc(100dvh - var(--topbar-h) - var(--safe-t) - var(--bottomnav-h) - var(--safe-b) - 32px); min-height: 420px; }
@media (min-width: 768px) { .ai { height: calc(100dvh - var(--topbar-h) - var(--safe-t) - 76px); } }
@media (min-width: 1024px) { .ai { grid-template-columns: 240px minmax(0, 1fr); } }
.ai > * { min-width: 0; }
.ai-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.ai-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.ai-list a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: .88rem; min-height: 38px; }
.ai-list a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-list a:hover { background: var(--surface-2); text-decoration: none; }
.ai-list a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); flex: none; }
@media (max-width: 1023px) {
  .ai { grid-template-rows: auto 1fr; }
  .ai-side { flex-direction: row; align-items: center; }
  .ai-side .btn-block { width: auto; flex: none; }
  .ai-list { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .ai-list::-webkit-scrollbar { display: none; }
  .ai-list a { flex: none; max-width: 200px; background: var(--surface-2); }
  .ai-list p { display: none; }
}
.ai-main { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: .5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ai-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ai-msgs { max-width: 760px; margin: 0 auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg { display: flex; gap: 10px; align-items: flex-start; }
.ai-msg.user { justify-content: flex-end; }
.ai-msg.user .ai-bubble { background: var(--accent-fill); color: var(--on-accent); border-radius: 18px 18px 4px 18px; padding: 10px 14px; max-width: 80%; overflow-wrap: anywhere; }
.ai-msg.bot .ai-bubble { flex: 1; min-width: 0; padding-top: 4px; overflow-wrap: anywhere; }
.ai-msg.sys { justify-content: center; text-align: center; color: var(--muted); }
.ai-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.md p { margin: 0 0 10px; } .md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 20px; } .md li { margin: 2px 0; }
.md .md-h { font-weight: 650; margin-top: 6px; }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.md-table { overflow-x: auto; margin: 0 0 10px; border: .5px solid var(--border); border-radius: 10px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.md-table th, .md-table td { padding: 7px 10px; border-bottom: .5px solid var(--separator); text-align: left; white-space: nowrap; }
.md-table th { background: var(--surface-2); font-weight: 600; }
.md-table tr:last-child td { border-bottom: 0; }
.ai-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-tools:not(:empty) { margin-bottom: 8px; }
.ai-tool { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 3px 10px; margin: 0 6px 6px 0; }
.ai-tool svg { width: 12px; height: 12px; }
.ai-tool:not(.done) { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.ai-typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.ai-confirm { border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; margin-left: 40px; }
.ai-confirm b { display: flex; align-items: center; gap: 6px; color: var(--accent); }
.ai-confirm .check { min-height: 40px; align-items: flex-start; padding-top: 8px; }
.ai-confirm .row { margin-top: 6px; }
@media (max-width: 767px) { .ai-confirm { margin-left: 0; } }
.ai-input { border-top: .5px solid var(--separator); padding: 12px 16px; background: var(--surface); }
.ai-box { max-width: 760px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; background: var(--surface-2); border-radius: 22px; padding: 4px 4px 4px 14px; }
.ai-box textarea { background: transparent; border: 0; min-height: 40px; max-height: 160px; resize: none; padding: 9px 0; box-shadow: none; }
.ai-box textarea:focus { background: transparent; box-shadow: none; }
.ai-box .icon-btn { width: 40px; height: 40px; flex: none; }
.ai-note { font-size: .72rem; text-align: center; margin: 8px auto 0; max-width: 760px; }
.ai-welcome { text-align: center; padding: 28px 8px; }
.ai-orb { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--on-accent); background: linear-gradient(135deg, var(--accent-fill), color-mix(in srgb, var(--accent-fill) 60%, var(--accent-2))); }
.ai-welcome h2 { font-size: 1.5rem; margin-bottom: 6px; }
.ai-welcome p { max-width: 480px; margin: 0 auto 18px; }
.ai-sugs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; text-align: left; }
.ai-sug { border: .5px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: .9rem; color: var(--text); cursor: pointer; min-height: 48px; }
.ai-sug:hover { background: var(--surface-2); }
.ai-ask { display: flex; align-items: center; gap: 8px; background: var(--surface); border: .5px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 14px; }
.ai-ask > span:first-child { color: var(--accent); display: grid; flex: none; }
.ai-ask input { background: transparent; border: 0; min-height: 40px; padding: 0; }
.ai-ask input:focus { box-shadow: none; background: transparent; }
@media (max-width: 767px) { .ai-ask .btn { display: none; } }
/* Bienvenida en pantallas anchas: proporciones de la referencia (banner amplio, texto grande, degradado más abierto) */
@media (min-width: 900px) {
  .welcome { min-height: 210px; padding: 34px 40px; border-radius: 30px;
    background: linear-gradient(100deg, var(--w-deep) 0%, var(--w-deep) 32%, var(--w-main) 44%, var(--w-sec) 58%, var(--w-soft) 76%, var(--w-light) 92%); }
  .welcome h2 { font-size: clamp(2rem, 1.4rem + 1.2vw, 2.5rem); margin-bottom: 10px; }
  .welcome p { font-size: 1.2rem; }
  .welcome > * { max-width: 46%; }
  .welcome p, .welcome-role { max-width: 38%; }
  .welcome-mark { top: 26px; right: 30px; width: 34px; height: 34px; }
}
@media (max-width: 599px) {
  .welcome { background: linear-gradient(100deg, var(--w-deep) 0%, var(--w-deep) 62%, var(--w-main) 76%, var(--w-sec) 88%, var(--w-light) 100%); }
  .welcome > *, .welcome p, .welcome-role { max-width: 76%; }
  .welcome p { font-size: 1rem; }
}

/* Asistente: estado «Próximamente» */
.soon { display: inline-flex; align-items: center; font-size: .68rem; font-weight: 600; letter-spacing: .02em; padding: 1px 8px; border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--at-coral) 16%, transparent), color-mix(in srgb, var(--at-lavender) 55%, transparent)); color: var(--accent); white-space: nowrap; }
.nav a .soon { margin-left: auto; }
@media (min-width: 768px) and (max-width: 1023px) { .sidebar .nav a .soon { display: none; } }
.soon-page { max-width: 760px; margin: 0 auto; padding: 12px 0 24px; }
.soon-hero { text-align: center; padding: 34px 20px 30px; border-radius: 26px; background: linear-gradient(160deg, color-mix(in srgb, var(--at-coral) 10%, var(--surface)), color-mix(in srgb, var(--at-lavender) 45%, var(--surface))); border: .5px solid var(--border); }
.soon-hero .soon { font-size: .78rem; padding: 3px 12px; margin-bottom: 16px; background: var(--surface); }
.soon-hero h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: 0 0 10px; }
.soon-hero p { max-width: 520px; margin: 0 auto; color: var(--muted); font-size: 1.02rem; }
.soon-hero .ai-orb { width: 68px; height: 68px; border-radius: 20px; background: linear-gradient(135deg, var(--at-coral), var(--at-peach) 60%, var(--at-lavender)); color: #fff; }
.soon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; margin-top: 16px; }
.soon-item { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: .5px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.soon-item > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.soon-item b { display: block; font-weight: 600; }
.soon-item small { color: var(--muted); }
.ai-ask.ai-soon { color: var(--text); text-decoration: none; padding: 10px 12px 10px 14px; }
.ai-ask.ai-soon:hover { background: var(--surface-2); }
.ai-soon-text { flex: 1; min-width: 0; font-size: .9rem; color: var(--muted); }
.ai-soon-text b { color: var(--text); font-weight: 600; }
@media (max-width: 599px) { .ai-ask.ai-soon { align-items: flex-start; flex-wrap: wrap; } .ai-ask.ai-soon .soon { margin-left: 30px; } }

/* Saldo de vacaciones por empleado */
.vac-bar { display: flex; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 8px 0 10px; }
.vac-bar i { display: block; height: 100%; }
.vac-bar .t, .vac-legend .t { background: var(--accent); }
.vac-bar .s, .vac-legend .s { background: var(--accent-2); }
.vac-bar .p, .vac-legend .p { background: var(--warning); }
.vac-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); }
.vac-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vac-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--surface-3); display: inline-block; }
.t th.th-wrap { white-space: normal; min-width: 96px; max-width: 120px; line-height: 1.25; }
.t td.th-wrap { white-space: nowrap; }
.push-ask { padding: 8px 8px 8px 14px; }
.push-ask .ai-soon-text { flex: 1; min-width: 0; font-size: .9rem; }
@media (max-width: 520px) { .push-ask { flex-wrap: wrap; } .push-ask .ai-soon-text { flex-basis: calc(100% - 40px); } }
.push-modal { text-align: center; }
.push-modal-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 4px auto 12px; color: #fff; background: linear-gradient(135deg, var(--at-coral, #ff345f), var(--at-peach, #fe6864)); }
.push-modal p { margin: 0 auto; max-width: 320px; color: var(--muted); }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 16px 0 12px; }
.login .or::before, .login .or::after { content: ''; flex: 1; height: .5px; background: var(--border); }
.btn-google { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); gap: 10px; }
.btn-google:hover { background: var(--surface-2); }
.cal-title.cap::first-letter { text-transform: uppercase; }
.year-grid.one-month { grid-template-columns: 1fr; }
.year-grid.one-month .ym { border: 0; padding: 4px 0 0; }
.year-grid.one-month .ym h4 { display: none; }
.year-grid.one-month .yg { font-size: .95rem; gap: 6px; }
.year-grid.one-month .yg b { font-size: .75rem; }
@media (min-width: 768px) and (max-width: 1023px) { .stats.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Selector segmentado (forma de pago) */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 10px; border-radius: var(--radius-sm);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); font-weight: 600; font-size: .92rem; text-align: center; transition: background .15s, box-shadow .15s; }
.choice span svg { display: inline; vertical-align: -3px; margin-right: 4px; }
.choice small { font-weight: 400; color: var(--muted); font-size: .76rem; }
.choice input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Próximos cumpleaños */
.bday-list { display: grid; gap: 4px; }
.bday { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-radius: 12px; }
.bday .title { font-weight: 600; font-size: .95rem; }
.bday .grow { min-width: 0; }
.bday-when { font-size: .85rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.bday.today { background: var(--accent-soft); padding-inline: 10px; }
/* Tablón de anuncios */
.ann-list { display: grid; gap: 16px; max-width: 760px; }
.ann { padding: 0; overflow: hidden; }
.ann > :not(.ann-img) { margin-left: 18px; margin-right: 18px; }
.ann-img { display: block; width: 100%; max-height: 360px; object-fit: cover; background: var(--surface-2); }
.ann .ann-img { border-radius: 0; margin: 0; }
#aprev .ann-img { border-radius: var(--radius-sm); margin-top: 8px; max-height: 240px; }
.ann-head { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; }
.ann-head h3 { flex: 1; margin: 0; font-size: 1.1rem; line-height: 1.3; }
.ann-pin { color: var(--accent); margin-right: 6px; vertical-align: -1px; }
.ann-tools { display: flex; gap: 2px; margin: -6px -8px 0 0; }
.ann-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.avatar.xs { width: 22px; height: 22px; font-size: .6rem; }
.ann-body { white-space: pre-line; margin-top: 10px; margin-bottom: 0; line-height: 1.55; overflow-wrap: anywhere; }
.ann-foot { display: flex; align-items: center; gap: 16px; padding: 12px 0 14px; }
.ann-like, .ann-views { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.ann-like { background: none; border: 0; padding: 4px 0; color: var(--muted); cursor: pointer; font: inherit; }
.ann-like:hover { color: var(--danger); }
.ann-like.on { color: var(--danger); }
.ann-like.on svg { fill: currentColor; }
.ann-foot .btn-link { margin-left: auto; }
.ann-dash-head { padding: 0 4px; }
.ann-dash .ann .ann-img { max-height: 200px; }
.push-devs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .9rem; } .push-devs li { display: flex; align-items: center; gap: 8px; }
.ann[data-ann] { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.ann[data-ann]:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.ann[data-ann]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ann-more { margin-left: auto; color: var(--accent); font-weight: 600; font-size: .88rem; }
.ann-full h2 { margin: 4px 0 6px; font-size: 1.35rem; line-height: 1.25; }
.ann-full-img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 12px; display: block; }
.ann-full .ann-body { font-size: 1rem; }
/* Planificación: selección de celdas */
.plan.selectable { user-select: none; -webkit-user-select: none; }
.plan.selectable td.cell.can { touch-action: manipulation; }
.plan td.cell.sel { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent); }
.plan td.cell.sel .add-hint { opacity: .8; color: var(--accent); }
.plan th.pick, .plan td.emp.pick { cursor: pointer; }
.plan th.pick:hover, .plan td.emp.pick:hover { color: var(--accent); }
.plan th.tot, .plan td.tot { width: 64px; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; vertical-align: middle; }
.selbar { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b, 0px)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: .5px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 8px 10px; max-width: calc(100vw - 32px); flex-wrap: wrap; animation: up .2s; }
.selbar-n { font-size: .9rem; padding: 0 6px; }
@media (max-width: 767px) { .selbar { bottom: calc(84px + var(--safe-b, 0px)); } }
.assign-list { max-height: 150px; overflow: auto; margin: 0; padding: 8px 12px 8px 28px; background: var(--surface-2); border-radius: 10px; font-size: .85rem; line-height: 1.6; }
/* Aprobación rápida ✓ / ✗ */
.qr { display: inline-flex; gap: 8px; }
.qr-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .08s; }
.qr-btn:active { transform: scale(.94); }
.qr-btn.ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.qr-btn.ok:hover { background: var(--success); color: #fff; }
.qr-btn.ko { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.qr-btn.ko:hover { background: var(--danger); color: #fff; }
@container tbl (max-width: 700px) {
  .responsive .t td.actions:empty { display: none; }
  .responsive .t td.actions { justify-content: flex-end; padding-top: 8px; }
}
/* Mapa de la jornada */
.route-box { border: .5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.route-map { height: 280px; background: var(--surface-2); }
@media (min-width: 768px) { .route-map { height: 340px; } }
.route-info { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; align-items: center; }
.route-info span { display: inline-flex; align-items: center; gap: 6px; }
.rdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.15); }
.btn-link-inline { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }
.btn-link-inline:hover { text-decoration: underline; }
.cb-geo { color: var(--accent); display: inline-grid; margin-left: 4px; }
.leaflet-container { font: inherit; }
