:root {
    --ink: #203446;
    --muted: #687987;
    --blue: #174d70;
    --blue-dark: #123b59;
    --accent: #c69a45;
    --line: #e1e7eb;
    --surface: #ffffff;
    --canvas: #f4f7f9;
    --soft: #edf3f6;
    --shadow: 0 8px 28px rgba(23, 55, 77, .07);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}
a { color: var(--blue); }
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    width: min(1240px, calc(100% - 40px));
    min-height: 118px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}
.brand-mark {
    width: 104px;
    height: 82px;
    flex: 0 0 104px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.brand-mark img {
    display: block;
    max-width: 100%;
    max-height: 82px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
}
.brand-copy { border-left: 1px solid var(--line); padding-left: 23px; }
.eyebrow, .section-kicker {
    margin: 0 0 4px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.brand-copy h1 { margin: 0; color: var(--blue-dark); font-size: clamp(22px, 3vw, 29px); line-height: 1.2; font-weight: 700; }
.subtitle { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.page-shell { width: min(1240px, calc(100% - 40px)); margin: 34px auto 52px; }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.intro-row h2 { margin: 0; color: var(--ink); font-size: 24px; font-weight: 700; }
.intro-text { margin: 7px 0 0; color: var(--muted); }
.archive-link { color: var(--blue); font-size: 13px; font-weight: 650; text-decoration: none; padding-bottom: 5px; }
.archive-link:hover, .table-link:hover { text-decoration: underline; }
.archive-link span { margin-left: 5px; }
.filter-card, .table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.filter-card { padding: 21px 24px 22px; margin-bottom: 22px; }
.filter-heading, .table-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.filter-heading h3, .table-heading h3 { margin: 0; font-size: 17px; color: var(--ink); }
.filter-heading p, .table-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.date-filters { display: flex; align-items: flex-end; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.date-filters label { display: grid; gap: 6px; color: #405464; font-size: 12px; font-weight: 650; }
.date-filters input {
    width: 190px;
    height: 40px;
    padding: 0 11px;
    border: 1px solid #cbd6dd;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
.date-filters input:focus { outline: 3px solid rgba(23, 77, 112, .13); border-color: var(--blue); }
.filter-hint { margin: 0 0 9px; color: var(--muted); font-size: 12px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--blue);
    border-radius: 7px;
    background: var(--blue);
    color: #fff;
    padding: 8px 13px;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button-light { background: #fff; color: var(--blue); }
.button-light:hover { background: var(--soft); color: var(--blue-dark); }
.button-small { padding: 5px 10px; font-size: 12px; }
.table-card { padding: 20px 22px 16px; }
.table-heading { margin-bottom: 15px; }
.status-indicator { display: inline-flex; align-items: center; gap: 7px; color: #526b5b; font-size: 12px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3b9565; }
.table-wrap { width: 100%; }
#tablaBoletines { border-collapse: collapse; }
#tablaBoletines thead th { color: #29465b; background: #f1f5f7; font-size: 12px; font-weight: 750; white-space: nowrap; }
#tablaBoletines tbody td { color: #344b5d; font-size: 13px; vertical-align: middle; }
#tablaBoletines tbody tr:hover { background: #f7fafb; }
#tablaBoletines .col-description { min-width: 300px; white-space: normal; }
#tablaBoletines .col-number, #tablaBoletines .col-count { font-weight: 650; }
#tablaBoletines .col-action { min-width: 110px; }
.muted { color: #8a969e; font-size: 12px; }
.dt-container { color: var(--ink); font-size: 13px; }
.dt-container .dt-layout-row { align-items: center; gap: 12px; }
.dt-container .dt-search input, .dt-container .dt-length select {
    min-height: 36px;
    border: 1px solid #cbd6dd;
    border-radius: 7px;
    padding: 5px 9px;
    background: #fff;
    color: var(--ink);
}
.dt-container .dt-search input:focus, .dt-container .dt-length select:focus { outline: 3px solid rgba(23, 77, 112, .13); border-color: var(--blue); }
.dt-container .dt-paging .dt-paging-button { border-radius: 6px !important; }
.dt-container .dt-paging .dt-paging-button.current { background: var(--blue) !important; color: #fff !important; border-color: var(--blue) !important; }
.dt-container .dt-processing { color: var(--blue); }
.site-footer { padding: 23px 20px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); text-align: center; font-size: 12px; }
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--blue); text-decoration: none; }

/* Página de detalle */
.detail-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 24px; margin-bottom: 22px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.detail-top h2 { margin: 0; font-size: 23px; }
.detail-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.detail-meta div { padding: 14px; border-radius: 8px; background: #f4f7f9; }
.detail-meta dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.detail-meta dd { margin: 0; color: var(--ink); font-size: 14px; }
.detail-description { margin: 18px 0 0; line-height: 1.65; }
.document-table { width: 100%; border-collapse: collapse; }
.document-table th, .document-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: top; }
.document-table th { background: #f1f5f7; color: #29465b; font-size: 12px; }
.document-table td { color: #344b5d; }
.detail-empty { padding: 24px; color: var(--muted); text-align: center; background: #f7f9fa; border-radius: 8px; }

@media (max-width: 760px) {
    .header-inner, .page-shell { width: min(100% - 26px, 1240px); }
    .header-inner { min-height: 100px; gap: 14px; }
    .brand-mark { width: 74px; height: 68px; flex-basis: 74px; }
    .brand-mark img { max-height: 68px; }
    .brand-copy { padding-left: 14px; }
    .brand-copy h1 { font-size: 19px; }
    .subtitle { font-size: 12px; }
    .page-shell { margin-top: 24px; }
    .intro-row { display: block; }
    .archive-link { display: inline-block; margin-top: 13px; }
    .filter-card, .table-card { padding: 17px 14px; }
    .filter-heading, .table-heading { align-items: flex-start; }
    .date-filters { align-items: stretch; }
    .date-filters label, .date-filters input { width: 100%; }
    .filter-hint { width: 100%; margin: 0; }
    .detail-meta { grid-template-columns: 1fr; }
    .detail-top { display: block; }
}
