/* Mi-NB Slice 4 — chrome + denseness (Muriel / Slice 1 tokens) */
:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --elevated: #FFFFFF;
  --ink: #141413;
  --muted: #6B6A66;
  --hairline: #E6E4DF;
  --accent: #0A7A3B;
  --accent-soft: #E7F4EC;
  --rail: #F3F2EE;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 19, 0.06);
  --rail-w: 220px;
  --rail-w-collapsed: 64px;
  --topbar-h: 56px;
  --bg-soft: var(--bg);
  --text-primary: var(--ink);
  --text-secondary: var(--muted);
  --text-muted: var(--muted);
  --border: var(--hairline);
  --nb-900: var(--ink);
  --nb-700: var(--ink);
  --nb-500: var(--accent);
  --nb-300: var(--hairline);
  --nb-100: var(--muted);
  --nb-50: var(--accent-soft);
  --lime: var(--accent);
  --amber-bg: #F4EFE4;
  --amber-text: #854F0B;
  --amber-strong: #BA7517;
  --red-bg: #F8D7DA;
  --red-text: #721C24;
  --red-strong: #c0392b;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0B0C;
  --surface: #141415;
  --elevated: #1A1A1C;
  --ink: #F5F5F3;
  --muted: #9A9A96;
  --hairline: #2A2A2C;
  --accent: #1A9B5C;
  --accent-soft: #123322;
  --rail: #101011;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  --amber-bg: #2a2314;
  --amber-text: #E8C48A;
  --amber-strong: #D4A017;
  --purple-bg: #1c1a2e;
  --purple-text: #C8C4F0;
  --red-bg: #2a1518;
  --red-text: #F0B4B8;
  --bg-soft: var(--bg);
  --text-primary: var(--ink);
  --text-secondary: var(--muted);
  --text-muted: var(--muted);
  --border: var(--hairline);
}
html { color-scheme: light; }
html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
}
body { padding-bottom: 0; }
html.mi-nb-authed body { padding-bottom: 0; }
@media (max-width: 799px) {
  html.mi-nb-authed body { padding-bottom: 80px; }
}

/* ── App shell ─────────────────────────────────────────────── */
.app-shell {
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  background: var(--bg);
}
.app-rail {
  display: none;
  flex: 0 0 var(--rail-w);
  width: var(--rail-w);
  background: var(--rail);
  border-right: 1px solid var(--hairline);
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  z-index: 40;
  transition: width 0.18s ease, flex-basis 0.18s ease;
}
html.mi-nb-authed .app-rail { display: flex; }
html.rail-collapsed .app-rail {
  flex-basis: var(--rail-w-collapsed);
  width: var(--rail-w-collapsed);
}
.app-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.app-content { flex: 1 1 auto; min-width: 0; padding-bottom: 8px; }

.rail-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 12px;
  color: var(--ink);
  text-decoration: none;
  min-height: var(--topbar-h);
}
.rail-brand img, .rail-brand svg, .wordmark {
  display: block;
  height: 22px;
  width: auto;
  max-width: 188px;
  color: var(--ink);
}
.rail-brand img.wordmark-mark {
  height: 32px;
  width: 32px;
  max-width: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  filter: none;
}
.wordmark-full {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.wordmark-name {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: var(--ink);
}
html.rail-collapsed .rail-brand .wordmark-full { display: none; }
html.rail-collapsed .rail-brand { justify-content: center; padding: 16px 0 12px; }

.rail-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 10px 12px;
}
.rail-dest {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  position: relative;
}
.rail-dest svg { width: 18px; height: 18px; flex-shrink: 0; }
.rail-dest:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
html[data-theme="dark"] .rail-dest:hover { background: rgba(255,255,255,0.04); }
.rail-dest.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.rail-dest.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: var(--accent);
}
html.rail-collapsed .rail-dest .rail-label { display: none; }
html.rail-collapsed .rail-dest { justify-content: center; padding: 10px 0; }
html.rail-collapsed .rail-dest.active::before { display: none; }

.rail-footer {
  padding: 10px 10px 16px;
  border-top: 1px solid var(--hairline);
}
.rail-foot-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}
.rail-foot-btn:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
html[data-theme="dark"] .rail-foot-btn:hover { background: rgba(255,255,255,0.04); }
.rail-foot-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
html.rail-collapsed .rail-footer { align-items: center; }
html.rail-collapsed .rail-foot-btn { justify-content: center; padding: 8px 0; }
html.rail-collapsed .rail-foot-label { display: none; }

/* ── Topbar ────────────────────────────────────────────────── */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  min-height: var(--topbar-h);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
}
.topbar-wordmark {
  display: none;
  height: 32px;
  width: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  filter: none;
}
.topbar-titles { flex: 1 1 auto; min-width: 0; }
.hd-greeting {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.hd-name {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-top: 1px;
  line-height: 1.2;
  color: var(--ink);
}
.hd-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hd-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.hd-bell {
  position: relative;
  background: var(--elevated);
  border: 1px solid var(--hairline);
  color: var(--ink);
  width: 36px; height: 32px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.hd-bell svg { width: 16px; height: 16px; }
.hd-bell-badge {
  position: absolute; top: -6px; right: -6px;
  background: #ef4444; color: white;
  font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: none;
}
.hd-bell-badge.hidden { display: none; }
.hd-bell.is-open { background: var(--accent-soft); }
.hd-report-btn:hover,
.hd-report-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--hairline);
  background: var(--elevated);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.profile-btn .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #2a2a2c;
  color: #fafaf8;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.02em;
}
.profile-meta { text-align: left; line-height: 1.15; }
.profile-name { font-size: 12px; font-weight: 650; }
.profile-role { font-size: 10px; color: var(--muted); }
.logout { display: none !important; }

@media (max-width: 799px) {
  .profile-meta { display: none; }
  .app-rail { display: none !important; }
  .app-shell { display: block; }
  .topbar-wordmark { display: block; }
  html.mi-nb-authed .bottomnav { display: grid !important; }
}
@media (min-width: 800px) {
  html.mi-nb-authed .bottomnav { display: none !important; }
}

/* ── Profile sheet ─────────────────────────────────────────── */
.profile-sheet.hidden { display: none; }
.profile-sheet { position: fixed; inset: 0; z-index: 170; }
.profile-sheet-scrim { position: absolute; inset: 0; background: rgba(20,20,19,0.28); }
.profile-sheet-panel {
  position: absolute;
  top: 56px; right: 12px;
  width: min(360px, calc(100vw - 16px));
  background: var(--elevated);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(20,20,19,0.18);
  padding: 16px;
}
.profile-sheet-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.profile-sheet-row:last-of-type { border-bottom: 0; }
.profile-sheet-row label,
.profile-sheet-row-label {
  color: var(--muted); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.profile-sheet-row select {
  font: inherit; font-size: 13px; font-weight: 600;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 6px 8px;
}
.theme-toggle {
  display: flex;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.theme-toggle-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle-btn.on {
  background: var(--ink);
  color: var(--bg);
}
.profile-sheet-action {
  width: 100%; margin-top: 8px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ── Bottom nav (phone) ────────────────────────────────────── */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--elevated);
  border-top: 1px solid var(--hairline);
  display: none;
  grid-template-columns: repeat(6, 1fr);
  padding: 8px 0 16px;
  z-index: 50;
}
.navtab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--muted); cursor: pointer;
  padding: 4px; position: relative;
  background: transparent; border: 0; font-family: inherit;
}
.navtab.active { color: var(--accent); font-weight: 600; }
.navtab svg { width: 22px; height: 22px; }

/* ── Políticas ─────────────────────────────────────────────── */
.policies-view {
  padding-bottom: 24px;
}
.policies-hero {
  margin: 20px 16px 12px;
  padding: 22px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
}
.policies-eyebrow {
  margin-bottom: 18px;
  color: var(--bg);
  opacity: 0.64;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.policies-hero h1 {
  margin: 0;
  font-size: clamp(25px, 5vw, 36px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.policies-hero p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--bg);
  opacity: 0.78;
  font-size: 14px;
  line-height: 1.5;
}
.policies-grid,
.bonus-policy-grid {
  display: grid;
  gap: 12px;
  margin: 0 16px;
}
.policy-card,
.bonus-policy-card,
.policy-shelf,
.more-policies {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.policy-card {
  padding: 18px;
}
.policy-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.policy-number {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.policy-card h2,
.bonus-policy-card h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.policy-card h2 { font-size: 19px; }
.policy-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.policy-facts {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}
.policy-facts li {
  position: relative;
  padding: 9px 0 9px 16px;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}
.policy-facts li::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.policy-win {
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}
.absence-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
.absence-types div {
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
.absence-types span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.absence-types p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.bonus-policy-card {
  padding: 16px;
}
.bonus-policy-card > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.bonus-policy-card > strong {
  display: block;
  margin: 8px 0 2px;
  color: var(--accent);
  font-size: 25px;
  letter-spacing: -0.04em;
}
.bonus-policy-card h3 { font-size: 14px; }
.bonus-policy-card ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.bonus-policy-card li {
  position: relative;
  padding: 6px 0 6px 14px;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}
.bonus-policy-card li:first-child { border-top: 0; }
.bonus-policy-card li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.policy-shelf,
.more-policies {
  margin: 0 16px;
  overflow: hidden;
}
.policy-shelf-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(58px, auto) 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.policy-shelf-item:last-child { border-bottom: 0; }
.policy-shelf-item > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.policy-shelf-item > strong,
.policy-shelf-copy > strong { font-size: 12px; }
.policy-shelf-item > small,
.policy-shelf-copy > small { color: var(--muted); font-size: 10px; display: block; }
.policy-shelf-nom035 {
  cursor: default;
  align-items: start;
}
.policy-shelf-copy { min-width: 0; }
.policy-form-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.policy-form-btn {
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.more-policies > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
}
.more-policies > div:last-child { border-bottom: 0; }
.more-policies strong { color: var(--ink); font-size: 12px; }
.more-policies span { color: var(--muted); font-size: 10px; }
.bonus-not-applicable {
  border-style: dashed;
}
.bonus-not-applicable .progress {
  opacity: 0.35;
}
.bonus-eligible-from {
  display: block;
}

@media (min-width: 680px) {
  .policies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bonus-policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .policies-hero,
  .policies-grid,
  .bonus-policy-grid,
  .policy-shelf,
  .more-policies {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
  }
  .policies-view > .section-title {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
  }
  .bonus-policy-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Quiet segmented filters (Solicitudes) ─────────────────── */
.filter-chips {
  display: flex;
  gap: 0;
  margin: 0 16px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--elevated);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 3px;
}
.filter-chip {
  padding: 7px 12px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  flex: 1 1 auto;
  text-align: center;
  font-family: inherit;
}
.filter-chip.active {
  background: var(--ink);
  color: var(--bg);
}

/* ── Cards / views: no green walls ─────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.highlight-green {
  background: var(--surface);
  border-color: var(--hairline);
}
.card.highlight-amber {
  background: var(--surface);
  border-color: var(--hairline);
}
.card.highlight-purple {
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.balance-hero {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.balance-hero .lbl-light { color: var(--muted); }
.balance-hero .balance-num { color: var(--accent); }
.balance-hero .balance-num small { color: var(--muted); }
.balance-hero .balance-sub { color: var(--muted); }
.balance-hero .balance-meta {
  border-top: 1px solid var(--hairline);
  color: var(--muted);
}
.balance-hero .balance-meta strong { color: var(--ink); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
}
.btn-primary:active { background: var(--ink); opacity: 0.88; }
.action-btn .ico {
  background: var(--elevated);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.action-btn:active { background: var(--elevated); }
.lbl-green { color: var(--muted); }
.total-num { color: var(--accent); }
.hist-total { color: var(--ink); }
.hist-card.current { background: var(--elevated); border-color: var(--hairline); }
.hist-current-pill { background: var(--ink); color: var(--bg); }
.streak-box { background: var(--elevated); border: 1px solid var(--hairline); }
.streak-num, .streak-text { color: var(--ink); }
.day-cell.today { border: 1px solid var(--accent); background: var(--surface); }
.aviso-panel {
  background: var(--elevated);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.aviso-card { background: var(--surface); border-color: var(--hairline); }
.empty-state { background: var(--surface); border-color: var(--hairline); color: var(--muted); }
.sheet-body { background: var(--elevated); color: var(--ink); }
.form-input, .form-select, .form-textarea {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hairline);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.impersonate-banner {
  background: var(--ink);
  color: var(--bg);
  box-shadow: none;
}
.impersonate-banner button {
  background: var(--bg);
  color: var(--ink);
}

html[data-theme="dark"] .vac-cal-day.taken { background: #163044; color: #B8DDF5; }
html[data-theme="dark"] .vac-cal-day.permiso { background: #123322; color: #8FDCB4; }
html[data-theme="dark"] .vac-cal-day.pending { background: #2A2418; color: #E8C48A; }
html[data-theme="dark"] .vac-cal-day.festivo { background: #1c1a2e; color: #C8C4F0; }
html[data-theme="dark"] .vac-cal-day.bono-pay { background: #2A2418; color: #E8C48A; }
html[data-theme="dark"] .vac-cal-day.bono-pay-paid { background: #123322; color: #8FDCB4; }
html[data-theme="dark"] .vac-cal-day.descanso { background: #141415; color: #6E6E72; }
html[data-theme="dark"] .vac-cal-dot.taken { background: #4A8FBF; }
html[data-theme="dark"] .vac-cal-dot.permiso { background: #2E8A5A; }
html[data-theme="dark"] .vac-cal-dot.pending { background: #C4A15A; }
html[data-theme="dark"] .vac-cal-dot.festivo { background: #7A74B8; }
html[data-theme="dark"] .vac-cal-dot.bono-pay { background: #C4A15A; border-color: #E8C48A; }
html[data-theme="dark"] .vac-cal-dot.bono-pay-paid { background: #2E8A5A; border-color: #8FDCB4; }
html[data-theme="dark"] .vac-cal-event.bono-paid { color: #8FDCB4; }
html[data-theme="dark"] .vac-cal-event.bono-pending { color: #E8C48A; }
html[data-theme="dark"] .vac-calendar-card {
  border-color: rgba(26, 155, 92, 0.18);
}
html[data-theme="dark"] .vac-cal-nav {
  background: var(--elevated);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.auth-brand-center { justify-content: center; }
.auth-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.auth-brand-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: var(--ink);
}
/* ── Auth overlays: themed, not portal-green ───────────────── */
.pin-overlay,
.email-overlay {
  background: var(--bg) !important;
  color: var(--ink) !important;
}
.pin-sub, .email-sub, .email-brand, .email-field label,
.pin-link, .email-back, .forgot-password-link {
  color: var(--muted) !important;
}
.pin-key {
  background: var(--elevated) !important;
  color: var(--ink) !important;
  border: 1px solid var(--hairline) !important;
}
.pin-key:active { background: var(--accent-soft) !important; }
.pin-dot { border-color: var(--hairline) !important; }
.pin-dot.filled { background: var(--accent) !important; border-color: var(--accent) !important; }
.email-field input {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-color: var(--hairline) !important;
}
.email-submit {
  background: var(--ink) !important;
  color: var(--bg) !important;
}
.password-toggle { color: var(--ink) !important; }
.onboarding-overlay { background: var(--bg); }
.onboarding-header {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-bottom: 1px solid var(--hairline);
}
.onb-brand { color: var(--muted) !important; }
.onb-sub { color: var(--muted) !important; }
.onb-step-dot.active { background: var(--accent) !important; }
.onb-info-card, .onb-doc-row { background: var(--surface); border-color: var(--hairline); }
.onb-nav-next { background: var(--ink) !important; color: var(--bg) !important; }
.onb-doc-btn { background: var(--ink); color: var(--bg); }
.form-password-wrap .password-toggle { color: var(--ink); }

#tu-equipo-card { padding: 10px 14px; }
.tu-equipo-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.tu-equipo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--hairline);
}
.tu-equipo-row:last-child { border-bottom: none; padding-bottom: 0; }
.tu-equipo-who { min-width: 0; flex: 1; }
.tu-equipo-name { font-size: 13px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.tu-equipo-role { font-size: 11px; color: var(--muted); margin: 1px 0 0; line-height: 1.2; }
.tu-equipo-actions { display: flex; gap: 2px; flex-shrink: 0; }
.tu-equipo-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  border-radius: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.tu-equipo-icon svg { width: 18px; height: 18px; display: block; }
.tu-equipo-icon:hover { background: rgba(0,0,0,0.04); }
html[data-theme="dark"] .tu-equipo-icon:hover { background: rgba(255,255,255,0.06); }
.tu-equipo-icon:active { transform: scale(0.94); }

.nom035-choice.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.nom035-back, .violencia-back, .violencia-card-cta, .nom035-card-cta {
  color: var(--ink);
}
.req-pill.aprobado { background: var(--elevated); color: var(--ink); }
.acceso-status.ok { background: var(--elevated); color: var(--ink); }
.acceso-action { border-color: var(--hairline); color: var(--ink); }
.device-card.current { background: var(--elevated); border-color: var(--hairline); }
.device-current-pill { background: var(--ink); color: var(--bg); }
.firma-pill-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.firma-pill-btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sign-step-pill {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--hairline);
}
.sign-step-pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sign-step-pill.done {
  background: var(--accent-soft);
  color: var(--ink);
  border-color: var(--hairline);
}
.req-repose {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
.req-repose-row { display: flex; align-items: center; gap: 8px; }
.req-repose-bar {
  flex: 1; background: var(--hairline); border-radius: 999px; height: 6px; overflow: hidden;
}
.req-repose-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.req-repose-bar > span.is-overdue { background: var(--red-strong, #c0392b); }
.req-repose-meta { font-size: 11px; color: var(--muted); white-space: nowrap; }
.req-repose-verdict { margin-top: 4px; font-size: 11px; }
.req-repose-ok { color: var(--accent); font-weight: 600; }
.req-repose-bad { color: var(--red-text); font-weight: 600; }
.req-repose-warn { color: var(--amber-text); font-weight: 600; }
.btn-upload-comp {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px dashed var(--amber-strong, var(--amber-text));
}
.ver-comp { color: var(--ink); }
.req-pill.cancelado { background: var(--surface); color: var(--muted); }
.sign-preview {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  max-height: 320px;
  overflow: auto;
  color: var(--ink);
}
.sign-ack-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  background: var(--accent-soft);
  padding: 8px 10px;
  border-radius: 6px;
}
.sign-rotate-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
#sign-canvas.sig-pad {
  background: #fff;
  border-color: var(--hairline);
}
.hist-justify-btn {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px dashed var(--amber-text);
}
.checkbox-pill span, .radio-pill span {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hairline);
}
.checkbox-pill input:checked + span,
.radio-pill input:checked + span {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.sign-nudge {
  margin-bottom: 8px;
  padding: 7px 10px;
  background: var(--amber-bg);
  color: var(--amber-text);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}
.sign-wait {
  margin-bottom: 8px;
  padding: 7px 10px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  font-size: 12px;
}
.punch-time.done { color: var(--ink); }
.punch-dot.done { background: var(--accent); }
.progress-bar { background: var(--ink); }
.bono-amt.green { color: var(--ink); }
.toast.success { background: var(--elevated); color: var(--ink); border: 1px solid var(--hairline); }
