﻿/* ============================================================
   ClasificaMX — Sistema de diseño (clasificados México)
   Tokens 4px · mobile-first · accesible · sin frameworks
   ============================================================ */

:root {
    /* Neutros */
    --bg: #fafaf9;
    --surface: #ffffff;
    --surface-2: #f4f4f5;
    --ink: #18181b;
    --ink-2: #3f3f46;
    --muted: #71717a;
    --border: rgba(24, 24, 27, 0.10);
    --border-strong: rgba(24, 24, 27, 0.18);

    /* Marca: esmeralda (guiño a México) + ámbar de acento */
    --brand-050: #ecfdf5;
    --brand-100: #d1fae5;
    --brand: #059669;
    --brand-strong: #047857;
    --brand-700: #065f46;
    --accent: #f59e0b;
    --accent-050: #fffbeb;

    /* Azul del logo: botones (antes verdes), ".com.mx" y fondos de categoría */
    --btn: #041778;
    --btn-hover: #0c2aa0;
    --btn-050: #eaeefb;
    --btn-100: #d4dbf6;
    --btn-light: #7d93ec;   /* azul claro para fondos oscuros (footer) */

    /* Semánticos */
    --danger: #dc2626;
    --danger-050: #fef2f2;
    --danger-border: #fecaca;
    --success: #059669;

    /* Escala tipográfica (rem) */
    --t-xs: 0.75rem;
    --t-sm: 0.875rem;
    --t-base: 1rem;
    --t-lg: 1.125rem;
    --t-xl: 1.25rem;
    --t-2xl: 1.5rem;
    --t-3xl: 1.875rem;
    --t-4xl: 2.25rem;

    /* Radios y elevación */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-full: 999px;
    --sh-sm: 0 1px 2px rgba(24, 24, 27, 0.06), 0 1px 3px rgba(24, 24, 27, 0.05);
    --sh-md: 0 4px 12px -2px rgba(24, 24, 27, 0.08), 0 2px 6px -2px rgba(24, 24, 27, 0.06);
    --sh-lg: 0 16px 40px -12px rgba(24, 24, 27, 0.18), 0 6px 16px -8px rgba(24, 24, 27, 0.10);

    --container: 1200px;
    --header-h: 64px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: var(--t-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
p { margin: 0 0 12px; }
a { color: var(--btn); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.t-sm { font-size: var(--t-sm); }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Campo trampa anti-bot: fuera de pantalla (NO display:none — algunos bots
   omiten lo oculto con display:none pero sí rellenan campos posicionados). */
.hp-field {
    position: absolute; left: -9999px; top: -9999px;
    width: 1px; height: 1px; overflow: hidden; opacity: 0;
}

/* Foco visible global */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible, .card-link:focus-visible {
    outline: 2px solid var(--btn-hover);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--header-h);
}
.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--t-xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
    flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.brand-mark img, .brand-mark svg {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.brand-mark-lg { width: 56px; height: 56px; }
.footer-brand .brand-mark { width: 28px; height: 28px; }
.brand .mx { color: var(--btn); }
/* `Postear.com.mx` debe ir pegado: el `gap` de .brand era flex entre cada
   item, incluido el text node "Postear", lo que dejaba un espacio raro
   antes de ".com.mx". Envolviendo en .brand-wordmark queda como UN solo
   flex item, así el gap solo aplica entre el logo y la palabra. */
.brand-wordmark { display: inline; white-space: nowrap; }

/* Buscador del header */
.searchbar {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-full);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    max-width: 640px;
}
.searchbar:focus-within {
    border-color: var(--btn-hover);
    box-shadow: 0 0 0 4px rgba(4, 23, 120, 0.15);
}
.searchbar .loc {
    display: flex; align-items: center; gap: 6px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-size: var(--t-sm);
    border-right: 1px solid var(--border);
    cursor: pointer;
    max-width: 150px;
}
.searchbar .q {
    flex: 1;
    border: 0;
    padding: 0 16px;
    font: inherit;
    background: transparent;
    color: var(--ink);
    min-width: 0;
}
.searchbar .q::placeholder { color: var(--muted); }
.searchbar .go {
    border: 0;
    background: var(--btn);
    color: #fff;
    padding: 0 20px;
    cursor: pointer;
    display: grid; place-items: center;
    transition: background .15s var(--ease);
}
.searchbar .go:hover { background: var(--btn-hover); }
.searchbar .go svg { width: 18px; height: 18px; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-weight: 600;
    font-size: var(--t-sm);
    line-height: 1;
    padding: 11px 18px;
    border-radius: var(--r-full);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .12s var(--ease), background .15s var(--ease),
                border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--btn); color: #fff; }
.btn-primary:hover { background: var(--btn-hover); box-shadow: var(--sh-md); }
.btn-accent { background: var(--accent); color: #18181b; }
.btn-accent:hover { background: #d97706; box-shadow: var(--sh-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: var(--t-base); }

.icon-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-2);
    cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }

/* Menú de cuenta */
.account { position: relative; }
.account-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px 6px 6px;
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font: inherit;
    color: var(--ink);
}
.account-btn:hover { background: var(--surface-2); }
.avatar {
    width: 30px; height: 30px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--btn-hover) 0%, var(--btn) 100%);
    color: #fff;
    display: grid; place-items: center;
    font-size: var(--t-sm);
    font-weight: 700;
}
.account-name { font-size: var(--t-sm); font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dropdown nativo con <details> (accesible, sin JS) */
details.account { position: relative; }
details.account > summary { list-style: none; }
details.account > summary::-webkit-details-marker { display: none; }
details.account > summary svg { transition: transform .15s var(--ease); }
details.account[open] > summary svg { transform: rotate(180deg); }
.account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    padding: 6px;
    z-index: 60;
}
.account-menu a, .account-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    border-radius: var(--r-sm);
    font: inherit;
    font-size: var(--t-sm);
    color: var(--ink);
    cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); text-decoration: none; }
.account-menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }

/* ---------------- Main ---------------- */
.site-main { flex: 1; }

.section { padding: 48px 0; }
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; margin-bottom: 24px;
}
.section-head h2 { margin: 0; }
.section-head .link { font-size: var(--t-sm); font-weight: 600; }

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(60% 80% at 10% 0%, rgba(5, 150, 105, 0.16) 0%, transparent 60%),
        radial-gradient(50% 70% at 95% 20%, rgba(245, 158, 11, 0.16) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}
.hero-inner { padding: 64px 16px 56px; text-align: center; }
.hero h1 {
    font-size: clamp(1.875rem, 1.2rem + 3vw, 3rem);
    max-width: 16ch;
    margin: 0 auto 12px;
}
.hero p { color: var(--ink-2); font-size: var(--t-lg); max-width: 52ch; margin: 0 auto 28px; }
.hero .pill-row {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px;
}
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--ink-2);
    transition: border-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
}
.pill:hover { border-color: var(--btn-hover); color: var(--btn); transform: translateY(-1px); text-decoration: none; }

/* Buscador grande del hero */
.hero-search {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
}
.hero-search input {
    flex: 1; border: 0; padding: 18px 20px; font: inherit; font-size: var(--t-base);
    background: transparent; color: var(--ink); min-width: 0;
}
.hero-search input:focus { outline: none; }
.hero-search button {
    border: 0; margin: 8px; border-radius: var(--r-md);
    background: var(--btn); color: #fff;
    padding: 0 24px; font: inherit; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: background .15s var(--ease);
}
.hero-search button:hover { background: var(--btn-hover); }
.hero-search button svg { width: 18px; height: 18px; }

/* ---------------- Categorías ---------------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.cat-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--ink);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
    border-color: var(--border-strong);
    text-decoration: none;
}
.cat-ic {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: var(--r-md);
    background: var(--btn-050);
    color: var(--btn);
}
.cat-ic svg { width: 22px; height: 22px; }
.cat-card .cat-name { font-weight: 700; font-size: var(--t-base); }
.cat-card .cat-count { font-size: var(--t-xs); color: var(--muted); }

/* ---------------- Grid de anuncios ---------------- */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
/* Paginador del listado (cuadrícula 4x3 por hoja) */
.pager {
    display: flex; flex-wrap: wrap; gap: 6px;
    justify-content: center; align-items: center;
    margin: 28px 0 4px;
}
.pager .pg {
    min-width: 38px; height: 38px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--r-md);
    background: var(--surface); color: var(--ink-2);
    font-size: var(--t-sm); font-weight: 600; text-decoration: none;
    transition: background .15s var(--ease), border-color .15s var(--ease);
}
.pager a.pg:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }
.pager .pg.is-cur { background: var(--btn); border-color: var(--btn); color: #fff; }
.pager .pg.is-off { opacity: .45; cursor: default; }
.pager .pg-gap { padding: 0 4px; color: var(--muted); }
.listing {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.listing:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--border-strong); }
.listing-link { color: inherit; display: block; }
.listing-link:hover { text-decoration: none; }
.listing-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.92);
}
.listing-photo svg { width: 38%; height: 38%; opacity: 0.9; }
.badge {
    position: absolute; top: 10px; left: 10px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    border-radius: var(--r-full);
    font-size: var(--t-xs);
    font-weight: 700;
    background: var(--accent);
    color: #18181b;
    box-shadow: var(--sh-sm);
}
.badge svg { width: 12px; height: 12px; }
.fav {
    position: absolute; top: 10px; right: 10px;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    color: var(--ink-2);
    cursor: pointer;
    transition: transform .12s var(--ease), color .15s var(--ease);
}
.fav:hover { transform: scale(1.08); color: var(--danger); }
.fav[aria-pressed="true"] { color: var(--danger); }
.fav svg { width: 18px; height: 18px; }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.listing-body { padding: 14px 16px 16px; }
.listing-price { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; }
.listing-title {
    font-size: var(--t-sm);
    color: var(--ink-2);
    margin: 6px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.listing-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: var(--t-xs); color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 10px;
}
.listing-meta svg { width: 13px; height: 13px; flex-shrink: 0; }
.listing-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.listing-meta .listing-seller {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 90px; font-weight: 600; color: var(--ink-2);
}

/* Cintas de color para fotos placeholder */
.ph-1 { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.ph-2 { background: linear-gradient(135deg, #059669, #065f46); }
.ph-3 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.ph-4 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.ph-5 { background: linear-gradient(135deg, #ec4899, #9d174d); }
.ph-6 { background: linear-gradient(135deg, #ef4444, #991b1b); }
.ph-7 { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.ph-8 { background: linear-gradient(135deg, #6366f1, #3730a3); }

/* Banda de confianza */
.value-band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.value-grid { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 40px 0; }
.value { display: flex; gap: 14px; align-items: flex-start; }
.value .vic {
    width: 42px; height: 42px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: var(--r-md);
    background: var(--brand-050); color: var(--brand-strong);
}
.value .vic svg { width: 22px; height: 22px; }
.value h3 { margin: 0 0 4px; font-size: var(--t-base); }
.value p { margin: 0; font-size: var(--t-sm); color: var(--muted); }

/* ---------------- Detalle de anuncio ---------------- */
.breadcrumb { display: flex; gap: 8px; font-size: var(--t-sm); color: var(--muted); padding: 20px 0 4px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 16px 0 56px; }
.gallery {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}
.gallery-main {
    aspect-ratio: 16 / 10;
    display: grid; place-items: center;
    color: rgba(255,255,255,.9);
}
.gallery-main svg { width: 22%; height: 22%; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px; }
.gallery-thumbs span { aspect-ratio: 1; border-radius: var(--r-sm); }
.gthumb {
    aspect-ratio: 1; border-radius: var(--r-sm);
    overflow: hidden; background: var(--surface-2);
    padding: 0; margin: 0; cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s var(--ease), opacity .15s var(--ease);
}
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumb:hover { opacity: .85; }
.gthumb.is-active { border-color: var(--btn-hover); }
.gthumb:focus-visible { outline: 2px solid var(--btn-hover); outline-offset: 2px; }
.detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
}
.detail-price { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 4px; }
.detail-title { font-size: var(--t-xl); font-weight: 600; color: var(--ink-2); margin: 0 0 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--r-full);
    background: var(--surface-2); color: var(--ink-2);
    font-size: var(--t-xs); font-weight: 600;
}
.chip svg { width: 13px; height: 13px; }
.seller {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; margin: 20px 0;
    background: var(--surface-2);
    border-radius: var(--r-md);
}
.seller .avatar { width: 44px; height: 44px; font-size: var(--t-base); }
.seller .s-name { font-weight: 700; }
.seller .s-meta { font-size: var(--t-xs); color: var(--muted); }
.detail-actions { display: grid; gap: 10px; }
.detail-desc { margin-top: 24px; }
.detail-desc h3 { font-size: var(--t-lg); }
.detail-desc p { color: var(--ink-2); }

/* ---------------- Tarjeta / formularios ---------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px;
    box-shadow: var(--sh-md);
}
.auth-wrap { display: flex; align-items: center; justify-content: center; padding: 56px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: var(--t-2xl); margin-bottom: 4px; }
.auth-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-weight: 800; font-size: var(--t-lg); }

.form-group { margin-bottom: 18px; }
.form-group > label {
    display: block; font-size: var(--t-sm); font-weight: 600;
    margin-bottom: 6px; color: var(--ink-2);
}
.input, .select, .textarea {
    width: 100%;
    padding: 11px 13px;
    font: inherit;
    font-size: var(--t-base);
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--btn-hover);
    box-shadow: 0 0 0 4px rgba(4, 23, 120, 0.15);
}
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check label { font-size: var(--t-sm); color: var(--ink-2); }
.field-error { display: block; color: var(--danger); font-size: var(--t-xs); margin-top: 6px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }

.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; border-radius: var(--r-sm);
    font-size: var(--t-sm); margin-bottom: 18px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-error { background: var(--danger-050); border: 1px solid var(--danger-border); color: #991b1b; }
.alert-info { background: var(--btn-050); border: 1px solid var(--btn-100); color: var(--btn); }
.alert-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: #d4d4d8; margin-top: 64px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0 32px;
}
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: var(--t-sm); color: #a1a1aa; max-width: 32ch; }
.footer-col h4 { font-size: var(--t-sm); color: #fff; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col a { display: block; color: #a1a1aa; font-size: var(--t-sm); padding: 5px 0; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding: 20px 0;
    font-size: var(--t-xs);
    color: #a1a1aa;
    display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between;
}

/* ---------------- Responsive ---------------- */
@media (min-width: 640px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .listing-grid { grid-template-columns: repeat(3, 1fr); }
    .form-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
    .cat-grid { grid-template-columns: repeat(5, 1fr); }
    /* 4 columnas en escritorio (cuadrícula 4x3 por hoja, cards uniformes) */
    .listing-grid { grid-template-columns: repeat(4, 1fr); }
    .value-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* El buscador del header solo desde tablet; en móvil va el hero */
@media (max-width: 859px) {
    .site-header .searchbar { display: none; }
    .header-actions .label-text { display: none; }
    /* Publicar y Mensajes ya viven en la barra inferior: no duplicar
       (esto era la causa principal del desborde del header en móvil) */
    .header-actions .btn-accent,
    .header-actions .msg-btn { display: none; }
    .header-row { gap: 10px; }
    .brand { font-size: var(--t-lg); min-width: 0; }
    .brand-mark { width: 30px; height: 30px; }
    .header-actions { gap: 6px; flex-shrink: 1; }
    .header-actions .btn { padding: 9px 14px; }
    .account-name { max-width: 84px; }

    /* Footer simplificado en móvil: solo icono + legales + Donar */
    .footer-hide-m { display: none !important; }
    .site-footer { margin-top: 32px; }
    .footer-grid {
        gap: 18px;
        justify-items: center;
        text-align: center;
        padding-top: 28px; padding-bottom: 8px;
    }
    .footer-brand { display: flex; justify-content: center; margin: 0; }
    .footer-brand .brand { gap: 0; margin: 0; }
    .footer-brand .footer-wordmark { display: none; }   /* solo el icono */
    .footer-brand .brand-mark { width: 44px; height: 44px; }
    .footer-col-legal { width: 100%; }
    .footer-col-legal h4 { margin-bottom: 8px; }
    .footer-col-legal a { padding: 7px 0; }
    .footer-bottom {
        justify-content: center;
        padding: 16px 0 calc(18px + env(safe-area-inset-bottom, 0px));
    }
    .footer-bottom .btn-donate, .footer-bottom .btn-support { margin: 0; }
}

/* Densidad móvil + ningún elemento debe forzar scroll horizontal */
@media (max-width: 639px) {
    html { overflow-x: clip; }
    .section { padding: 26px 0; }
    .hero-inner { padding: 36px 16px 32px; }
    .hero p { font-size: var(--t-base); }
    .site-footer { margin-top: 36px; }
    .section-head { margin-bottom: 16px; flex-wrap: wrap; gap: 4px 16px; }
    .container { padding: 0 14px; }
    h1 { font-size: var(--t-2xl); }
    .btn-lg { padding: 13px 20px; }
    /* Títulos/cuerpos largos (URLs, nombres) no rompen el ancho */
    h1, h2, h3, p, .listing-title, .detail-title, .detail-desc p,
    .cat-name, .panel-title { overflow-wrap: break-word; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .listing:hover, .cat-card:hover, .pill:hover { transform: none; }
}

/* ---------------- Anuncios reales (imágenes) ---------------- */
.listing-photo { background: var(--surface-2); }
.listing-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.badge-cat {
    background: rgba(24, 24, 27, 0.78);
    color: #fff;
    backdrop-filter: blur(2px);
}
/* Postear Plus: distintivo de publicación de pago (corona) */
.badge-paid {
    top: auto; bottom: 10px;
    left: auto; right: 10px;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    color: #4a2f00;
}
.badge-paid svg { width: 13px; height: 13px; }
.gallery-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.gallery-thumbs span { overflow: hidden; background: var(--surface-2); }
.gallery-thumbs span img { width: 100%; height: 100%; object-fit: cover; }

/* Detalle: filas extra por categoría */
.detail-extra { margin: 4px 0 20px; }
.ex-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--t-sm);
}
.ex-row span { color: var(--muted); }
.ex-row strong { color: var(--ink); font-weight: 600; text-align: right; }
.ex-link { font-weight: 700; }

/* ---------------- Panel "Mis anuncios" ---------------- */
.panel-list { display: grid; gap: 12px; }
.panel-ad {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px;
}
.panel-ad.is-archived { opacity: 0.72; }
.panel-thumb {
    width: 84px; height: 84px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
    display: block;
}
.panel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.panel-info { min-width: 0; }
.panel-info .chip { margin-bottom: 6px; }
.panel-title {
    display: block; font-weight: 700; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
a.panel-title:hover { color: var(--btn); }
.panel-meta { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.panel-status {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding-top: 10px; border-top: 1px solid var(--border);
}
.badge-ok, .badge-off {
    display: inline-flex; align-items: center;
    padding: 5px 10px; border-radius: var(--r-full);
    font-size: var(--t-xs); font-weight: 700;
}
.badge-ok { background: var(--btn-050); color: var(--btn); }
.badge-off { background: var(--surface-2); color: var(--muted); }

@media (min-width: 640px) {
    .panel-ad { grid-template-columns: 84px 1fr auto; }
    .panel-status {
        grid-column: auto; border-top: 0; padding-top: 0;
        flex-direction: column; align-items: flex-end; gap: 8px;
    }
}

/* Acciones de tarjeta: favorito + reportar (apiladas, arriba-derecha) */
.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}
.card-actions .fav { position: static; top: auto; right: auto; }
.rep {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    color: var(--ink-2);
    cursor: pointer;
    transition: transform .12s var(--ease), color .15s var(--ease);
}
.rep:hover { transform: scale(1.08); color: var(--accent); }
.rep svg { width: 17px; height: 17px; }
.detail-actions .btn-ghost svg { width: 18px; height: 18px; }

/* Scroll suave + ancla de resultados bajo el header sticky */
html { scroll-behavior: smooth; }
#resultados { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Like persistente en tarjetas (icono + contador) */
.card-actions .fav {
    width: auto; height: 32px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 0 10px;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink-2);
    text-decoration: none;
    transition: transform .12s var(--ease), color .15s var(--ease);
}
.card-actions .fav:hover { transform: scale(1.06); color: var(--danger); text-decoration: none; }
.card-actions .fav svg { width: 16px; height: 16px; }
.fav.is-on { color: var(--danger); }
.fav.is-on svg { fill: currentColor; }
.fav-n { font-size: var(--t-xs); font-weight: 700; line-height: 1; }

/* Like en el detalle */
.fav-btn.is-on { border-color: var(--danger); color: var(--danger); }
.fav-btn.is-on svg { fill: currentColor; }

/* Perfil */
.profile-head {
    display: flex; align-items: center; gap: 16px;
    padding-bottom: 20px; margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.profile-avatar {
    width: 72px; height: 72px; flex-shrink: 0;
    border-radius: var(--r-full);
    overflow: hidden;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--btn-hover) 0%, var(--btn) 100%);
    color: #fff;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-initial { font-size: var(--t-2xl); font-weight: 800; }
.profile-head .form-group { flex: 1; }

/* Avatar en el header */
.avatar-img { object-fit: cover; padding: 0; }
input.input[disabled] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* Uploader moderno (drag & drop) */
.dz { position: relative; }
.dz-input {
    position: absolute; width: 1px; height: 1px;
    opacity: 0; overflow: hidden; z-index: -1;
}
.dz-area {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 28px 16px; text-align: center;
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-md);
    background: var(--surface-2);
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.dz-area:hover { border-color: var(--btn-hover); }
.dz-area svg { width: 30px; height: 30px; color: var(--muted); }
.dz-text strong { display: block; font-size: var(--t-sm); }
.dz-text span { font-size: var(--t-xs); color: var(--muted); }
.dz.dz-over .dz-area { border-color: var(--btn-hover); background: var(--btn-050); }
.dz-area.has-files { padding: 14px; }
.dz-acts {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
    margin-top: 4px;
}
.dz-acts .btn { min-height: 44px; }
.dz-area .dz-acts svg { width: 18px; height: 18px; color: currentColor; }
.dz-prev { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dz-item {
    position: relative;
    width: 84px; border-radius: var(--r-sm);
    overflow: hidden; border: 1px solid var(--border);
    background: var(--surface); text-align: center;
}
.dz-item img { width: 84px; height: 64px; object-fit: cover; display: block; }
.dz-item span { display: block; font-size: 10px; color: var(--muted); padding: 3px 0; }
.dz-del {
    position: absolute; top: 3px; right: 3px;
    width: 22px; height: 22px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%;
    background: rgba(24, 24, 27, 0.72); color: #fff;
    font-size: 15px; line-height: 1; cursor: pointer;
    transition: background .15s var(--ease);
}
.dz-del:hover { background: var(--danger, #dc2626); }
.dz-del:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* ----- Admin · Vigencia por categoría (tabla precios) ----- */
.catdays { display: grid; gap: 8px; }
.catdays-head, .catdays-row {
    display: grid;
    grid-template-columns: 1fr 96px 96px 96px;
    gap: 12px; align-items: center;
}
.catdays-head {
    padding: 0 14px 8px;
    font-size: var(--t-sm); font-weight: 700; color: var(--ink-2);
    border-bottom: 1px solid var(--border);
}
.catdays-head span:not(:first-child) { text-align: center; }
.catdays-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
}
.catdays-name {
    font-weight: 600; color: var(--ink);
    min-width: 0; overflow-wrap: anywhere;
}
.catdays-cell { display: block; margin: 0; }
.catdays-lbl { display: none; }                 /* solo en móvil */
.catdays-in {
    width: 100%; padding: 9px 10px;
    text-align: center; -moz-appearance: textfield;
}
.catdays-in::-webkit-outer-spin-button,
.catdays-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 639px) {
    .catdays-head { display: none; }
    .catdays-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 12px;
    }
    .catdays-name {
        grid-column: 1 / -1;
        font-size: var(--t-base);
        padding-bottom: 6px;
        border-bottom: 1px solid var(--border);
    }
    .catdays-lbl {
        display: block; font-size: var(--t-xs);
        color: var(--ink-2); font-weight: 600; margin-bottom: 4px;
    }
}

/* ----- Admin · Buzón de soporte ----- */
.sup-group {
    font-size: var(--t-base); margin: 22px 0 8px;
    padding-bottom: 6px; border-bottom: 1px solid var(--border);
    color: var(--ink);
}
.sup-group:first-of-type { margin-top: 0; }
.sup-ticket {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px; margin: 0 0 10px;
}
.sup-ticket.is-read { opacity: .72; }
.sup-meta {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 12px; font-size: var(--t-xs); color: var(--ink-2);
    margin-bottom: 6px;
}
.sup-from { font-weight: 700; color: var(--ink); }
.sup-date { white-space: nowrap; }
.sup-msg {
    margin: 0 0 8px; color: var(--ink); line-height: 1.5;
    overflow-wrap: anywhere; white-space: pre-wrap;
}
.sup-actions {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; flex-wrap: wrap;
}
.sup-tech {
    color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 60%;
}

.geo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------------- Selector de iconos (admin / categorías) ---------------- */
.iconpick { display: flex; flex-direction: column; gap: 10px; }
.iconpick-head { display: flex; align-items: center; gap: 10px; }
.iconpick-search { flex: 1; }
.iconpick-prev {
    width: 44px; height: 44px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: var(--r-md);
    background: var(--btn-050); color: var(--btn);
}
.iconpick-prev svg { width: 22px; height: 22px; }
.iconpick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-2);
}
.iconpick-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--ink-2);
    cursor: pointer;
    transition: transform .12s var(--ease), border-color .12s var(--ease),
                background .12s var(--ease), color .12s var(--ease);
}
.iconpick-item:hover {
    transform: translateY(-1px);
    border-color: var(--btn-hover);
    color: var(--btn);
}
.iconpick-item:focus-visible {
    outline: 2px solid var(--btn-hover);
    outline-offset: 2px;
}
.iconpick-item.is-sel {
    border-color: var(--btn);
    background: var(--btn-050);
    color: var(--btn);
    box-shadow: 0 0 0 1px var(--btn) inset;
}
.iconpick-item svg { width: 26px; height: 26px; }
.iconpick-name {
    font-size: 11px; line-height: 1.2;
    text-align: center; color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.iconpick-item.is-sel .iconpick-name { color: var(--btn); }
.iconpick-empty { margin: 4px 0 0; }
.iconpick-adv { margin-top: 10px; }
.iconpick-adv summary {
    cursor: pointer; font-size: var(--t-sm); font-weight: 600;
    color: var(--ink-2); padding: 4px 0;
}
.iconpick-adv[open] summary { margin-bottom: 8px; }

/* ---------------- Chat (SignalR) ---------------- */
.msg-btn {
    position: relative; display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: var(--r-full);
    color: var(--ink-2); background: var(--surface-2);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.msg-btn:hover { background: var(--btn-050); color: var(--btn); text-decoration: none; }
.msg-btn svg { width: 19px; height: 19px; }
.msg-badge {
    position: absolute; top: -4px; right: -4px;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: grid; place-items: center;
    font-size: 11px; font-weight: 700; line-height: 1;
    color: #fff; background: var(--danger);
    border-radius: var(--r-full); border: 2px solid var(--surface);
}

/* Drawer estilo Marketplace */
.chat-drawer {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(10, 12, 30, 0.45);
    display: flex; justify-content: flex-end;
}
.chat-drawer[hidden] { display: none; }
.chat-drawer-card {
    width: min(420px, 100%); height: 100%;
    background: var(--surface);
    display: flex; flex-direction: column;
    box-shadow: var(--sh-lg);
    animation: chat-in .22s var(--ease);
}
@keyframes chat-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-drawer-card { animation: none; } }

.chat-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.chat-head-info { flex: 1; min-width: 0; }
.chat-head-info strong { display: block; font-size: var(--t-base); }
.chat-head-ad { display: block; font-size: var(--t-xs); color: var(--btn); }
.chat-close, .chat-back {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: var(--r-full);
    border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.chat-close:hover, .chat-back:hover { background: var(--surface-2); }
.chat-close svg, .chat-back svg { width: 18px; height: 18px; }
.chat-conn { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-full); }
.chat-conn.ok { background: var(--btn-050); color: var(--btn); }
.chat-conn.pend { background: var(--accent-050); color: #92610a; }

.chat-msgs {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
    background: var(--bg);
}
.chat-loading { color: var(--muted); font-size: var(--t-sm); text-align: center; margin: 24px 0; }
.msg {
    max-width: 78%; padding: 9px 12px; border-radius: 14px;
    font-size: var(--t-sm); line-height: 1.4;
}
.msg p { margin: 0; word-wrap: break-word; overflow-wrap: anywhere; }
.msg time { display: block; margin-top: 3px; font-size: 10px; opacity: .65; }
.msg.their { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.mine { align-self: flex-end; background: var(--btn); color: #fff; border-bottom-right-radius: 4px; }
.msg.mine time { color: #fff; }
.msg-scam {
    align-self: stretch; margin: 2px 0 6px;
    background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
    border-radius: 10px; padding: 8px 11px;
    font-size: var(--t-xs); line-height: 1.4;
}

.chat-compose {
    display: flex; gap: 8px; align-items: flex-end;
    padding: 12px 14px; border-top: 1px solid var(--border);
    background: var(--surface);
}
.chat-input {
    flex: 1; resize: none; min-height: 42px; max-height: 120px;
    padding: 10px 12px; font: inherit; font-size: var(--t-sm);
    border: 1px solid var(--border-strong); border-radius: var(--r-md);
    background: var(--surface); color: var(--ink);
}
.chat-input:focus { outline: none; border-color: var(--btn-hover); box-shadow: 0 0 0 4px rgba(4, 23, 120, 0.15); }
.chat-compose .btn { white-space: nowrap; }

/* Bandeja /Mensajes */
.chat-wrap {
    display: grid; grid-template-columns: 320px 1fr;
    gap: 0; min-height: 60vh;
    border: 1px solid var(--border); border-radius: var(--r-lg);
    overflow: hidden; background: var(--surface);
}
.chat-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.chat-list-title { font-size: var(--t-lg); margin: 0; padding: 18px 16px 12px; }
.chat-li {
    display: flex; gap: 10px; align-items: center;
    padding: 12px 16px; border-top: 1px solid var(--border);
    color: var(--ink);
}
.chat-li:hover { background: var(--surface-2); text-decoration: none; }
.chat-li.is-active { background: var(--btn-050); }
.chat-li-thumb {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--r-md);
    overflow: hidden; background: var(--surface-2); display: grid; place-items: center;
}
.chat-li-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chat-li-main { flex: 1; min-width: 0; }
.chat-li-top { display: flex; justify-content: space-between; gap: 8px; }
.chat-li-top b { font-size: var(--t-sm); }
.chat-li-when { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.chat-li-ad { font-size: var(--t-xs); color: var(--btn); }
.chat-li-ad, .chat-li-snip {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-li-snip { font-size: var(--t-xs); color: var(--muted); }
.chat-li-dot {
    min-width: 18px; height: 18px; padding: 0 5px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 11px; font-weight: 700;
    color: #fff; background: var(--danger); border-radius: var(--r-full);
}
.chat-main { display: flex; flex-direction: column; }
.chat-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 12px; color: var(--muted); padding: 40px;
}
.chat-empty svg { width: 46px; height: 46px; }
.chat-back { display: none; }

@media (max-width: 760px) {
    .chat-wrap { grid-template-columns: 1fr; }
    .chat-wrap[data-conv]:not([data-conv="0"]) .chat-list { display: none; }
    .chat-wrap:not([data-conv]) .chat-main,
    .chat-wrap[data-conv="0"] .chat-main { display: none; }
    .chat-back { display: grid; }
    .chat-drawer-card { width: 100%; }
}

/* Acciones del chat (reportar / concluir venta) */
.chat-actions { position: relative; }
.chat-actions > summary, .chat-actions-btn {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: var(--r-md);
    border: 0; background: var(--surface-2); color: var(--ink-2);
    font-size: var(--t-sm); font-weight: 600;
}
.chat-actions > summary::-webkit-details-marker { display: none; }
.chat-actions > summary:hover, .chat-actions-btn:hover { background: var(--btn-050); color: var(--btn); }
.chat-actions-btn svg { width: 16px; height: 16px; }
.chat-actions-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 70;
    width: 280px; max-width: 80vw;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); box-shadow: var(--sh-lg); padding: 6px;
}
.chat-act > summary {
    list-style: none; cursor: pointer; padding: 9px 10px;
    border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 600;
}
.chat-act > summary::-webkit-details-marker { display: none; }
.chat-act > summary:hover { background: var(--surface-2); }
.chat-act-body { padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-act-body label { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }
.chat-act-body .select, .chat-act-body .textarea { width: 100%; }
.chat-act-body .textarea { min-height: 70px; }
.chat-act-link {
    display: block; width: 100%; text-align: left; cursor: pointer;
    padding: 10px 12px; border: 0; background: transparent;
    border-radius: var(--r-sm); font: inherit; font-size: var(--t-sm);
    font-weight: 600; color: var(--ink);
}
.chat-act-link:hover { background: var(--surface-2); }
.chat-act-link.is-danger { color: var(--danger); }
.chat-act-link.is-danger:hover { background: var(--danger-050); }
.cmx-acc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cmx-acc-list .btn { width: 100%; }

/* Modal genérico (acciones del chat, etc.) */
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; box-shadow: var(--sh-md); }
.cmx-modal {
    position: fixed; inset: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(10, 12, 30, 0.5);
}
.cmx-modal[hidden] { display: none; }
.cmx-modal-card {
    width: 100%; max-width: 460px; background: var(--surface);
    border-radius: var(--r-lg); box-shadow: var(--sh-lg);
    display: flex; flex-direction: column; overflow: hidden;
    animation: chat-in .18s var(--ease);
}
@media (prefers-reduced-motion: reduce) { .cmx-modal-card { animation: none; } }
.cmx-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.cmx-modal-head strong { font-size: var(--t-lg); }
.cmx-modal-x {
    display: grid; place-items: center; width: 32px; height: 32px;
    border: 0; background: transparent; color: var(--ink-2);
    border-radius: var(--r-full); cursor: pointer;
}
.cmx-modal-x:hover { background: var(--surface-2); }
.cmx-modal-x svg { width: 18px; height: 18px; }
.cmx-modal-body {
    padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.cmx-modal-body label { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.cmx-modal-body .select, .cmx-modal-body .textarea { width: 100%; }
.cmx-modal-body .textarea { min-height: 96px; }
.cmx-modal-foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 18px; border-top: 1px solid var(--border);
}

/* Buscador móvil: hoja superior (no centrado) */
.cmx-modal.cmx-search { align-items: flex-start; padding: 0; }
.cmx-search-card {
    width: 100%; max-width: 640px;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    margin: 0 auto;
}
.cmx-search-row {
    display: flex; align-items: center; gap: 8px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 14px;
}
.cmx-search-ic { display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.cmx-search-ic svg { width: 20px; height: 20px; }
.cmx-search-input {
    flex: 1; min-width: 0;
    border: 1px solid var(--border-strong); border-radius: var(--r-full);
    padding: 12px 16px; font: inherit; font-size: 16px;
    background: var(--surface); color: var(--ink);
}
.cmx-search-input::placeholder { color: var(--muted); }
.cmx-search-input:focus {
    outline: none; border-color: var(--btn-hover);
    box-shadow: 0 0 0 4px rgba(4, 23, 120, 0.15);
}
.cmx-search-go { flex-shrink: 0; min-height: 44px; }
.cmx-search-cancel {
    display: block; width: 100%;
    background: none; border: 0; border-top: 1px solid var(--border);
    padding: 13px; font: inherit; font-size: var(--t-sm);
    color: var(--muted); cursor: pointer;
}
.cmx-search-cancel:hover { background: var(--surface-2); }

/* Editar publicación: fotos actuales */
.edit-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.edit-img {
    position: relative; width: 104px; height: 104px;
    border-radius: var(--r-md); overflow: hidden;
    border: 1px solid var(--border); background: var(--surface-2);
}
.edit-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.edit-img-x {
    position: absolute; top: 4px; right: 4px;
    width: 24px; height: 24px; display: grid; place-items: center;
    border-radius: var(--r-full); background: rgba(10,12,30,.62);
    color: #fff; font-size: 13px; line-height: 1; text-decoration: none;
}
.edit-img-x:hover { background: var(--danger); color: #fff; text-decoration: none; }

/* Overlay de carga al detectar geolocalización */
.geo-loading {
    position: fixed; inset: 0; z-index: 1200;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(120% 120% at 50% 0%, #0c2aa0 0%, #041778 55%, #02103f 100%);
    color: #fff;
}
.geo-loading[hidden] { display: none; }
.geo-loading-inner { text-align: center; padding: 24px; }
.geo-orb {
    position: relative; display: grid; place-items: center;
    width: 132px; height: 132px; margin: 0 auto 22px;
}
.geo-orb img {
    width: 76px; height: 76px; object-fit: contain;
    border-radius: 22px; background: #fff; padding: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.35);
    animation: geo-pulse 1.8s var(--ease) infinite;
}
.geo-orb-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 25%, #7d93ec 50%, #fff 75%, transparent 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    animation: geo-spin 1.1s linear infinite;
}
.geo-loading-txt { font-size: var(--t-lg); font-weight: 800; margin: 0; letter-spacing: -.01em; }
.geo-loading-sub { font-size: var(--t-sm); margin: 6px 0 0; color: rgba(255,255,255,.78); }
@keyframes geo-spin { to { transform: rotate(360deg); } }
@keyframes geo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
    .geo-orb-ring, .geo-orb img { animation: none; }
}

/* Páginas legales (Términos / Aviso de Privacidad) */
.legal { max-width: 820px; }
.legal h1 { font-size: var(--t-2xl); margin: 0 0 6px; letter-spacing: -.02em; }
.legal .legal-date { color: var(--muted); font-size: var(--t-sm); margin: 0 0 28px; }
.legal h2 {
    font-size: var(--t-lg); margin: 30px 0 10px;
    padding-top: 16px; border-top: 1px solid var(--border);
}
.legal p { line-height: 1.7; color: var(--ink-2); margin: 0 0 12px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { line-height: 1.7; color: var(--ink-2); margin-bottom: 6px; }
.legal a { color: var(--btn); font-weight: 600; }
.legal .legal-foot {
    margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border);
    color: var(--muted); font-size: var(--t-sm);
}

/* Checkbox de aceptación de términos en registro */
.terms-check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: var(--t-sm); color: var(--ink-2); cursor: pointer;
}
.terms-check input[type="checkbox"] { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; }
.terms-check a { color: var(--btn); font-weight: 600; }

/* Banda de publicidad (carrusel de banners o AdSense; mismo espacio) */
.ad-band-wrap { padding: 8px 0 4px; }
.ad-band {
    position: relative;
    height: 140px;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.ad-carousel { position: absolute; inset: 0; }
.ad-slide {
    position: absolute; inset: 0;
    display: none;
    align-items: center; justify-content: center;
}
.ad-slide.is-on { display: flex; animation: ad-fade .5s var(--ease); }
.ad-slide a, .ad-slide img { display: block; width: 100%; height: 100%; }
.ad-slide img { object-fit: contain; }
@keyframes ad-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ad-slide.is-on { animation: none; } }
.ad-adsense { position: absolute; inset: 0; width: 100%; height: 100%; }
.ad-empty {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: var(--t-sm); letter-spacing: .04em;
    text-transform: uppercase;
}
@media (max-width: 640px) { .ad-band { height: 90px; } }

/* Donaciones */
.btn-donate, .btn-support {
    background: transparent; color: inherit;
    border: 1px solid rgba(255,255,255,.35);
    padding: 6px 14px; font-weight: 700;
}
.btn-donate:hover, .btn-support:hover { background: rgba(255,255,255,.12); }
.btn-support { margin-left: 6px; }
.don-methods { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; }
.don-methods label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.don-methods input { width: 16px; height: 16px; }
.don-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.don-stat {
    flex: 1; min-width: 130px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 14px 16px; text-align: center;
}
.don-stat-n { display: block; font-size: var(--t-xl); font-weight: 800; color: var(--btn); }
.don-stat-l { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }

/* Dashboard de métricas */
.metric-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.metric-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 16px 18px;
}
.metric-card h3 { font-size: var(--t-base); margin: 0 0 12px; }
.metric-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.metric-lbl {
    flex: 0 0 38%; font-size: var(--t-xs); color: var(--ink-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.metric-bar { flex: 1; height: 10px; background: var(--surface-2); border-radius: var(--r-full); overflow: hidden; }
.metric-bar > span { display: block; height: 100%; background: var(--btn); border-radius: var(--r-full); }
.metric-val { flex: 0 0 auto; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); min-width: 38px; text-align: right; }

/* Panel de estados (rollout) */
.states-grid {
    display: grid; gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.state-row {
    display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap;
    padding: 10px 14px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-md);
}
.state-row.off { background: var(--surface-2); }
.state-name {
    flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: var(--t-sm);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.state-row .btn {
    flex: 0 0 auto; min-width: 84px; text-align: center;
    margin-left: auto; white-space: nowrap;
}
.state-badge {
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-full);
    background: var(--btn-050); color: var(--btn);
}
.state-row.off .state-badge { background: var(--danger-050); color: var(--danger); }
.states-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.states-toolbar .state-search { flex: 1; min-width: 180px; }

/* Postear Plus (activación por estado — irreversible) */
.plus-warn { display: flex; gap: 10px; align-items: flex-start; }
.plus-warn svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.state-badge.is-off { background: var(--danger-050); color: var(--danger); }
.plus-badge {
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-full);
    background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.state-row.is-plus { border-color: var(--success); background: rgba(5, 150, 105, .06); }
.state-row.is-plus .plus-badge { background: rgba(5, 150, 105, .14); color: var(--success); }
.plus-since { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* eShop (Postear Plus) */
.shop-head { display: flex; align-items: center; gap: 16px; }
.shop-mark {
    width: 48px; height: 48px; flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: var(--r-md); background: var(--btn-050); color: var(--btn);
}
.shop-mark svg { width: 24px; height: 24px; }
.pay-methods label { margin-right: 16px; font-weight: 600; }
.plan-list { margin: 0 0 14px; padding-left: 18px; }
.plan-list li { margin: 5px 0; font-size: var(--t-sm); color: var(--ink-2); }
.bulk-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.bulk-row { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
    .bulk-row {
        grid-template-columns: 2fr 1.2fr 0.8fr 1.4fr;
        align-items: center;
    }
}

/* Estrellas y perfil del vendedor (estilo Amazon) */
.stars { color: #f59e0b; letter-spacing: 1px; }
.seller-head { display: flex; align-items: center; gap: 16px; }
.seller-ava .avatar-lg { width: 72px; height: 72px; font-size: var(--t-2xl); }
.seller-id h1 { font-size: var(--t-xl); margin: 0; }
.seller-score { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.seller-score .stars { font-size: var(--t-lg); }
.review { padding: 14px 0; border-top: 1px solid var(--border); }
.review-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-body { margin: 6px 0 0; color: var(--ink-2); white-space: pre-wrap; }
.s-name a { color: inherit; }
.s-name a:hover { color: var(--btn); }
.listing-meta .listing-rate { color: #b9770e; font-weight: 700; flex-shrink: 0; }

/* ---------------- Carrusel de categorías ---------------- */
.cat-carousel { position: relative; padding: 0 8px; }
.cat-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 2px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.cat-track::-webkit-scrollbar { display: none; }
.cat-track:focus-visible { outline: 2px solid var(--btn-hover); outline-offset: 2px; border-radius: var(--r-md); }

.cat-carousel .cat-card {
    flex: 0 0 calc((100% - 56px) / 5);   /* 5 visibles, 4 gaps de 14px */
    scroll-snap-align: start;
    display: block;
    padding: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--ink);
}
.cat-carousel .cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
    border-color: var(--border-strong);
    text-decoration: none;
}
.cat-cover {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
}
.cat-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-cover-ph {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--btn-hover) 0%, var(--btn) 100%);
    color: #fff;
}
.cat-cover-ph svg { width: 34%; height: 34%; opacity: .9; }
.cat-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.cat-carousel .cat-name { font-weight: 700; font-size: var(--t-base); letter-spacing: -.01em; }
.cat-carousel .cat-count { font-size: var(--t-xs); color: var(--muted); }

.cat-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--sh-md);
    cursor: pointer;
    z-index: 3;
    transition: background .15s var(--ease), transform .12s var(--ease), opacity .15s var(--ease);
}
.cat-nav:hover { background: var(--surface-2); }
.cat-nav:active { transform: translateY(-50%) scale(.94); }
.cat-nav svg { width: 18px; height: 18px; }
.cat-prev { left: -6px; }
.cat-next { right: -6px; }
.cat-nav[disabled] { opacity: .35; cursor: default; pointer-events: none; }

@media (max-width: 1023px) {
    .cat-carousel .cat-card { flex-basis: calc((100% - 28px) / 3); }   /* 3 visibles */
}
@media (max-width: 639px) {
    .cat-carousel .cat-card { flex-basis: calc((100% - 14px) / 1.6); } /* ~1.6 visibles */
    .cat-prev { left: -2px; } .cat-next { right: -2px; }
}
@media (prefers-reduced-motion: reduce) {
    .cat-track { scroll-behavior: auto; }
    .cat-carousel .cat-card:hover { transform: none; }
}

/* ---------------- Panel admin: pestañas y filtros ---------------- */
.admin-tabs, .admin-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.admin-tabs a, .admin-filters a {
    padding: 8px 16px;
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--t-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.admin-tabs a:hover, .admin-filters a:hover { background: var(--surface-2); text-decoration: none; }
.admin-tabs a.active {
    background: var(--btn);
    border-color: var(--btn);
    color: #fff;
}
.admin-filters { margin-bottom: 16px; }
.admin-filters a { padding: 6px 12px; font-size: var(--t-xs); }
.panel-status .btn { white-space: nowrap; }

/* Grupo (nombre de tabla) en el detalle de plantillas personalizadas */
.ex-group {
    font-size: var(--t-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin: 14px 0 2px;
}

/* Portadas: imagen centrada (versión light) */
.listing-img, .cat-cover-img, .gallery-img,
.panel-thumb img, .dz-item img {
    object-fit: cover;
    object-position: center center;
}
.listing-photo, .cat-cover, .panel-thumb { background: var(--surface-2); }

/* ---------------- Compartir ---------------- */
.listing-share {
    display: flex; gap: 6px;
    padding: 0 14px 12px;
}
.sshare {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: var(--r-full);
    background: var(--surface-2);
    color: var(--ink-2);
    transition: transform .12s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.sshare:hover { transform: translateY(-1px); text-decoration: none; color: #fff; }
.sshare svg { width: 15px; height: 15px; }
.sshare-fb:hover { background: #1877F2; }
.sshare-x:hover  { background: #000; }
.sshare-ms:hover { background: #A033FF; }
.sshare-wa:hover { background: #25D366; }

/* Detalle: fila de compartir */
.share-row {
    display: flex; align-items: center; gap: 8px;
    margin: 16px 0 0; padding-top: 14px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.share-lbl { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); margin-right: 2px; }
.share-btn {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: var(--r-full);
    color: #fff;
    transition: transform .12s var(--ease), opacity .15s var(--ease);
}
.share-btn:hover { transform: translateY(-1px); opacity: .92; text-decoration: none; }
.share-btn svg { width: 19px; height: 19px; }
.share-fb { background: #1877F2; }
.share-x  { background: #000; }
.share-ms { background: #A033FF; }
.share-wa { background: #25D366; }

/* Carrusel "similares": tarjeta vacía reservada */
.cat-card.sim-empty {
    pointer-events: none;
    opacity: .7;
    border-style: dashed;
}
.cat-card.sim-empty:hover { transform: none; box-shadow: none; }
.cat-card.sim-empty .cat-cover-ph {
    background: var(--surface-2);
    color: var(--muted);
}
.cat-card .cat-count {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============================================================
   PWA / Experiencia móvil tipo app  (aditivo: no altera escritorio)
   ============================================================ */

/* Barra inferior de navegación: oculta en escritorio */
.cmx-tabbar { display: none; }

@media (max-width: 859px) {
    .cmx-tabbar {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        align-items: stretch; justify-content: space-around;
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: saturate(180%) blur(10px);
        backdrop-filter: saturate(180%) blur(10px);
        border-top: 1px solid var(--border);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -2px 14px -8px rgba(24, 24, 27, 0.22);
    }
    .cmx-tab {
        flex: 1; min-width: 0;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; min-height: 56px; padding: 8px 4px 6px;
        background: none; border: 0; cursor: pointer; text-decoration: none;
        color: var(--muted); font-family: inherit;
        -webkit-tap-highlight-color: transparent;
    }
    .cmx-tab svg { width: 23px; height: 23px; }
    .cmx-tab span { font-size: 11px; font-weight: 600; line-height: 1; }
    .cmx-tab.is-active { color: var(--btn); }
    .cmx-tab:active { transform: scale(0.94); }
    .cmx-tab:focus-visible { outline: 2px solid var(--btn); outline-offset: -3px; border-radius: 8px; }

    /* Botón central elevado: Publicar */
    .cmx-tab-fab svg {
        width: 26px; height: 26px; box-sizing: content-box;
        background: var(--accent); color: #1a1205;
        border-radius: 999px; padding: 12px; margin-top: -22px;
        border: 3px solid var(--surface);
        box-shadow: 0 6px 16px -4px rgba(245, 158, 11, 0.55);
    }
    .cmx-tab-fab span { color: var(--ink-2); }

    /* El contenido no queda tapado por la barra */
    body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

    /* 16px en campos: evita el zoom automático de iOS al enfocar */
    input, select, textarea, .input, .select, .textarea { font-size: 16px; }

    /* Objetivos táctiles cómodos */
    .btn { min-height: 44px; }

    /* El chat no queda bajo la barra inferior */
    .chat-drawer-card { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* Modo app instalada (standalone): respeta el notch superior */
@media (display-mode: standalone), (display-mode: minimal-ui) {
    .site-header { padding-top: env(safe-area-inset-top, 0px); }
}
html.cmx-standalone .site-header { padding-top: env(safe-area-inset-top, 0px); }

/* ============================================================
   Empleos (portal independiente)
   ============================================================ */
.empleos-hero {
    /* Fondo con un glow azul muy sutil para diferenciar el hero del
       resto de la página sin gritar. El radial-gradient sale del centro
       y se desvanece — da profundidad al search bar que vive encima. */
    background:
        radial-gradient(80% 60% at 50% 0%, var(--btn-050) 0%, transparent 70%),
        linear-gradient(180deg, #f8fafc, #ffffff);
    border-bottom: 1px solid var(--border);
    padding: 48px 0 32px;
}
.empleos-hero h1 { font-size: var(--t-3xl, 1.875rem); margin: 0; }

/* ----- Buscador unificado (shell pill con botón integrado al borde) -----
   Layout: [ 🔍 puesto | 📍 ciudad │ 🔍 Buscar ]
   Todo el control es UNA sola pieza: dos campos separados por un divider
   y un botón pegado al borde derecho que es parte del mismo shell. Esta
   estructura garantiza que el botón nunca puede caer a otra línea por
   wrap — está literalmente dentro del flex-container del shell.

   Estados: default (sombra ambient suave), hover (sombra crece),
   focus-within (ring azul + sombra). En mobile (≤640px) el shell se
   vuelve columna con dividers horizontales y el botón ocupa el ancho. */
.empleos-search {
    display: flex; margin-top: 16px;
}
.empleos-search-shell {
    flex: 1 1 auto;
    display: flex; align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    box-shadow:
        0 1px 2px rgba(24, 24, 27, 0.04),
        0 8px 24px rgba(24, 24, 27, 0.06);
    overflow: hidden;
    min-width: 0;           /* permite que los hijos shrinkeen al máximo */
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.empleos-search-shell:hover {
    box-shadow:
        0 1px 2px rgba(24, 24, 27, 0.05),
        0 14px 36px rgba(24, 24, 27, 0.10);
}
.empleos-search-shell:focus-within {
    border-color: var(--btn);
    box-shadow:
        0 0 0 4px rgba(4, 23, 120, 0.12),
        0 12px 32px rgba(24, 24, 27, 0.10);
}
.empleos-search-field {
    display: flex; align-items: center; gap: 10px;
    padding: 0 18px; min-width: 0;
    cursor: text;
}
.empleos-search-field-q   { flex: 1 1 60%; }
.empleos-search-field-loc { flex: 1 1 40%; }
.empleos-search-icon {
    flex: 0 0 auto;
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-2);
    transition: color .15s var(--ease);
}
.empleos-search-icon svg { width: 18px; height: 18px; }
.empleos-search-field:focus-within .empleos-search-icon { color: var(--btn); }

/* Reset del input: el styling vive en el shell, no en el input individual.
   `min-width: 0` permite shrinkear por debajo del ancho del placeholder. */
.empleos-search-shell .empleos-search-field input {
    flex: 1 1 auto; min-width: 0; width: 100%;
    border: 0; background: transparent; box-shadow: none;
    border-radius: 0; outline: none;
    padding: 14px 0;
    font: inherit; font-size: var(--t-base); color: var(--ink);
    height: auto;
}
.empleos-search-shell .empleos-search-field input::placeholder {
    color: var(--ink-2); opacity: .65;
}
/* Quita la X nativa de Chrome en type=search (rompe el look pill). */
.empleos-search-shell input[type="search"]::-webkit-search-decoration,
.empleos-search-shell input[type="search"]::-webkit-search-cancel-button,
.empleos-search-shell input[type="search"]::-webkit-search-results-button,
.empleos-search-shell input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}
.empleos-search-sep {
    width: 1px; background: var(--border);
    margin: 12px 0; align-self: stretch;
    flex: 0 0 auto;
    transition: background .2s var(--ease);
}
.empleos-search-shell:focus-within .empleos-search-sep {
    background: rgba(4, 23, 120, 0.25);
}

/* Botón integrado al borde derecho del shell. flex: 0 0 auto = no
   crece ni shrinkea, mantiene su tamaño natural. El margin negativo
   "absorbe" el padding del shell para que el botón llegue al borde. */
.empleos-search-btn {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    margin: 4px;             /* pequeño respiro del borde del shell */
    padding: 0 22px;
    background: var(--btn);
    color: #fff;
    border: 0;
    border-radius: var(--r-full);
    font: inherit;
    font-weight: 600;
    font-size: var(--t-sm);
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s var(--ease), transform .12s var(--ease);
}
.empleos-search-btn:hover { background: var(--btn-hover); }
.empleos-search-btn:active { transform: scale(0.97); }
.empleos-search-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}
.empleos-search-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.empleos-roles {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin-top: 22px;
}
.role-card {
    position: relative;
    display: flex; align-items: flex-start; gap: 14px;
    padding: 18px 20px; border-radius: var(--r-lg);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--ink); text-decoration: none;
    transition: transform .15s var(--ease), border-color .15s var(--ease),
                box-shadow .15s var(--ease);
}
.role-card:hover {
    border-color: var(--btn-hover);
    transform: translateY(-2px);
    box-shadow:
        0 2px 6px rgba(24, 24, 27, 0.05),
        0 12px 28px rgba(24, 24, 27, 0.08);
    text-decoration: none;
}
/* Icono SVG inyectado por CSS — el ASPX existente no tiene los SVGs
   inline así que los pintamos como mask-image. Si en el futuro se
   agregan SVGs reales al markup, este pseudo elemento desaparece sin
   problema (display:none lo desactiva). */
.role-card::before {
    content: "";
    flex: 0 0 auto;
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    background: var(--btn-050);
    /* SVG persona (candidato) embebido como data URL */
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23041778' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 4-6 8-6s8 2 8 6'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23041778' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 4-6 8-6s8 2 8 6'/></svg>");
    -webkit-mask-size: 26px 26px; mask-size: 26px 26px;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    background-color: var(--btn);
    background-image: none;
}
.role-card-alt::before {
    background: rgba(255, 255, 255, 0.18);
    background-color: rgba(255, 255, 255, 0.18);
    /* Icono maletín para reclutador */
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='7' width='18' height='13' rx='2'/><path d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='7' width='18' height='13' rx='2'/><path d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/></svg>");
}
.role-card > strong, .role-card > span { display: block; min-width: 0; }
.role-card strong {
    font-size: var(--t-lg);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
    color: inherit;
}
.role-card span {
    font-size: var(--t-sm);
    color: var(--ink-2);
    line-height: 1.4;
}
/* Flecha → en el extremo derecho como CTA visual */
.role-card::after {
    content: "→";
    position: absolute; right: 18px; top: 50%;
    transform: translateY(-50%);
    color: var(--btn);
    font-size: var(--t-xl);
    opacity: .35;
    transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.role-card:hover::after { opacity: 1; transform: translateY(-50%) translateX(2px); }

.role-card-alt {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 70%, #3b82f6 100%);
    color: #fff;
    border-color: transparent;
    overflow: hidden;
}
.role-card-alt strong, .role-card-alt span { color: #fff; }
.role-card-alt span { color: rgba(255, 255, 255, 0.85); }
.role-card-alt::after { color: #fff; opacity: .6; }
.role-card-alt:hover { border-color: transparent; }

.empleos-roles .role-card-full { grid-column: 1 / -1; }

/* ----- Subida de CV (PerfilEmpleo) ----- */
.cv-input {
    /* Input real oculto pero accesible (lo dispara el label .cv-drop). */
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cv-drop {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-md);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.cv-drop:hover, .cv-drop:focus-within {
    border-color: var(--btn-hover);
    background: var(--surface);
}
.cv-drop-ico {
    flex: 0 0 auto; width: 36px; height: 36px;
    color: var(--ink-2);
    display: grid; place-items: center;
}
.cv-drop-ico svg { width: 100%; height: 100%; }
.cv-drop-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cv-drop-main strong { font-size: var(--t-sm); color: var(--ink); }
.cv-drop-pick {
    flex: 0 0 auto; padding: 8px 14px;
    background: var(--btn); color: #fff;
    border-radius: var(--r-sm); font-size: var(--t-sm);
    font-weight: 600;
}
.cv-picked {
    background: #f0f9ff; border: 1px solid #bae6fd;
    border-radius: var(--r-sm); padding: 8px 12px;
    color: #075985;
}

/* Banner del CV actual: ver / eliminar */
.cv-current {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; margin: 0 0 14px;
    background: #f0fdf4; border: 1px solid #86efac;
    border-radius: var(--r-md);
    color: #065f46;
}
.cv-current-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cv-current-icon {
    flex: 0 0 auto; width: 28px; height: 28px;
    background: #d1fae5; color: #065f46;
    border-radius: 50%; display: grid; place-items: center;
}
.cv-current-icon svg { width: 16px; height: 16px; }
.cv-current-text { display: flex; flex-direction: column; min-width: 0; }
.cv-current-text strong { color: #064e3b; font-weight: 700; }
.cv-current-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-current .cv-del { color: var(--danger, #dc2626); }
.cv-actions {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

@media (max-width: 640px) {
    .cv-drop { padding: 14px; flex-wrap: wrap; }
    .cv-drop-pick { width: 100%; text-align: center; }
}

/* ----- Banner de aceptación de Términos (Perfil.aspx) -----
   Para usuarios creados por Google Sign-In que aún no aceptaron. Tono
   "atención" sin ser agresivo: fondo amber suave + borde marcado. */
.terms-card {
    background: #fffbeb;                  /* amber-50 */
    border: 1px solid #fcd34d;            /* amber-300 */
    margin-bottom: 18px;
}
.terms-card-head {
    display: flex; align-items: center; gap: 10px;
    color: #92400e;                       /* amber-800 */
}
.terms-card-head svg { width: 22px; height: 22px; flex: 0 0 auto; }
.terms-card-head h2 { font-size: var(--t-lg); color: #78350f; }
.terms-card p { color: var(--ink); margin: 0; }
.terms-card-list {
    margin: 10px 0 0; padding-left: 20px; color: var(--ink-2);
    font-size: var(--t-sm); line-height: 1.6;
}
.terms-card-list a { font-weight: 600; }
.terms-card .terms-check { display: inline-flex; align-items: flex-start; gap: 8px; }
.terms-card .terms-check input { margin-top: 3px; }
.terms-card .terms-check span { font-size: var(--t-sm); color: var(--ink); }

.empleos-grid {
    display: grid; gap: 22px;
    grid-template-columns: 260px 1fr;
    align-items: start;
}
.empleos-filters {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 16px;
}
.empleos-filters h3 { margin: 0 0 10px; font-size: var(--t-base); }
.empleos-filters label {
    display: block; margin: 10px 0 6px;
    font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
}
.empleos-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-block; padding: 5px 10px; border-radius: 999px;
    font-size: var(--t-xs); background: var(--surface-2);
    color: var(--ink-2); border: 1px solid var(--border);
    text-decoration: none;
}
.chip:hover { border-color: var(--btn-hover); text-decoration: none; }
.chip.is-on { background: var(--btn); color: #fff; border-color: var(--btn); }

.empleos-list-head {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 12px; margin-bottom: 12px;
}

.job-card {
    display: block; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 14px 16px; margin-bottom: 12px; color: var(--ink);
    text-decoration: none;
    transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.job-card:hover { border-color: var(--btn-hover); transform: translateY(-1px); text-decoration: none; }
.job-card.is-applied { background: #f0fdf4; border-color: #86efac; }
.job-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.job-title { font-size: var(--t-lg); font-weight: 700; margin: 0; color: var(--ink); }
.job-company { font-size: var(--t-sm); color: var(--ink-2); margin: 2px 0 8px; font-weight: 600; }
.job-meta {
    display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 0;
    list-style: none; font-size: var(--t-xs); color: var(--ink-2);
    margin: 0 0 8px;
}
.job-meta li::after { content: "·"; margin-left: 10px; color: var(--muted); }
.job-meta li:last-child::after { content: ""; }
.job-snippet { font-size: var(--t-sm); color: var(--ink-2); margin: 0 0 6px; line-height: 1.5; }
.job-foot { display: flex; gap: 8px; margin: 0; }

/* ============================================================
   Detalle de vacante (`Empleo.aspx`)
   Layout 2 columnas: main (1fr) + sticky aside (340px).
   Cada bloque es una "card" con padding generoso y border-radius
   suave; el sidebar tiene una CTA prominente.
   Mobile: stack — la CTA queda arriba de la descripción (visible
   sin scroll) gracias al order CSS.
   ============================================================ */

.jobd-section { padding: 16px 0 56px; }

.jobd-shell {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 340px;
    align-items: start;
}
.jobd-main {
    display: flex; flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Card común para todos los bloques (head, body, apply, meta) */
.jobd-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: 0 1px 2px rgba(24, 24, 27, 0.03);
}

/* ----- Header del puesto ----- */
.jobd-head-top {
    display: flex; gap: 16px; align-items: flex-start;
    margin-bottom: 16px;
}
.jobd-logo {
    flex: 0 0 auto;
    width: 64px; height: 64px;
    background: var(--btn-050);
    color: var(--btn);
    border-radius: var(--r-md);
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.25rem;
    letter-spacing: -0.02em;
}
.jobd-logo[data-c="1"] { background: #fef3c7; color: #92400e; }
.jobd-logo[data-c="2"] { background: #dcfce7; color: #166534; }
.jobd-logo[data-c="3"] { background: #fce7f3; color: #9d174d; }
.jobd-logo[data-c="4"] { background: #ede9fe; color: #5b21b6; }
.jobd-logo[data-c="5"] { background: #cffafe; color: #155e75; }

.jobd-head-text { flex: 1 1 auto; min-width: 0; }
.jobd-title {
    margin: 0;
    font-size: clamp(1.375rem, 2.6vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.jobd-company {
    margin: 4px 0 0;
    color: var(--ink-2);
    font-size: var(--t-base);
    font-weight: 600;
}

/* Pills de meta (ubicación / modalidad / contrato) — visualmente
   coherentes con las del listado pero más grandes para detalle. */
.jobd-pills {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.jobd-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--surface-2);
    border-radius: var(--r-full);
    color: var(--ink-2);
    font-size: var(--t-sm);
    font-weight: 500;
}
.jobd-pill svg { width: 14px; height: 14px; flex: 0 0 auto; }
.jobd-pill-loc { background: var(--btn-050); color: var(--btn); font-weight: 600; }

/* Sueldo destacado como chip verde (igual que el listado para que
   sea reconocible). Si está vacío (salaryConfidential), no se ve. */
.jobd-salary-row { margin: 0 0 12px; }
.jobd-salary {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #86efac;
    border-radius: var(--r-full);
    font-size: var(--t-base);
    font-weight: 700;
    line-height: 1.3;
}
.jobd-salary:empty { display: none; }

/* Chips secundarios (área, experiencia) — más sutiles */
.jobd-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.jobd-chips .chip {
    padding: 4px 12px;
    background: var(--surface-2);
    color: var(--ink-2);
    border-radius: var(--r-full);
    font-size: var(--t-xs);
    font-weight: 600;
}

/* ----- Cuerpo / descripción ----- */
.jobd-h2 {
    font-size: var(--t-lg);
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--ink);
}
.job-desc {
    white-space: pre-wrap;
    line-height: 1.7;
    color: var(--ink);
    font-size: var(--t-base);
    overflow-wrap: anywhere;
}
.job-desc strong { color: var(--ink); font-weight: 700; }

/* ----- Sidebar ----- */
.jobd-side {
    display: flex; flex-direction: column;
    gap: 12px;
    position: sticky;
    top: calc(var(--header-h, 64px) + 16px);
    align-self: start;
}
/* La card de "Postular" es la acción primaria — un toque más visible
   con border azul suave + sombra sutil cuando hover. */
.jobd-apply { border-color: var(--btn-100); }
.jobd-apply-title {
    margin: 0 0 8px;
    font-size: var(--t-lg);
    font-weight: 700;
    color: var(--ink);
    display: flex; align-items: center; gap: 8px;
}
.jobd-apply-title svg { width: 22px; height: 22px; color: var(--success, #059669); }

/* Card "ya postulaste" en verde semántico */
.jobd-applied {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 70%);
}
.jobd-applied .jobd-apply-title { color: #166534; }

.jobd-meta-card { background: var(--surface-2); border-color: transparent; }

/* ----- Mobile / tablet ----- */
@media (max-width: 960px) {
    .jobd-shell {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .jobd-side {
        position: static;
        top: auto;
        /* La CTA va ARRIBA del cuerpo en mobile para que el botón
           "Postular" sea lo primero que ve el usuario tras el header. */
        order: -1;
    }
}

@media (max-width: 600px) {
    .jobd-section { padding: 12px 0 48px; }
    .jobd-card { padding: 16px; border-radius: var(--r-md); }
    .jobd-head-top { gap: 12px; margin-bottom: 12px; }
    .jobd-logo { width: 52px; height: 52px; font-size: 1.05rem; }
    .jobd-title { font-size: 1.25rem; }
    .jobd-pills { gap: 6px; margin-bottom: 12px; }
    .jobd-pill { padding: 5px 10px; font-size: var(--t-xs); }
    .jobd-salary { padding: 6px 14px; font-size: var(--t-sm); }
    .job-desc { font-size: var(--t-sm); line-height: 1.65; }
    .jobd-apply-title { font-size: var(--t-base); }
}

/* Mantenemos los .job-detail-* legacy ocultos por si quedaron en otra
   parte (compatibilidad — no rompemos nada). Sus declaraciones viejas
   ya no aplican porque ahora usamos .jobd-* en el markup. */
.job-detail-side .card { margin-bottom: 14px; }

/* Reclutador */
.recruiter-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.recruiter-job {
    display: grid; gap: 12px; align-items: center;
    grid-template-columns: 1fr 130px 220px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 14px; margin-bottom: 10px;
}
.recruiter-job.is-closed { opacity: .6; }
.recruiter-job-title { font-weight: 700; color: var(--ink); text-decoration: none; }
.recruiter-job-stats { text-align: center; }
.recruiter-job-stats .don-stat-n { display: block; font-size: var(--t-xl, 1.25rem); font-weight: 700; }
.recruiter-job-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* Badges de estado en el listado del panel del reclutador */
.rj-status {
    display: inline-flex; align-items: center;
    padding: 2px 10px;
    border-radius: var(--r-full);
    font-size: var(--t-xs);
    font-weight: 700;
    line-height: 1.5;
    background: var(--surface-2);
    color: var(--ink-2);
    border: 1px solid var(--border);
}
.rj-status.ok    { background: #dcfce7; color: #166534; border-color: #86efac; }
.rj-status.warn  { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.rj-status.muted { background: var(--surface-2); color: var(--ink-2); border-color: var(--border); }

/* "Cerrar postulación" — discreto en outline; "Reabrir" — primary verde
   para alentar la acción positiva. */
.recruiter-job-close { color: var(--danger, #dc2626) !important; border-color: rgba(220, 38, 38, .25); }
.recruiter-job-close:hover { background: #fef2f2; border-color: var(--danger, #dc2626); }
.recruiter-job-reopen { background: var(--success, #059669); color: #fff !important; border-color: var(--success, #059669); }
.recruiter-job-reopen:hover { background: #047857; }

/* ----- Buscador exclusivo de "Mis vacantes" (panel del reclutador) ----- */
.myjobs-head { margin: 0 0 12px; }
.myjobs-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    position: relative;
}
.myjobs-search-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-2);
    pointer-events: none;
    z-index: 1;
}
.myjobs-search-ico svg { width: 16px; height: 16px; display: block; }
.myjobs-search {
    flex: 1 1 260px;
    min-width: 200px;
    padding-left: 38px;
}
.myjobs-status { min-width: 170px; }
.myjobs-count { margin: 0 0 12px; }

@media (max-width: 600px) {
    .myjobs-toolbar { gap: 6px; }
    .myjobs-search-ico { left: 12px; }
    .myjobs-search { padding-left: 34px; flex-basis: 100%; }
    .myjobs-status { flex: 1 1 auto; }
}

.recruiter-apps { display: grid; gap: 12px; margin-top: 14px; }
.applicant {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 14px;
}
.applicant-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.applicant-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.applicant-answers { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.applicant-answers summary { cursor: pointer; font-weight: 600; }

.req { color: var(--danger, #dc2626); }

/* Lista de alertas de empleo (PerfilEmpleo) */
.alert-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
    background: var(--surface-2); margin: 6px 0;
}
.alert-row-text { font-size: var(--t-sm); color: var(--ink); overflow-wrap: anywhere; }

/* ----- Google Sign-In: presentación premium del botón oficial -----
   Reglas de marca de Google: el botón debe usarse tal cual lo emite GIS
   (no podemos reescribir el texto/branding). Lo que SÍ podemos hacer es
   embellecer el contenedor: separador con gradient, halo glow animado,
   tagline con ícono, animación de entrada. El resultado se siente
   "premium" sin tocar el botón mismo. */
.auth-google {
    margin-top: 22px;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    animation: gsi-rise .55s var(--ease) both;
}
.auth-sep {
    width: 100%; display: flex; align-items: center; gap: 12px;
    color: var(--muted); font-size: var(--t-xs);
    text-transform: uppercase; letter-spacing: .08em;
    font-weight: 600;
}
.auth-sep::before, .auth-sep::after {
    content: ""; flex: 1; height: 1px;
    background: linear-gradient(to right, transparent, var(--border) 30%, var(--border) 70%, transparent);
}
.auth-sep::before { background: linear-gradient(to right, transparent, var(--border) 60%); }
.auth-sep::after  { background: linear-gradient(to right, var(--border) 40%, transparent); }

/* Stage: contiene halo animado + frame del botón + tagline */
.gsi-stage {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 6px 0;
}
/* Halo: un blob de gradiente difuminado que pulsa suavemente detrás del
   botón. Da sensación de "elemento destacado" sin imponerse. */
.gsi-halo {
    position: absolute; inset: -10px 0 auto 50%;
    transform: translateX(-50%);
    width: 360px; max-width: 90%; height: 64px;
    background: radial-gradient(closest-side,
                rgba(66, 133, 244, 0.30),
                rgba(66, 133, 244, 0.10) 55%,
                transparent 75%);
    filter: blur(14px);
    z-index: 0;
    animation: gsi-pulse 3.6s var(--ease) infinite;
    pointer-events: none;
}
.gsi-frame {
    position: relative; z-index: 1;
    padding: 4px;                   /* deja espacio para el "scale" del hover */
    transition: transform .25s var(--ease), filter .25s var(--ease);
}
.gsi-frame:hover { transform: translateY(-1px) scale(1.02); filter: drop-shadow(0 8px 18px rgba(66,133,244,.25)); }
.gsi-frame:active { transform: translateY(0) scale(0.99); }
.auth-google .g_id_signin { display: flex; justify-content: center; }
.gsi-tag {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0; font-size: var(--t-xs); color: var(--ink-2);
}
.gsi-tag svg { width: 14px; height: 14px; color: #4285F4; }

@keyframes gsi-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes gsi-pulse {
    0%, 100% { opacity: .55; transform: translateX(-50%) scale(1);   }
    50%      { opacity: .95; transform: translateX(-50%) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-google, .gsi-halo { animation: none; }
    .gsi-frame { transition: none; }
}

/* ----- Admin · Tabla de usuarios (buscable / ordenable / paginable) ----- */
.users-toolbar {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin: 0 0 14px;
}
.users-search { flex: 1; min-width: 220px; max-width: 480px; }
.users-count { margin-left: auto; }

.user-table-wrap { overflow-x: auto; }
.user-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    font-size: var(--t-sm);
}
.user-table thead th {
    background: var(--surface-2);
    color: var(--ink-2);
    font-weight: 700; text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.user-table .ut-sort {
    color: inherit; text-decoration: none; display: inline-block;
}
.user-table .ut-sort:hover { color: var(--ink); text-decoration: none; }
.user-table th.is-active .ut-sort { color: var(--ink); }
.user-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.user-table tbody tr:last-child td { border-bottom: 0; }
.user-table tbody tr:hover { background: var(--surface-2); }

.ut-id        { width: 60px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ut-user      { min-width: 180px; }
.ut-name      { min-width: 160px; }
.ut-email     { min-width: 200px; overflow-wrap: anywhere; }
.ut-loc       { min-width: 140px; }
.ut-ads       { width: 80px; text-align: right; font-variant-numeric: tabular-nums; }
.ut-created   { width: 110px; white-space: nowrap; }
.ut-actions   { min-width: 220px; white-space: nowrap; }
.ut-actions .ut-sep { color: var(--muted); margin: 0 4px; }
.ut-actions .ut-del { color: var(--danger, #dc2626); }
.ut-avatar {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand, #1e3a8a), var(--brand-700, #1e40af));
    color: #fff; font-weight: 700; font-size: var(--t-xs);
    vertical-align: middle; margin-right: 8px;
}
.ut-nick { vertical-align: middle; font-weight: 600; color: var(--ink); }

.users-pager, .pubs-pager {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin: 14px 0 0; align-items: center; justify-content: center;
}
.users-pager .pg, .pubs-pager .pg {
    display: inline-block; padding: 6px 12px; min-width: 36px;
    text-align: center; font-size: var(--t-sm);
    border: 1px solid var(--border); border-radius: var(--r-sm);
    color: var(--ink-2); text-decoration: none; background: var(--surface);
}
.users-pager .pg:hover, .pubs-pager .pg:hover { border-color: var(--btn-hover); text-decoration: none; }
.users-pager .pg-cur, .pubs-pager .pg-cur {
    background: var(--btn); color: #fff; border-color: var(--btn);
    pointer-events: none;
}
.users-pager .pg-gap, .pubs-pager .pg-gap { border: 0; background: transparent; color: var(--muted); }

@media (max-width: 859px) {
    .users-count { margin-left: 0; width: 100%; }
    .user-table { font-size: var(--t-xs); }
    .user-table thead th, .user-table tbody td { padding: 8px 8px; }
    .ut-name, .ut-loc { display: none; }   /* en pantallas chicas priorizamos nick+email */
}

/* Tablet medio (~640-860px): el shell sigue en row pero el texto del
   botón se oculta para no comprimir los inputs. El icono solo es
   suficiente — la lupa es universalmente reconocida como "buscar". */
@media (max-width: 860px) {
    .empleos-search-btn-text { display: none; }
    .empleos-search-btn { padding: 0 16px; }
    .empleos-search-field { padding: 0 14px; gap: 8px; }
}

@media (max-width: 540px) {
    /* Móvil chico: pasa a stack vertical (puesto encima, ciudad debajo,
       separadas por divider horizontal). El botón sale del shell
       y se vuelve bloque full-width con texto. */
    .empleos-search-shell {
        flex-direction: column;
        border-radius: var(--r-lg);
    }
    .empleos-search-field { padding: 6px 16px; }
    .empleos-search-field input { padding: 12px 0; }
    .empleos-search-sep {
        width: auto; height: 1px;
        margin: 0 16px;
    }
    .empleos-search-btn {
        margin: 8px;
        padding: 12px 16px;
        font-size: var(--t-base);
        justify-content: center;
    }
    .empleos-search-btn-text { display: inline; }
}

@media (max-width: 859px) {
    .empleos-grid { grid-template-columns: 1fr; }
    .empleos-roles { grid-template-columns: 1fr; }
    .job-detail { grid-template-columns: 1fr; }
    .recruiter-job { grid-template-columns: 1fr; }
    .recruiter-job-stats { text-align: left; }
    .recruiter-job-actions { justify-content: flex-start; }
    .header-jobs { display: none; }
}

/* `prefers-reduced-motion`: respetamos preferencia del SO y quitamos las
   transiciones del shell para evitar parpadeos al hacer focus. */
@media (prefers-reduced-motion: reduce) {
    .empleos-search-shell,
    .empleos-search-icon,
    .empleos-search-sep { transition: none; }
}

/* ============================================================
   Empleos v2 — layout inspirado en Computrabajo (mejorado)
   · Hero compacto con search
   · Sub-header sticky (conteo + chips activos + sort + filtros mobile)
   · Desktop: 2 columnas (filters 280 + lista flexible)
   · Mobile: 1 columna + drawer (bottom sheet) para filtros
   ============================================================ */

.jobs-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(60% 50% at 15% 0%, rgba(125, 147, 236, 0.20) 0%, transparent 60%),
        radial-gradient(60% 50% at 85% 0%, rgba(4, 23, 120, 0.10) 0%, transparent 60%),
        linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border);
    padding: 48px 0 28px;
}
/* Patrón sutil de dots para texturizar el hero sin abrumar — invisible
   en alto-contraste, decorativo en modo normal. */
.jobs-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(4, 23, 120, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: .35;
    pointer-events: none;
    mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
}
.jobs-hero > .container { position: relative; z-index: 1; }
.jobs-hero h1 {
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    margin: 0;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--ink);
}
.jobs-search { margin-top: 18px; }
.jobs-hero-roles { margin-top: 20px; }

/* ----- Toolbar / sub-header sticky ----- */
.jobs-toolbar {
    position: sticky; top: var(--header-h, 64px);
    z-index: 20;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.jobs-toolbar-row {
    display: flex; align-items: center; gap: 16px;
    flex-wrap: wrap;
}
.jobs-toolbar-l { flex: 1 1 auto; min-width: 0; }
.jobs-toolbar-r {
    display: flex; align-items: center; gap: 12px;
    flex: 0 0 auto;
}
.jobs-results-title {
    font-size: var(--t-lg);
    margin: 0;
    line-height: 1.2;
    color: var(--ink);
}
.jobs-results-count {
    display: block;
    margin-top: 2px;
    font-size: var(--t-sm);
    color: var(--ink-2);
}
.jobs-sort {
    display: inline-flex; align-items: center; gap: 8px;
}
.jobs-sort .select {
    padding: 8px 32px 8px 12px;
    font-size: var(--t-sm);
    min-height: 38px;
}
.select-compact { min-height: 38px; padding: 8px 32px 8px 12px; font-size: var(--t-sm); }
.input-compact { min-height: 38px; padding: 8px 12px; font-size: var(--t-sm); }

.jobs-filter-toggle {
    display: none;          /* solo aparece en mobile */
    padding: 8px 14px;
    font-size: var(--t-sm);
    min-height: 38px;
}
.jobs-filter-toggle-badge {
    display: inline-block;
    margin-left: 6px;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    background: var(--btn); color: #fff;
    border-radius: var(--r-full);
    font-size: var(--t-xs); font-weight: 700;
    line-height: 20px; text-align: center;
}

/* ----- Chips de filtros activos ----- */
.jobs-active-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 10px;
}
.jobs-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: var(--btn-050);
    color: var(--btn);
    border: 1px solid var(--btn-100);
    border-radius: var(--r-full);
    font-size: var(--t-sm); font-weight: 600;
    text-decoration: none;
    transition: background .15s var(--ease), border-color .15s var(--ease);
}
.jobs-chip:hover {
    background: var(--btn-100);
    text-decoration: none;
}
.jobs-chip-x {
    display: inline-block;
    width: 16px; height: 16px;
    line-height: 14px; text-align: center;
    border-radius: 50%;
    background: rgba(4, 23, 120, .15);
    font-size: var(--t-sm); font-weight: 700;
}
.jobs-chip-clear {
    background: transparent;
    color: var(--ink-2);
    border-color: var(--border);
}
.jobs-chip-clear:hover {
    background: var(--surface-2);
    color: var(--ink);
}

/* ----- Grid: filters | list ----- */
.jobs-section { padding-top: 18px; padding-bottom: 32px; }
.jobs-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* ----- Sidebar de filtros (sticky en desktop) ----- */
.jobs-filters {
    position: sticky;
    top: calc(var(--header-h, 64px) + 80px);  /* debajo del toolbar */
    align-self: start;
    max-height: calc(100vh - var(--header-h, 64px) - 90px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px;
}
.jobs-filters-head {
    display: none;  /* solo en mobile */
    justify-content: space-between; align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.jobs-filters-title {
    font-size: var(--t-lg); font-weight: 700;
}
.jobs-filters-close {
    background: transparent; border: 0; padding: 6px;
    color: var(--ink-2); cursor: pointer;
    border-radius: var(--r-sm);
}
.jobs-filters-close:hover { background: var(--surface-2); color: var(--ink); }
.jobs-filters-close svg { width: 22px; height: 22px; }

/* Filtro grupo (acordeón nativo con <details>) */
.jobs-fg {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.jobs-fg:first-of-type { padding-top: 0; }
.jobs-fg:last-of-type { border-bottom: 0; padding-bottom: 0; }
.jobs-fg summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700; font-size: var(--t-sm);
    color: var(--ink);
    display: flex; align-items: center; justify-content: space-between;
    user-select: none;
    padding: 4px 0;
}
.jobs-fg summary::-webkit-details-marker { display: none; }
.jobs-fg summary::after {
    content: "";
    width: 10px; height: 10px;
    border-right: 2px solid var(--ink-2);
    border-bottom: 2px solid var(--ink-2);
    transform: rotate(45deg);
    transition: transform .2s var(--ease);
    margin-top: -3px;
}
.jobs-fg[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.jobs-fg-body { padding-top: 10px; }
.jobs-fg-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 2px;
}
.jobs-fg-opt {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    color: var(--ink-2);
    font-size: var(--t-sm);
    text-decoration: none;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.jobs-fg-opt:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.jobs-fg-opt.is-on {
    background: var(--btn-050);
    color: var(--btn);
    font-weight: 600;
}
.jobs-fg-dot {
    flex: 0 0 auto;
    width: 16px; height: 16px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface);
    transition: border-color .15s var(--ease), background .15s var(--ease);
    position: relative;
}
.jobs-fg-opt.is-on .jobs-fg-dot {
    border-color: var(--btn);
    background: var(--btn);
    box-shadow: inset 0 0 0 3px var(--surface);
}

.jobs-filters-actions {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ----- Lista de vacantes ----- */
.jobs-list {
    display: flex; flex-direction: column; gap: 12px;
    min-width: 0;
}
.jobs-empty {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 40px 24px;
    text-align: center;
}
.jobs-empty svg { width: 40px; height: 40px; color: var(--ink-2); margin-bottom: 8px; }
.jobs-empty p { margin: 4px 0; }
.jobs-empty .btn { margin-top: 16px; }

/* ----- Job card v2 (con logo placeholder coloreado) -----
   Diseño tipo Indeed/LinkedIn: logo a la izquierda, contenido en columna,
   chips de meta-info y sueldo destacado. La animación de hover usa
   elevación (no solo color) para dar sensación de "interactivo". */
.job-card-v2 {
    display: flex; gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    color: inherit; text-decoration: none;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease),
                transform .18s var(--ease);
}
.job-card-v2:hover {
    border-color: var(--btn-100);
    box-shadow:
        0 2px 6px rgba(24, 24, 27, 0.05),
        0 12px 30px rgba(24, 24, 27, 0.10);
    text-decoration: none;
    transform: translateY(-2px);
}
.job-card-v2:hover .job-card-logo { transform: scale(1.05); }
.job-card-v2.is-applied {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 60%);
    border-color: #86efac;
}
.job-card-v2.is-applied:hover { border-color: #4ade80; }

/* Logo placeholder: las 2 letras iniciales sobre un fondo de color suave.
   El color de fondo se deriva del nombre de la empresa (ver code-behind
   CompanyInitials que ahora emite también un data-c="0|1|2|3|4" para
   variantes deterministas). Si no llega data-c, usa el azul de marca. */
.job-card-logo {
    flex: 0 0 auto;
    width: 56px; height: 56px;
    background: var(--btn-050);
    color: var(--btn);
    border-radius: var(--r-md);
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.1rem;
    letter-spacing: -0.02em;
    transition: transform .18s var(--ease);
}
.job-card-logo[data-c="1"] { background: #fef3c7; color: #92400e; }
.job-card-logo[data-c="2"] { background: #dcfce7; color: #166534; }
.job-card-logo[data-c="3"] { background: #fce7f3; color: #9d174d; }
.job-card-logo[data-c="4"] { background: #ede9fe; color: #5b21b6; }
.job-card-logo[data-c="5"] { background: #cffafe; color: #155e75; }
.job-card-logo-ph { display: block; }

.job-card-body { flex: 1 1 auto; min-width: 0; }
.job-card-head {
    display: flex; gap: 10px; align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2px;
}
.job-card-v2 .job-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: var(--ink);
    overflow-wrap: anywhere;
    /* clamp a 2 líneas para alineación visual entre cards */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.job-card-v2:hover .job-title { color: var(--btn); }
.job-card-v2 .job-company {
    margin: 2px 0 10px;
    color: var(--ink-2);
    font-size: var(--t-sm);
    font-weight: 600;
}
.job-card-v2 .job-meta {
    list-style: none;
    margin: 0 0 8px; padding: 0;
    display: flex; flex-wrap: wrap; gap: 6px 8px;
    color: var(--ink-2);
    font-size: var(--t-xs);
}
/* Meta como pills sutiles para visibilizar mejor cada propiedad */
.job-card-v2 .job-meta li {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    background: var(--surface-2);
    border-radius: var(--r-full);
    color: var(--ink-2);
    font-weight: 500;
    white-space: nowrap;
}
.job-card-v2 .job-meta li::after { content: ""; margin: 0; }
.job-card-v2 .job-meta-loc svg { width: 12px; height: 12px; flex: 0 0 auto; }

/* Sueldo: highlight como chip verde (semánticamente "ganancia/positivo"). */
.job-card-v2 .job-salary {
    display: inline-block;
    margin: 6px 0 10px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #86efac;
    border-radius: var(--r-full);
    font-size: var(--t-sm);
    font-weight: 700;
    line-height: 1.3;
}
.job-card-v2 .job-salary:empty { display: none; }

.job-card-v2 .job-snippet {
    margin: 6px 0 10px;
    color: var(--ink-2);
    font-size: var(--t-sm);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.job-card-v2 .job-foot {
    margin: 0;
    color: var(--muted);
    font-size: var(--t-xs);
    display: flex; gap: 10px; align-items: center;
    flex-wrap: wrap;
}
.job-foot-when {
    font-weight: 600;
    color: var(--ink-2);
    display: inline-flex; align-items: center; gap: 4px;
}
/* Reloj sutil antes del "Hace X días" */
.job-foot-when::before {
    content: "";
    width: 12px; height: 12px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 2'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 2'/></svg>");
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    display: inline-block;
}
.job-foot-sep { color: var(--border-strong); }

.badge-applied {
    flex: 0 0 auto;
    padding: 4px 12px;
    background: #dcfce7; color: #166534;
    border: 1px solid #86efac;
    border-radius: var(--r-full);
    font-size: var(--t-xs); font-weight: 700;
    white-space: nowrap;
    display: inline-flex; align-items: center; gap: 4px;
}
.badge-applied::before {
    content: "";
    width: 12px; height: 12px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

/* ----- Backdrop del drawer (mobile) ----- */
.jobs-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(2px);
}
.jobs-drawer-backdrop[hidden] { display: none; }

/* ----- Responsive: mobile/tablet ----- */
@media (max-width: 960px) {
    .jobs-grid { grid-template-columns: 1fr; }
    .jobs-filter-toggle { display: inline-flex; }

    /* Drawer (bottom sheet) en mobile, con "handle" arriba como
       afford-visible para que el usuario sepa que es deslizable. */
    .jobs-filters {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        top: auto;
        max-height: 85vh;
        max-width: 100%;
        border: 0;
        border-top: 1px solid var(--border);
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
        z-index: 100;
        transform: translateY(100%);
        transition: transform .28s var(--ease);
        padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0)) 16px;
    }
    /* Handle visual (línea redondeada arriba) */
    .jobs-filters::before {
        content: "";
        display: block;
        width: 40px; height: 4px;
        background: var(--border-strong);
        border-radius: var(--r-full);
        margin: 4px auto 12px;
    }
    .jobs-filters.is-open { transform: translateY(0); }
    .jobs-filters-head { display: flex; }
}

@media (max-width: 600px) {
    .jobs-hero { padding: 24px 0 16px; }
    .jobs-hero h1 { font-size: 1.5rem; }
    .jobs-hero p { font-size: var(--t-sm); }
    .jobs-toolbar { padding: 10px 0; }
    .jobs-toolbar-row { gap: 8px; }
    .jobs-results-title { font-size: var(--t-base); }
    .jobs-toolbar-r { width: 100%; justify-content: space-between; }
    .jobs-sort { flex: 1 1 auto; min-width: 0; }
    .jobs-sort .select { width: 100%; }

    .empleos-roles { gap: 10px; margin-top: 16px; }
    .role-card { padding: 14px 16px; gap: 12px; }
    .role-card::before { width: 38px; height: 38px; }
    .role-card::after { right: 14px; font-size: var(--t-lg); }
    .role-card strong { font-size: var(--t-base); }

    .job-card-v2 { padding: 14px; gap: 12px; border-radius: var(--r-md); }
    .job-card-logo { width: 46px; height: 46px; font-size: var(--t-base); }
    .job-card-v2 .job-title { font-size: var(--t-base); }
    .job-card-v2 .job-meta { gap: 4px 6px; }
    .job-card-v2 .job-meta li { padding: 2px 8px; }
    .job-card-v2 .job-salary { padding: 3px 10px; font-size: var(--t-xs); }
}

/* `prefers-reduced-motion` */
@media (prefers-reduced-motion: reduce) {
    .jobs-filters,
    .job-card-v2,
    .jobs-chip,
    .jobs-fg summary::after { transition: none; }
}

/* ============================================================
   Empleos · acciones en card (bookmark + postular)
   + link "Guardadas" + modal de preguntas
   ============================================================ */

/* El card ya no es <a> directo — ahora es <article> que contiene un
   .job-card-link (el anchor envolvente) + .job-card-actions afuera. */
.job-card-v2 { position: relative; flex-direction: column; align-items: stretch; padding: 0; }
.job-card-link {
    display: flex; gap: 16px;
    padding: 18px 20px 14px;
    color: inherit; text-decoration: none;
    min-width: 0;
}
.job-card-link:hover { text-decoration: none; }

.job-card-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 0 20px 16px;
    border-top: 1px dashed var(--border);
    padding-top: 12px;
    margin-top: -2px;
}

/* Bookmark button */
.job-bmk {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--ink-2);
    border-radius: var(--r-full);
    cursor: pointer;
    transition: background .15s var(--ease), color .15s var(--ease),
                border-color .15s var(--ease), transform .15s var(--ease);
}
.job-bmk:hover { background: var(--surface-2); color: var(--ink); border-color: var(--btn-100); }
.job-bmk:active { transform: scale(0.94); }
.job-bmk svg { width: 18px; height: 18px; transition: fill .15s var(--ease); }
.job-bmk.is-saved { background: var(--btn-050); color: var(--btn); border-color: var(--btn); }
.job-bmk.is-saved svg { fill: currentColor; }
.job-bmk:focus-visible {
    outline: 2px solid var(--btn);
    outline-offset: 2px;
}

/* Postular ahora — más pequeño que un .btn normal, optimizado para card */
.job-apply-btn {
    padding: 8px 16px;
    font-size: var(--t-sm);
    font-weight: 700;
    border-radius: var(--r-full);
    min-height: 36px;
}
.job-apply-done {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: #dcfce7; color: #166534;
    border: 1px solid #86efac;
    border-radius: var(--r-full);
    font-size: var(--t-sm); font-weight: 700;
}
.job-apply-done svg { width: 14px; height: 14px; }

/* Link "Guardadas (N)" en el toolbar */
.jobs-saved-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--ink-2);
    border-radius: var(--r-full);
    font-size: var(--t-sm); font-weight: 600;
    text-decoration: none;
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.jobs-saved-link:hover { background: var(--surface-2); color: var(--ink); border-color: var(--btn-100); text-decoration: none; }
.jobs-saved-link svg { width: 16px; height: 16px; }
.jobs-saved-link.is-active {
    background: var(--btn); color: #fff; border-color: var(--btn);
}
.jobs-saved-link.is-active:hover { background: var(--btn-hover); color: #fff; }
.jobs-saved-badge {
    display: inline-block; min-width: 18px; height: 18px;
    padding: 0 6px; line-height: 18px;
    background: var(--btn); color: #fff;
    border-radius: var(--r-full);
    font-size: var(--t-xs); font-weight: 700; text-align: center;
}
.jobs-saved-link.is-active .jobs-saved-badge { background: rgba(255,255,255,0.25); }

/* Modal de postulación con preguntas */
.jobs-apply-modal {
    position: fixed; inset: 0;
    z-index: 1000;
    display: grid; place-items: center;
    padding: 16px;
}
.jobs-apply-modal[hidden] { display: none; }
.jobs-apply-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}
.jobs-apply-modal-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    animation: jobsApplyIn .2s var(--ease);
}
@keyframes jobsApplyIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.jobs-apply-modal-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 12px;
    border-bottom: 1px solid var(--border);
}
.jobs-apply-modal-head h3 { margin: 0; font-size: var(--t-lg); }
.jobs-apply-modal-head .icon-btn {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: transparent; border: 0;
    color: var(--ink-2); cursor: pointer;
    border-radius: var(--r-full);
}
.jobs-apply-modal-head .icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.jobs-apply-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.jobs-apply-fields {
    display: flex; flex-direction: column; gap: 14px;
}
.jobs-apply-field label {
    display: block;
    font-size: var(--t-sm);
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--ink);
}
.jobs-apply-field .req { color: var(--danger); }
.jobs-apply-field .input,
.jobs-apply-field .textarea,
.jobs-apply-field .select { width: 100%; }
.jobs-apply-yesno {
    display: flex; gap: 12px; align-items: center;
}
.jobs-apply-yesno label {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 500;
    cursor: pointer;
}
.jobs-apply-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    background: #fef2f2; color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: var(--r-sm);
}
.jobs-apply-modal-foot {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    border-bottom-left-radius: var(--r-lg);
    border-bottom-right-radius: var(--r-lg);
}

/* Mobile: el modal ocupa más espacio y la acción de pie queda sticky */
@media (max-width: 600px) {
    .jobs-apply-modal { padding: 0; }
    .jobs-apply-modal-card {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .job-card-actions { padding: 12px 16px; flex-wrap: wrap; }
    .job-card-link { padding: 14px 16px 10px; }
}

/* ============================================================
   Reclutamiento (landing para empresas) — `EmpleoReclutador.aspx`
   Diseñada para vivir en un subdominio independiente. Estilo
   inspirado en Indeed reclutamiento + Computrabajo empresas,
   con las mejoras del design system propio (tokens, espacios 4px,
   ilustración SVG inline en lugar de PNG externo).
   ============================================================ */

/* ----- Hero ----- */
.rec-hero {
    background:
        radial-gradient(120% 80% at 80% 0%, rgba(125, 147, 236, 0.18) 0%, transparent 60%),
        linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border);
    padding: 56px 0 64px;
    overflow: hidden;
}
.rec-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
    align-items: center;
}
.rec-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--btn-050);
    color: var(--btn);
    border-radius: var(--r-full);
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.rec-hero-title {
    margin: 14px 0 12px;
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--ink);
}
.rec-accent {
    background: linear-gradient(120deg, var(--btn) 0%, #2563eb 50%, #7d93ec 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.rec-hero-sub {
    margin: 0 0 24px;
    font-size: var(--t-lg);
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 56ch;
}
.rec-hero-actions {
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.rec-hero-actions .btn-lg { min-height: 52px; padding: 0 28px; }
.rec-hero-perks {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-wrap: wrap;
    gap: 8px 24px;
    color: var(--ink-2);
    font-size: var(--t-sm);
}
.rec-hero-perks li {
    display: inline-flex; align-items: center; gap: 6px;
}
.rec-hero-perks svg {
    width: 18px; height: 18px;
    color: #16a34a;
    flex: 0 0 auto;
}

/* Ilustración SVG inline a la derecha */
.rec-hero-illu {
    display: flex; justify-content: center; align-items: center;
}
.rec-hero-illu svg {
    width: 100%;
    max-width: 520px;
    height: auto;
}

/* ----- Stats / social proof ----- */
.rec-stats {
    background: var(--ink);
    color: #fff;
    padding: 32px 0;
}
.rec-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.rec-stat {
    display: flex; flex-direction: column; gap: 4px;
}
.rec-stat-n {
    font-size: var(--t-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #fff 0%, var(--btn-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.rec-stat-l {
    font-size: var(--t-sm);
    color: rgba(255, 255, 255, 0.75);
}

/* ----- Sección genérica (steps, features, cta) ----- */
.rec-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px;
}
.rec-section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.rec-section-head p {
    margin: 0;
    font-size: var(--t-lg);
}

/* ----- Hero X (encabezado azul del setup) -----
   Capas de fondo con blobs difuminados + estrellas + grid. Frase
   en una sola línea con entrada palabra por palabra, "clic"
   destacado debajo con shine animado, y dos iconos (maletín y CV)
   que intercambian posiciones en loop infinito.
   Los SVGs viven sobre el fondo con `mix-blend-mode: screen` para
   que se fundan con el azul en lugar de verse pegados encima. */
.rec-hero-x {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    padding: 64px 0 80px;
    background:
        /* Capa final: gradient base azul intenso */
        linear-gradient(135deg, #0a1d6b 0%, var(--btn) 45%, #1e3a8a 100%);
}
.rec-hero-x-bg {
    position: absolute; inset: 0; z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
/* Blobs difuminados (efecto bokeh) — flotan lentamente */
.rec-hero-x-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    will-change: transform;
}
.rec-hero-x-blob-1 {
    width: 420px; height: 420px;
    top: -120px; left: -100px;
    background: radial-gradient(circle, #7d93ec 0%, transparent 70%);
    animation: rec-hx-float 18s ease-in-out infinite;
}
.rec-hero-x-blob-2 {
    width: 360px; height: 360px;
    bottom: -140px; right: -80px;
    background: radial-gradient(circle, #2563eb 0%, transparent 70%);
    animation: rec-hx-float 22s ease-in-out -8s infinite;
}
.rec-hero-x-blob-3 {
    width: 280px; height: 280px;
    top: 30%; left: 55%;
    background: radial-gradient(circle, #4c6fff 0%, transparent 70%);
    opacity: 0.35;
    animation: rec-hx-float 26s ease-in-out -14s infinite;
}
@keyframes rec-hx-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 20px) scale(0.95); }
}
/* Estrellas sutiles con dos capas de tamaño */
.rec-hero-x-stars {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,255,255,.6) 1px, transparent 1.5px),
        radial-gradient(circle at 70% 40%, rgba(255,255,255,.4) 1px, transparent 1.5px),
        radial-gradient(circle at 30% 70%, rgba(255,255,255,.5) 1px, transparent 1.5px),
        radial-gradient(circle at 85% 80%, rgba(255,255,255,.45) 1px, transparent 1.5px),
        radial-gradient(circle at 50% 30%, rgba(255,255,255,.3) 0.8px, transparent 1.2px);
    background-size: 280px 220px, 320px 280px, 260px 240px, 360px 300px, 200px 180px;
    opacity: 0.75;
    animation: rec-hx-twinkle 6s ease-in-out infinite;
}
@keyframes rec-hx-twinkle {
    0%, 100% { opacity: 0.75; }
    50%      { opacity: 0.45; }
}
/* Grid muy sutil para textura tech */
.rec-hero-x-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

/* Iconos swap (maletín ↔ CV) */
.rec-hero-x-swap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, 80%);
    height: 110px;
    z-index: 1;
    pointer-events: none;
    /* mix-blend-mode hace que los blancos del SVG se fundan con el
       azul de fondo en vez de "pegarse" encima como una pegatina. */
    mix-blend-mode: screen;
    opacity: 0.85;
}
.rec-hero-x-icon {
    position: absolute;
    top: 50%;
    width: 84px; height: 84px;
    display: grid; place-items: center;
    transition: filter .3s var(--ease);
    filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.2));
    will-change: transform, left, right;
}
.rec-hero-x-icon svg { width: 100%; height: 100%; }
/* Recorrido sincronizado: a los 6s vuelve a la posición inicial.
   Cada icono pasa por encima del otro (z-index toggle) y rota
   ligeramente al cruzar. */
.rec-hero-x-icon-a {
    left: 0; transform: translateY(-50%);
    animation: rec-hx-swap-a 6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
    z-index: 2;
}
.rec-hero-x-icon-b {
    left: calc(100% - 84px); transform: translateY(-50%);
    animation: rec-hx-swap-b 6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
    z-index: 1;
}
@keyframes rec-hx-swap-a {
    0%   { left: 0;                  transform: translateY(-50%) rotate(0deg)   scale(1); }
    40%  { left: calc(100% - 84px);  transform: translateY(-90%) rotate(180deg) scale(0.9); }
    50%  { left: calc(100% - 84px);  transform: translateY(-50%) rotate(180deg) scale(1); }
    90%  { left: 0;                  transform: translateY(-10%) rotate(360deg) scale(0.9); }
    100% { left: 0;                  transform: translateY(-50%) rotate(360deg) scale(1); }
}
@keyframes rec-hx-swap-b {
    0%   { left: calc(100% - 84px);  transform: translateY(-50%) rotate(0deg)    scale(1); }
    40%  { left: 0;                  transform: translateY(-10%) rotate(-180deg) scale(0.9); }
    50%  { left: 0;                  transform: translateY(-50%) rotate(-180deg) scale(1); }
    90%  { left: calc(100% - 84px);  transform: translateY(-90%) rotate(-360deg) scale(0.9); }
    100% { left: calc(100% - 84px);  transform: translateY(-50%) rotate(-360deg) scale(1); }
}

/* Contenido (breadcrumb + texto) */
.rec-hero-x-inner {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 16px;
}
.rec-hero-x-crumb {
    justify-content: center;
    margin-bottom: 24px;
}
.rec-hero-x-crumb a,
.rec-hero-x-crumb span {
    color: rgba(255, 255, 255, 0.78);
}
.rec-hero-x-crumb a:hover { color: #fff; }

.rec-hero-x-title {
    margin: 0 0 18px;
    font-size: clamp(1.5rem, 4vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.30);
    color: #fff;
}
/* Frase principal en UNA SOLA LÍNEA. Cada palabra entra con stagger. */
.rec-hero-x-line {
    display: block;
    white-space: nowrap;
    /* Compactamos en pantallas pequeñas con clamp ya en .rec-hero-x-title */
}
.rec-hero-x-line > span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: rec-hx-word 0.6s var(--ease) forwards;
}
.rec-hero-x-line > span:nth-child(1) { animation-delay: 0.10s; }
.rec-hero-x-line > span:nth-child(2) { animation-delay: 0.18s; }
.rec-hero-x-line > span:nth-child(3) { animation-delay: 0.26s; }
.rec-hero-x-line > span:nth-child(4) { animation-delay: 0.34s; }
.rec-hero-x-line > span:nth-child(5) { animation-delay: 0.42s; }
.rec-hero-x-line > span:nth-child(6) { animation-delay: 0.50s; }
.rec-hero-x-line > span:nth-child(7) { animation-delay: 0.58s; }
.rec-hero-x-line > span + span { margin-left: 0.28em; }
@keyframes rec-hx-word {
    to { opacity: 1; transform: translateY(0); }
}

/* "clic" debajo, grande, con shine */
.rec-hero-x-clic {
    display: inline-block;
    position: relative;
    margin-top: 6px;
    padding: 8px 22px;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, var(--accent, #f59e0b) 0%, #fcd34d 50%, var(--accent, #f59e0b) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(20px) scale(0.92);
    animation:
        rec-hx-clic-in   0.7s 0.72s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        rec-hx-clic-grad 4s 2s linear infinite;
}
@keyframes rec-hx-clic-in {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rec-hx-clic-grad {
    from { background-position: 0%   50%; }
    to   { background-position: 200% 50%; }
}
.rec-hero-x-clic::after {
    /* Subrayado decorativo que se "dibuja" debajo */
    content: "";
    position: absolute;
    left: 22px; right: 22px;
    bottom: 4px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent 0%, var(--accent, #f59e0b) 50%, transparent 100%);
    transform-origin: center;
    transform: scaleX(0);
    animation: rec-hx-clic-line 0.6s 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes rec-hx-clic-line {
    to { transform: scaleX(1); }
}
/* Shine: barrido de luz que cruza el texto cada ~3.5s */
.rec-hero-x-clic-shine {
    position: absolute; inset: 0;
    background: linear-gradient(110deg,
        transparent 30%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    background-position: -100% 0;
    animation: rec-hx-shine 3.5s 2.5s linear infinite;
    pointer-events: none;
}
@keyframes rec-hx-shine {
    0%   { background-position: -100% 0; }
    60%  { background-position: 200% 0; }
    100% { background-position: 200% 0; }
}
/* Dot animado de "cursor" después de la palabra */
.rec-hero-x-clic-dot {
    display: inline-block;
    width: 12px; height: 12px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--accent, #f59e0b);
    vertical-align: 0.5em;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.8);
    animation: rec-hx-blink 1.2s ease-in-out 1.8s infinite;
    opacity: 0;
}
@keyframes rec-hx-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.3; transform: scale(0.85); }
}

.rec-hero-x-sub {
    max-width: 560px;
    margin: 18px auto 0;
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0;
    animation: rec-hx-sub 0.6s 1s var(--ease) forwards;
}
@keyframes rec-hx-sub {
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 760px) {
    .rec-hero-x { padding: 48px 0 56px; }
    .rec-hero-x-swap { width: 90%; height: 80px; }
    .rec-hero-x-icon { width: 56px; height: 56px; }
    @keyframes rec-hx-swap-a {
        0%   { left: 0;                  transform: translateY(-50%) rotate(0deg)   scale(1); }
        40%  { left: calc(100% - 56px);  transform: translateY(-90%) rotate(180deg) scale(0.9); }
        50%  { left: calc(100% - 56px);  transform: translateY(-50%) rotate(180deg) scale(1); }
        90%  { left: 0;                  transform: translateY(-10%) rotate(360deg) scale(0.9); }
        100% { left: 0;                  transform: translateY(-50%) rotate(360deg) scale(1); }
    }
    @keyframes rec-hx-swap-b {
        0%   { left: calc(100% - 56px);  transform: translateY(-50%) rotate(0deg)    scale(1); }
        40%  { left: 0;                  transform: translateY(-10%) rotate(-180deg) scale(0.9); }
        50%  { left: 0;                  transform: translateY(-50%) rotate(-180deg) scale(1); }
        90%  { left: calc(100% - 56px);  transform: translateY(-90%) rotate(-360deg) scale(0.9); }
        100% { left: calc(100% - 56px);  transform: translateY(-50%) rotate(-360deg) scale(1); }
    }
    /* En pantallas chicas la frase puede pasar a 2 líneas
       (mejor que truncar). Mantiene el espirit "todo en una línea"
       hasta donde el ancho lo permita. */
    .rec-hero-x-line { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    .rec-hero-x-blob,
    .rec-hero-x-stars,
    .rec-hero-x-icon-a,
    .rec-hero-x-icon-b,
    .rec-hero-x-line > span,
    .rec-hero-x-clic,
    .rec-hero-x-clic::after,
    .rec-hero-x-clic-shine,
    .rec-hero-x-clic-dot,
    .rec-hero-x-sub {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    /* Posiciones finales de los iconos (sin swap) */
    .rec-hero-x-icon-a { left: 0; }
    .rec-hero-x-icon-b { left: calc(100% - 84px); }
}

/* ----- Pasos FX (versión futurista animada) -----
   Layout: 3 cards centradas con número grande, icono y descripción.
   Efectos:
     · línea horizontal "circuito" conectando los 3 (animación de dash)
     · número con glow pulsante azul
     · gradient border en hover (conic gradient rotando)
     · entry fade-up con stagger
     · partículas/grid sutil en fondo
*/
.rec-steps-fx {
    position: relative;
    background:
        linear-gradient(180deg, var(--surface) 0%, var(--btn-050) 50%, var(--surface) 100%);
    padding: 80px 0;
    overflow: hidden;
    isolation: isolate;
}
.rec-steps-fx-bg {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(4, 23, 120, 0.12) 1.5px, transparent 2px),
        radial-gradient(circle at 78% 42%, rgba(125, 147, 236, 0.18) 1px, transparent 2px),
        radial-gradient(circle at 30% 80%, rgba(4, 23, 120, 0.10) 1px, transparent 2px),
        radial-gradient(circle at 90% 88%, rgba(125, 147, 236, 0.14) 1.5px, transparent 2px);
    background-size: 80px 80px, 60px 60px, 100px 100px, 70px 70px;
    pointer-events: none;
    z-index: 0;
}
.rec-section-head-light h2 { color: var(--ink); }
.rec-section-head-light p { color: var(--ink-2); }

.rec-steps-fx-list {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
    z-index: 1;
}
/* Línea conectora "circuito" entre los 3 pasos (desktop). */
.rec-steps-fx-list::before {
    content: "";
    position: absolute;
    top: 50px;
    left: calc(16.66% + 32px);
    right: calc(16.66% + 32px);
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--btn) 0,
        var(--btn) 8px,
        transparent 8px,
        transparent 16px
    );
    background-size: 200% 100%;
    z-index: 0;
    opacity: 0;
    animation:
        rec-line-in 0.8s 0.7s var(--ease) forwards,
        rec-line-flow 3s 1.5s linear infinite;
}
@keyframes rec-line-in {
    to { opacity: 0.55; }
}
@keyframes rec-line-flow {
    from { background-position: 0% 0%; }
    to   { background-position: 200% 0%; }
}

/* Card individual */
.rec-step-fx {
    position: relative;
    list-style: none;
    opacity: 0;
    transform: translateY(20px);
    animation: rec-step-in 0.6s var(--ease) forwards;
    animation-delay: var(--rec-delay, 0s);
}
@keyframes rec-step-in {
    to { opacity: 1; transform: translateY(0); }
}

.rec-step-fx-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 56px 28px 28px;
    text-align: center;
    height: 100%;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease),
                border-color .25s var(--ease);
}
.rec-step-fx-card::before {
    /* Gradient border que aparece en hover, rotando suavemente. */
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--r-lg);
    padding: 1px;
    background: conic-gradient(
        from 0deg,
        var(--btn) 0%,
        var(--btn-light) 25%,
        #2563eb 50%,
        var(--btn-light) 75%,
        var(--btn) 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity .3s var(--ease);
    animation: rec-border-spin 8s linear infinite;
    pointer-events: none;
}
.rec-step-fx-card:hover::before { opacity: 1; }
.rec-step-fx-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 4px 8px rgba(4, 23, 120, 0.05),
        0 24px 60px rgba(4, 23, 120, 0.18);
}
@keyframes rec-border-spin {
    to { transform: rotate(360deg); }
}

/* Número grande con glow */
.rec-step-fx-num {
    position: absolute;
    top: -28px; left: 50%;
    transform: translateX(-50%);
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--btn) 0%, var(--btn-light) 100%);
    color: #fff;
    z-index: 2;
}
.rec-step-fx-num-glow {
    position: absolute; inset: -8px;
    border-radius: 50%;
    background: var(--btn);
    opacity: 0.18;
    z-index: -1;
    animation: rec-num-pulse 2.4s ease-in-out infinite;
}
@keyframes rec-num-pulse {
    0%, 100% { transform: scale(1);   opacity: 0.18; }
    50%      { transform: scale(1.35); opacity: 0.05; }
}
.rec-step-fx-num-text {
    font-size: var(--t-xl);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* Icono del paso */
.rec-step-fx-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    background: var(--btn-050);
    color: var(--btn);
    border-radius: var(--r-md);
    transition: background .25s var(--ease), transform .25s var(--ease);
}
.rec-step-fx-ico svg { width: 30px; height: 30px; }
.rec-step-fx-card:hover .rec-step-fx-ico {
    background: var(--btn);
    color: #fff;
    transform: scale(1.06) rotate(-3deg);
}

/* Texto */
.rec-step-fx-card h3 {
    margin: 0 0 8px;
    font-size: var(--t-xl);
    letter-spacing: -0.01em;
    color: var(--ink);
}
.rec-step-fx-card p {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-2);
}

/* ----- Responsive (banner + steps-fx) ----- */
@media (max-width: 960px) {
    .rec-banner-inner { min-height: 280px; padding: 32px 16px; }
    .rec-banner-overlay { padding: 20px; }

    .rec-steps-fx { padding: 56px 0; }
    .rec-steps-fx-list {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    /* En mobile la línea conectora vertical en el lado izq. */
    .rec-steps-fx-list::before {
        top: 56px; bottom: 56px;
        left: 50%; right: auto;
        width: 2px; height: auto;
        background: repeating-linear-gradient(
            180deg,
            var(--btn) 0,
            var(--btn) 8px,
            transparent 8px,
            transparent 16px
        );
        background-size: 100% 200%;
    }
    @keyframes rec-line-flow {
        from { background-position: 0% 0%; }
        to   { background-position: 0% 200%; }
    }
}

@media (max-width: 540px) {
    .rec-banner { margin-top: 24px; }
    .rec-banner-overlay h2 { font-size: var(--t-xl); }
    .rec-step-fx-card { padding: 56px 20px 24px; }
}

/* `prefers-reduced-motion`: desactiva todas las animaciones del banner
   y de los steps para usuarios con sensibilidad al movimiento. */
@media (prefers-reduced-motion: reduce) {
    .rec-step-fx,
    .rec-step-fx-card,
    .rec-step-fx-card::before,
    .rec-step-fx-num-glow,
    .rec-step-fx-ico,
    .rec-steps-fx-list::before {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ----- Features ----- */
.rec-features {
    padding: 72px 0;
    background: var(--surface-2);
}
.rec-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.rec-feat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px;
    transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.rec-feat:hover {
    border-color: var(--btn-100);
    transform: translateY(-1px);
}
.rec-feat-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: var(--btn-050);
    color: var(--btn);
    border-radius: var(--r-sm);
    margin-bottom: 14px;
}
.rec-feat-ico svg { width: 22px; height: 22px; }
.rec-feat h3 {
    font-size: var(--t-lg);
    margin: 0 0 4px;
    color: var(--ink);
}
.rec-feat p {
    margin: 0;
    color: var(--ink-2);
    font-size: var(--t-sm);
    line-height: 1.5;
}

/* ============================================================
   CrearEmpleo — panel del reclutador para publicar/editar vacantes
   ============================================================ */
.ce-section { max-width: 1140px; }
.ce-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin: 4px 0 18px;
}
.ce-title {
    margin: 0;
    font-size: var(--t-2xl);
    letter-spacing: -0.02em;
}
.ce-autosave {
    transition: color .2s var(--ease);
}
.ce-autosave.is-saved { color: #16a34a; }

/* Layout: form + sidebar checklist */
.ce-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}
.ce-form  { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ce-side  {
    position: sticky;
    top: calc(var(--header-h, 64px) + 24px);
    display: flex; flex-direction: column; gap: 16px;
}
.ce-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px 22px;
}
.ce-h2 {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 14px;
    font-size: var(--t-lg);
    letter-spacing: -0.01em;
}
.ce-h2-ico {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: var(--btn-050);
    color: var(--btn);
    border-radius: var(--r-sm);
}
.ce-h2-ico svg { width: 18px; height: 18px; }
.ce-h3 { font-size: var(--t-base); margin: 0 0 8px; }

/* Chips de sueldo */
.ce-salary-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 14px;
}
.ce-chip {
    display: inline-flex; align-items: center;
    padding: 6px 14px;
    background: var(--surface);
    color: var(--ink-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-full);
    font-size: var(--t-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.ce-chip:hover { background: var(--surface-2); color: var(--ink); }
.ce-chip.is-on {
    background: var(--btn);
    color: #fff;
    border-color: var(--btn);
}
.ce-chip-alt {
    background: transparent;
    border-style: dashed;
}
.ce-chip-alt.is-on { background: var(--accent, #f59e0b); border-color: var(--accent, #f59e0b); }

/* Descripción */
.ce-desc-tools {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
.ce-desc-tools .btn { padding: 6px 12px; min-height: 32px; }
#ceDescCount {
    transition: color .2s var(--ease);
}
#ceDescCount.is-low { color: #b45309; font-weight: 600; }
#ceDescCount.is-ok  { color: #16a34a; }

/* Preguntas */
.ce-questions {
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 12px;
}
.ce-q-row {
    display: grid;
    grid-template-columns: 1fr 160px auto;
    gap: 10px; align-items: center;
}
.ce-q-req {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0; white-space: nowrap;
}

/* Acciones (sticky en mobile) */
.ce-actions {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 10px;
    padding-top: 14px;
}
.ce-shortcut {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 4px;
}
.ce-shortcut kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    color: var(--ink-2);
}
.btn.is-disabled-look {
    opacity: 0.65;
    /* No deshabilitamos el click — el server hace validación final.
       Solo damos pista visual de que faltan campos requeridos. */
}

/* Checklist sidebar */
.ce-checklist-card { padding: 18px 20px; }
.ce-checklist {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.ce-checklist li {
    display: flex; align-items: center; gap: 10px;
    font-size: var(--t-sm);
    color: var(--ink-2);
    transition: color .2s var(--ease);
}
.ce-checklist li.is-on {
    color: #16a34a;
    text-decoration: line-through;
    text-decoration-color: rgba(22, 163, 74, 0.4);
}
.ce-checklist li.ce-cl-opt { opacity: 0.7; }
.ce-cl-dot {
    flex: 0 0 auto;
    width: 16px; height: 16px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface);
    position: relative;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.ce-checklist li.is-on .ce-cl-dot {
    background: #16a34a;
    border-color: #16a34a;
}
.ce-checklist li.is-on .ce-cl-dot::after {
    content: "";
    position: absolute;
    left: 3px; top: 0;
    width: 4px; height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ce-progress {
    margin-top: 14px;
    height: 6px;
    background: var(--surface-2);
    border-radius: var(--r-full);
    overflow: hidden;
}
.ce-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--btn) 0%, #16a34a 100%);
    border-radius: var(--r-full);
    transition: width .3s var(--ease);
}

/* Tips */
.ce-tips-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.ce-tips-list li {
    position: relative;
    padding-left: 18px;
    font-size: var(--t-sm);
    color: var(--ink-2);
    line-height: 1.45;
}
.ce-tips-list li::before {
    content: "→";
    position: absolute;
    left: 0; top: 0;
    color: var(--btn);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 960px) {
    .ce-grid { grid-template-columns: 1fr; }
    .ce-side { position: static; }
    .ce-q-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 540px) {
    .ce-card { padding: 16px; }
    .ce-h2 { font-size: var(--t-base); }
    .ce-h2-ico { width: 28px; height: 28px; }
    .ce-h2-ico svg { width: 15px; height: 15px; }
    .ce-shortcut { display: none; }

    /* Acciones sticky al pie en mobile para que el CTA esté siempre visible */
    .ce-actions {
        position: sticky;
        bottom: 0;
        background: var(--surface);
        border-top: 1px solid var(--border);
        margin: 0 -16px -16px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
        box-shadow: 0 -8px 24px rgba(24, 24, 27, 0.08);
        z-index: 10;
    }
    .ce-actions .btn { flex: 1 1 auto; }
}

/* ----- Registro inline empresa (form) ----- */
.rec-reg {
    padding: 64px 0;
    background: linear-gradient(180deg, var(--surface) 0%, var(--btn-050) 100%);
}
.rec-reg-shell {
    max-width: 760px;
}
.rec-reg-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow:
        0 2px 4px rgba(24, 24, 27, 0.04),
        0 14px 36px rgba(24, 24, 27, 0.06);
}
.rec-reg-h {
    margin: 18px 0 12px;
    font-size: var(--t-sm);
    font-weight: 700;
    color: var(--btn);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}
.rec-reg-h:first-child { margin-top: 0; }
/* Honeypot anti-bot: invisible para humanos, accesible para parsers. */
.rec-reg-hp {
    position: absolute !important;
    left: -9999px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none;
}

@media (max-width: 540px) {
    .rec-reg { padding: 40px 0; }
    .rec-reg-card { padding: 20px; }
}

/* ----- CTA final ----- */
.rec-cta {
    padding: 56px 0 72px;
    background: var(--surface);
}
.rec-cta-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 32px;
    padding: 40px 48px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, var(--btn) 100%);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 60px rgba(4, 23, 120, 0.22);
}
.rec-cta-card h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 8px;
    color: #fff;
    letter-spacing: -0.01em;
}
.rec-cta-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--t-base);
}

/* ----- (legado) Hero del setup viejo — reemplazado por .rec-hero-x ----- */

/* ----- Responsive ----- */
@media (max-width: 960px) {
    .rec-hero { padding: 36px 0 40px; }
    .rec-hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .rec-hero-illu { order: -1; }    /* en mobile, ilustración arriba */
    .rec-hero-illu svg { max-width: 360px; }

    .rec-stats-grid { grid-template-columns: repeat(2, 1fr); }

    .rec-steps,
    .rec-features { padding: 48px 0; }

    .rec-steps-list { grid-template-columns: 1fr; gap: 32px; }
    .rec-features-grid { grid-template-columns: repeat(2, 1fr); }

    .rec-cta-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 32px 24px;
    }
    .rec-cta-card .btn { justify-self: center; }
}

@media (max-width: 540px) {
    .rec-hero-title { font-size: clamp(1.75rem, 7vw, 2.25rem); }
    .rec-hero-sub { font-size: var(--t-base); }
    .rec-hero-actions { flex-direction: column; align-items: stretch; }
    .rec-hero-actions .btn { width: 100%; }
    .rec-hero-perks { flex-direction: column; gap: 6px; }

    .rec-stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .rec-stat-n { font-size: var(--t-2xl); }

    .rec-features-grid { grid-template-columns: 1fr; }
    .rec-step { padding: 28px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .rec-step, .rec-feat, .rec-cta-card { transition: none; }
}

/* ============================================================
   SKELETON SCREENS — mejora la percepción de carga
   ============================================================
   Aplican mientras una imagen aún no terminó de cargar (la red
   tarda, no el server). Cuando el `onload` se dispara, el JS
   añade `data-loaded="1"` y el shimmer desaparece con un fade.
   Patrón usado por LinkedIn, YouTube, Indeed. */

/* Versión 2: el shimmer va en un PSEUDO ::after del contenedor
   (.listing-photo / .cat-cover), NO en el <img> mismo. La versión
   anterior aplicaba `opacity: 0.001` al img para ocultarlo mientras
   cargaba, pero eso también ocultaba SU PROPIO background (donde
   estaba el shimmer) → se veía como cero efecto.

   Ahora el shimmer es una capa propia detrás del img. El JS marca
   `.is-loaded` en el padre cuando la imagen carga → shimmer hace
   fade-out, el img hace fade-in. */

.skel-shimmer {
    background: linear-gradient(
        90deg,
        var(--surface-2) 0%,
        #e3e7f0 50%,
        var(--surface-2) 100%
    );
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s linear infinite;
}

/* Skeleton ÚNICAMENTE para .listing-photo. Las categorías (.cat-cover) no
   cargan imágenes remotas — son SVG inline — así que poner shimmer ahí
   era una animación infinita desperdiciada (CPU/GPU) que el usuario nunca
   vería terminar. Las categorías conservan su gradient azul original
   definido en su bloque (línea ~1612). */
.listing-photo {
    position: relative;
    overflow: hidden;
}

/* Capa de shimmer en ::after — visible mientras no .is-loaded. */
.listing-photo::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(
        90deg,
        var(--surface-2) 0%,
        #e3e7f0 50%,
        var(--surface-2) 100%
    );
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s linear infinite;
    z-index: 0;
    pointer-events: none;
    transition: opacity .35s ease-out;
}
.listing-photo.is-loaded::after {
    opacity: 0;
    /* Cuando ya cargó, también detenemos la animación — no hay que
       gastar GPU pintando un gradient invisible. */
    animation: none;
}

/* Las imágenes empiezan invisibles y aparecen con fade cuando el padre
   recibe .is-loaded (vía JS al disparar onload del <img>). Cuando está
   dentro de <picture>, su padre directo es <picture>, no .listing-photo
   — por eso usamos descendant ` ` en vez de hijo directo `>`. */
.listing-photo .listing-img {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity .35s ease-out;
}
.listing-photo.is-loaded .listing-img { opacity: 1; }

/* <picture> propio: que ocupe el espacio (height 100% del contenedor). */
.listing-photo picture {
    position: relative; z-index: 1;
    display: block;
    width: 100%; height: 100%;
}

/* Las badges (categoría, premium) siempre encima del shimmer y la imagen. */
.listing-photo > .badge,
.listing-photo > [class*="badge"] { z-index: 3; }

@keyframes skel-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* Skeleton placeholder shells — útiles si en el futuro se carga
   contenido vía AJAX. Diseñados para "ocupar el espacio" del
   listado mientras los datos llegan. */
.skel-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.skel-listing {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.skel-listing-photo {
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    animation: skel-shimmer 1.4s linear infinite;
}
.skel-listing-body { padding: 12px 14px; }
.skel-line {
    height: 10px;
    margin: 6px 0;
    background: var(--surface-2);
    border-radius: 4px;
    animation: skel-shimmer 1.4s linear infinite;
}
.skel-line.w70 { width: 70%; }
.skel-line.w50 { width: 50%; }
.skel-line.w90 { width: 90%; }

/* ============================================================
   TOP PROGRESS BAR — barra de carga al navegar
   ============================================================
   Aparece arriba al hacer click en un link interno. Da feedback
   inmediato de que algo está pasando, mientras el browser hace
   la nueva request. Se quita en pagehide/unload. */

.cmx-progress {
    position: fixed; top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--btn) 0%, #2563eb 50%, var(--btn-light) 100%);
    box-shadow: 0 0 12px var(--btn);
    z-index: 9999;
    pointer-events: none;
    transition: width .35s cubic-bezier(0.65, 0, 0.35, 1), opacity .25s ease-out;
    opacity: 0;
}
.cmx-progress.is-on  { opacity: 1; }
.cmx-progress.is-done { width: 100% !important; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    img[data-skel],
    .skel-shimmer,
    .skel-listing-photo,
    .skel-line,
    .cmx-progress { animation: none !important; }
}

/* ============================================================
   Listado (infinite scroll) — Listado.aspx
   ============================================================ */
.list-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 18px; flex-wrap: wrap;
    margin: 0 0 22px;
}
.list-title {
    margin: 0;
    font-size: var(--t-2xl);
    letter-spacing: -0.02em;
}
/* Buscador del Listado — UNA sola pieza visual.
   Estructura: [icon | input | button] sin paddings entre ellos. El container
   tiene border-radius + overflow:hidden, así el botón hereda las esquinas
   redondeadas del lado derecho. align-items:stretch hace que icono, input y
   botón ocupen la MISMA altura. */
.list-search {
    display: flex; align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    overflow: hidden;          /* recorta el botón a la pill */
    box-shadow:
        0 1px 2px rgba(24, 24, 27, 0.05),
        0 6px 18px rgba(24, 24, 27, 0.06);
    min-width: 340px; max-width: 540px;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.list-search:hover {
    box-shadow:
        0 1px 2px rgba(24, 24, 27, 0.06),
        0 12px 30px rgba(24, 24, 27, 0.10);
}
.list-search:focus-within {
    border-color: var(--btn);
    box-shadow:
        0 0 0 4px rgba(4, 23, 120, 0.14),
        0 12px 30px rgba(24, 24, 27, 0.10);
}
.list-search-ico {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    padding-left: 20px;
    padding-right: 10px;
    color: var(--ink-2);
    transition: color .15s var(--ease);
}
.list-search-ico svg { width: 20px; height: 20px; }
.list-search:focus-within .list-search-ico { color: var(--btn); }

.list-search input[type="search"] {
    flex: 1 1 auto; min-width: 0; width: 100%;
    border: 0; outline: none; background: transparent;
    padding: 14px 4px;
    font: inherit; font-size: var(--t-base); color: var(--ink);
    height: auto;
    line-height: 1.3;
}
.list-search input[type="search"]::placeholder {
    color: var(--ink-2); opacity: .55;
}
/* Quita la X nativa de Chrome en type=search (rompe el look pill). */
.list-search input[type="search"]::-webkit-search-decoration,
.list-search input[type="search"]::-webkit-search-cancel-button,
.list-search input[type="search"]::-webkit-search-results-button,
.list-search input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.list-search-btn {
    flex: 0 0 auto;
    padding: 0 28px;
    background: var(--btn);
    color: #fff;
    border: 0;
    border-radius: 0;          /* hereda las esquinas del container vía overflow:hidden */
    font: inherit;
    font-weight: 600;
    font-size: var(--t-sm);
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    gap: 6px;
    transition: background .15s var(--ease);
}
.list-search-btn:hover  { background: var(--btn-hover); }
.list-search-btn:active { background: #0a1d6b; }
.list-search-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}
.list-search-btn svg { width: 16px; height: 16px; }

/* Mobile: full-width. */
@media (max-width: 640px) {
    .list-search { min-width: 100%; max-width: 100%; }
    .list-search-ico { padding-left: 14px; padding-right: 8px; }
    .list-search-btn { padding: 0 18px; }
}

/* CTA "Ver todo" debajo de los 12 destacados de la home */
.list-verall {
    text-align: center;
    margin: 24px 0 0;
}
.list-verall .btn { min-width: 220px; }

/* Sentinel + estados del infinite scroll */
.list-sentinel {
    min-height: 80px;
    margin: 24px 0 12px;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
}
.list-spinner,
.list-done,
.list-error {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--ink-2);
    font-size: var(--t-sm);
    margin: 0;
}
.list-spinner[hidden],
.list-done[hidden],
.list-error[hidden] { display: none; }

/* Spinner — gira con SVG inline */
.list-spinner svg {
    width: 28px; height: 28px;
    color: var(--btn);
    animation: list-spin 1s linear infinite;
    transform-origin: center;
}
@keyframes list-spin {
    to { transform: rotate(360deg); }
}

.list-done {
    color: var(--ink);
    font-weight: 600;
}
.list-done svg {
    width: 18px; height: 18px;
    color: #16a34a;
}

.list-error {
    color: #b91c1c;
}
.list-error svg { width: 18px; height: 18px; }
.list-error button {
    background: transparent; border: 0; padding: 0;
    color: var(--btn); cursor: pointer; text-decoration: underline;
    font: inherit;
}
.list-error button:hover { color: var(--btn-hover); }

@media (prefers-reduced-motion: reduce) {
    .list-spinner svg { animation: none; }
}

@media (max-width: 540px) {
    .list-head { gap: 12px; }
    .list-title { font-size: var(--t-xl); }
    .list-search { min-width: 100%; flex: 1 1 100%; }
}

/* Carrusel de categorías en Listado.aspx — chips horizontales */
.list-cats {
    display: flex; flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    margin: 0 0 18px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.list-cats::-webkit-scrollbar { height: 6px; }
.list-cats::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.list-cat {
    flex: 0 0 auto;
    display: inline-flex; align-items: center;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-full);
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
    white-space: nowrap;
}
.list-cat:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.list-cat.is-active {
    background: var(--btn); color: #fff;
    border-color: var(--btn);
}

/* ----- Admin · Grid de Publicaciones (buscador + filtros + cards) -----
   Misma fuente de datos y mismas acciones que la lista anterior; lo único
   que cambia es el layout (vertical-list → responsive grid) y la toolbar
   con búsqueda libre + categoría. Chips de estado heredan estilo de .chip. */

.pubs-toolbar {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin: 0 0 12px;
}
.pubs-search { flex: 1; min-width: 220px; max-width: 480px; }
.pubs-cat { min-width: 200px; }
.pubs-count { margin-left: auto; }

.pubs-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 0 0 16px;
}
.pubs-chips .chip {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--t-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.pubs-chips .chip:hover { background: var(--surface-2); color: var(--ink); }
.pubs-chips .chip.is-active {
    background: var(--btn); color: #fff; border-color: var(--btn);
}

.pubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.pub-card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.pub-card:hover {
    box-shadow:
        0 1px 2px rgba(24, 24, 27, 0.06),
        0 12px 28px rgba(24, 24, 27, 0.10);
}

.pub-photo {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-2);
}
.pub-photo img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .25s var(--ease);
}
.pub-card:hover .pub-photo img { transform: scale(1.03); }

.pub-cat {
    position: absolute; top: 8px; left: 8px;
    padding: 4px 10px;
    background: rgba(255,255,255,.92);
    color: var(--ink);
    font-size: var(--t-xs); font-weight: 700;
    border-radius: var(--r-full);
    box-shadow: 0 1px 2px rgba(24, 24, 27, 0.10);
}

.pub-badge {
    position: absolute; top: 8px; right: 8px;
    padding: 4px 10px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--t-xs); font-weight: 700;
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(24, 24, 27, 0.10);
}
.pub-badge.ok   { background: #ecfdf5; color: var(--success); border-color: #a7f3d0; }
.pub-badge.warn { background: #fffbeb; color: #b45309;       border-color: #fde68a; }
.pub-badge.muted{ background: var(--surface-2); color: var(--ink-2); }

.pub-body {
    flex: 1 1 auto;
    padding: 12px 14px 8px;
    display: flex; flex-direction: column; gap: 6px;
}
.pub-title {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    line-height: 1.3;
    /* Trunca a 2 líneas para mantener cards de altura consistente */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.3em * 2);
}
.pub-title:hover { color: var(--btn); text-decoration: underline; }
.pub-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    color: var(--ink-2);
    font-size: var(--t-xs);
}
.pub-meta .dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--ink-2); opacity: .55;
    display: inline-block;
}

.pub-actions {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 10px 14px 14px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.pub-actions .btn { flex: 1 1 auto; min-width: 80px; }

@media (max-width: 480px) {
    .pubs-grid { grid-template-columns: 1fr; }
    .pubs-toolbar > .pubs-count { margin-left: 0; flex-basis: 100%; }
}
