:root {
    --bg: #f5f7fa;
    --panel: #fff;
    --ink: #172b45;
    --muted: #596b80;
    --line: #dce3ec;
    --accent: #245bb5;
    --radius: 12px;
    --shadow: 0 5px 22px #10294408;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 110px; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
img, video { max-width: 100%; }
img { display: block; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(2rem, 3.5vw, 3.6rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.35rem, 2vw, 1.9rem); letter-spacing: -.025em; }
h3 { font-size: 1.2rem; }
:focus-visible { outline: 3px solid #3a80dd; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 200; padding: 12px 20px; background: #fff; color: #172b45; border: 2px solid #245bb5; }
.skip:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 50; min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 14px 4%; background: #102338; border-bottom: 1px solid #ffffff20; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-size: 1.35rem; font-weight: 750; letter-spacing: .035em; min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.brand span { overflow-wrap: anywhere; max-width: 220px; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: #d8e3ef; font-size: .85rem; text-decoration: none; white-space: nowrap; padding: 10px 0; }
.site-nav a:hover, .site-nav a[aria-current] { color: #f0d299; }
.site-nav .account-link { border: 1px solid #d8bd884d; border-radius: 6px; padding: 9px 16px; color: #f0d299; }
.menu-toggle { display: none; color: #fff; background: transparent; border: 1px solid #90a8c2; border-radius: 6px; padding: 10px 14px; min-height: 44px; }
.site-footer { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; padding: 46px 6%; background: #102338; color: #bfccdc; border-top: 1px solid #ffffff18; }
.site-footer p { font-size: .9rem; }
.site-footer a { color: #e4c996; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 18px 0; font-size: .85rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 21px; background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: 7px; text-decoration: none; font-weight: 650; font-size: .94rem; line-height: 1.4; cursor: pointer; }
.button:hover { background: #19478f; text-decoration: none; }
.button:disabled { opacity: .65; cursor: wait; }
.button.secondary { color: var(--accent); background: transparent; border-color: #9fb7d8; }
.button.secondary:hover { background: #eaf0fa; }
.button.danger { background: #fff0f0; color: #9d2635; border-color: #e5b7bf; }
.button.danger:hover { background: #f9dce0; }
.button.compact { font-size: .82rem; min-height: 40px; padding: 9px 14px; }
.full-width { width: 100%; }
.actions, .form-actions, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.actions { margin-top: 26px; }
.form-actions { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.row-actions { gap: 10px; font-size: .85rem; }
.surface, .form, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.eyebrow { font-size: .7rem; line-height: 1.5; text-transform: uppercase; letter-spacing: .14em; font-weight: 750; color: var(--accent); margin-bottom: 14px; }
.muted, .small, small { color: var(--muted); }
.small, small { font-size: .83rem; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.two-col { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 26px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.card { min-width: 0; }
.card h2 { font-size: 1.45rem; }
.card p { color: var(--muted); }
.notice { padding: 18px 22px; border: 1px solid #a7d7bd; border-radius: 9px; background: #eaf6ef; color: #175238; margin-bottom: 24px; overflow-wrap: anywhere; }
.notice a { color: inherit; font-weight: 600; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice.error { background: #fff1f2; border-color: #e9b7be; color: #912635; }
.notice.warning { background: #fff7e7; border-color: #e6cc8a; color: #6e511c; }
.empty { padding: 42px 28px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }
.empty h2 { margin-bottom: 14px; }
label { display: block; font-size: .9rem; font-weight: 600; }
input, select, textarea { display: block; width: 100%; min-width: 0; margin-top: 7px; padding: 11px 13px; background: var(--panel); color: var(--ink); border: 1px solid #9eafc2; border-radius: 6px; min-height: 46px; }
input[readonly] { background: #eef2f7; color: #52687f; }
input[type=file] { padding: 9px; font-size: .85rem; }
input[type=file]::file-selector-button { border: 1px solid #b4c3d6; background: #eef3fa; padding: 5px 10px; border-radius: 4px; margin-right: 10px; color: #172b45; }
textarea { resize: vertical; min-height: 110px; }
[aria-invalid=true] { border-color: #b73a49; }
.required { color: #a93e4e; }
.field-error { display: block; font-size: .82rem; color: #a22c3e; margin-top: 6px; }
.stack-form { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.stack-form > label:not(.check-label) { margin-top: 8px; }
.stack-form input, .stack-form select, .stack-form textarea { margin-top: 0; }
.stack-form > .button { margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; }
.span-two { grid-column: 1/-1; }
.check-label { display: flex; align-items: flex-start; gap: 10px; font-size: .84rem; font-weight: 450; line-height: 1.6; margin: 12px 0; }
.check-label input { flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 3px 0 0; accent-color: var(--accent); }
.consent-box { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 16px; }
.password-field { display: flex; border: 1px solid #9eafc2; border-radius: 6px; overflow: hidden; }
.password-field input { border: 0; margin: 0; border-radius: 0; }
.password-field button { background: var(--panel); border: 0; color: var(--accent); padding: 0 14px; font-size: .85rem; }
.password-field:focus-within { outline: 3px solid #3a80dd; outline-offset: 3px; }
.detail-list, .legal-identity { margin: 0; }
.detail-list dt, .legal-identity dt { color: var(--muted); font-size: .8rem; margin-top: 16px; }
.detail-list dd, .legal-identity dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.badge { display: inline-block; border: 1px solid #cfdbea; background: #eff4fa; color: #415b7c; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.badge-success { color: #176344; border-color: #bddfcc; background: #eaf7ef; }
.badge-warning { color: #7a5714; border-color: #edd69d; background: #fff7df; }
.badge-danger { color: #972e3d; border-color: #e7bcc3; background: #fff0f2; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 22px 0; color: var(--muted); font-size: .85rem; }
.pagination > div { display: flex; gap: 10px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding: 20px; margin: 24px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.filter-bar label { flex: 1; min-width: 150px; max-width: 380px; font-size: .78rem; color: var(--muted); }
.filter-bar > a { align-self: center; font-size: .85rem; }
.filter-end { margin-left: auto; }
.table-wrap { position: relative; overflow-x: auto; padding: 0; width: 100%; max-width: 100%; min-width: 0; contain: inline-size; }
.table-wrap[data-overflow=true]::before { content: 'Desplaza la tabla para ver todas las columnas'; display: block; position: sticky; left: 0; padding: 10px 18px; font-size: .72rem; color: var(--muted); background: var(--panel); border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .86rem; }
caption { text-align: left; font-size: .85rem; font-weight: 650; padding: 18px 22px; color: var(--ink); border-bottom: 1px solid var(--line); }
th, td { padding: 16px 20px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: #576b82; background: #f3f6fa; white-space: nowrap; }
td { overflow-wrap: anywhere; }
td > strong, td > small, td > a { display: block; }
td > small { font-size: .75rem; margin-top: 5px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7faff; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.empty-cell { text-align: center; padding: 42px; color: var(--muted); }
.inline-form { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.inline-form select { font-size: .82rem; min-height: 40px; margin: 0; }
.message-cell { min-width: 170px; max-width: 400px; }
summary { cursor: pointer; color: var(--accent); min-height: 34px; }
details p { margin-top: 14px; }
.delete-confirm { color: #9d2635; }
.delete-confirm summary { color: inherit; }
.delete-confirm > div { padding: 14px; border: 1px solid #eac6cc; background: #fff4f4; border-radius: 7px; margin-top: 8px; min-width: 200px; max-width: 300px; }
.upload-preview { width: 180px; height: 110px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; }
.brand-preview { width: 160px; height: 100px; padding: 12px; object-fit: contain; background: #17314d; border-radius: 8px; margin-bottom: 16px; }
.favicon-preview { width: 64px; height: 64px; object-fit: contain; margin: 18px 0 34px; }
.error-page { max-width: 680px; margin: 15vh auto; padding: 30px; }
.text-button { background: none; border: 0; color: var(--accent); padding: 0; font: inherit; text-decoration: underline; }
@media (max-width: 1150px) { .site-header { gap: 18px; padding-inline: 3%; } .site-nav { gap: 12px; } .site-nav a { font-size: .78rem; } .brand { font-size: 1.1rem; } }
@media (max-width: 950px) {
    .site-header { flex-wrap: wrap; padding: 15px 5%; }
    .site-nav { width: 100%; flex-wrap: wrap; gap: 8px 20px; }
    .site-nav a { font-size: .9rem; padding: 10px; }
    .js .menu-toggle { display: block; }
    .js .site-nav { display: none; }
    .js .site-nav.open { display: flex; }
    .brand span { max-width: 200px; }
    .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
    .two-col, .cards, .form-grid, .site-footer { grid-template-columns: minmax(0,1fr); }
    .span-two { grid-column: auto; }
    .section-heading { align-items: flex-start; flex-wrap: wrap; }
    .filter-bar { padding: 16px; gap: 12px; }
    .filter-bar label { max-width: none; }
    .pagination { flex-wrap: wrap; }
    th, td { padding: 14px; }
    .surface, .form, .card { padding: 20px; }
    .table-wrap { padding: 0; }
    .site-footer { padding: 36px 6%; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
