:root {
    --bg: #f5f7fb;
    --ink: #111827;
    --muted: #5b6472;
    --line: #d9e0ea;
    --brand: #0c7a5b;
    --brand-strong: #096447;
    --panel: #ffffff;
    --accent: #e7b14a;
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #eef4f2;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.background-cover {
    position: fixed;
    inset: -26px;
    background-image: url("../../img/capa-fundo.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(8px);
    opacity: .48;
    transform: scale(1.04);
    transform-origin: center;
    pointer-events: none;
    z-index: 0;
    animation: cover-breathe 16s ease-in-out infinite alternate;
}

.background-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245, 247, 251, .68) 0%, rgba(238, 244, 242, .62) 52%, rgba(248, 240, 223, .72) 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: min(52vw, 520px);
    aspect-ratio: 1;
    border-radius: 999px;
    pointer-events: none;
    z-index: 1;
    opacity: .16;
    filter: blur(34px);
    animation: soft-drift 18s ease-in-out infinite alternate;
}

body::before {
    left: -160px;
    top: 16%;
    background: radial-gradient(circle, rgba(12, 122, 91, .28), rgba(12, 122, 91, 0) 68%);
}

body::after {
    right: -180px;
    bottom: 8%;
    background: radial-gradient(circle, rgba(231, 177, 74, .28), rgba(231, 177, 74, 0) 70%);
    animation-delay: -7s;
}

@keyframes soft-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(34px, -28px, 0) scale(1.08);
    }
}

@keyframes cover-breathe {
    from {
        transform: scale(1.04) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.08) translate3d(12px, -10px, 0);
    }
}

.page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    position: relative;
    z-index: 2;
}

.hero {
    width: min(760px, 100%);
    display: block;
    align-items: center;
    text-align: center;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(58px, 9vw, 108px);
    line-height: 1;
    letter-spacing: 0;
    color: #07111f;
    font-weight: 800;
    text-shadow: 0 2px 18px rgba(255, 255, 255, .48);
}

.title-main {
    color: #d59a24;
}

.title-tv {
    color: #007a5a;
}

.eyebrow {
    margin: 0 0 16px;
    color: #006c4d;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 15px;
    text-shadow: 0 1px 12px rgba(255, 255, 255, .55);
}

.lead {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    color: #314056;
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.5;
    font-weight: 600;
    text-shadow: 0 1px 14px rgba(255, 255, 255, .65);
}

.lead span {
    color: #007a5a;
    font-weight: 800;
}

.lead strong {
    color: #0a875f;
    font-weight: 800;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 34px;
}

.button {
    border: 0;
    border-radius: 12px;
    min-height: 62px;
    min-width: 190px;
    padding: 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .01em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease, filter .18s ease;
}

.button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .28) 45%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.button:hover {
    transform: translateY(-3px) scale(1.02);
}

.button:hover::before {
    transform: translateX(120%);
}

.button:active {
    transform: translateY(0) scale(.98);
}

.button-primary,
.button-submit.is-ready {
    background: linear-gradient(135deg, #07835f 0%, #0caf7d 100%);
    color: #fff;
    box-shadow: 0 16px 32px rgba(12, 122, 91, .32), 0 0 0 1px rgba(255, 255, 255, .18) inset;
}

.button-primary:hover,
.button-submit.is-ready:hover {
    background: linear-gradient(135deg, #069269 0%, #13c991 100%);
    box-shadow: 0 20px 42px rgba(12, 122, 91, .42), 0 0 0 1px rgba(255, 255, 255, .28) inset;
}

.button-secondary {
    background: linear-gradient(135deg, #0f172a 0%, #18233a 100%);
    color: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .32), 0 0 0 1px rgba(255, 255, 255, .14) inset;
}

.button-secondary:hover {
    background: linear-gradient(135deg, #111d36 0%, #263653 100%);
    box-shadow: 0 20px 42px rgba(15, 23, 42, .42), 0 0 0 1px rgba(255, 255, 255, .24) inset;
}

.button-submit {
    width: 100%;
    margin-top: 12px;
    background: #aeb6c2;
    color: #fff;
}

.button-submit:disabled {
    cursor: not-allowed;
    transform: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .62);
    display: grid;
    place-items: center;
    padding: 18px;
    z-index: 10;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal {
    width: min(430px, 100%);
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    position: relative;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.modal h2 {
    margin: 0 0 18px;
}

.modal-close {
    position: absolute;
    right: 14px;
    top: 12px;
    border: 0;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin: 12px 0 6px;
}

input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 16px;
}

input:focus {
    outline: 3px solid rgba(12, 122, 91, .18);
    border-color: var(--brand);
}

.form-message {
    min-height: 22px;
    color: var(--muted);
    font-size: 14px;
}

.field-help {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.modal-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .page-shell {
        place-items: center;
        padding: 28px 18px;
    }

    .hero {
        grid-template-columns: 1fr;
        max-width: 430px;
        gap: 22px;
        text-align: center;
    }

    .hero-copy h1 {
        font-size: clamp(46px, 14vw, 62px);
    }

    .eyebrow {
        justify-content: center;
        margin-bottom: 14px;
    }

    .lead {
        margin-left: auto;
        margin-right: auto;
        font-size: clamp(20px, 6vw, 24px);
    }

    .actions {
        margin-top: 28px;
        gap: 12px;
    }

    .actions .button {
        width: 100%;
        min-width: 0;
        min-height: 58px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .background-cover,
    body::before,
    body::after {
        animation: none;
    }
}

.admin-page {
    background: #f4f6f8;
}

.login-box {
    width: min(420px, calc(100% - 32px));
    margin: 9vh auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 16px 42px rgba(17, 24, 39, .08);
}

.login-box h1 {
    margin: 0 0 18px;
}

.full {
    width: 100%;
    margin-top: 18px;
}

.small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.alert {
    background: #fff1f1;
    border: 1px solid #ffc9c9;
    color: #8a1f1f;
    border-radius: 8px;
    padding: 10px 12px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.admin-header div,
.admin-header nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-header span {
    color: var(--muted);
}

.admin-main {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.stats-grid div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stats-grid span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.stats-grid strong {
    font-size: 28px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
}

.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    background: #f9fafb;
    font-size: 13px;
    color: #374151;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
}

.pagination a {
    color: var(--brand);
    font-weight: 700;
}

@media (max-width: 760px) {
    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid,
    .filters {
        grid-template-columns: 1fr;
    }
}
