: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(1400px, calc(100% - 40px)); margin: 34px auto 52px; }
.page-shell-narrow { max-width: 1180px; }
.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); }
.filter-card, .table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.filter-card { padding: 21px 24px 18px; 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; }
.decree-filters {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(130px, .8fr) minmax(100px, .55fr) minmax(190px, 1.35fr) minmax(155px, .9fr) auto;
    align-items: end;
    gap: 12px;
    margin-top: 19px;
}
.decree-filters label { display: grid; gap: 6px; min-width: 0; color: #405464; font-size: 12px; font-weight: 650; }
.decree-filters input, .decree-filters select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #cbd6dd;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}
.decree-filters input:focus, .decree-filters select:focus { outline: 3px solid rgba(23, 77, 112, .13); border-color: var(--blue); }
.filter-actions { display: flex; align-items: end; }
.filter-hint { margin: 12px 0 0; 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); color: #fff; }
.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%; overflow-x: visible; }
#tablaDecretos {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0 !important;
}
#tablaDecretos thead th {
    color: #29465b;
    background: #f1f5f7;
    font-size: 12px;
    font-weight: 750;
    white-space: normal;
    overflow-wrap: break-word;
}
#tablaDecretos tbody td { color: #344b5d; font-size: 13px; vertical-align: middle; }
#tablaDecretos tbody tr:hover { background: #f7fafb; }
/* Distribución porcentual: suma 100% para mantener visible Descargar en escritorio. */
#tablaDecretos th:nth-child(1), #tablaDecretos td:nth-child(1) { width: 7%; }
#tablaDecretos th:nth-child(2), #tablaDecretos td:nth-child(2) { width: 8%; }
#tablaDecretos th:nth-child(3), #tablaDecretos td:nth-child(3) { width: 8%; }
#tablaDecretos th:nth-child(4), #tablaDecretos td:nth-child(4) { width: 32%; }
#tablaDecretos th:nth-child(5), #tablaDecretos td:nth-child(5) { width: 10%; }
#tablaDecretos th:nth-child(6), #tablaDecretos td:nth-child(6) { width: 5%; }
#tablaDecretos th:nth-child(7), #tablaDecretos td:nth-child(7) { width: 18%; }
#tablaDecretos th:nth-child(8), #tablaDecretos td:nth-child(8) { width: 12%; }
#tablaDecretos .col-type { text-align: center; }
#tablaDecretos .col-number, #tablaDecretos .col-year { font-weight: 650; white-space: nowrap; text-align: center; }
#tablaDecretos .col-number { overflow: hidden; text-overflow: ellipsis; }
#tablaDecretos .col-date { white-space: nowrap; text-align: center; }
#tablaDecretos .col-description { white-space: normal; overflow-wrap: anywhere; }
.description-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.4; }
#tablaDecretos .col-notes { text-align: center; white-space: normal; }
#tablaDecretos .col-department { white-space: normal; overflow-wrap: anywhere; }
#tablaDecretos .col-download { text-align: center; white-space: nowrap; }
#tablaDecretos .download-link { min-width: 88px; padding-left: 8px; padding-right: 8px; }
.table-link { color: var(--blue); font-weight: 650; text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.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; }
.message { padding: 16px 18px; border-radius: 8px; margin-bottom: 20px; }
.message-error { border: 1px solid #e8c4c4; background: #fff8f8; color: #8b2d2d; }
.detail-empty { padding: 24px; color: var(--muted); text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.notes-table { width: 100%; border-collapse: collapse; }
.notes-table th, .notes-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: top; }
.notes-table th { background: #f1f5f7; color: #29465b; font-size: 12px; white-space: nowrap; }
.notes-table td { color: #344b5d; }
.notes-table .observation-cell { min-width: 240px; white-space: normal; }
.notes-table a { font-weight: 600; }

@media (max-width: 1180px) {
    .decree-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
    .filter-actions { align-items: end; }
}
@media (max-width: 899px) {
    .table-wrap { overflow-x: auto; }
    #tablaDecretos { min-width: 940px; }
}
@media (max-width: 760px) {
    .header-inner, .page-shell { width: min(100% - 26px, 1400px); }
    .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; }
    .filter-card, .table-card { padding: 17px 14px; }
    .filter-heading, .table-heading { align-items: flex-start; }
    .decree-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .keyword-field { grid-column: 1 / -1; }
    .filter-actions { grid-column: 1 / -1; }
    .filter-actions .button { width: 100%; }
    .status-indicator { display: none; }
}
@media (max-width: 440px) {
    .decree-filters { grid-template-columns: 1fr; }
    .keyword-field, .filter-actions { grid-column: auto; }
    .filter-heading { align-items: flex-start; }
    .filter-heading .button { padding: 7px 9px; font-size: 12px; }
}
