/* ==========================================================================
   Molisud RRHH — SH mockup fidelity (Drive 1.png / 2.png / 3.png)
   Light + dark themes · fully responsive
   ========================================================================== */

:root,
[data-theme="light"] {
  --sidebar: #0b1220;
  --sidebar-2: #111827;
  --sidebar-text: #c7d2e0;
  --sidebar-muted: #8b9bb0;
  --sidebar-active: #1d4ed8;
  --sidebar-active-bg: rgba(37, 99, 235, 0.22);
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-border: rgba(255, 255, 255, 0.08);

  --bg: #eef2f7;
  --bg-elevated: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary: #2563eb;
  --primary-2: #3b82f6;
  --primary-soft: #eff6ff;
  --primary-text: #1e40af;

  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --ok-text: #166534;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --warn-text: #92400e;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --danger-text: #991b1b;
  --info: #0284c7;
  --info-soft: #e0f2fe;

  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.28);
  color-scheme: light;
}

[data-theme="dark"] {
  --sidebar: #05080f;
  --sidebar-2: #0a101c;
  --sidebar-text: #d5deea;
  --sidebar-muted: #8a97ab;
  --sidebar-active: #3b82f6;
  --sidebar-active-bg: rgba(59, 130, 246, 0.2);
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-border: rgba(255, 255, 255, 0.08);

  --bg: #0b1220;
  --bg-elevated: #111827;
  --surface: #151e2e;
  --surface-2: #1a2436;
  --text: #e8eef7;
  --text-2: #c2cddc;
  --muted: #93a0b4;
  --border: #243247;
  --border-strong: #334155;

  --primary: #3b82f6;
  --primary-2: #60a5fa;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --primary-text: #93c5fd;

  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, 0.14);
  --ok-text: #86efac;
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --warn-text: #fcd34d;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --danger-text: #fecaca;
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.12);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --focus: 0 0 0 3px rgba(59, 130, 246, 0.35);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: var(--focus); }

/* ---------- Boot ---------- */
.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #0b1220, #152033 55%, #1e3a5f);
}
.boot__card {
  text-align: center;
  color: #e8f0fa;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.boot__card img {
  width: 56px; height: 56px; border-radius: 14px; background: #fff;
}
.boot__spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 480px at 12% 0%, rgba(37,99,235,.28), transparent 60%),
    radial-gradient(700px 420px at 90% 100%, rgba(215,165,66,.16), transparent 55%),
    linear-gradient(160deg, #071018, #0b1220 42%, #122033);
}
.login__card {
  width: min(440px, 100%);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(0,0,0,.35);
  padding: 32px 28px;
  display: grid;
  gap: 16px;
}
.login__brand { display: flex; align-items: center; gap: 12px; }
.login__brand img { width: 48px; height: 48px; border-radius: 12px; background: #fff; }
.login__brand h1 { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.login__brand span { display: block; font-size: .82rem; color: var(--muted); font-weight: 500; }
.login__lead { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.login__error {
  background: var(--danger-soft);
  color: var(--danger-text);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: .9rem;
}
.login__field {
  display: grid;
  gap: 6px;
}
.login__field label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.login__field input {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 11px 12px;
}
.login__pw {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.login__pw-toggle {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.login__hint, .login__meta {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
}
.login details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  list-style: none;
}
.login details summary::-webkit-details-marker { display: none; }

/* ---------- Buttons ---------- */
.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, opacity .12s ease, background .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}
.btn--ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--soft {
  background: var(--primary-soft);
  color: var(--primary-text);
}
.btn--sm { padding: 8px 12px; font-size: .86rem; border-radius: 10px; }
.btn--icon {
  width: 40px; height: 40px; padding: 0;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn--icon:hover { background: var(--primary-soft); color: var(--primary); }

/* ---------- Shell ---------- */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
}

.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: min(86vw, var(--sidebar-w));
  height: 100vh;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: var(--sidebar-text);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--sidebar-border);
  z-index: 40;
  transform: translateX(-105%);
  transition: transform .22s ease;
  box-shadow: 20px 0 40px rgba(0,0,0,.25);
}
.sidebar.is-open { transform: translateX(0); }
.sidebar__hint {
  margin: 0;
  padding: 0 10px;
  color: var(--sidebar-muted);
  font-size: .72rem;
  line-height: 1.35;
}
.sidebar__close {
  margin-left: auto;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 14px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar__brand img {
  width: 40px; height: 40px; border-radius: 12px; background: #fff; flex-shrink: 0;
}
.sidebar__brand strong {
  display: block;
  color: #fff;
  font-size: .98rem;
  letter-spacing: -0.01em;
}
.sidebar__brand small {
  color: var(--sidebar-muted);
  font-size: .72rem;
}
.nav {
  display: grid;
  gap: 3px;
  flex: 1;
  overflow: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}
.nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--sidebar-text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 500;
  font-size: .92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav button .nav-ico {
  width: 20px;
  text-align: center;
  opacity: .9;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav button:hover { background: var(--sidebar-hover); color: #fff; }
.nav button.active {
  background: var(--sidebar-active-bg);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
  font-weight: 600;
}
.nav .badge {
  margin-left: auto;
  font-size: .68rem;
  background: rgba(215, 165, 66, 0.22);
  color: #f0d28a;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.sidebar__user {
  border-top: 1px solid var(--sidebar-border);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
.sidebar__user .who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .85rem;
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  color: #fff;
  flex-shrink: 0;
}
.avatar--lg { width: 56px; height: 56px; font-size: 1.15rem; }
.who__meta { min-width: 0; }
.who__meta strong {
  display: block;
  color: #fff;
  font-size: .86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.who__meta span {
  display: block;
  color: var(--sidebar-muted);
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sidebar__actions .btn {
  background: rgba(255,255,255,.06);
  color: #e8eef7;
  border: 1px solid rgba(255,255,255,.08);
  font-size: .78rem;
  padding: 8px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Mobile top bar */
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  align-items: center;
  gap: 10px;
}
.mobile-bar__title {
  font-weight: 700;
  font-size: .95rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mark-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  padding: 4px 12px 4px 4px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.mark-btn img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #c9a227;
  display: block;
}
.mark-btn:hover { border-color: var(--primary); color: var(--primary); }
.mark-btn[aria-expanded="true"] {
  box-shadow: var(--focus);
  border-color: var(--primary);
}
.mark-btn__txt { display: grid; line-height: 1.15; text-align: left; }
.mark-btn__txt strong { font-size: .82rem; }
.mark-btn__txt span { font-size: .68rem; color: var(--muted); font-weight: 600; }
.topbar__lead {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1 1 16rem;
}
.topbar__titles { min-width: 0; }
.home-btn { white-space: nowrap; }

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 8px;
  flex-wrap: wrap;
}
.topbar h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar h2 .step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 .4em;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}
.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .84rem;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}

.content {
  padding: 8px 24px 32px;
  display: grid;
  gap: 16px;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 14px; }
.grid--kpi {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--modules {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.grid--dash-mid {
  grid-template-columns: 1.35fr 1fr;
}
.grid--dash-bot {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Inicio hub (SH cuadrantes) ---------- */
.hub {
  display: grid;
  gap: 18px;
}
.hub__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 22px;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--primary-soft), transparent 55%),
    var(--surface);
}
.hub__eyebrow {
  margin: 0 0 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hub__greet {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  letter-spacing: -0.02em;
  font-weight: 750;
}
.hub__howto {
  margin: 0;
  max-width: 52ch;
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.45;
}
.hub__lead {
  margin: 0;
  color: var(--text-2);
  font-size: .92rem;
  max-width: 42ch;
  line-height: 1.45;
}
.hub__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.hub__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hub__section-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.hub__alert-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--border));
  background: var(--danger-soft);
  color: var(--danger-text);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 48px;
}
.hub__alert-strip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.hub__alert-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, transparent);
}
.hub__alert-cta {
  margin-left: auto;
  font-weight: 700;
  font-size: .86rem;
  color: var(--danger-text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* SH size wireframe: desk + rail + stage + alert. Tokens unchanged. */
.hub__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.hub__meta .hub__greet {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}
.hub__meta .hub__eyebrow { margin: 0 0 2px; }

.hub-desk {
  position: relative;
  margin-top: 36px;
  padding: 22px 18px 18px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--text) 7%, var(--bg));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 420px;
}
.hub-tabs {
  position: absolute;
  top: 0;
  right: 22px;
  transform: translateY(-88%);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: calc(100% - 36px);
}
.hub-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: var(--surface);
  color: var(--text-2);
  border-radius: 12px 12px 0 0;
  padding: 9px 14px 11px;
  font-weight: 700;
  font-size: .8rem;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.hub-tab:hover { color: var(--primary); background: var(--primary-soft); }
.hub-tab__n {
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: 1.35em;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .68rem;
}

.hub-desk__body {
  display: grid;
  grid-template-columns: 13.75rem minmax(0, 1fr);
  grid-template-rows: minmax(280px, 1fr) auto;
  grid-template-areas:
    "rail stage"
    "rail alert";
  gap: 16px;
  min-height: 400px;
}
.hub-rail {
  grid-area: rail;
  display: grid;
  gap: 12px;
  align-content: start;
}
.hub-stage {
  grid-area: stage;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  min-height: 320px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}
.hub-stage__search {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  width: min(340px, 100%);
}
.hub-stage__search .field {
  flex: 1 1 auto;
  border-radius: 999px;
  padding: 9px 14px;
}
.hub-stage__lupa {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hub-stage__work {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.hub-stage__avisos {
  flex: 1 1 14rem;
  min-width: min(100%, 14rem);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hub-stage__avisos .hub__chips {
  justify-content: flex-start;
  max-width: none;
}
.hub-alert-card .alert-list {
  max-height: 16rem;
  overflow: auto;
}
.hub-alert-slot {
  grid-area: alert;
  justify-self: end;
  width: min(22rem, 100%);
}

.module-tile.module-tile--rail {
  min-height: 92px;
  padding: 12px;
  gap: 8px;
  grid-template-rows: auto auto;
}
.module-tile.module-tile--rail .module-tile__ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1rem;
}
.module-tile.module-tile--rail .module-tile__title { font-size: .92rem; }
.module-tile.module-tile--rail .module-tile__foot {
  border-top: 0;
  padding-top: 0;
}

.module-tile.module-tile--hero {
  width: min(22.5rem, 56%);
  min-height: 168px;
  align-self: start;
}
.module-tile.module-tile--alert {
  min-height: 132px;
  width: 100%;
}

.hub-more {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
}
.hub-more__label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.hub-more__row { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .84rem;
  font-weight: 650;
  box-shadow: var(--shadow-sm);
}
.hub-chip:hover {
  border-color: var(--border-strong);
  color: var(--primary);
  background: var(--primary-soft);
}

.module-tile {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  min-height: 168px;
  padding: 16px;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  min-width: 0;
}
.module-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.module-tile:active {
  transform: translateY(0);
}
.module-tile--priority {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  background:
    linear-gradient(160deg, var(--danger-soft), transparent 55%),
    var(--surface);
}
.module-tile__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.module-tile__ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--primary-soft);
  color: var(--primary);
}
.module-tile--blue .module-tile__ico { background: var(--primary-soft); color: var(--primary); }
.module-tile--green .module-tile__ico { background: var(--ok-soft); color: var(--ok); }
.module-tile--red .module-tile__ico { background: var(--danger-soft); color: var(--danger); }
.module-tile--violet .module-tile__ico { background: #ede9fe; color: #7c3aed; }
.module-tile--cyan .module-tile__ico { background: var(--info-soft); color: var(--info); }
.module-tile--warn .module-tile__ico { background: var(--warn-soft); color: var(--warn); }
[data-theme="dark"] .module-tile--violet .module-tile__ico {
  background: rgba(124, 58, 237, .18);
  color: #c4b5fd;
}
.module-tile__status {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}
.module-tile__status--ok {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.module-tile__status--partial {
  background: var(--warn-soft);
  color: var(--warn-text);
}
.module-tile__status--pending {
  background: var(--surface-2);
  color: var(--muted);
}
.module-tile__status--muted {
  background: var(--surface-2);
  color: var(--muted);
}
.module-tile__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.module-tile__title {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  font-weight: 750;
}
.module-tile__blurb {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.35;
}
.module-tile__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.module-tile__metric {
  font-size: .78rem;
  font-weight: 650;
  color: var(--text-2);
}
.module-tile__metric--muted {
  color: var(--muted);
  font-weight: 600;
}
.module-tile__arrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform .15s ease;
}
.module-tile:hover .module-tile__arrow {
  transform: translateX(3px);
}
.split {
  display: grid;
  grid-template-columns: 1.7fr .95fr;
  gap: 14px;
  align-items: start;
}
.split--empleados {
  grid-template-columns: 1.05fr 1.35fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.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 h3 {
  margin: 0;
  font-size: .98rem;
  letter-spacing: -0.01em;
}
.card__link {
  color: var(--primary);
  font-size: .84rem;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
}

/* KPI tiles (mockup style) */
.kpi {
  display: grid;
  gap: 8px;
  min-height: 108px;
}
.kpi__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.kpi__icon {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.kpi__icon--blue { background: var(--primary-soft); color: var(--primary); }
.kpi__icon--green { background: var(--ok-soft); color: var(--ok); }
.kpi__icon--red { background: var(--danger-soft); color: var(--danger); }
.kpi__icon--violet { background: #ede9fe; color: #7c3aed; }
.kpi__icon--cyan { background: var(--info-soft); color: var(--info); }
[data-theme="dark"] .kpi__icon--violet { background: rgba(124,58,237,.18); color: #c4b5fd; }

.kpi__label {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}
.kpi__value {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}
.kpi__value--ok { color: var(--ok); }
.kpi__value--warn { color: var(--warn); }
.kpi__value--danger { color: var(--danger); }
.kpi__sub {
  font-size: .76rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.delta {
  font-weight: 700;
  font-size: .74rem;
}
.delta--up { color: var(--ok); }
.delta--down { color: var(--danger); }

/* Circular coverage (mockup) */
.rings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 12px;
  align-items: start;
}
.ring {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.ring__val {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset .4s ease;
}
.ring__val--ok { stroke: var(--ok); }
.ring__val--warn { stroke: var(--warn); }
.ring__val--mid { stroke: #f59e0b; }
.ring__val--danger { stroke: var(--danger); }
.ring__val--blue { stroke: var(--primary); }
.ring__center {
  font-size: .78rem;
  font-weight: 800;
  fill: var(--text);
  transform: rotate(90deg);
  transform-origin: center;
}
.ring__label {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}
.ring__meta {
  font-size: .7rem;
  color: var(--text-2);
  font-family: var(--mono);
}

/* Alerts */
.alert-list { display: grid; gap: 10px; }
.alert {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .88rem;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
}
.alert--clickable {
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease, transform .12s ease;
}
.alert--clickable:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface-2));
  box-shadow: var(--shadow-sm);
}
.alert--clickable:active { transform: scale(0.995); }
.alert--clickable.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.alert__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.alert--alta .alert__dot { background: var(--danger); }
.alert--media .alert__dot { background: var(--warn); }
.alert--info .alert__dot { background: var(--info); }
.alert__body { min-width: 0; }
.alert__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.alert__nivel {
  text-transform: capitalize;
  font-size: .78rem;
  letter-spacing: 0.02em;
}
.alert__text { line-height: 1.35; }
.alert__action {
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  background: none;
  border: 0;
  padding: 0;
  white-space: nowrap;
  align-self: center;
  cursor: pointer;
  font-family: inherit;
}
.alert__hit {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.alert__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  align-self: center;
}
.alert__open {
  white-space: nowrap;
}
.alert-detail-hero {
  border-left: 4px solid var(--info);
}
.alert-detail-hero--alta { border-left-color: var(--danger); }
.alert-detail-hero--media { border-left-color: var(--warn); }
.alert-detail-hero--info { border-left-color: var(--info); }
.alert-detail-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Bars / charts simple */
.bars { display: grid; gap: 10px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(72px, 110px) 1fr 44px;
  gap: 10px;
  align-items: center;
  font-size: .86rem;
}
.bar-track {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}
.bar-fill--ok { background: linear-gradient(90deg, #16a34a, #22c55e); }
.bar-fill--warn { background: linear-gradient(90deg, #d97706, #f59e0b); }
.bar-fill--danger { background: linear-gradient(90deg, #dc2626, #f87171); }

.spark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 72px;
  padding-top: 8px;
}
.spark span {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  min-width: 6px;
  opacity: .9;
}
.spark--green span { background: linear-gradient(180deg, #4ade80, #16a34a); }

/* Toolbar / filters */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.field {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 9px 12px;
  min-width: 0;
  color: var(--text);
}
.field--grow { flex: 1 1 180px; min-width: 160px; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }

/* Tables */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.card--flush .table-wrap { border: 0; border-radius: 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 640px;
}
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  position: sticky;
  top: 0;
  z-index: 1;
}
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: default; transition: background .12s ease; }
tbody tr.clickable { cursor: pointer; }
tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
tbody tr.is-selected td {
  background: var(--primary-soft);
}
.emp-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.emp-cell .avatar { width: 32px; height: 32px; font-size: .75rem; }
.actions-cell {
  display: flex;
  gap: 6px;
}
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  font-size: .85rem;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary-2); }

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
}
.pill--ok { background: var(--ok-soft); color: var(--ok-text); }
.pill--warn { background: var(--warn-soft); color: var(--warn-text); }
.pill--danger { background: var(--danger-soft); color: var(--danger-text); }
.pill--info { background: var(--info-soft); color: var(--info); }
.pill--muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pill--blue { background: var(--primary-soft); color: var(--primary-text); }

/* Detail panel / Empleados dossier */
.detail-panel { display: grid; gap: 14px; }
.detail-panel__hero {
  display: flex;
  gap: 12px;
  align-items: center;
}
.detail-panel__hero h4 {
  margin: 0;
  font-size: 1.05rem;
}
.detail-panel__hero p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .84rem;
}
.dossier {
  display: grid;
  gap: 14px;
  align-content: start;
}
.dossier__section {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.dossier__section:first-of-type { border-top: 0; padding-top: 0; }
.dossier__h {
  margin: 0;
  font-size: .88rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dossier__presence {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.dossier__week {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.dossier__day {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.dossier__day-label {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.dossier__history { margin: 0; }
.dossier__weeknav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dossier__weeknav-label {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1 1 8rem;
  min-width: 0;
  font-size: .95rem;
}
.dossier__punches {
  display: grid;
  gap: 2px;
}
.dossier__punch {
  font-size: .72rem;
  line-height: 1.3;
  color: var(--text-2);
}
.dossier__punch.mono { font-size: .72rem; }
.dossier__punch--miss { color: var(--muted); }
.dossier__punch--off { color: var(--warn-text); }
.dossier__older summary {
  cursor: pointer;
  font-size: .86rem;
  color: var(--text-2);
}
.dossier__older[open] summary { margin-bottom: 8px; }
.dossier__sensibles {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 8px 12px;
}
.dossier__sensibles summary {
  cursor: pointer;
  list-style: disclosure-closed;
}
.dossier__sensibles[open] summary { list-style: disclosure-open; }
.dossier__sensibles-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.shift-chip--readonly { pointer-events: none; }
.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.detail div {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.detail dt {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.detail dd {
  margin: 4px 0 0;
  font-weight: 650;
  font-size: .9rem;
  word-break: break-word;
}

/* Source banner */
.source-banner {
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  color: var(--primary-text);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: .84rem;
  line-height: 1.45;
}
.source-banner strong { font-weight: 700; }
.source-banner--live {
  background: var(--ok-soft);
  border-color: color-mix(in srgb, var(--ok) 28%, var(--border));
  color: var(--ok-text);
}
.source-banner--offline {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 30%, var(--border));
  color: var(--warn-text);
}

/* Data origin badge (topbar) */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  max-width: 100%;
}
.source-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: .9;
}
.source-badge--live {
  background: var(--ok-soft);
  color: var(--ok-text);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--border));
}
.source-badge--offline {
  background: var(--warn-soft);
  color: var(--warn-text);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
}
.source-badge--seed {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}
.source-badge--stage {
  background: var(--primary-soft);
  color: var(--primary-text);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}

/* Data mode switch (Excel | Naaloo | Ambos) */
.mode-switch {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
.mode-switch__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
  padding: 7px 12px;
  min-height: 34px;
  line-height: 1.1;
  transition: background .15s ease, color .15s ease;
}
.mode-switch__btn + .mode-switch__btn {
  border-left: 1px solid var(--border);
}
.mode-switch__btn:hover {
  color: var(--text);
  background: var(--surface);
}
.mode-switch__btn.is-active {
  background: var(--primary);
  color: #fff;
}
[data-theme="dark"] .mode-switch__btn.is-active {
  background: var(--primary);
  color: #0b1220;
}

.guiado-strip {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}
.guiado-strip__purpose,
.guiado-strip__first {
  margin: 0;
  color: var(--text-2);
  font-size: .9rem;
  line-height: 1.45;
  max-width: 62ch;
}
.guiado-strip__first .btn {
  vertical-align: baseline;
  margin: 0 2px;
}
.coach {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}
.coach p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.4;
  max-width: 62ch;
}
.ficha-back { margin: 0 0 12px; }
@media (prefers-reduced-motion: reduce) {
  .coach, .guiado-strip { transition: none; }
}

.reconcile-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: .86rem;
}
.reconcile-strip--partial {
  border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
  background: var(--warn-soft);
}
.src-chip {
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.src-chip--both {
  background: var(--ok-soft);
  color: var(--ok-text);
  border-color: color-mix(in srgb, var(--ok) 30%, var(--border));
}
.src-chip--naaloo {
  background: var(--primary-soft);
  color: var(--primary-text);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.src-chip--xlsx {
  background: var(--surface-2);
  color: var(--muted);
}

.source-banner--seed {
  border-color: var(--border);
}

.empty {
  color: var(--muted);
  font-size: .92rem;
  padding: 22px;
  text-align: center;
}
.mono { font-family: var(--mono); font-size: .84rem; }
.footer-note {
  color: var(--muted);
  font-size: .76rem;
  margin: 8px 0 0;
  line-height: 1.4;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Pagination */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--muted);
  background: var(--surface);
}
.pager__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.pager__size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-2);
}
.pager__size select.field {
  min-width: 88px;
  padding: 6px 28px 6px 10px;
  font-weight: 700;
}
.pager__btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
}
.pager__btns button {
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 700;
  font-size: .82rem;
  padding: 0 8px;
}
.pager__btns button:hover:not(:disabled) {
  border-color: var(--primary-2);
  color: var(--primary);
  background: var(--primary-soft);
}
.pager__btns button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pager__btns button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.pager__ellipsis {
  min-width: 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  user-select: none;
}
.table-wrap--scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.table-wrap--scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border);
}

@media (max-width: 560px) {
  .pager { flex-direction: column; align-items: stretch; }
  .pager__btns { justify-content: center; }
  .pager__meta { justify-content: space-between; }
}

/* Overlay for mobile sidebar */
.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 20, 0.55);
  z-index: 35;
  backdrop-filter: blur(2px);
}
.scrim.is-open { display: block; }

/* Theme toggle visual */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.theme-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 700;
}
.theme-toggle button.active {
  background: var(--primary-soft);
  color: var(--primary-text);
}

/* Critical list */
.crit-list { display: grid; gap: 8px; }
.crit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.crit-item .ico { color: var(--danger); }

/* Org chart simple */
.org {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 8px 0;
}
.org__node {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 140px;
}
.org__node strong { display: block; font-size: .88rem; }
.org__node span { color: var(--muted); font-size: .75rem; }
.org__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

@media (min-width: 1280px) {
  .hub-desk { min-height: 480px; }
  .hub-desk__body { min-height: 440px; }
  .hub-stage { min-height: 360px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .grid--kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--dash-bot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .split,
  .split--empleados,
  .grid--dash-mid { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .grid--modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-desk__body {
    grid-template-columns: 12.25rem minmax(0, 1fr);
  }
  .module-tile.module-tile--hero { width: min(20rem, 70%); }
}
@media (max-width: 900px) {
  .mobile-bar { display: flex; }
  .topbar .mark-btn { display: none; }
  .mark-btn__txt { display: none; }
  .grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 10px 14px 28px; }
  .topbar { padding: 14px 14px 4px; }
  .detail { grid-template-columns: 1fr; }
  .hub__alert-cta { margin-left: 0; width: 100%; }
  .hub-desk { margin-top: 18px; padding-top: 16px; min-height: 0; }
  .hub-tabs {
    position: static;
    transform: none;
    right: auto;
    margin: 0 0 12px;
    max-width: 100%;
  }
  .hub-tab { border-bottom: 1px solid var(--border); border-radius: 12px; }
  .hub-desk__body {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "stage"
      "rail"
      "alert";
    min-height: 0;
  }
  .hub-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hub-stage { min-height: 240px; }
  .module-tile.module-tile--hero { width: min(22rem, 100%); }
  .hub-alert-slot { justify-self: stretch; width: 100%; }
}
@media (max-width: 560px) {
  .grid--kpi,
  .grid--2,
  .grid--3,
  .grid--modules,
  .grid--dash-bot { grid-template-columns: 1fr; }
  .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-row { grid-template-columns: 72px 1fr 36px; font-size: .8rem; }
  .topbar__right { width: 100%; }
  .date-pill { flex: 1; justify-content: center; }
  .login__card { padding: 24px 18px; }
  table { min-width: 520px; font-size: .82rem; }
  .module-tile { min-height: 148px; }
  .hub-rail { grid-template-columns: 1fr; }
  .hub-stage__search { width: 100%; }
  .module-tile.module-tile--hero,
  .module-tile.module-tile--rail,
  .module-tile.module-tile--alert { width: 100%; min-height: 96px; }
}

/* ---------- Planificación de turnos (Módulo 1 · refs 14-ago) ---------- */
.plan-stage { padding: 12px 14px 10px; }
.plan-stage__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.plan-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--border);
}
.plan-tab {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-weight: 700;
  font-size: .82rem;
  padding: 7px 12px;
  border-radius: 999px;
}
.plan-tab.is-active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.plan-stage__actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.plan-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
}
.plan-toolbar .field--search {
  border-radius: 999px;
  min-width: 16rem;
  flex: 1 1 16rem;
}
.plan-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 8px;
}
.plan-filters__field {
  display: grid;
  gap: 4px;
  min-width: 10rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-2);
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}
.plan-filters__field legend {
  padding: 0;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-2);
}
.plan-filters__field .field { min-width: 11rem; }
.plan-filters__field .field--search { min-width: 16rem; border-radius: 999px; }
.plan-tipo__group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.plan-tipo__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  min-height: 32px;
  min-width: 44px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.plan-tipo__btn.is-on {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.plan-empty { text-align: center; padding: 1.6rem 1rem; }
.plan-empty p { margin: 0 0 10px; }
.plan-filter-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: .82rem;
  color: var(--text-2);
}
.plan-filter-status p { margin: 0; }
.plan-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-chip {
  border: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary-text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 32px;
}
.plan-emp__txt { position: relative; }
.plan-emp__tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 6;
  min-width: 14rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px 10px;
  font-size: .75rem;
  font-weight: 600;
}
.plan-emp__tip span { display: block; color: var(--text-2); font-weight: 500; }
.plan-emp__who:hover .plan-emp__tip,
.plan-emp__who:focus-within .plan-emp__tip { display: grid; gap: 2px; }
.plan-toolbar .field--date { min-width: 9.5rem; }
.plan-week {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.plan-filters__week {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: 14px;
  align-items: start;
}
.plan-layout--single { grid-template-columns: 1fr; }
.plan-board {
  overflow: auto;
  max-height: min(72vh, 880px);
  border-radius: var(--radius-sm);
}
.plan-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}
.plan-table th,
.plan-table td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 6px;
  vertical-align: middle;
}
.plan-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  font-size: .72rem;
  color: var(--muted);
  text-align: center;
  border: 0;
  padding: 6px 4px;
}
.plan-day.is-weekend,
.plan-cell.is-weekend { background: color-mix(in srgb, var(--surface-2) 80%, var(--bg)); }
.plan-cell--dim {
  opacity: .28;
  filter: grayscale(.35);
}
.plan-cell--dim .plan-cell__btn { pointer-events: none; }
.plan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 8px 0 0;
}
.plan-legend__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 650;
  cursor: pointer;
}
.plan-legend__btn.is-on {
  box-shadow: var(--focus);
  border-color: color-mix(in srgb, var(--text) 25%, var(--border));
}
.plan-legend__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.plan-view-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.plan-view-menu label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 650;
}
.plan-day__pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  line-height: 1.15;
  text-transform: lowercase;
}
.plan-day.is-weekend .plan-day__pill { color: var(--muted); }
.plan-day__pill strong { font-size: .95rem; color: var(--text); }
.plan-table thead th.plan-emp {
  text-align: left;
  z-index: 4;
}
.plan-emp {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 13.5rem;
  background: var(--surface);
}
.plan-emp__who {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  width: 100%;
}
.plan-emp__who:hover,
.plan-emp__who:focus-visible {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  outline: none;
}
.plan-emp__txt { min-width: 0; }
.plan-emp__name {
  display: block;
  font-weight: 650;
  font-size: .86rem;
  line-height: 1.2;
}
.plan-emp__sector {
  display: block;
  margin-top: 2px;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}
.plan-emp__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.plan-sector td {
  background: var(--surface-2);
  font-weight: 750;
  font-size: .78rem;
  letter-spacing: .02em;
  padding: 8px 10px;
  position: sticky;
  left: 0;
}
.plan-cell.is-user .plan-cell__btn {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}
.plan-cell.is-ingest .plan-cell__btn {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 35%, transparent);
}
.shift-chip__src {
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.plan-cell {
  width: 6.6rem;
  min-width: 6.6rem;
  text-align: center;
}
.plan-cell__btn {
  width: 100%;
  min-height: 44px;
  border: 1px dashed transparent;
  background: transparent;
  border-radius: 10px;
  padding: 2px;
  display: grid;
  place-items: center;
}
.plan-cell__btn:hover,
.plan-cell__btn:focus-visible {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}
.plan-cell__empty {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
}
.plan-cell__btn:hover .plan-cell__empty,
.plan-cell__btn:focus-visible .plan-cell__empty { opacity: 1; }

.shift-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border-radius: 10px;
  padding: 6px 8px 5px;
  border: 1px solid transparent;
  font-weight: 750;
  line-height: 1.15;
  text-align: left;
}
.shift-chip__top {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.shift-chip__code { font-size: .8rem; letter-spacing: .02em; flex: 1; }
.shift-chip__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #64748b;
  box-shadow: 0 0 0 2px color-mix(in srgb, #64748b 25%, transparent);
  flex-shrink: 0;
}
.shift-chip__dot--on {
  background: #22c55e;
  box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 25%, transparent);
}
.shift-chip__dot--late {
  background: #dc2626;
  box-shadow: 0 0 0 2px color-mix(in srgb, #dc2626 35%, transparent);
}
.shift-chip__dot--caution {
  background: #eab308;
  box-shadow: 0 0 0 2px color-mix(in srgb, #eab308 35%, transparent);
}
.shift-chip__dot--off {
  background: #2563eb;
  box-shadow: 0 0 0 2px color-mix(in srgb, #2563eb 25%, transparent);
}
.shift-chip__dot--holiday {
  background: #0f766e;
  box-shadow: 0 0 0 2px color-mix(in srgb, #0f766e 25%, transparent);
}
.shift-chip__dot--away {
  background: #f59e0b;
  box-shadow: 0 0 0 2px color-mix(in srgb, #f59e0b 25%, transparent);
}
.shift-chip__dot--leave {
  background: #7c3aed;
  box-shadow: 0 0 0 2px color-mix(in srgb, #7c3aed 25%, transparent);
}
.shift-chip__dot--idle {
  background: #64748b;
  box-shadow: 0 0 0 2px color-mix(in srgb, #64748b 25%, transparent);
}
.shift-chip__del {
  display: none;
  margin-left: auto;
  font-size: .72rem;
  opacity: .75;
}
.plan-cell__btn:hover .shift-chip__del,
.plan-cell__btn:focus-within .shift-chip__del { display: inline; }
.shift-chip__time { font-size: .66rem; font-weight: 650; opacity: .9; display: inline-flex; align-items: center; gap: 3px; }
.shift-chip__clk { font-size: .62rem; }
.shift-chip--coral { background: #f8c9c6; color: #9f1239; border-color: #f0a8a4; }
.shift-chip--sky { background: #cfe8fb; color: #0c4a6e; border-color: #9fd0f3; }
.shift-chip--violet { background: #d9cff6; color: #5b21b6; border-color: #c4b5fd; }
.shift-chip--teal { background: #ccfbf1; color: #115e59; border-color: #5eead4; }
.shift-chip--amber { background: #fde68a; color: #92400e; border-color: #fbbf24; }
.shift-chip--blue { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.shift-chip--cyan { background: #cffafe; color: #155e75; border-color: #67e8f9; }
.shift-chip--slate { background: #e2e8f0; color: #334155; border-color: #cbd5e1; }
.shift-chip--green { background: #dcfce7; color: #166534; border-color: #86efac; }
.shift-chip--vac { background: #ccfbf1; color: #115e59; border-color: #5eead4; }
.shift-chip--orange { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.shift-chip--rose { background: #ffe4e6; color: #9f1239; border-color: #fda4af; }
.shift-chip--lime { background: #ecfccb; color: #3f6212; border-color: #bef264; }
.shift-chip.is-selected { box-shadow: var(--focus); }
.shift-tip {
  display: none;
  position: absolute;
  z-index: 8;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 12rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px 10px;
  font-weight: 600;
  font-size: .72rem;
}
.plan-cell__btn:hover .shift-tip,
.plan-cell__btn:focus-visible .shift-tip { display: grid; gap: 2px; }
.shift-tip__code {
  display: inline-block;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 800;
}
.shift-tip__meta, .shift-tip__time { color: var(--muted); font-weight: 600; }
[data-theme="dark"] .shift-chip--coral { background: rgba(244, 63, 94, .2); color: #fecdd3; border-color: rgba(244, 63, 94, .4); }
[data-theme="dark"] .shift-chip--sky { background: rgba(56, 189, 248, .18); color: #bae6fd; border-color: rgba(56, 189, 248, .4); }
[data-theme="dark"] .shift-chip--violet { background: rgba(167, 139, 250, .2); color: #ddd6fe; border-color: rgba(167, 139, 250, .4); }
[data-theme="dark"] .shift-chip--teal { background: rgba(45, 212, 191, .18); color: #99f6e4; border-color: rgba(45, 212, 191, .35); }
[data-theme="dark"] .shift-chip--amber { background: rgba(245, 158, 11, .18); color: #fcd34d; border-color: rgba(245, 158, 11, .4); }
[data-theme="dark"] .shift-chip--blue { background: rgba(59, 130, 246, .2); color: #93c5fd; border-color: rgba(59, 130, 246, .4); }
[data-theme="dark"] .shift-chip--cyan { background: rgba(34, 211, 238, .16); color: #a5f3fc; border-color: rgba(34, 211, 238, .35); }
[data-theme="dark"] .shift-chip--slate { background: rgba(148, 163, 184, .16); color: #cbd5e1; border-color: rgba(148, 163, 184, .3); }
[data-theme="dark"] .shift-chip--green { background: rgba(34, 197, 94, .16); color: #86efac; border-color: rgba(34, 197, 94, .35); }
[data-theme="dark"] .shift-chip--vac { background: rgba(45, 212, 191, .16); color: #99f6e4; border-color: rgba(45, 212, 191, .35); }
[data-theme="dark"] .shift-chip--orange { background: rgba(249, 115, 22, .16); color: #fdba74; border-color: rgba(249, 115, 22, .35); }
[data-theme="dark"] .shift-chip--rose { background: rgba(244, 63, 94, .16); color: #fda4af; border-color: rgba(244, 63, 94, .35); }
[data-theme="dark"] .shift-chip--lime { background: rgba(132, 204, 22, .16); color: #d9f99d; border-color: rgba(132, 204, 22, .4); }
[data-theme="dark"] .shift-chip__dot {
  background: #94a3b8;
  box-shadow: 0 0 0 2px color-mix(in srgb, #94a3b8 30%, transparent);
}
[data-theme="dark"] .shift-chip__dot--on {
  background: #4ade80;
  box-shadow: 0 0 0 2px color-mix(in srgb, #4ade80 30%, transparent);
}
[data-theme="dark"] .shift-chip__dot--late {
  background: #f87171;
  box-shadow: 0 0 0 2px color-mix(in srgb, #f87171 40%, transparent);
}
[data-theme="dark"] .shift-chip__dot--caution {
  background: #facc15;
  box-shadow: 0 0 0 2px color-mix(in srgb, #facc15 40%, transparent);
}
[data-theme="dark"] .shift-chip__dot--off {
  background: #60a5fa;
  box-shadow: 0 0 0 2px color-mix(in srgb, #60a5fa 30%, transparent);
}
[data-theme="dark"] .shift-chip__dot--holiday {
  background: #2dd4bf;
  box-shadow: 0 0 0 2px color-mix(in srgb, #2dd4bf 30%, transparent);
}
[data-theme="dark"] .shift-chip__dot--away {
  background: #fbbf24;
  box-shadow: 0 0 0 2px color-mix(in srgb, #fbbf24 30%, transparent);
}
[data-theme="dark"] .shift-chip__dot--leave {
  background: #c4b5fd;
  box-shadow: 0 0 0 2px color-mix(in srgb, #c4b5fd 30%, transparent);
}
[data-theme="dark"] .shift-chip__dot--idle {
  background: #94a3b8;
  box-shadow: 0 0 0 2px color-mix(in srgb, #94a3b8 30%, transparent);
}

.plan-palette {
  position: sticky;
  top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.plan-palette--below {
  position: static;
  margin-top: 12px;
}
.plan-palette--below > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
}
.plan-palette__list { display: grid; gap: 8px; margin-top: 8px; }
.plan-palette__item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-palette__item.is-active { border-color: var(--primary); box-shadow: var(--focus); }
.plan-palette__badge {
  min-width: 2.4rem;
  text-align: center;
  border-radius: 8px;
  padding: 6px 4px;
  font-weight: 800;
  font-size: .78rem;
}
.plan-palette__txt { display: grid; gap: 2px; font-size: .78rem; }
.plan-palette__txt span { color: var(--muted); font-size: .7rem; }
.plan-palette__create {
  margin-top: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: .82rem;
  text-align: left;
  padding: 4px 2px;
}
.plan-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.plan-foot__btns { display: flex; gap: 8px; }
.plan-by-shift {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 12px;
}
.plan-by-shift__card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-2);
}
.plan-by-shift__n { margin: 8px 0; font-size: .75rem; color: var(--muted); }
.plan-by-shift__card ul { margin: 0; padding-left: 1rem; font-size: .82rem; }
.plan-by-shift__card li span { color: var(--muted); margin-left: 6px; font-size: .75rem; }

.plan-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .45);
}
.plan-modal__card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  display: grid;
  gap: 12px;
}
.plan-modal__card h3 { margin: 0; font-size: 1.05rem; }
.plan-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.fichaje-drawer__card { width: min(440px, 100%); }
.fichaje-drawer__sub {
  margin: 4px 0 0;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-2);
}
.fichaje-drawer__today {
  margin: 0;
  display: grid;
  gap: 8px;
}
.fichaje-drawer__today > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: .86rem;
}
.fichaje-drawer__today dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}
.fichaje-drawer__today dd { margin: 0; }
.fichaje-drawer__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .82rem;
  display: grid;
  gap: 4px;
}
.plan-filters__label {
  display: block;
  margin: 0 0 4px;
  padding: 0;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-2);
}

@media (max-width: 1100px) {
  .plan-layout { grid-template-columns: 1fr; }
  .plan-palette { position: static; }
}

.plan-audit {
  margin: 8px 16px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  background: var(--surface-2);
}
.plan-audit summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.plan-audit__table {
  width: 100%;
  margin-top: 8px;
  font-size: 0.78rem;
}
.plan-audit[open] summary {
  margin-bottom: 4px;
}

/* Vacaciones — resumen de solicitudes (Ana Clara, 2026-09) */
.vac-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.vac-field {
  display: grid;
  gap: 4px;
  min-width: 140px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}
.vac-field .field { min-width: 150px; }
.vac-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.vac-avatar { width: 32px; height: 32px; font-size: .72rem; }
.vac-tipo-inline,
.vac-scroll-hint { display: none; }
.vac-tipo { font-weight: 700; }
.vac-tipo__detail {
  margin-top: 2px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  white-space: normal;
  max-width: 220px;
}
.vac-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.vac-cal__head strong { text-transform: capitalize; }
.vac-cal__dow,
.vac-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.vac-cal__dow {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}
.vac-day {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .82rem;
}
.vac-day:hover { background: var(--surface-2); }
.vac-day[aria-pressed="true"] { box-shadow: var(--focus); }
.vac-day--empty { display: block; }
.vac-day--aprobada { background: var(--ok); color: #fff; }
.vac-day--pendiente { background: #f5b942; color: #1f2937; }
.vac-day--rechazada { background: #f0a0a8; color: #7f1d1d; }
.vac-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: .78rem;
}
.vac-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vac-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
.vac-dot--aprobada { background: var(--ok); }
.vac-dot--pendiente { background: #f5b942; }
.vac-dot--rechazada { background: #e11d48; }
.vac-next { margin-top: 16px; }
.vac-next__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.vac-next__more { color: var(--muted); }
.vac-detail { margin-top: 16px; }
.vac-detail__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}
.vac-detail__grid dt {
  margin: 0;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
}
.vac-detail__grid dd { margin: 2px 0 0; }
@media (max-width: 1100px) {
  .vac-main { grid-template-columns: 1fr; }
  .vac-detail__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .vac-scroll-hint {
    display: block;
    margin: 0;
    padding: 10px 12px 0;
    color: var(--muted);
    font-size: .78rem;
  }
  .vac-tipo-inline {
    display: block;
    margin-top: 2px;
    color: var(--text-2);
    font-size: .75rem;
    font-weight: 700;
  }
}
@media (max-width: 560px) {
  .vac-detail__grid { grid-template-columns: 1fr; }
}

/* Print / reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .module-tile:hover,
  .hub__alert-strip:hover {
    transform: none;
  }
  .module-tile:hover .module-tile__arrow {
    transform: none;
  }
}

.cover-ask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 20, 0.55);
  padding: 1rem;
}
.cover-ask__card { width: min(28rem, 100%); }
[data-cover-drop].is-cover-over { outline: 2px solid var(--accent, #7eb6ff); }
[data-cover-row][draggable="true"] { cursor: grab; }
