@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/noto-sans-latin-ext-400.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/noto-sans-latin-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/noto-sans-latin-ext-600.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/noto-sans-latin-600.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/noto-sans-latin-ext-700.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/noto-sans-latin-700.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root { color-scheme: light; }

html[data-tema="institucional"] {
    --primary: #7F2841;
    --primary-dark: #612233;
    --accent: #B69664;
    --accent-deep: #923244;
    --neutral: #4b4f54;
    --ink: #161616;
    --muted: #4b4f54;
    --canvas: #ffffff;
    --surface: #ffffff;
    --line: #e3e3e3;
    --header: #612233;
    --soft: #f6f6f6;
    --chip: #f3f3f3;
    --focus: #B69664;
}

html[data-tema="gris"] {
    --primary: #4b4f54;
    --primary-dark: #2e3134;
    --accent: #8b9096;
    --accent-deep: #5e6368;
    --neutral: #4b4f54;
    --ink: #161616;
    --muted: #5c6166;
    --canvas: #ffffff;
    --surface: #ffffff;
    --line: #e3e3e3;
    --header: #3a3e42;
    --soft: #f4f4f5;
    --chip: #eceeef;
    --focus: #2e3134;
}

* { box-sizing: border-box; }

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
    background: var(--canvas);
    color: var(--ink);
    font-family: "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

a { color: var(--primary); }

.saltar {
    position: absolute;
    left: 0.75rem;
    top: -3rem;
    background: #fff;
    color: var(--ink);
    padding: 0.45rem 0.7rem;
    z-index: 5;
}

.saltar:focus { top: 0.75rem; }

.contenedor {
    width: min(1240px, calc(100% - 3rem));
    margin-inline: auto;
}

.barra {
    --corte: round(nearest, max(18rem, calc(50% + min(1240px, 100% - 3rem) / 2 - 36rem - 1.15rem)), 1px);
    --curva: 240px;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    background: var(--header);
    border-bottom: 0;
}

.barra-oro {
    position: absolute;
    z-index: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 150px;
    overflow: visible;
    pointer-events: none;
}

.barra-oro-mover {
    transform: translateX(var(--corte));
}

.barra-forma-relleno { fill: var(--header); }

.barra-curva-oro {
    fill: none;
    stroke: var(--accent);
    stroke-width: var(--oro, 3px);
    stroke-linecap: butt;
    stroke-linejoin: round;
    shape-rendering: geometricPrecision;
}

.barra-franja {
    position: relative;
    z-index: 1;
    height: 50px;
    background: var(--header);
}

.barra-interna {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 100%;
    padding: 0;
}

.marca {
    position: absolute;
    z-index: 2;
    left: calc((var(--corte) - var(--curva)) / 2);
    top: 0.7rem;
    line-height: 0;
    transform: translateX(-50%);
}

.logo {
    display: block;
    width: auto;
}

.logo-cabecera {
    height: 116px;
    opacity: 0.92;
}

html[data-tema="gris"] .logo {
    filter: grayscale(1) contrast(1.05);
}

.barra-titulo {
    margin: 0;
    flex: 1 1 auto;
    color: #fff;
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.1;
    text-align: right;
}

.barra-titulo a {
    color: #fff;
    text-decoration: none;
}

.hero {
    position: relative;
    flex: 0 0 auto;
    background: transparent;
    padding: 0.75rem 0 0.35rem;
}

.busqueda {
    max-width: 36rem;
    margin-left: auto;
}

.busqueda label {
    display: block;
    margin: 0.4rem 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 400;
    text-align: right;
}

.busqueda-controles {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.4rem 0.4rem 1.2rem;
}

input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 1.05rem;
    padding: 0.65rem 0;
}

input[type="search"]:focus { outline: none; }

.busqueda-controles:focus-within {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.busqueda button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 999px;
    background: var(--primary-dark);
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 0.78rem 1.15rem;
    cursor: pointer;
}

.busqueda button:hover { background: var(--primary); }

.icono-buscar {
    width: 1.15rem;
    height: 1.15rem;
}

.limpiar {
    display: block;
    margin-top: 0.35rem;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: right;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.pagina {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 0.45rem 0 0.75rem;
}

.aviso,
.vacio {
    background: transparent;
}

.aviso {
    margin-bottom: 1rem;
    padding: 0.15rem 0 0.15rem 0.9rem;
    border-left: 3px solid var(--accent);
}

.aviso p { margin: 0; }

.aviso p + p { margin-top: 0.35rem; }

.aviso-error { border-left-color: var(--accent-deep); }

.resumen {
    flex: 0 0 auto;
    margin: 0 0 0.65rem;
    color: var(--muted);
    font-weight: 600;
}

.vacio {
    margin: 0;
    color: var(--muted);
}

.tabla-marco {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--surface);
}

.tabla-marco:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.padron {
    width: 100%;
    min-width: 58rem;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #fff;
}

.padron th,
.padron td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.padron thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--soft);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: inset 0 -1px 0 var(--line);
}

.padron thead th:nth-child(1) { width: 26%; }

.padron thead th:nth-child(2) { width: 22%; }

.padron thead th:nth-child(3) { width: 13rem; }

.padron tbody th,
.padron tbody td {
    color: var(--neutral);
}

.padron tbody th {
    width: 24%;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.padron tbody tr:hover th,
.padron tbody tr:hover td {
    background: var(--soft);
}

.rfc {
    width: 12rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.actividades {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.actividades li {
    position: relative;
    margin: 0;
    padding: 0.12rem 0 0.12rem 0.8rem;
}

.actividades li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.sin-actividad {
    grid-column: 1 / -1;
    color: var(--muted);
    font-style: italic;
}

.sin-actividad::before { background: var(--line); }

.pie {
    flex: 0 0 auto;
    background: var(--soft);
}

.paginacion {
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.65rem;
}

.paginacion a,
.pagina-inactiva,
.pagina-actual {
    padding: 0.45rem 0.9rem;
}

.paginacion a {
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

.paginacion a:hover { background: var(--primary-dark); }

.pagina-inactiva { color: #8a8a8a; }

.pagina-actual {
    color: var(--muted);
    font-weight: 600;
}

.pie-cuerpo {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 1.5rem;
    padding: 2rem 0 1.6rem;
}

.pie h2 {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
}

.pie ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pie li + li { margin-top: 0.35rem; }

.pie a { font-weight: 700; }

.pie-cuerpo p { margin: 0.55rem 0 0; }

.logo-pie { height: 58px; }

.pie-base {
    height: 2.75rem;
    background: var(--header);
}

@media (max-width: 980px) {
    .barra { border-bottom: 3px solid var(--accent); }

    .barra-relleno,
    .barra-curva,
    .barra-oro,
    .barra-oro-base,
    .barra-franja::after { display: none; }

    .barra-franja { height: auto; background: transparent; }

    .barra-interna { padding: 0.35rem 0; }

    .marca { position: static; transform: none; }

    .logo-cabecera { height: 48px; }

    .hero { padding: 1rem 0 0.45rem; }
}

@media (max-width: 760px) {
    .barra {
        border-bottom: 3px solid var(--accent);
    }

    .barra-relleno,
    .barra-curva,
    .barra-oro,
    .barra-oro-base,
    .barra-franja::after { display: none; }

    .barra-franja { height: auto; background: transparent; }

    .barra-interna {
        gap: 0.85rem;
        min-height: 0;
        padding: 0.4rem 0;
    }

    .marca { position: static; transform: none; }

    .logo-cabecera { height: 36px; }

    .barra-titulo { font-size: 0.95rem; }

    .hero { padding: 1rem 0; }

    .busqueda { max-width: none; }

    .busqueda button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .busqueda button { padding: 0.78rem; }

    .pie-cuerpo {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 0.85rem;
        row-gap: 0.2rem;
        align-items: center;
        padding: 0.55rem 0 0.5rem;
    }

    .pie-marca {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .logo-pie { height: 36px; }

    .pie-enlaces {
        display: flex;
        flex-wrap: wrap;
        grid-column: 2;
        grid-row: 1;
        align-items: baseline;
        gap: 0.2rem 0.55rem;
    }

    .pie-padron { grid-column: 2; grid-row: 2; }

    .pie h2 { margin: 0; font-size: 0.82rem; }

    .pie-padron p {
        margin: 0;
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .padron tbody th { font-size: 0.95rem; }
}

@media print {
    html,
    body {
        height: auto;
        overflow: visible;
    }

    body,
    main,
    .pagina { display: block; }

    .tabla-marco { overflow: visible; }

    .padron {
        min-width: 0;
    }

    .padron thead th { position: static; }

    .saltar, .busqueda, .paginacion { display: none; }

    .barra-relleno,
    .barra-curva,
    .barra-oro,
    .barra-oro-base,
    .barra-franja::after { display: none; }

    .marca { position: static; transform: none; }

    .logo-cabecera {
        height: 48px;
        opacity: 1;
        filter: brightness(0);
    }

    .barra, .hero, .pie-base {
        background: #fff;
        color: #000;
    }

    .padron tr { break-inside: avoid; }

    .hero::after { display: none; }

    .aviso { break-inside: avoid; box-shadow: none; }
}
