/* /home/tgestion/public_html/assets/css/gestion.css
   Sistema de diseño canónico de Tudela Gestión.
   Base: tokens de la matriz (superadmin.css) + extensiones de producto.
   Acento de servicio: #73C15D. Light-only. Inter 300–600.
   Regla: los paneles NO definen estilos inline; consumen este archivo.
   v2: capa premium g2- (portal trabajador + dashboard empleador).
   v3: capa dashboard cumplimiento g3- (sidebar, semáforo DS44, KPI,
       timeline PTP, checklist, CTA trabajador). Aditiva.
   ------------------------------------------------------------------ */

:root {
    /* ── Tokens matriz (verbatim) ── */
    --td-black: #050505;
    --td-text: #111111;
    --td-muted: #6f6f6f;
    --td-line: #e9e9e9;
    --td-soft: #f7f8fa;
    --td-white: #ffffff;
    --td-ease: cubic-bezier(.22, 1, .36, 1);

    --sa-bg: #f6f7f9;
    --sa-surface: #ffffff;
    --sa-line: #e7e8eb;
    --sa-line-2: #dcdee2;
    --sa-text-3: #9aa0a6;
    --sa-radius: 18px;
    --sa-radius-sm: 12px;
    --sa-maxw: 1120px;

    /* ── Extensiones Gestión ── */
    --g-accent: #73C15D;
    --g-accent-ink: #2f6b22;          /* texto sobre superficies verdes claras */
    --g-accent-soft: rgba(115, 193, 93, .14);
    --g-accent-ring: rgba(115, 193, 93, .30);

    --g-ink-2: #374151;               /* texto secundario más fuerte que muted */
    --g-mute-bg: #f1f5f9;

    --ok: #16a34a;      --ok-bg: #f0fdf4;   --ok-line: #bbf7d0;
    --danger: #dc2626;  --danger-bg: #fef2f2; --danger-line: #fecaca;
    --warn: #d97706;    --warn-bg: #fffbeb; --warn-line: #fde68a;
    --info: #2563eb;    --info-bg: #eff6ff; --info-line: #bfdbfe;

    --radius-lg: 18px;
    --radius: 12px;
    --radius-sm: 9px;
    --radius-pill: 100px;

    --shadow-card: 0 1px 2px rgba(17, 17, 17, .04);
    --shadow-soft: 0 8px 22px rgba(17, 17, 17, .06);
    --shadow-pop: 0 18px 46px rgba(17, 17, 17, .10);
    --nav-h: 64px;
}

/* ── Reset / base ─────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    color: var(--td-text);
    background: var(--sa-bg);
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; color: var(--td-black); }

/* ── App shell ────────────────────────────────────── */
.g-topbar {
    position: sticky; top: 0; z-index: 40;
    height: 60px;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--sa-line);
}
.g-topbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--g-accent); opacity: .9;
}
.g-topbar__inner {
    height: 100%; max-width: var(--sa-maxw); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; gap: 16px;
}
.g-brand { display: inline-flex; align-items: center; }
.g-brand__logo { height: 30px; width: auto; display: block; }
.g-topbar__spacer { flex: 1; }

.g-user {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 5px 12px 5px 6px;
    background: var(--td-white); border: 1px solid var(--sa-line);
    border-radius: var(--radius-pill); font-size: 13px; color: var(--td-muted);
}
.g-user__avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--td-black); color: #fff;
    display: grid; place-items: center; font-size: 11px; font-weight: 600;
}
.g-user strong { color: var(--td-text); font-weight: 500; }

.g-logout {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--sa-text-3);
    padding: 7px 10px; border-radius: var(--radius-pill);
    transition: color .18s var(--td-ease), background .18s var(--td-ease);
}
.g-logout:hover { color: var(--danger); background: rgba(220, 38, 38, .06); }

.g-main { max-width: var(--sa-maxw); margin: 0 auto; padding: 30px 24px 64px; }
.g-main--narrow { max-width: 760px; }

.g-head { margin-bottom: 26px; }
.g-head__title { font-size: 24px; }
.g-head__sub { margin-top: 6px; font-size: 14px; color: var(--td-muted); }

.g-sectlabel {
    display: flex; align-items: center; gap: 14px;
    font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--sa-text-3); margin: 32px 0 16px;
}
.g-sectlabel::after { content: ""; flex: 1; height: 1px; background: var(--sa-line); }

/* ── Cards ────────────────────────────────────────── */
.g-card {
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    border-radius: var(--radius-lg); padding: 22px;
    box-shadow: var(--shadow-card);
}
.g-card--accent { position: relative; overflow: hidden; }
.g-card--accent::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--g-accent); opacity: .95;
}
.g-card--link { display: block; transition: transform .18s var(--td-ease), box-shadow .18s var(--td-ease), border-color .18s var(--td-ease); }
.g-card--link:hover { transform: translateY(-2px); border-color: var(--sa-line-2); box-shadow: var(--shadow-soft); }

/* ── Botones ──────────────────────────────────────── */
.g-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1;
    padding: 11px 16px; border-radius: var(--radius);
    background: var(--td-white); color: var(--td-text);
    border: 1px solid var(--sa-line-2); cursor: pointer;
    transition: background .15s var(--td-ease), border-color .15s var(--td-ease), opacity .15s var(--td-ease), transform .15s var(--td-ease);
    text-decoration: none;
}
.g-btn:hover { background: var(--td-soft); }
.g-btn:active { transform: scale(.98); }
.g-btn svg, .g-btn .ti { font-size: 17px; }

.g-btn--primary { background: var(--td-black); color: #fff; border-color: var(--td-black); font-weight: 600; }
.g-btn--primary:hover { background: #000; opacity: .92; }

.g-btn--accent { background: var(--g-accent); color: #fff; border-color: var(--g-accent); font-weight: 600; }
.g-btn--accent:hover { opacity: .9; background: var(--g-accent); }

.g-btn--danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.g-btn--ghost { background: transparent; border-color: transparent; color: var(--td-muted); }
.g-btn--ghost:hover { background: var(--td-soft); color: var(--td-text); }

.g-btn--sm { padding: 7px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.g-btn--block { width: 100%; }
.g-btn svg { transition: transform .15s var(--td-ease); }
.g-btn--primary:hover svg, .g-btn--accent:hover svg { transform: translateX(2px); }
.g-btn:disabled, .g-btn[disabled] { opacity: .5; cursor: not-allowed; }

.g-iconbtn {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--td-white); border: 1px solid var(--sa-line-2);
    color: var(--td-muted); cursor: pointer;
    transition: background .15s var(--td-ease), color .15s var(--td-ease);
}
.g-iconbtn:hover { background: var(--td-soft); color: var(--td-text); }

/* ── Formularios ──────────────────────────────────── */
.g-field { margin-bottom: 16px; }
.g-field > label {
    display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--td-muted); margin-bottom: 7px;
}
.g-input, .g-field input, .g-field select, .g-field textarea {
    width: 100%; font-family: inherit; font-size: 14px; color: var(--td-text);
    background: var(--td-white); border: 1px solid var(--sa-line-2); border-radius: var(--radius);
    padding: 11px 13px; outline: none;
    transition: border-color .15s var(--td-ease), box-shadow .15s var(--td-ease);
}
.g-field textarea { resize: vertical; min-height: 96px; }
.g-input:focus,
.g-field input:focus, .g-field select:focus, .g-field textarea:focus {
    border-color: var(--g-accent);
    box-shadow: 0 0 0 3px var(--g-accent-ring);
}
.g-field__hint { margin-top: 6px; font-size: 12px; color: var(--sa-text-3); }
.g-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .g-grid-2 { grid-template-columns: 1fr; } }
.g-col-full { grid-column: 1 / -1; }
.g-label-opt { font-weight: 400; color: var(--td-muted); }

/* ── Alertas / flash ──────────────────────────────── */
.g-alert {
    font-size: 13px; border-radius: var(--radius); padding: 11px 14px; margin-bottom: 18px;
    display: flex; align-items: center; gap: 9px;
}
.g-alert--ok   { background: var(--ok-bg);     border: 1px solid var(--ok-line);     color: #15803d; }
.g-alert--err  { background: var(--danger-bg); border: 1px solid var(--danger-line); color: #b91c1c; }
.g-alert--warn { background: var(--warn-bg);   border: 1px solid var(--warn-line);   color: #b45309; }
.g-alert--info { background: var(--info-bg);   border: 1px solid var(--info-line);   color: #1d4ed8; }

/* ── Chips / badges ───────────────────────────────── */
.g-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 500; line-height: 1;
    padding: 5px 10px; border-radius: var(--radius-pill);
    background: var(--g-mute-bg); color: var(--g-ink-2);
    border: 1px solid var(--sa-line);
}
.g-chip--ok     { background: var(--ok-bg);     color: #15803d; border-color: var(--ok-line); }
.g-chip--danger { background: var(--danger-bg); color: #b91c1c; border-color: var(--danger-line); }
.g-chip--warn   { background: var(--warn-bg);   color: #b45309; border-color: var(--warn-line); }
.g-chip--accent { background: var(--g-accent-soft); color: var(--g-accent-ink); border-color: transparent; }

/* ── Tablas ───────────────────────────────────────── */
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.g-table th {
    text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--sa-text-3); padding: 10px 12px; border-bottom: 1px solid var(--sa-line);
}
.g-table td { padding: 12px; border-bottom: 1px solid var(--sa-line); color: var(--td-text); vertical-align: middle; }
.g-table tr:last-child td { border-bottom: none; }
.g-table tbody tr:hover td, .g-table tbody tr:hover td { background: var(--td-soft); }

/* ── KPIs / stats ─────────────────────────────────── */
.g-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.g-kpi {
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    border-radius: var(--radius); padding: 18px 20px;
}
.g-kpi__l { font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--sa-text-3); margin-bottom: 10px; }
.g-kpi__n { font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -.02em; color: var(--td-black); }
@media (max-width: 600px) { .g-kpis { grid-template-columns: 1fr; } }

/* ── Estado vacío ─────────────────────────────────── */
.g-empty { text-align: center; padding: 46px 20px; color: var(--td-muted); }
.g-empty__t { font-size: 16px; font-weight: 600; color: var(--td-text); margin-bottom: 6px; }
.g-empty__s { font-size: 13.5px; line-height: 1.55; max-width: 360px; margin: 0 auto; }

/* ── Modal ────────────────────────────────────────── */
.g-modal-bg {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(8, 10, 14, .5);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.g-modal {
    background: var(--sa-surface); border-radius: var(--radius-lg);
    padding: 28px 26px; max-width: 540px; width: 100%;
    box-shadow: var(--shadow-pop);
}
.g-modal__t { font-size: 18px; margin-bottom: 6px; }
.g-modal__s { font-size: 13.5px; color: var(--td-muted); line-height: 1.6; margin-bottom: 20px; text-align: justify; }
.g-modal__act { display: flex; gap: 10px; justify-content: flex-end; }

/* ── Nav inferior (móvil) ─────────────────────────── */
.g-bottomnav {
    position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h); z-index: 40;
    background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--sa-line); display: flex;
}
.g-bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 11px; color: var(--sa-text-3);
}
.g-bottomnav a .ti { font-size: 21px; }
.g-bottomnav a.is-active { color: var(--td-black); }
.g-bottomnav a.is-active .ti { color: var(--g-accent-ink); }
@media (min-width: 760px) { .g-bottomnav { display: none; } }
.g-has-bottomnav { padding-bottom: calc(var(--nav-h) + 12px); }
@media (min-width: 760px) { .g-has-bottomnav { padding-bottom: 64px; } }

/* ── Utilidades ───────────────────────────────────── */
.g-stack > * + * { margin-top: 14px; }
.g-row { display: flex; align-items: center; gap: 10px; }
.g-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-muted { color: var(--td-muted); }
.g-hide-mobile { }
@media (max-width: 600px) { .g-hide-mobile { display: none !important; } }

/* ==================================================================
   V2 · CAPA PREMIUM (prefijo g2-)
   Portal trabajador + dashboard empleador. Aditiva: no modifica nada
   de lo anterior. Sin emojis; iconografía Tabler exclusivamente.
   ================================================================== */

/* ── Autenticación centrada (patrón matriz sa-login) ── */
.g2-auth {
    min-height: calc(100vh - 62px);
    display: grid; place-items: start center;
    padding: 8vh 20px 40px;
    background:
        radial-gradient(680px 360px at 50% -8%, var(--g-accent-soft), transparent 62%),
        var(--sa-bg);
}
.g2-auth__box { width: 100%; max-width: 400px; }
.g2-auth__brand { text-align: center; margin-bottom: 26px; }
.g2-auth__disc {
    width: 58px; height: 58px; border-radius: 50%;
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    box-shadow: var(--shadow-card);
    display: grid; place-items: center; margin: 0 auto 14px;
}
.g2-auth__disc .ti { font-size: 27px; color: var(--g-accent-ink); }
.g2-auth__title { font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--td-black); }
.g2-auth__hint { margin-top: 6px; font-size: 13.5px; color: var(--td-muted); line-height: 1.55; }
.g2-auth__card {
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    border-radius: var(--radius-lg); padding: 28px 26px;
    box-shadow: 0 24px 60px rgba(17, 17, 17, .06);
}
.g2-auth__foot { text-align: center; margin-top: 20px; font-size: 12px; color: var(--sa-text-3); line-height: 1.6; }

/* ── Hero de identidad (cabecera de portal) ── */
.g2-hero {
    display: flex; align-items: center; gap: 16px;
    padding: 4px 2px 22px;
}
.g2-hero__disc {
    flex-shrink: 0; width: 54px; height: 54px; border-radius: 16px;
    background: var(--td-black); color: var(--g-accent);
    display: grid; place-items: center;
    font-size: 18px; font-weight: 600; letter-spacing: .02em;
}
.g2-hero__disc .ti { font-size: 26px; }
.g2-hero__name { font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--td-black); line-height: 1.2; }
.g2-hero__meta { margin-top: 4px; font-size: 13px; color: var(--td-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.g2-hero__meta .ti { font-size: 14px; color: var(--sa-text-3); }
.g2-hero__side { margin-left: auto; }
@media (max-width: 600px) {
    .g2-hero { flex-direction: column; text-align: center; }
    .g2-hero__meta { justify-content: center; }
    .g2-hero__side { margin: 4px auto 0; }
}

/* ── Anillo de cumplimiento (conic, --p = 0..100) ── */
.g2-ring {
    --p: 0;
    --ring-size: 128px;
    --ring-w: 11px;
    position: relative;
    width: var(--ring-size); height: var(--ring-size);
    border-radius: 50%;
    background: conic-gradient(var(--g-accent) calc(var(--p) * 1%), var(--g-mute-bg) 0);
}
.g2-ring::before {
    content: "";
    position: absolute; inset: var(--ring-w);
    border-radius: 50%;
    background: var(--sa-surface);
}
.g2-ring__val {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-size: calc(var(--ring-size) * .22);
    font-weight: 600; letter-spacing: -.02em; color: var(--td-black);
}
.g2-ring__val small { font-size: .55em; font-weight: 500; color: var(--td-muted); margin-left: 1px; }
.g2-ring--sm { --ring-size: 92px; --ring-w: 9px; }

/* ── Score card (anillo + resumen) ── */
.g2-score {
    display: flex; align-items: center; gap: 26px;
    padding: 24px;
}
.g2-score__body { flex: 1; min-width: 0; }
.g2-score__label {
    font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--sa-text-3); margin-bottom: 6px;
}
.g2-score__t { font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--td-black); }
.g2-score__s { margin-top: 6px; font-size: 13.5px; color: var(--td-muted); line-height: 1.6; max-width: 520px; }
.g2-score__stats { display: flex; gap: 22px; margin-top: 14px; }
.g2-stat__n { font-size: 20px; font-weight: 600; color: var(--td-black); line-height: 1; }
.g2-stat__l { margin-top: 5px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--sa-text-3); }
@media (max-width: 640px) {
    .g2-score { flex-direction: column; text-align: center; }
    .g2-score__stats { justify-content: center; }
    .g2-score__s { margin-left: auto; margin-right: auto; }
}

/* ── Tiles de módulo (barra de acento superior, patrón sa-svc) ── */
.g2-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 920px) { .g2-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .g2-tiles { grid-template-columns: 1fr; } }

.g2-tile {
    --tile: var(--td-muted);
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 10px; padding: 24px 14px 20px;
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    transition: transform .2s var(--td-ease), border-color .2s var(--td-ease), box-shadow .2s var(--td-ease);
}
.g2-tile::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--tile); opacity: .9;
}
a.g2-tile:hover { transform: translateY(-3px); border-color: var(--sa-line-2); box-shadow: var(--shadow-soft); }
.g2-tile__disc {
    width: 52px; height: 52px; border-radius: 15px;
    background: color-mix(in srgb, var(--tile) 12%, #ffffff);
    display: grid; place-items: center;
}
.g2-tile__disc .ti { font-size: 25px; color: var(--tile); }
.g2-tile__t { font-size: 13.5px; font-weight: 600; color: var(--td-text); line-height: 1.3; }
.g2-tile__s { font-size: 11.5px; color: var(--td-muted); display: inline-flex; align-items: center; gap: 4px; }
.g2-tile__s .ti { font-size: 13px; }
.g2-tile--lock { opacity: .62; }
.g2-tile--lock:hover { transform: none; box-shadow: var(--shadow-card); }

/* ── Filas de acción (accesos del dashboard) ── */
.g2-rowlink {
    display: flex; align-items: center; gap: 15px;
    padding: 18px 20px;
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    transition: transform .18s var(--td-ease), border-color .18s var(--td-ease), box-shadow .18s var(--td-ease);
}
.g2-rowlink:hover { transform: translateY(-2px); border-color: var(--sa-line-2); box-shadow: var(--shadow-soft); }
.g2-rowlink__disc {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 13px;
    background: var(--g-accent-soft);
    display: grid; place-items: center;
}
.g2-rowlink__disc .ti { font-size: 22px; color: var(--g-accent-ink); }
.g2-rowlink__body { flex: 1; min-width: 0; }
.g2-rowlink__t { font-size: 14.5px; font-weight: 600; color: var(--td-text); line-height: 1.3; }
.g2-rowlink__s { margin-top: 3px; font-size: 12.5px; color: var(--td-muted); line-height: 1.5; }
.g2-rowlink__aux { display: flex; align-items: center; gap: 12px; }
.g2-rowlink__go { font-size: 20px; color: var(--sa-text-3); transition: transform .18s var(--td-ease), color .18s var(--td-ease); }
.g2-rowlink:hover .g2-rowlink__go { transform: translateX(3px); color: var(--td-text); }

/* ── Documento (fila premium del portal trabajador) ── */
.g2-doc {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
a.g2-doc { transition: transform .18s var(--td-ease), border-color .18s var(--td-ease), box-shadow .18s var(--td-ease); }
a.g2-doc:hover { transform: translateY(-2px); border-color: var(--sa-line-2); box-shadow: var(--shadow-soft); }
.g2-doc__disc {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 13px;
    background: var(--g-accent-soft);
    display: grid; place-items: center;
}
.g2-doc__disc .ti { font-size: 22px; color: var(--g-accent-ink); }
.g2-doc--done .g2-doc__disc { background: var(--ok-bg); }
.g2-doc--done .g2-doc__disc .ti { color: var(--ok); }
.g2-doc__body { flex: 1; min-width: 0; }
.g2-doc__t { font-size: 14px; font-weight: 600; color: var(--td-text); line-height: 1.35; }
.g2-doc__m { margin-top: 3px; font-size: 12px; color: var(--td-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.g2-doc__m .ti { font-size: 13px; color: var(--sa-text-3); }
.g2-doc__act { flex-shrink: 0; }
@media (max-width: 520px) {
    .g2-doc { flex-wrap: wrap; }
    .g2-doc__act { width: 100%; display: flex; }
    .g2-doc__act > * { flex: 1; }
}

/* ── Stepper (enrolamiento / firma) ── */
.g2-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin: 4px 0 22px;
}
.g2-step { display: flex; align-items: center; gap: 8px; }
.g2-step__dot {
    width: 27px; height: 27px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 12.5px; font-weight: 600;
    background: var(--sa-surface); color: var(--sa-text-3);
    border: 1.5px solid var(--sa-line-2);
}
.g2-step__dot .ti { font-size: 15px; }
.g2-step__lbl { font-size: 12.5px; font-weight: 500; color: var(--sa-text-3); }
.g2-step.is-active .g2-step__dot { background: var(--td-black); border-color: var(--td-black); color: var(--g-accent); }
.g2-step.is-active .g2-step__lbl { color: var(--td-black); font-weight: 600; }
.g2-step.is-done .g2-step__dot { background: var(--g-accent-soft); border-color: transparent; color: var(--g-accent-ink); }
.g2-step.is-done .g2-step__lbl { color: var(--td-muted); }
.g2-steps__bar { width: 42px; height: 1.5px; background: var(--sa-line-2); margin: 0 12px; }
@media (max-width: 480px) { .g2-step__lbl { display: none; } .g2-steps__bar { width: 26px; } }

/* ── Visor de documento enmarcado (PDF.js) ── */
.g2-visor {
    position: relative;
    border: 1px solid var(--sa-line);
    border-radius: var(--radius);
    background: var(--g-mute-bg);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    height: 56vh; min-height: 320px;
    box-shadow: inset 0 1px 4px rgba(17, 17, 17, .05);
}
.g2-visor canvas {
    display: block; width: calc(100% - 24px); height: auto;
    margin: 12px auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(17, 17, 17, .10);
}
.g2-visor__msg {
    display: grid; place-items: center; align-content: center;
    height: 100%; gap: 8px; padding: 16px;
    color: var(--td-muted); font-size: 13px; text-align: center;
}
.g2-visor__msg .ti { font-size: 26px; color: var(--sa-text-3); }

/* ── Sello de resultado (éxito / error de flujo) ── */
.g2-seal { text-align: center; padding: 10px 6px 4px; }
.g2-seal__disc {
    position: relative;
    width: 76px; height: 76px; border-radius: 50%;
    background: var(--ok-bg);
    display: grid; place-items: center;
    margin: 0 auto 16px;
}
.g2-seal__disc::after {
    content: ""; position: absolute; inset: -7px;
    border-radius: 50%; border: 1.5px solid var(--ok-line);
}
.g2-seal__disc .ti { font-size: 38px; color: var(--ok); }
.g2-seal--err .g2-seal__disc { background: var(--danger-bg); }
.g2-seal--err .g2-seal__disc::after { border-color: var(--danger-line); }
.g2-seal--err .g2-seal__disc .ti { color: var(--danger); }
.g2-seal__t { font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--td-black); }
.g2-seal__s { margin: 8px auto 0; font-size: 13.5px; color: var(--td-muted); line-height: 1.6; max-width: 400px; }

/* ── Nota legal fina ── */
.g2-legal {
    display: flex; align-items: flex-start; justify-content: center; gap: 7px;
    font-size: 11.5px; color: var(--sa-text-3); line-height: 1.55;
    text-align: center; margin: 12px auto 0; max-width: 460px;
}
.g2-legal .ti { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* ── Canvas de firma manuscrita ── */
.g2-sign {
    position: relative;
    border: 1.5px dashed var(--sa-line-2);
    border-radius: var(--radius);
    background: #fff; overflow: hidden;
}
.g2-sign canvas { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; }
.g2-sign__hint {
    position: absolute; inset: 0;
    display: grid; place-items: center; align-content: center; gap: 5px;
    pointer-events: none;
    color: var(--sa-text-3); font-size: 13px;
}
.g2-sign__hint .ti { font-size: 24px; }
.g2-sign.is-err { border-color: var(--danger); border-style: solid; }
.g2-sign__err {
    display: flex; align-items: center; gap: 6px;
    margin: 8px 0 0; font-size: 13px; color: var(--danger);
}
.g2-sign__err .ti { font-size: 16px; }

/* ── Divisor de lista dentro de card ── */
.g2-divide > * + * { border-top: 1px solid var(--sa-line); }

/* ── PIN / OTP inputs ── */
.g2-code input {
    text-align: center; font-size: 21px; font-weight: 600; letter-spacing: .38em;
}

/* ==================================================================
   V3 · DASHBOARD DE CUMPLIMIENTO (prefijo g3-)
   Panel Empresa MVP + Panel Trabajador MVP (rediseño Opción B).
   Capa aditiva: no modifica tokens ni componentes g-/g2- previos.
   Componentes: shell con sidebar, semáforo SG-SST (DS 44 Art. 64),
   KPI con ícono, timeline PTP, barra de progreso, chip de plazo.
   Iconografía: Tabler exclusivamente. Light-only.
   ================================================================== */

:root {
    --g3-side-w: 232px;
    /* Estados del semáforo de cumplimiento */
    --sem-ok: var(--ok);        --sem-ok-bg: var(--ok-bg);        --sem-ok-line: var(--ok-line);
    --sem-warn: var(--warn);    --sem-warn-bg: var(--warn-bg);    --sem-warn-line: var(--warn-line);
    --sem-bad: var(--danger);   --sem-bad-bg: var(--danger-bg);   --sem-bad-line: var(--danger-line);
    --sem-off: var(--sa-text-3);--sem-off-bg: var(--g-mute-bg);   --sem-off-line: var(--sa-line);
}

/* ── Shell con sidebar (desktop ≥1024px) ─────────────
   Uso: <body class="g-has-bottomnav g3-has-side">
        <aside class="g3-side">…</aside>
        <div class="g3-content"> topbar + main </div>
   En <1024px la sidebar se oculta y manda la bottomnav.  */
.g3-side {
    display: none;
}
@media (min-width: 1024px) {
    body.g3-has-side { padding-bottom: 0; }
    .g3-side {
        display: flex; flex-direction: column;
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
        width: var(--g3-side-w);
        background: var(--sa-surface);
        border-right: 1px solid var(--sa-line);
        padding: 20px 14px 18px;
    }
    .g3-content { margin-left: var(--g3-side-w); }
    body.g3-has-side .g-bottomnav { display: none; }
    body.g3-has-side .g-topbar__inner { max-width: none; padding: 0 32px; }
    body.g3-has-side .g-main { max-width: 1040px; }
}
.g3-side__brand { display: flex; align-items: center; padding: 4px 10px 22px; }
.g3-side__brand img { height: 48px; width: auto; display: block; }
.g3-side__nav { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.g3-side__item {
    display: flex; align-items: center; gap: 11px;
    font-size: 13.5px; font-weight: 500; color: var(--td-muted);
    padding: 10px 12px; border-radius: var(--radius-sm);
    transition: background .15s var(--td-ease), color .15s var(--td-ease);
}
.g3-side__item .ti { font-size: 19px; color: var(--sa-text-3); transition: color .15s var(--td-ease); }
.g3-side__item:hover { background: var(--td-soft); color: var(--td-text); }
.g3-side__item:hover .ti { color: var(--td-text); }
.g3-side__item.is-active {
    background: var(--td-black); color: #fff; font-weight: 600;
}
.g3-side__item.is-active .ti { color: var(--g-accent); }
.g3-side__label {
    font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
    color: var(--sa-text-3); padding: 18px 12px 8px;
}
.g3-side__foot { border-top: 1px solid var(--sa-line); padding-top: 12px; margin-top: 12px; }

/* ── Semáforo SG-SST (elementos DS 44 Art. 64) ────────
   Grid de tarjetas de estado. Modificadores por elemento:
   is-ok (cumple) · is-warn (parcial/por vencer) ·
   is-bad (incumple/vencido) · is-off (no aplica / próximamente). */
.g3-sem { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
@media (max-width: 900px) { .g3-sem { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .g3-sem { grid-template-columns: 1fr; } }

.g3-sem__item {
    --sem: var(--sem-off); --sem-bg: var(--sem-off-bg); --sem-line: var(--sem-off-line);
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 9px;
    padding: 17px 16px 15px;
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    transition: transform .18s var(--td-ease), border-color .18s var(--td-ease), box-shadow .18s var(--td-ease);
}
.g3-sem__item::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--sem); opacity: .85;
}
a.g3-sem__item:hover { transform: translateY(-2px); border-color: var(--sa-line-2); box-shadow: var(--shadow-soft); }
.g3-sem__item.is-ok   { --sem: var(--sem-ok);   --sem-bg: var(--sem-ok-bg);   --sem-line: var(--sem-ok-line); }
.g3-sem__item.is-warn { --sem: var(--sem-warn); --sem-bg: var(--sem-warn-bg); --sem-line: var(--sem-warn-line); }
.g3-sem__item.is-bad  { --sem: var(--sem-bad);  --sem-bg: var(--sem-bad-bg);  --sem-line: var(--sem-bad-line); }
.g3-sem__item.is-off  { opacity: .68; }
.g3-sem__item.is-off:hover { transform: none; box-shadow: var(--shadow-card); }

.g3-sem__top { display: flex; align-items: center; gap: 10px; }
.g3-sem__disc {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
    background: var(--sem-bg); border: 1px solid var(--sem-line);
    display: grid; place-items: center;
}
.g3-sem__disc .ti { font-size: 19px; color: var(--sem); }
.g3-sem__t { font-size: 13.5px; font-weight: 600; color: var(--td-text); line-height: 1.25; }
.g3-sem__ref { font-size: 10.5px; color: var(--sa-text-3); letter-spacing: .02em; margin-top: 2px; }
.g3-sem__state {
    display: inline-flex; align-items: center; gap: 5px;
    align-self: flex-start;
    font-size: 11.5px; font-weight: 600; line-height: 1;
    padding: 5px 9px; border-radius: var(--radius-pill);
    background: var(--sem-bg); color: var(--sem); border: 1px solid var(--sem-line);
}
.g3-sem__state .ti { font-size: 13px; }
.g3-sem__s { font-size: 12px; color: var(--td-muted); line-height: 1.5; }

/* ── KPI con ícono (evolución del g-kpi) ─────────────── */
.g3-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
@media (max-width: 900px) { .g3-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .g3-kpis { grid-template-columns: 1fr; } }
.g3-kpi {
    --kpi: var(--g-accent-ink);
    display: flex; align-items: flex-start; gap: 13px;
    background: var(--sa-surface); border: 1px solid var(--sa-line);
    border-radius: var(--radius-lg); padding: 17px 18px;
    box-shadow: var(--shadow-card);
    transition: transform .18s var(--td-ease), border-color .18s var(--td-ease), box-shadow .18s var(--td-ease);
}
a.g3-kpi:hover { transform: translateY(-2px); border-color: var(--sa-line-2); box-shadow: var(--shadow-soft); }
.g3-kpi__disc {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
    background: color-mix(in srgb, var(--kpi) 11%, #ffffff);
    display: grid; place-items: center;
}
.g3-kpi__disc .ti { font-size: 20px; color: var(--kpi); }
.g3-kpi__body { min-width: 0; }
.g3-kpi__n { font-size: 24px; font-weight: 600; line-height: 1.05; letter-spacing: -.02em; color: var(--td-black); }
.g3-kpi__n small { font-size: 13px; font-weight: 500; color: var(--sa-text-3); letter-spacing: 0; }
.g3-kpi__l { margin-top: 4px; font-size: 11.5px; color: var(--td-muted); line-height: 1.35; }
.g3-kpi--warn { --kpi: var(--warn); }
.g3-kpi--bad  { --kpi: var(--danger); }
.g3-kpi--info { --kpi: var(--info); }

/* ── Barra de progreso fina ───────────────────────────── */
.g3-bar {
    --p: 0;
    height: 7px; border-radius: 99px;
    background: var(--g-mute-bg); overflow: hidden;
}
.g3-bar__fill {
    width: calc(var(--p) * 1%); height: 100%;
    border-radius: inherit;
    background: var(--g-accent);
    transition: width .5s var(--td-ease);
}
.g3-bar--warn .g3-bar__fill { background: var(--warn); }
.g3-bar--bad  .g3-bar__fill { background: var(--danger); }
.g3-bar__meta {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 11.5px; color: var(--td-muted); margin-bottom: 7px;
}
.g3-bar__meta strong { font-size: 12.5px; color: var(--td-text); font-weight: 600; }

/* ── Chip de plazo / vencimiento ─────────────────────── */
.g3-due {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 600; line-height: 1;
    padding: 5px 9px; border-radius: var(--radius-pill);
    background: var(--g-mute-bg); color: var(--g-ink-2); border: 1px solid var(--sa-line);
    white-space: nowrap;
}
.g3-due .ti { font-size: 13px; }
.g3-due--soon { background: var(--warn-bg); color: #b45309; border-color: var(--warn-line); }
.g3-due--over { background: var(--danger-bg); color: #b91c1c; border-color: var(--danger-line); }
.g3-due--done { background: var(--ok-bg); color: #15803d; border-color: var(--ok-line); }

/* ── Timeline vertical (actividades PTP) ─────────────── */
.g3-tl { position: relative; padding-left: 26px; }
.g3-tl::before {
    content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
    width: 1.5px; background: var(--sa-line-2);
}
.g3-tl__item { position: relative; padding: 2px 0 20px; }
.g3-tl__item:last-child { padding-bottom: 2px; }
.g3-tl__dot {
    position: absolute; left: -26px; top: 4px;
    width: 17px; height: 17px; border-radius: 50%;
    background: var(--sa-surface); border: 2px solid var(--sa-line-2);
    display: grid; place-items: center;
}
.g3-tl__dot .ti { font-size: 10px; color: transparent; }
.g3-tl__item.is-done .g3-tl__dot { background: var(--g-accent); border-color: var(--g-accent); }
.g3-tl__item.is-done .g3-tl__dot .ti { color: var(--td-black); }
.g3-tl__item.is-late .g3-tl__dot { background: var(--danger-bg); border-color: var(--danger); }
.g3-tl__item.is-late .g3-tl__dot .ti { color: var(--danger); }
.g3-tl__date { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--sa-text-3); }
.g3-tl__t { margin-top: 3px; font-size: 13.5px; font-weight: 600; color: var(--td-text); line-height: 1.35; }
.g3-tl__s { margin-top: 3px; font-size: 12.5px; color: var(--td-muted); line-height: 1.5; }
.g3-tl__aux { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Checklist de requisitos ─────────────────────────── */
.g3-check { display: flex; flex-direction: column; }
.g3-check__row {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 4px;
}
.g3-check__row + .g3-check__row { border-top: 1px solid var(--sa-line); }
.g3-check__ico {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--g-mute-bg); color: var(--sa-text-3);
}
.g3-check__ico .ti { font-size: 15px; }
.g3-check__row.is-ok .g3-check__ico { background: var(--ok-bg); color: var(--ok); }
.g3-check__row.is-bad .g3-check__ico { background: var(--danger-bg); color: var(--danger); }
.g3-check__row.is-warn .g3-check__ico { background: var(--warn-bg); color: var(--warn); }
.g3-check__body { flex: 1; min-width: 0; }
.g3-check__t { font-size: 13.5px; font-weight: 500; color: var(--td-text); line-height: 1.35; }
.g3-check__s { margin-top: 2px; font-size: 11.5px; color: var(--td-muted); }
.g3-check__aux { flex-shrink: 0; }

/* ── Banner de acción prioritaria (portal trabajador) ── */
.g3-cta {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 16px;
    padding: 22px 24px;
    background: var(--td-black); color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}
.g3-cta::after {
    content: ""; position: absolute; right: -70px; top: -70px;
    width: 190px; height: 190px; border-radius: 50%;
    background: radial-gradient(circle, var(--g-accent-ring), transparent 68%);
    pointer-events: none;
}
.g3-cta__disc {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
    background: rgba(115, 193, 93, .16);
    display: grid; place-items: center;
}
.g3-cta__disc .ti { font-size: 24px; color: var(--g-accent); }
.g3-cta__body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.g3-cta__t { font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.g3-cta__s { margin-top: 4px; font-size: 12.5px; color: rgba(255, 255, 255, .62); line-height: 1.5; }
.g3-cta__act { flex-shrink: 0; position: relative; z-index: 1; }
@media (max-width: 560px) {
    .g3-cta { flex-wrap: wrap; }
    .g3-cta__act { width: 100%; }
    .g3-cta__act .g-btn { width: 100%; }
}

/* ── Cabecera de sección con acción ──────────────────── */
.g3-secthead {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 30px 0 14px;
}
.g3-secthead .g-sectlabel { margin: 0; flex: 1; }
.g3-secthead__act { flex-shrink: 0; font-size: 12.5px; font-weight: 600; color: var(--g-accent-ink); display: inline-flex; align-items: center; gap: 4px; }
.g3-secthead__act .ti { font-size: 15px; transition: transform .15s var(--td-ease); }
.g3-secthead__act:hover .ti { transform: translateX(2px); }

/* ── Layout de dos columnas del dashboard ────────────── */
.g3-cols { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .g3-cols { grid-template-columns: 1.6fr 1fr; align-items: start; } }

/* ── Utilidad: ocultar en desktop cuando la sidebar está visible ── */
@media (min-width: 1024px) {
    body.g3-has-side .g-hide-desktop-side { display: none !important; }
}
/* ── Onboarding guiado (E1) · "Pon en marcha tu cumplimiento" ── */
.g-onb { padding: 0; overflow: hidden; }
.g-onb::before {
    content: ""; display: block; height: 3px;
    background: var(--g-accent); opacity: .95;
}
.g-onb__head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; padding: 18px 20px 14px;
}
.g-onb__t { font-size: 16px; font-weight: 650; color: var(--td-text); letter-spacing: -.01em; }
.g-onb__s { margin-top: 4px; font-size: 13px; color: var(--td-muted); line-height: 1.5; }
.g-onb__count {
    flex-shrink: 0; font-size: 12px; font-weight: 650; white-space: nowrap;
    color: var(--g-accent-ink); background: var(--g-accent-soft);
    padding: 5px 11px; border-radius: 999px;
}
.g-onb__list { display: flex; flex-direction: column; }
.g-onb__item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px; border-top: 1px solid var(--td-line);
    transition: background .15s var(--td-ease);
}
.g-onb__item:hover { background: rgba(0, 0, 0, .022); }
.g-onb__num {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 13.5px; font-weight: 650; color: var(--td-muted);
    border: 1.5px solid var(--td-line); background: var(--td-white);
}
.g-onb__num .ti { font-size: 16px; }
.g-onb__body { flex: 1; min-width: 0; }
.g-onb__it { font-size: 14px; font-weight: 600; color: var(--td-text); line-height: 1.35; }
.g-onb__is { margin-top: 3px; font-size: 12.5px; color: var(--td-muted); line-height: 1.5; }
.g-onb__aux {
    flex-shrink: 0; display: inline-flex; align-items: center;
    font-size: 12.5px; font-weight: 600; color: var(--td-muted);
}
.g-onb__aux .ti { font-size: 17px; transition: transform .15s var(--td-ease); }
.g-onb__item:hover .g-onb__aux .ti { transform: translateX(2px); }

/* Paso completado */
.g-onb__item.is-done .g-onb__num {
    background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok);
}
.g-onb__item.is-done .g-onb__it {
    color: var(--td-muted); text-decoration: line-through;
    text-decoration-color: rgba(0, 0, 0, .25); text-decoration-thickness: 1px;
}
.g-onb__item.is-done .g-onb__is { display: none; }
.g-onb__item.is-done .g-onb__aux { color: var(--ok); }

/* Paso pendiente activo: acento en el arrow */
.g-onb__item.is-todo .g-onb__aux .ti { color: var(--g-accent-ink); }

@media (max-width: 560px) {
    .g-onb__head { padding: 15px 16px 12px; }
    .g-onb__item { padding: 13px 16px; }
    .g-onb__is { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   #13 · Briefing diario — la voz del asistente (post-onboarding).
   Comparte la familia visual del camino (.g-onb): barra de acento,
   círculo de ícono, chips. Protagonista destacado; secundarios como
   filas compactas; listas en viñetas verticales estilizadas.
   ───────────────────────────────────────────────────────────── */
.g-brief { padding: 0; overflow: hidden; }
.g-brief::before {
    content: ""; display: block; height: 3px;
    background: var(--g-accent); opacity: .95;
}

/* Cabecera: saludo + protagonista */
.g-brief__hero {
    display: flex; align-items: flex-start; gap: 15px;
    padding: 20px 22px;
}
.g-brief__ico {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--g-accent-soft); color: var(--g-accent-ink);
    border: 1.5px solid var(--g-accent-ring);
}
.g-brief__ico .ti { font-size: 21px; }
.g-brief__main { flex: 1; min-width: 0; }
.g-brief__hello {
    font-size: 12.5px; font-weight: 650; letter-spacing: .01em;
    color: var(--td-muted); text-transform: none;
}
.g-brief__kicker {
    margin-top: 6px; font-size: 12.5px; font-weight: 650;
    color: var(--g-accent-ink); letter-spacing: -.01em;
}
.g-brief__msg {
    margin-top: 3px; font-size: 16px; font-weight: 600;
    color: var(--td-text); line-height: 1.45; letter-spacing: -.01em;
}
/* Viñetas verticales estilizadas (listas dentro de un ítem) */
.g-brief__bullets { margin: 10px 0 0; padding: 0; list-style: none; }
.g-brief__bullets li {
    position: relative; padding: 3px 0 3px 16px;
    font-size: 13.5px; font-weight: 500; color: var(--td-text);
    line-height: 1.5;
}
.g-brief__bullets li::before {
    content: ""; position: absolute; left: 0; top: 11px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--g-accent); box-shadow: 0 0 0 2px var(--g-accent-soft);
}
.g-brief__cta { margin-top: 14px; }

/* Secundarios: banda inferior compacta */
.g-brief__more { border-top: 1px solid var(--td-line); }
.g-brief__sum {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 22px; cursor: pointer; list-style: none;
    font-size: 12.5px; font-weight: 650; color: var(--td-muted);
    transition: background .15s var(--td-ease);
}
.g-brief__sum::-webkit-details-marker { display: none; }
.g-brief__sum:hover { background: var(--td-soft); }
.g-brief__sum .ti { font-size: 16px; transition: transform .18s var(--td-ease); }
details[open] .g-brief__sum .ti-chevron-down { transform: rotate(180deg); }
.g-brief__item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 13px 22px; border-top: 1px solid var(--td-line);
}
.g-brief__item-ico {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; margin-top: 1px;
    background: var(--td-soft); color: var(--td-muted);
    border: 1px solid var(--td-line);
}
.g-brief__item-ico .ti { font-size: 15px; }
.g-brief__item-body { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--td-text); }
.g-brief__item-body .g-brief__bullets li { font-size: 12.5px; }
.g-brief__item-link {
    display: inline-flex; align-items: center; gap: 3px; margin-top: 4px;
    font-size: 12.5px; font-weight: 650; color: var(--g-accent-ink);
}
.g-brief__item-link .ti { font-size: 14px; }

/* Tonos: acento del ícono del protagonista por severidad */
.g-brief--obligacion .g-brief__ico { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.g-brief--plazo      .g-brief__ico { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-line); }
.g-brief--operativo  .g-brief__ico { background: var(--info-bg);   color: var(--info);   border-color: var(--info-line); }
.g-brief--sugerencia .g-brief__ico { background: var(--info-bg);   color: var(--info);   border-color: var(--info-line); }
.g-brief--calma      .g-brief__ico { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-line); }
.g-brief--obligacion .g-brief__kicker { color: var(--danger); }
.g-brief--plazo      .g-brief__kicker { color: var(--warn); }
.g-brief--operativo  .g-brief__kicker,
.g-brief--sugerencia .g-brief__kicker { color: var(--info); }
.g-brief--calma      .g-brief__kicker { color: var(--ok); }

@media (max-width: 560px) {
    .g-brief__hero { padding: 16px 16px; gap: 12px; }
    .g-brief__ico { width: 38px; height: 38px; }
    .g-brief__msg { font-size: 15px; }
    .g-brief__sum, .g-brief__item { padding-left: 16px; padding-right: 16px; }
}

/* ─────────────────────────────────────────────────────────────
   Onboarding memorable — barra de progreso segmentada, tarjeta
   de desbloqueo y celebración por hito. Dopamina del acto, nunca
   del puntaje (principio A.5 del diseño de onboarding).
   ───────────────────────────────────────────────────────────── */

/* Barra segmentada: 6 segmentos que se llenan con animación escalonada */
.g-onb__prog { display: flex; gap: 5px; margin: 0 20px 14px; }
.g-onb__seg {
    flex: 1; height: 6px; border-radius: 999px;
    background: var(--td-line); position: relative; overflow: hidden;
}
.g-onb__seg.is-fill::after {
    content: ""; position: absolute; inset: 0; border-radius: 999px;
    background: var(--g-accent); transform-origin: left;
    animation: gOnbFill .55s var(--td-ease) both;
}
.g-onb__seg.is-fill:nth-child(2)::after { animation-delay: .07s; }
.g-onb__seg.is-fill:nth-child(3)::after { animation-delay: .14s; }
.g-onb__seg.is-fill:nth-child(4)::after { animation-delay: .21s; }
.g-onb__seg.is-fill:nth-child(5)::after { animation-delay: .28s; }
.g-onb__seg.is-fill:nth-child(6)::after { animation-delay: .35s; }
@keyframes gOnbFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Tarjeta de desbloqueo: anticipa la recompensa sin mostrar el muro rojo */
.g-onb__unlock {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; border-top: 1px dashed var(--sa-line-2);
    background: var(--td-soft); color: var(--td-muted);
    font-size: 13px; line-height: 1.5;
}
.g-onb__unlock .ti { font-size: 18px; flex-shrink: 0; }
.g-onb__unlock b { color: var(--td-text); font-weight: 650; }

/* Banner de celebración por hito (disparado por JS, una sola vez) */
.g-cheer {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 20px; margin-bottom: 16px;
    border-radius: var(--radius-lg);
    background: var(--g-accent-soft); border: 1px solid var(--g-accent-ring);
    animation: gCheerIn .5s var(--td-ease) both;
}
.g-cheer__ico {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--td-white); color: var(--g-accent-ink);
}
.g-cheer__ico .ti { font-size: 20px; }
.g-cheer__body { flex: 1; min-width: 0; }
.g-cheer__t { font-size: 14px; font-weight: 650; color: var(--td-text); }
.g-cheer__s { margin-top: 2px; font-size: 13px; color: var(--td-text); line-height: 1.55; }
.g-cheer__x {
    flex-shrink: 0; background: none; border: 0; cursor: pointer;
    color: var(--td-muted); padding: 2px; line-height: 1;
}
.g-cheer__x .ti { font-size: 17px; }
.g-cheer__x:hover { color: var(--td-text); }
@keyframes gCheerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Lista de actos en el modal de cierre 6/6 */
.g-done__list { margin: 14px 0 4px; padding: 0; list-style: none; text-align: left; }
.g-done__list li {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 6px 0; font-size: 13.5px; color: var(--td-text); line-height: 1.5;
}
.g-done__list li .ti { flex-shrink: 0; margin-top: 2px; font-size: 16px; color: var(--ok); }

@media (max-width: 560px) {
    .g-onb__prog { margin: 0 16px 12px; }
    .g-onb__unlock { padding: 13px 16px; }
}