/* =============================================================
   MIMESIS · Talento Humano — Sistema de diseño
   1. Fuentes  2. Tokens  3. Base  4. Layout  5. Componentes
   6. Wizard  7. Documento  8. Gráficos  9. Vistas  10. Responsive  11. Impresión
   ============================================================= */

/* 1. Fuentes (tipografías oficiales del manual de marca) */
@font-face { font-family: "Exo 2"; src: url("../fonts/Exo2-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/Exo2-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/Exo2-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/Exo2-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Rubita Smile"; src: url("../fonts/RubitaSmile.ttf") format("truetype"); font-weight: 400; font-display: swap; }

/* 2. Tokens */
:root {
  --bg: #f5f3fa;
  --surface: #ffffff;
  --surface-2: #faf8fe;
  --surface-3: #f1edf9;
  --ink: #1b1230;
  --ink-2: #3a3050;
  --mute: #6b6283;
  --mute-2: #8f87a5;
  --line: #e7e2f1;
  --line-2: #d9d2e8;

  --brand: #6d28d9;
  --brand-600: #7c3aed;
  --brand-500: #8b5cf6;
  --brand-100: #ede6fe;
  --brand-50: #f6f2ff;
  --deep: #1f0838;
  --deep-2: #2e0f52;
  --deep-3: #3d1670;
  --magenta: #c730da;
  --cyan: #22d3ee;
  --cyan-ink: #0b7f93;
  --grad: linear-gradient(115deg, #22d3ee 0%, #8b5cf6 48%, #c730da 100%);
  --grad-deep: linear-gradient(150deg, #2e0f52 0%, #1f0838 55%, #170529 100%);

  --success: #0d7a55; --success-bg: #e3f6ee; --success-line: #b9e8d4;
  --warning: #9a5b04; --warning-bg: #fff3d9; --warning-line: #f6dca2;
  --danger: #c0263a;  --danger-bg: #fde9ec;  --danger-line: #f6c4cc;
  --info: #2f5bd8;    --info-bg: #e8efff;    --info-line: #c6d6fb;
  --neutral: #6b6283; --neutral-bg: #f0edf6; --neutral-line: #ddd7ea;

  --display: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --sans: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --script: "Rubita Smile", cursive;

  --r-lg: 20px; --r: 14px; --r-sm: 10px; --r-xs: 7px;
  --shadow-sm: 0 1px 2px rgba(27, 18, 48, .06);
  --shadow: 0 1px 2px rgba(27, 18, 48, .05), 0 10px 30px -16px rgba(46, 16, 101, .22);
  --shadow-lg: 0 2px 6px rgba(27, 18, 48, .06), 0 30px 60px -24px rgba(46, 16, 101, .35);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sidebar: 268px;
  --topbar: 72px;
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--ink-2);
  background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh;
  font-variant-numeric: tabular-nums;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.15; letter-spacing: -.01em; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
ul { padding: 0; list-style: none; }
::selection { background: var(--brand-500); color: #fff; }
:focus-visible { outline: 2.5px solid var(--brand-500); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wordmark { font-family: var(--script); font-weight: 400; letter-spacing: -.02em; line-height: 1; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--mute); }
.small { font-size: .84rem; }
.tiny { font-size: .75rem; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ico { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 4. Layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--grad-deep); color: #e9e1f7; padding: 22px 16px 16px; overflow: hidden; z-index: 40;
}
.sidebar::before { /* textura de puntos inspirada en el globo del logo */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(190, 160, 255, .18) 1.1px, transparent 1.3px);
  background-size: 11px 11px;
  mask-image: radial-gradient(120% 60% at 100% 100%, #000 0%, transparent 70%);
}
.sidebar::after {
  content: ""; position: absolute; width: 380px; height: 380px; right: -220px; top: -160px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(199, 48, 218, .28), transparent); filter: blur(6px);
}
.brand { position: relative; display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; z-index: 1; color: #fff; }
.brand img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .08), 0 8px 24px -6px rgba(139, 92, 246, .7); }
.brand .wordmark { font-size: 1.9rem; color: #fff; display: block; }
.brand small { display: block; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: #b9a8db; margin-top: 3px; font-weight: 600; }
.nav { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-label { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: #9786bb; font-weight: 700; padding: 14px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: #d9cff0; font-weight: 500; font-size: .92rem; transition: background .25s var(--ease), color .25s;
}
.nav a .ico { width: 19px; height: 19px; opacity: .85; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.nav a.active::before { content: ""; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--grad); }
.nav a.active .ico { opacity: 1; color: #c9b5ff; }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--magenta); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.side-user { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); margin-top: 12px; }
.side-user .who { min-width: 0; flex: 1; line-height: 1.25; }
.side-user strong { display: block; color: #fff; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user span { font-size: .74rem; color: #b6a6d6; }
.side-user button { color: #cbbdea; padding: 7px; border-radius: 9px; }
.side-user button:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 3vw, 40px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .crumbs { font-size: .8rem; color: var(--mute); display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar .crumbs a { color: var(--mute); }
.topbar .crumbs a:hover { color: var(--brand); }
.topbar .crumbs .ico { width: 14px; height: 14px; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .2s, transform .2s; }
.icon-btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn .dot { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--magenta); color: #fff; font-size: .64rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.content { padding: 8px clamp(16px, 3vw, 40px) 64px; width: 100%; max-width: 1360px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 10px 0 26px; }
.page-head h1 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.page-head p { color: var(--mute); margin-top: 6px; max-width: 70ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }

/* 5. Componentes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px; position: relative; }
.card-flat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { font-size: 1.08rem; }
.card-head .sub { font-size: .8rem; color: var(--mute); margin-top: 2px; }
.card-deep { background: var(--grad-deep); color: #e7defa; border: 0; overflow: hidden; }
.card-deep h2, .card-deep h3 { color: #fff; }
.card-deep::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45; background-image: radial-gradient(rgba(190, 160, 255, .2) 1.1px, transparent 1.3px); background-size: 11px 11px; mask-image: radial-gradient(90% 90% at 100% 0%, #000, transparent 70%); }
.card-deep > * { position: relative; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 20px; border-radius: 12px;
  font-weight: 600; font-size: .9rem; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s, color .2s;
  border: 1px solid transparent; user-select: none;
}
.btn .ico { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(109, 40, 217, .8), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn-primary:hover { background: #5b1fc0; transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(109, 40, 217, .85); }
.btn-grad { background: var(--grad); color: #fff; text-shadow: 0 1px 1px rgba(40, 0, 80, .25); box-shadow: 0 10px 26px -12px rgba(139, 92, 246, .9); background-size: 140% 100%; background-position: 0 0; }
.btn-grad:hover { background-position: 100% 0; transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand-500); color: var(--brand); }
.btn-soft { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.btn-soft:hover { background: var(--brand-100); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a51d30; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #0a6345; }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .18); }
.btn-light:hover { background: rgba(255, 255, 255, .2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .82rem; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 1rem; border-radius: 14px; }
.btn-icon { width: 38px; padding: 0; }
.link { color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: .74rem; font-weight: 600; border: 1px solid; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge-success { color: var(--success); background: var(--success-bg); border-color: var(--success-line); }
.badge-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-line); }
.badge-danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-line); }
.badge-info { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.badge-neutral { color: var(--neutral); background: var(--neutral-bg); border-color: var(--neutral-line); }
.badge-brand { color: var(--brand); background: var(--brand-50); border-color: var(--brand-100); }

.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: .9rem; color: #fff; background: var(--grad); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); letter-spacing: .02em; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.6rem; }
.avatar.sm { width: 32px; height: 32px; font-size: .74rem; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid; font-size: .88rem; }
.alert .ico { width: 20px; height: 20px; margin-top: 1px; }
.alert strong { color: inherit; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-line); color: #6d4103; }
.alert-info { background: var(--info-bg); border-color: var(--info-line); color: #1f3f99; }
.alert-danger { background: var(--danger-bg); border-color: var(--danger-line); color: #8d1828; }
.alert-success { background: var(--success-bg); border-color: var(--success-line); color: #0a5b40; }
.alert-brand { background: var(--brand-50); border-color: var(--brand-100); color: #4a1a96; }

/* Formularios clásicos (admin) */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.field > span em { font-style: normal; color: var(--danger); }
.field small { font-size: .74rem; color: var(--mute); }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface);
  transition: border-color .2s, box-shadow .2s; font-size: .9rem; color: var(--ink);
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6283' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input:hover, .select:hover, .textarea:hover { border-color: #c5bbdb; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); }
.input-group { position: relative; }
.input-group .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mute); font-weight: 600; font-size: .9rem; pointer-events: none; }
.input-group .input { padding-left: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .two { grid-column: span 2; }
.form-section { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 260px 1fr; gap: 28px; }
.form-section:first-child { border-top: 0; padding-top: 4px; }
.form-section h3 { font-size: 1rem; }
.form-section p { font-size: .82rem; color: var(--mute); margin-top: 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .86rem; font-weight: 500; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; cursor: pointer; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }
.seg { display: inline-flex; padding: 4px; background: var(--surface-3); border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { height: 34px; padding: 0 14px; border-radius: 9px; font-size: .82rem; font-weight: 600; color: var(--mute); transition: all .2s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

/* Tablas */
.table-wrap { overflow-x: auto; border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person strong { display: block; color: var(--ink); font-weight: 600; font-size: .9rem; }
.person span { display: block; font-size: .78rem; color: var(--mute); }

/* Listas de solicitudes */
.req-list { display: flex; flex-direction: column; }
.req-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background .2s; color: inherit; }
.req-item:last-child { border-bottom: 0; }
.req-item:hover { background: var(--surface-2); }
.req-item .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.req-item .ic .ico { width: 21px; height: 21px; }
.req-item strong { color: var(--ink); font-weight: 600; font-size: .92rem; display: block; }
.req-item .meta { font-size: .78rem; color: var(--mute); display: flex; gap: 6px 12px; flex-wrap: wrap; margin-top: 2px; }
.req-item .right { display: flex; align-items: center; gap: 12px; }

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 10px; }
.kpi .top { display: flex; align-items: center; justify-content: space-between; }
.kpi .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.kpi .ic.warning { background: var(--warning-bg); color: var(--warning); }
.kpi .ic.success { background: var(--success-bg); color: var(--success); }
.kpi .ic.info { background: var(--info-bg); color: var(--info); }
.kpi .ic.danger { background: var(--danger-bg); color: var(--danger); }
.kpi .value { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.kpi .label { font-size: .82rem; color: var(--mute); font-weight: 500; }
.kpi .hint { font-size: .76rem; color: var(--mute-2); }

/* Tarjetas de catálogo (permisos/certificados) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: inherit; text-align: left; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s; overflow: hidden;
}
.tile::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(closest-side, rgba(139, 92, 246, .14), transparent); opacity: 0; transition: opacity .35s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-100); }
.tile:hover::after { opacity: 1; }
.tile .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); transition: background .3s, color .3s; }
.tile:hover .ic { background: var(--brand); color: #fff; }
.tile .ic .ico { width: 23px; height: 23px; }
.tile h3 { font-size: 1.02rem; }
.tile p { font-size: .82rem; color: var(--mute); line-height: 1.5; }
.tile .foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .74rem; }
.tile .go { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--mute); transition: all .3s var(--ease); }
.tile:hover .go { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateX(3px); }
.group-title { font-family: var(--display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 28px 0 12px; display: flex; align-items: center; gap: 12px; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Definiciones */
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.dl div { min-width: 0; }
.dl dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.dl dd { margin: 3px 0 0; color: var(--ink); font-weight: 500; font-size: .9rem; overflow-wrap: anywhere; }
.dl.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--mute); }
.kv strong { color: var(--ink); font-weight: 600; text-align: right; white-space: nowrap; }
.kv.total { border-top: 1px solid var(--line-2); border-bottom: 0; margin-top: 4px; padding-top: 14px; }
.kv.total strong { font-family: var(--display); font-size: 1.15rem; }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--mute); }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.empty .ic .ico { width: 28px; height: 28px; }
.empty h3 { font-size: 1.05rem; margin-bottom: 4px; }
.empty p { font-size: .86rem; max-width: 44ch; margin: 0 auto; }

/* Dropzone */
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  padding: 30px 20px; border-radius: var(--r-lg); border: 2px dashed var(--line-2); background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s, transform .2s;
}
.drop:hover, .drop.over { border-color: var(--brand-500); background: var(--brand-50); }
.drop.over { transform: scale(1.01); }
.drop .ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.drop .ic .ico { width: 26px; height: 26px; }
.drop strong { color: var(--ink); font-weight: 600; }
.drop small { color: var(--mute); font-size: .78rem; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.has-file { border-style: solid; border-color: var(--success-line); background: var(--success-bg); }
.drop .preview { max-height: 150px; max-width: 80%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .08)); }

/* Modal y panel lateral */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(23, 6, 41, .45); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .25s var(--ease); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 28px; animation: pop .35s var(--ease); }
.modal.wide { width: min(980px, 100%); }
.modal.full { width: min(1100px, 100%); height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.modal h2 { font-size: 1.35rem; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.modal-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-bar h3 { font-size: 1rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal iframe { flex: 1; width: 100%; border: 0; background: #e9e6ef; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.popover { position: absolute; top: calc(100% + 10px); right: 0; width: min(390px, calc(100vw - 32px)); background: var(--surface); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 60; animation: pop .3s var(--ease); overflow: hidden; }
.popover-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.popover-head h3 { font-size: .98rem; }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: inherit; transition: background .15s; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: linear-gradient(90deg, var(--brand-50), transparent); }
.notif .nd { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.notif .nd .ico { width: 17px; height: 17px; }
.notif strong { display: block; font-size: .85rem; color: var(--ink); font-weight: 600; }
.notif p { font-size: .8rem; color: var(--mute); line-height: 1.45; }
.notif time { font-size: .72rem; color: var(--mute-2); }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-success { background: var(--success-bg); color: var(--success); }
.tone-warning { background: var(--warning-bg); color: var(--warning); }
.tone-danger { background: var(--danger-bg); color: var(--danger); }

/* Toast */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 14px 16px; border-radius: 14px; background: var(--deep); color: #fff; box-shadow: var(--shadow-lg); font-size: .88rem; animation: toast-in .45s var(--ease); }
.toast .ico { width: 20px; height: 20px; }
.toast.success .ico { color: #6ee7b7; }
.toast.error .ico { color: #fda4af; }
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; padding: 12px 16px; font-weight: 600; font-size: .88rem; color: var(--mute); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--brand); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 3px; background: var(--grad); }
.tabs .count { font-size: .7rem; background: var(--surface-3); color: var(--mute); border-radius: 99px; padding: 1px 8px; }
.tabs button.on .count { background: var(--brand-50); color: var(--brand); }

/* Progreso */
.bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width 1s var(--ease); }
.bar.thin { height: 6px; }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface-3) 0%, #faf8fe 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.page-enter { animation: page-in .5s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

/* =============================================================
   6. Wizard — formulario una pregunta a la vez, a todo el ancho
   ============================================================= */
.wizard { position: fixed; inset: 0; z-index: 80; background: var(--surface); display: flex; flex-direction: column; animation: fade .3s ease; }
.wizard::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 100% 0%, rgba(139, 92, 246, .09), transparent 70%), radial-gradient(50% 50% at 0% 100%, rgba(34, 211, 238, .07), transparent 70%); }
.wz-top { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px clamp(18px, 4vw, 48px); z-index: 2; }
.wz-top .brandmini { display: flex; align-items: center; gap: 10px; }
.wz-top .brandmini img { width: 34px; height: 34px; border-radius: 50%; }
.wz-top .brandmini .wordmark { font-size: 1.45rem; color: var(--deep-2); }
.wz-top .title { font-size: .82rem; color: var(--mute); padding-left: 16px; border-left: 1px solid var(--line); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-top .title strong { color: var(--ink); font-weight: 600; }
.wz-top .spacer { flex: 1; }
.wz-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-3); }
.wz-progress i { display: block; height: 100%; background: var(--grad); transition: width .6s var(--ease); }
.wz-body { position: relative; flex: 1; overflow-y: auto; display: flex; z-index: 1; }
.wz-step { width: 100%; padding: clamp(28px, 7vh, 90px) clamp(20px, 10vw, 180px) 140px; display: flex; flex-direction: column; min-height: 100%; }
.wz-step > * { margin-block: auto; } /* centra si cabe; si no, inicia arriba sin recortar */
.wz-step.anim-next { animation: wz-next .55s var(--ease); }
.wz-step.anim-prev { animation: wz-prev .55s var(--ease); }
@keyframes wz-next { from { opacity: 0; transform: translateY(40px); } }
@keyframes wz-prev { from { opacity: 0; transform: translateY(-40px); } }
.wz-q { max-width: 980px; width: 100%; }
.wz-num { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; color: var(--brand); font-size: 1rem; margin-bottom: 14px; }
.wz-num .ico { width: 16px; height: 16px; }
.wz-q h2 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }
.wz-q .help { margin-top: 12px; font-size: clamp(.95rem, 1.2vw, 1.1rem); color: var(--mute); max-width: 70ch; }
.wz-answer { margin-top: clamp(24px, 4vh, 40px); }
.wz-input {
  width: 100%; border: 0; border-bottom: 2px solid var(--line-2); background: transparent; font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  padding: 8px 2px 12px; color: var(--brand); transition: border-color .25s; border-radius: 0; font-weight: 500;
}
.wz-input::placeholder { color: #c9c1db; }
.wz-input:focus { outline: none; border-bottom-color: var(--brand); }
textarea.wz-input { resize: none; min-height: 3.4em; line-height: 1.35; font-size: clamp(1.15rem, 2vw, 1.6rem); }
.wz-row { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 28px 40px; align-items: end; }
.wz-row label { display: flex; flex-direction: column; gap: 6px; }
.wz-row label > span { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.wz-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; max-width: 1100px; }
.wz-choice {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface);
  text-align: left; font-size: 1.02rem; font-weight: 500; color: var(--ink); transition: all .2s var(--ease);
}
.wz-choice kbd { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; border: 1.5px solid var(--line-2); font-family: var(--display); font-weight: 700; font-size: .8rem; color: var(--mute); background: var(--surface-2); transition: all .2s; }
.wz-choice:hover { border-color: var(--brand-500); background: var(--brand-50); transform: translateX(3px); }
.wz-choice.on { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(139, 92, 246, .15); }
.wz-choice.on kbd { background: var(--brand); color: #fff; border-color: var(--brand); }
.wz-choice .check { margin-left: auto; color: var(--brand); opacity: 0; transition: opacity .2s; }
.wz-choice.on .check { opacity: 1; }
.wz-actions { display: flex; align-items: center; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.wz-actions .hint { font-size: .8rem; color: var(--mute); }
.wz-actions .hint kbd { font-family: var(--sans); font-weight: 700; font-size: .74rem; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line-2); }
.wz-error { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-size: .88rem; font-weight: 500; animation: shake .4s; }
.wz-error .ico { width: 16px; height: 16px; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.wz-nav { position: absolute; right: clamp(18px, 4vw, 48px); bottom: 24px; display: flex; gap: 2px; z-index: 3; background: var(--brand); border-radius: 12px; padding: 3px; box-shadow: 0 10px 24px -10px rgba(109, 40, 217, .8); }
.wz-nav button { width: 42px; height: 38px; border-radius: 9px; color: #fff; display: grid; place-items: center; }
.wz-nav button:hover { background: rgba(255, 255, 255, .15); }
.wz-nav button[disabled] { opacity: .35; pointer-events: none; }
.wz-counter { position: absolute; left: clamp(18px, 4vw, 48px); bottom: 30px; font-size: .8rem; color: var(--mute); z-index: 3; font-weight: 500; }
.wz-calc { margin-top: 22px; display: inline-flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: var(--brand-50); border: 1px solid var(--brand-100); color: #4a1a96; font-size: .95rem; }
.wz-calc .ico { width: 22px; height: 22px; color: var(--brand); }
.wz-calc strong { font-family: var(--display); font-size: 1.25rem; color: var(--brand); }
.wz-calc.warn { background: var(--warning-bg); border-color: var(--warning-line); color: #6d4103; }
.wz-calc.warn .ico, .wz-calc.warn strong { color: var(--warning); }
.wz-calc.bad { background: var(--danger-bg); border-color: var(--danger-line); color: #8d1828; }
.wz-calc.bad .ico, .wz-calc.bad strong { color: var(--danger); }
.wz-intro { max-width: 980px; }
.wz-intro .big-ic { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 26px; box-shadow: 0 18px 40px -16px rgba(139, 92, 246, .9); }
.wz-intro .big-ic .ico { width: 36px; height: 36px; stroke-width: 1.6; }
.wz-intro h1 { font-size: clamp(2.1rem, 4.6vw, 3.8rem); letter-spacing: -.025em; font-weight: 700; }
.wz-intro .lede { font-size: clamp(1.02rem, 1.5vw, 1.25rem); color: var(--mute); margin-top: 14px; max-width: 62ch; }
.wz-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; max-width: 1080px; }
.wz-fact.wide { grid-column: 1 / -1; background: var(--brand-50); border-color: var(--brand-100); }
.wz-tips { margin-top: 14px; max-width: 1080px; padding: 18px 20px; border-radius: 14px; border: 1px dashed var(--brand-100); background: linear-gradient(140deg, #fff, var(--brand-50)); }
.wz-tips strong { display: flex; align-items: center; gap: 8px; font-family: var(--display); color: var(--brand); font-size: .95rem; }
.wz-tips ul { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 22px; }
.wz-tips li { display: flex; gap: 9px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.wz-tips li .ico { width: 16px; height: 16px; color: var(--success); margin-top: 2px; }
.wz-fact { padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.wz-fact span { display: flex; align-items: center; gap: 7px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--mute); }
.wz-fact span .ico { width: 14px; height: 14px; color: var(--brand); }
.wz-fact p { margin-top: 6px; font-size: .9rem; color: var(--ink); font-weight: 500; line-height: 1.45; }
.wz-review { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; max-width: 1240px; width: 100%; }
.wz-review aside { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.wz-sign { max-width: 760px; }
.wz-sign .drop { padding: 48px 24px; min-height: 260px; }
.wz-done { text-align: center; align-items: center; max-width: 720px; margin: 0 auto; }
.wz-done .seal { position: relative; width: 120px; height: 120px; margin: 0 auto 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 24px 50px -20px rgba(139, 92, 246, .95); animation: seal .9s var(--ease); }
.wz-done .seal::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px dashed var(--brand-100); animation: spin 18s linear infinite; }
.wz-done .seal .ico { width: 54px; height: 54px; stroke-width: 2.2; }
.wz-done .seal .ico path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .7s .35s var(--ease) forwards; }
@keyframes seal { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.wz-done h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.wz-done .code { display: inline-block; margin-top: 18px; padding: 8px 16px; border-radius: 99px; background: var(--surface-3); font-family: var(--display); font-weight: 700; letter-spacing: .06em; color: var(--brand); }
.timeline { text-align: left; margin: 30px auto 0; display: flex; flex-direction: column; gap: 0; max-width: 460px; }
.timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.timeline li::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--mute); }
.timeline .tdot .ico { width: 15px; height: 15px; }
.timeline li.done .tdot { background: var(--success); color: #fff; }
.timeline li.now .tdot { background: var(--warning-bg); color: var(--warning); box-shadow: 0 0 0 4px rgba(246, 220, 162, .5); }
.timeline li.bad .tdot { background: var(--danger); color: #fff; }
.timeline strong { display: block; color: var(--ink); font-size: .9rem; }
.timeline span { font-size: .8rem; color: var(--mute); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .6; } }

/* =============================================================
   7. Documento (plantilla en membrete Mimesis, tamaño carta)
   ============================================================= */
.doc-frame { position: relative; width: 100%; container-type: inline-size; }
.doc-scale { width: 816px; transform-origin: top left; }
.doc-page {
  position: relative; width: 816px; height: 1056px; background: #fff url("../img/membrete.jpg") center / 100% 100% no-repeat;
  color: #1d1730; font-family: var(--sans); font-size: 11.6px; line-height: 1.52; padding: 48px 76px 150px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 24px 60px -30px rgba(46, 16, 101, .45); border-radius: 4px; overflow: hidden;
}
.doc-page .doc-body { position: relative; z-index: 1; }
.doc-page .doc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.doc-page .doc-head img { width: 54px; height: 54px; border-radius: 50%; }
.doc-page .doc-head .wordmark { font-size: 30px; color: #2e0f52; }
.doc-page .doc-head .co { font-size: 9.4px; color: #5d5373; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; margin-top: 3px; }
.doc-page .doc-code { position: absolute; top: 2px; right: 0; text-align: right; font-size: 9.6px; color: #6b6283; z-index: 1; }
.doc-page .doc-code strong { display: block; font-family: var(--display); font-size: 12.5px; color: #2e0f52; letter-spacing: .04em; }
.doc-page h1.doc-title { font-family: var(--display); font-size: 17px; color: #2e0f52; text-align: center; letter-spacing: .06em; text-transform: uppercase; margin: 2px 0 18px; }
.doc-page p { margin-bottom: 9px; text-align: justify; hyphens: auto; }
.doc-page .to { margin-bottom: 14px; }
.doc-page .to p { margin: 0; text-align: left; }
.doc-page .to p.gap { margin-top: 8px; }
.doc-page .subject { font-weight: 700; margin: 0 0 12px; text-align: left; }
.doc-page table.doc-table { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 11px; line-height: 1.4; }
.doc-page .doc-table th, .doc-page .doc-table td { border: 1px solid #ddd5ea; padding: 4.5px 9px; text-align: left; vertical-align: top; }
.doc-page .doc-table th { background: #f4effc; color: #3d1670; font-weight: 600; width: 34%; }
.doc-page .doc-table.cols th { width: auto; }
.doc-page ul.doc-list { list-style: disc; padding-left: 20px; margin: -2px 0 10px; }
.doc-page ul.doc-list li { margin-bottom: 3px; }
.doc-page .legal-note { font-size: 9.8px; line-height: 1.45; color: #5d5373; border-left: 3px solid #c9b5ff; padding: 5px 11px; background: #faf7ff; margin: 4px 0 12px; text-align: left; }
.doc-page .signs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 18px; }
.doc-page .signs.single { grid-template-columns: minmax(0, 300px); }
.doc-page .sign { font-size: 10.8px; line-height: 1.4; }
.doc-page .sign .sig-img { height: 62px; display: flex; align-items: flex-end; margin-bottom: 3px; }
.doc-page .sign .sig-img img { max-height: 62px; max-width: 220px; object-fit: contain; }
.doc-page .sign .sig-line { border-top: 1.2px solid #1d1730; padding-top: 5px; }
.doc-page .sign strong { display: block; }
.doc-page .sig-empty { height: 62px; display: flex; align-items: center; justify-content: center; border: 1.5px dashed #c9b5ff; border-radius: 8px; color: #8b5cf6; font-size: 10px; margin-bottom: 3px; background: #faf7ff; }
.doc-page .decision { margin-top: 16px; padding: 10px 14px; border-radius: 8px; border: 1px solid; font-size: 10.8px; }
.doc-page .decision.ok { border-color: #b9e8d4; background: #f1fbf6; }
.doc-page .decision.no { border-color: #f6c4cc; background: #fff5f6; }
.doc-page .decision h4 { font-family: var(--display); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.doc-page .decision.ok h4 { color: #0d7a55; }
.doc-page .decision.no h4 { color: #c0263a; }
.doc-page .decision p { margin-bottom: 4px; text-align: left; }
.doc-page .doc-foot { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; justify-content: center; gap: 30px; font-size: 10px; color: #fff; font-weight: 500; z-index: 1; }
.doc-page .doc-foot span { display: inline-flex; align-items: center; gap: 6px; }
.doc-page .doc-foot .ico { width: 12px; height: 12px; }
.doc-page .watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: var(--display); font-weight: 800; font-size: 92px; letter-spacing: .1em; color: rgba(139, 92, 246, .07); transform: rotate(-30deg); }
.doc-page .stamp { position: absolute; top: 118px; right: 70px; z-index: 2; transform: rotate(8deg); border: 3px solid; border-radius: 10px; padding: 6px 14px; font-family: var(--display); font-weight: 800; letter-spacing: .12em; font-size: 15px; text-transform: uppercase; opacity: .85; }
.doc-page .stamp.ok { color: #0d7a55; border-color: #0d7a55; }
.doc-page .stamp.no { color: #c0263a; border-color: #c0263a; }
.doc-page .stamp.wait { color: #9a5b04; border-color: #9a5b04; }

/* =============================================================
   8. Gráficos
   ============================================================= */
.donut { position: relative; flex: none; }
.donut svg { transform: rotate(-90deg); }
.donut circle { fill: none; transition: stroke-dasharray 1.2s var(--ease); }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut .center strong { display: block; font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--ink); letter-spacing: -.03em; }
.donut .center span { font-size: .74rem; color: var(--mute); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.legend { display: flex; flex-direction: column; gap: 12px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; font-size: .86rem; }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.legend strong { font-family: var(--display); color: var(--ink); font-size: 1.05rem; }
.year-cal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; }
.mcal h4 { font-family: var(--display); font-size: .85rem; text-transform: capitalize; margin-bottom: 8px; color: var(--ink); display: flex; justify-content: space-between; }
.mcal h4 small { font-family: var(--sans); font-size: .7rem; color: var(--brand); font-weight: 700; }
.mcal .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mcal .dow { font-size: .62rem; color: var(--mute-2); text-align: center; font-weight: 700; }
.mcal .d { aspect-ratio: 1; display: grid; place-items: center; font-size: .68rem; border-radius: 6px; color: var(--ink-2); position: relative; }
.mcal .d.we { color: #b4abc6; }
.mcal .d.hol { color: var(--magenta); font-weight: 700; }
.mcal .d.hol::after { content: ""; position: absolute; bottom: 2px; width: 3px; height: 3px; border-radius: 50%; background: var(--magenta); }
.mcal .d.out { opacity: .32; }
.mcal .d.today { box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; }
.mcal .d.used { background: var(--brand); color: #fff; font-weight: 600; }
.mcal .d.sched { background: var(--cyan); color: #053c47; font-weight: 600; }
.mcal .d.pend { background: repeating-linear-gradient(135deg, var(--warning-bg) 0 4px, #ffe5ad 4px 8px); color: var(--warning); font-weight: 700; }
.mcal .d.perm { background: var(--brand-100); color: var(--brand); font-weight: 600; }
.mcal .d.sel { background: var(--magenta); color: #fff; font-weight: 700; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: .78rem; color: var(--mute); }
.cal-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cal-legend i { width: 14px; height: 14px; border-radius: 4px; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar .lab { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 6px; }
.hbar .lab strong { color: var(--ink); }
.spark-timeline { position: relative; height: 54px; margin-top: 8px; }
.spark-timeline .track { position: absolute; left: 0; right: 0; top: 22px; height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.spark-timeline .track i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.spark-timeline .mark { position: absolute; top: 12px; width: 2px; height: 30px; background: var(--ink); }
.spark-timeline .mark span { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); font-size: .7rem; white-space: nowrap; color: var(--ink); font-weight: 600; }
.spark-timeline .mark.r span { left: auto; right: -2px; transform: none; }
.spark-timeline .mark.l span { left: -2px; transform: none; }
.spark-timeline .mark.notice { background: var(--warning); }
.spark-timeline .mark.notice span { color: var(--warning); top: -16px; }

/* Desprendibles */
.payslips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.slip { position: relative; height: 104px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; padding: 12px; text-align: left; transition: all .25s var(--ease); color: inherit; overflow: hidden; }
.slip .m { font-family: var(--display); font-weight: 700; font-size: .95rem; text-transform: capitalize; color: var(--ink); }
.slip .s { font-size: .7rem; color: var(--mute); }
.slip .ico { width: 22px; height: 22px; }
.slip.ok { background: linear-gradient(160deg, var(--surface) 40%, var(--brand-50)); border-color: var(--brand-100); }
.slip.ok .ico { color: var(--brand); }
.slip.ok:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-500); }
.slip.none { border-style: dashed; background: var(--surface-2); color: var(--mute-2); }
.slip.none .m { color: var(--mute-2); }
.slip.future { opacity: .45; }
.slip.add { cursor: pointer; }
.slip.add:hover { border-color: var(--brand-500); color: var(--brand); background: var(--brand-50); }

/* Contrato */
.contract-slot { display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: var(--r-lg); border: 2px dashed var(--warning-line); background: repeating-linear-gradient(135deg, #fffaf0 0 12px, #fff6e2 12px 24px); }
.contract-slot .ic { flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--warning); box-shadow: var(--shadow); animation: pulse 2.4s infinite; }
.contract-slot .ic .ico { width: 26px; height: 26px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(234, 170, 50, .45); } 50% { box-shadow: 0 0 0 10px rgba(234, 170, 50, 0); } }
.contract-ok { display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--success-bg), #f4fbf8); border: 1px solid var(--success-line); }
.contract-ok .ic { flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--success); box-shadow: var(--shadow); }
.contract-ok .ic .ico { width: 26px; height: 26px; }
.contract-slot, .contract-ok { flex-wrap: wrap; }
.contract-slot > div, .contract-ok > div { min-width: 190px; }

/* Documentos */
.doc-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: all .3s var(--ease); }
.doc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.doc-card .file { flex: none; position: relative; width: 54px; height: 66px; border-radius: 8px 16px 8px 8px; background: linear-gradient(160deg, #fff, var(--brand-50)); border: 1px solid var(--brand-100); display: grid; place-items: center; color: var(--brand); }
.doc-card .file::after { content: "PDF"; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: .58rem; font-weight: 800; letter-spacing: .06em; color: #fff; background: var(--magenta); border-radius: 4px; padding: 1px 5px; }
.doc-card .file.form::after { content: "FORM"; background: var(--brand); }
.doc-card .file .ico { width: 22px; height: 22px; margin-top: -12px; }
.doc-card h3 { font-size: 1rem; }
.doc-card p { font-size: .82rem; color: var(--mute); margin-top: 4px; }
.doc-card .acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* =============================================================
   9. Vistas específicas
   ============================================================= */
/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.login-art { position: relative; overflow: hidden; background: var(--grad-deep); color: #fff; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.login-art::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55; background-image: radial-gradient(rgba(190, 160, 255, .22) 1.2px, transparent 1.4px); background-size: 13px 13px; mask-image: radial-gradient(70% 70% at 70% 60%, #000, transparent 75%); }
.login-art .orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(50px); opacity: .55; }
.login-art .orb.a { width: 420px; height: 420px; right: -120px; top: -100px; background: #c730da; animation: float 14s ease-in-out infinite; }
.login-art .orb.b { width: 360px; height: 360px; left: -140px; bottom: -120px; background: #22d3ee; opacity: .3; animation: float 16s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(30px, 40px) scale(1.08); } }
.login-art .globe { width: min(360px, 60%); margin: 0 auto; border-radius: 50%; box-shadow: 0 40px 100px -30px rgba(199, 48, 218, .7), 0 0 0 10px rgba(255, 255, 255, .04), 0 0 0 22px rgba(255, 255, 255, .025); animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-12px); } }
.login-art h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.5rem); font-weight: 600; max-width: 18ch; }
.login-art p { color: #cdbfee; margin-top: 12px; max-width: 46ch; }
.login-art .top { display: flex; align-items: center; gap: 12px; }
.login-art .top .wordmark { font-size: 2.1rem; }
.login-art .top small { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #b9a8db; font-weight: 600; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .2); }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 6vw, 90px); max-width: 620px; width: 100%; margin: 0 auto; }
.login-form h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.login-form .lede { color: var(--mute); margin: 10px 0 34px; }
.login-form form { display: flex; flex-direction: column; gap: 18px; }
.login-form .input { height: 52px; font-size: 1rem; border-radius: 13px; }
.login-form .pw { position: relative; }
.login-form .pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 8px; color: var(--mute); border-radius: 8px; }
.login-form .foot { margin-top: 28px; font-size: .8rem; color: var(--mute); }

/* Hero inicio */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 30px; }
.hero h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: #fff; font-weight: 600; }
.hero h1 .wordmark { font-size: 1.25em; }
.hero p { color: #cdbfee; margin-top: 10px; max-width: 52ch; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #fff; font-weight: 600; font-size: .88rem; transition: all .25s var(--ease); }
.quick a:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }
.quick a .qi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); flex: none; }
.quick a .qi .ico { width: 19px; height: 19px; }

.profile-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.profile-head h2 { font-size: 1.6rem; color: #fff; }
.profile-head .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font-size: .76rem; color: #ece4fb; font-weight: 500; }
.chip .ico { width: 14px; height: 14px; }
.money-tile { padding: 18px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.money-tile span { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.money-tile span .ico { width: 15px; height: 15px; color: var(--brand); }
.money-tile strong { display: block; font-family: var(--display); font-size: 1.45rem; color: var(--ink); margin-top: 6px; letter-spacing: -.01em; }
.money-tile small { display: block; font-size: .74rem; color: var(--mute); margin-top: 4px; line-height: 1.4; }

/* =============================================================
   10. Responsive
   ============================================================= */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-cal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payslips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wz-review { grid-template-columns: 1fr; }
  .wz-review aside { position: static; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 284px; transform: translateX(-105%); transition: transform .4s var(--ease); box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(23, 6, 41, .4); z-index: 35; }
  .menu-btn { display: grid; }
  .g-3, .g-2, .hero { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 300px; }
  .login-art .globe { width: 150px; }
  .form-section { grid-template-columns: 1fr; gap: 14px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wz-facts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .g-4 { grid-template-columns: 1fr 1fr; }
  .year-cal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payslips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .two { grid-column: auto; }
  .dl, .dl.cols-3 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .wz-row { grid-template-columns: 1fr; }
  .wz-step { padding-bottom: 120px; }
  .wz-top .title { display: none; }
  .wz-counter { display: none; }
  .wz-nav { bottom: 14px; }
  .quick { grid-template-columns: 1fr; }
  .req-item { grid-template-columns: 40px 1fr; }
  .req-item .right { grid-column: 2; }
  .topbar .crumbs { display: none; }
  .toasts { left: 16px; right: 16px; }
  .toast { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =============================================================
   11. Impresión / Guardar como PDF
   ============================================================= */
#print-root { display: none; }
@media print {
  @page { size: letter; margin: 0; }
  html, body { background: #fff !important; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
  #print-root .doc-page { width: 8.5in; min-height: 11in; height: 11in; box-shadow: none; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; page-break-after: always; overflow: hidden; }
  #print-root .watermark { display: none; }
}

/* Archivo de permisos */
.arch-filters { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.arch-table th.r, .arch-table td.r { text-align: right; }
.arch-table td { padding: 11px 14px; }
@media (max-width: 640px) { .arch-filters { grid-template-columns: 1fr 1fr; } .arch-filters .input-group { grid-column: 1 / -1; } }
.tile .tile-law { display: flex; gap: 6px; align-items: flex-start; font-size: .72rem; color: var(--brand); font-weight: 600; line-height: 1.4; }
.tile .tile-law .ico { width: 13px; height: 13px; margin-top: 1px; flex: none; }
.paid-list { padding: 12px 14px; border-radius: 12px; background: var(--success-bg); border: 1px solid var(--success-line); }
.paid-list .kv { border-bottom-color: var(--success-line); }
.paid-list .ico { width: 15px; height: 15px; color: var(--success); vertical-align: -2px; }

/* Sello institucional de Mimesis */
.doc-page .company-sign .seal-wrap { position: relative; height: 112px; display: flex; align-items: flex-end; margin-bottom: 4px; }
.doc-page .company-sign .seal { width: 112px; height: 112px; transform: rotate(-9deg); opacity: .9; mix-blend-mode: multiply; }
.doc-page .company-sign .seal-sig { position: absolute; left: 54px; bottom: 18px; max-height: 58px; max-width: 170px; object-fit: contain; }
.doc-page .company-sign .sig-empty { height: 112px; }
.pw-wrap { position: relative; display: block; flex: 1; min-width: 0; }
.pw-wrap .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--mute); }
.pw-eye:hover { background: var(--surface-3); color: var(--brand); }

/* =============================================================
   Contratistas: registro de horas
   ============================================================= */
.ts-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.hours-cal .hc-dow, .hours-cal .hc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hours-cal .hc-dow span { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute-2); text-align: center; padding-bottom: 4px; }
.hc-day { position: relative; aspect-ratio: 1 / .86; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; padding: 6px 8px; text-align: left; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.hc-day .n { font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.hc-day .h { font-family: var(--display); font-size: .86rem; font-weight: 700; color: var(--brand); align-self: flex-end; }
.hc-day:not([disabled]):hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.hc-day.we { background: var(--surface-2); }
.hc-day.hol .n { color: var(--magenta); }
.hc-day.future { opacity: .4; cursor: default; }
.hc-day.today { border: 2px solid var(--ink); }
.hc-day.sel { box-shadow: 0 0 0 3px var(--brand-500); border-color: var(--brand); }
.hc-day.lv1 { background: #f3eefe; } .hc-day.lv2 { background: #e2d6fc; } .hc-day.lv3 { background: #c9b2f8; } .hc-day.lv4 { background: #a98af0; }
.hc-day.lv3 .h, .hc-day.lv4 .h { color: #2e0f52; }
.hc-day.aprobado::after, .hc-day.reportado::after, .hc-day.observado::after, .hc-day.mixto::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; }
.hc-day.aprobado::after { background: var(--success); }
.hc-day.reportado::after, .hc-day.mixto::after { background: #e0a21a; }
.hc-day.observado::after { background: var(--danger); }
.cal-legend .lg { width: 10px; height: 10px; border-radius: 50%; }
.cal-legend .lg.aprobado { background: var(--success); } .cal-legend .lg.reportado { background: #e0a21a; } .cal-legend .lg.observado { background: var(--danger); }
.cols-chart { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding-top: 10px; }
.cols-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.cols-chart .bar-v { flex: 1; width: 100%; max-width: 54px; background: var(--surface-3); border-radius: 10px; display: flex; align-items: flex-end; overflow: hidden; }
.cols-chart .bar-v i { display: block; width: 100%; background: var(--grad); border-radius: 10px; min-height: 2px; transition: height 1s var(--ease); }
.cols-chart strong { font-family: var(--display); font-size: .9rem; color: var(--ink); }
.cols-chart span { font-size: .72rem; color: var(--mute); }
.ts-form-card { position: sticky; top: calc(var(--topbar) + 10px); }
.ts-form { padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }
.ts-calc:empty { display: none; }
.ts-day-list:empty { display: none; }
.ts-day-list { margin-bottom: 8px; }
.ts-list { display: flex; flex-direction: column; }
.ts-entry { display: flex; gap: 14px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.ts-entry:last-child { border-bottom: 0; }
.ts-entry .ts-h { flex: none; width: 74px; padding: 8px; border-radius: 10px; background: var(--brand-50); text-align: center; }
.ts-entry .ts-h strong { display: block; font-family: var(--display); color: var(--brand); font-size: .95rem; }
.ts-entry .ts-h span { font-size: .66rem; color: var(--mute); }
.ts-entry.observado .ts-h { background: var(--danger-bg); } .ts-entry.observado .ts-h strong { color: var(--danger); }
.ts-entry.aprobado .ts-h { background: var(--success-bg); } .ts-entry.aprobado .ts-h strong { color: var(--success); }
.ts-review { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ts-review > input { margin-top: 22px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.ts-review .ts-entry { flex: 1; }
.ts-actions { display: grid; grid-template-columns: 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.ts-actions .row { flex-wrap: wrap; justify-content: flex-end; }
.ts-form .row.between { flex-wrap: wrap; gap: 8px; }
details summary { cursor: pointer; }
@media (max-width: 1100px) { .ts-layout { grid-template-columns: 1fr; } .ts-form-card { position: static; } }
@media (max-width: 640px) {
  .hours-cal .hc-dow, .hours-cal .hc-grid { gap: 3px; }
  .hc-day { padding: 4px 5px; border-radius: 8px; aspect-ratio: 1 / 1.05; }
  .hc-day .h { font-size: .66rem; }
  .hc-day .n { font-size: .68rem; }
  .ts-actions { grid-template-columns: 1fr; }
  .cols-chart { height: 150px; gap: 6px; }
}
