* { box-sizing: border-box; }
body { margin: 0; color: var(--dinsides-black); background: radial-gradient(circle at 7% 1%, rgba(229,37,33,.09), transparent 22rem), var(--dinsides-bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select { font: inherit; } button { cursor: pointer; }
.consultation-shell { width: min(1580px, calc(100% - 24px)); margin: 14px auto 40px; }
.consultation-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 26px 28px; overflow: hidden; border-radius: 27px; color: #fff; background: linear-gradient(120deg, #111214 0%, #1d1e22 62%, #421311 100%); box-shadow: 0 16px 38px rgba(17,18,20,.12); }
.consultation-header h1 { margin: 5px 0 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.045em; }.consultation-header p { max-width: 760px; margin: 10px 0 0; color: #d2d5da; font-size: 13px; line-height: 1.55; }
.consultation-sync { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 13px; border: 1px solid #cbdcf3; border-radius: 13px; color: #344050; background: #f1f7ff; }
.consultation-sync__dot { width: 9px; height: 9px; border-radius: 50%; background: #2c6fbd; box-shadow: 0 0 0 4px rgba(44,111,189,.12); }
.consultation-sync strong, .consultation-sync small { display: block; }.consultation-sync strong { font-size: 11px; }.consultation-sync small { margin-top: 2px; color: #717b88; font-size: 10px; line-height: 1.4; }
.consultation-sync button { grid-column: 3; grid-row: 1; padding: 7px 9px; border: 1px solid #ccd5df; border-radius: 8px; background: #fff; font-size: 10px; font-weight: 850; }
.consultation-sync[data-state="synced"] { border-color: #bfe6d1; background: #f0fbf5; }.consultation-sync[data-state="synced"] .consultation-sync__dot { background: #168454; box-shadow: 0 0 0 4px rgba(22,132,84,.12); }
.consultation-sync[data-state="error"] { border-color: #efc1be; background: #fff4f3; }.consultation-sync[data-state="error"] .consultation-sync__dot { background: #d22f29; box-shadow: 0 0 0 4px rgba(210,47,41,.12); }
.consultation-sync[data-state="local"] { border-color: #e4d8ae; background: #fffbed; }.consultation-sync[data-state="local"] .consultation-sync__dot { background: #b17c00; box-shadow: 0 0 0 4px rgba(177,124,0,.12); }
.eyebrow { color: #ff9692; font-size: 10px; font-weight: 950; letter-spacing: .14em; }.eyebrow--dark { color: #848c97; }
.header-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid transparent; border-radius: 12px; font-weight: 900; }.button--primary { color: #fff; background: var(--dinsides-red); }.button--ghost-dark { color: #fff; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }.file-button { position: relative; cursor: pointer; }.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.control-card, .entry-card, .matrix-card, .source-card { margin-top: 14px; padding: 18px; border: 1px solid rgba(17,18,20,.07); border-radius: 18px; background: #fff; box-shadow: 0 9px 26px rgba(17,18,20,.045); }
.control-card { display: grid; grid-template-columns: 190px 230px 180px minmax(280px, 1fr); gap: 12px; align-items: end; }.field label { display: block; margin: 0 0 6px 2px; color: var(--dinsides-muted); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }.field input, .field select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--dinsides-line); border-radius: 10px; color: var(--dinsides-black); background: #fff; outline: none; }.field input:focus, .field select:focus { border-color: var(--dinsides-red); box-shadow: 0 0 0 3px rgba(229,37,33,.09); }.control-note { min-height: 42px; padding: 9px 12px; border-radius: 11px; background: #eef6ff; color: #245477; }.control-note strong, .control-note span { display: block; }.control-note strong { font-size: 10px; }.control-note span { margin-top: 3px; font-size: 9px; line-height: 1.4; }
.import-banner { display: none; margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 11px; line-height: 1.45; }.import-banner.is-visible { display: block; }.import-banner.ok { color: #126a46; background: #eaf8f1; }.import-banner.warn { color: #865400; background: #fff6df; }.import-banner.error { color: #991d1a; background: #ffeceb; }
.consultation-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }.consultation-kpis article { min-height: 112px; padding: 17px 18px; border: 1px solid rgba(17,18,20,.07); border-radius: 17px; background: #fff; }.consultation-kpis span, .consultation-kpis small { display: block; color: var(--dinsides-muted); }.consultation-kpis span { font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }.consultation-kpis strong { display: block; margin-top: 8px; font-size: 29px; letter-spacing: -.04em; }.consultation-kpis small { margin-top: 7px; font-size: 9px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.section-heading h2 { margin: 4px 0 0; font-size: 19px; }.section-heading p { margin: 5px 0 0; color: var(--dinsides-muted); font-size: 10px; line-height: 1.4; }.master-chip { padding: 7px 9px; border-radius: 999px; color: #126a46; background: #eaf8f1; font-size: 9px; font-weight: 900; }.entry-form { display: grid; grid-template-columns: 1.1fr 180px 140px 1.5fr auto; gap: 10px; align-items: end; margin-top: 14px; }
.matrix-card { padding: 0; overflow: hidden; }.matrix-heading { padding: 18px; }.legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--dinsides-muted); font-size: 9px; }.legend span { display: flex; align-items: center; gap: 5px; }.legend i { width: 10px; height: 10px; border-radius: 3px; }.legend-sunday { background: #eceff2; }.legend-entry { border: 1px solid #efaca9; background: #fff; }
.matrix-wrap { overflow: auto; max-height: 680px; border-top: 1px solid var(--dinsides-line); }.matrix-wrap table { width: 100%; min-width: 1880px; border-collapse: separate; border-spacing: 0; }.matrix-wrap th, .matrix-wrap td { min-width: 48px; padding: 7px 5px; text-align: center; border-right: 1px solid #eceef1; border-bottom: 1px solid #eceef1; font-size: 9px; }.matrix-wrap thead th { position: sticky; top: 0; z-index: 3; color: #5f6670; background: #f7f8fa; font-weight: 900; }.matrix-wrap thead th:first-child, .matrix-wrap tbody th, .matrix-wrap tfoot th { position: sticky; left: 0; z-index: 4; min-width: 165px; text-align: left; background: #fff; }.matrix-wrap thead th:first-child { z-index: 6; background: #f7f8fa; }.matrix-wrap tbody th strong, .matrix-wrap tbody th small { display: block; }.matrix-wrap tbody th small { margin-top: 3px; color: var(--dinsides-muted); font-size: 8px; font-weight: 500; }.matrix-wrap .sunday { color: #9aa0a8; background: #f0f2f4; }.matrix-wrap input { width: 39px; height: 31px; padding: 0 4px; text-align: center; border: 1px solid #e3e5e8; border-radius: 7px; background: #fff; font-size: 9px; outline: none; }.matrix-wrap input:focus { border-color: var(--dinsides-red); box-shadow: 0 0 0 2px rgba(229,37,33,.09); }.matrix-wrap input:disabled { border-color: transparent; background: transparent; }.matrix-wrap .summary-cell { min-width: 64px; font-weight: 900; background: #fbfbfc; }.matrix-wrap .total-cell { color: #fff; background: #23252a; }.matrix-wrap .points-cell { color: #8e211e; background: #fff1f0; }.matrix-wrap tfoot th, .matrix-wrap tfoot td { position: sticky; bottom: 0; z-index: 2; font-weight: 950; background: #fff; }.matrix-wrap tfoot th { z-index: 5; }.matrix-empty { padding: 50px 20px; text-align: center; color: var(--dinsides-muted); font-size: 12px; }
.source-card { color: #70430b; background: #fff8e9; border-color: #f0dfb8; }.source-card strong { font-size: 11px; }.source-card p { margin: 5px 0 0; font-size: 10px; line-height: 1.5; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 20; max-width: 360px; padding: 11px 14px; transform: translateY(120%); opacity: 0; border-radius: 11px; color: #fff; background: var(--dinsides-black); font-size: 11px; font-weight: 800; transition: .25s; }.toast.is-visible { transform: translateY(0); opacity: 1; }
@media (max-width: 1050px) { .control-card { grid-template-columns: repeat(3, 1fr); }.control-note { grid-column: 1 / -1; }.entry-form { grid-template-columns: repeat(3, 1fr); }.entry-form .field--note { grid-column: span 2; }.consultation-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .consultation-shell { width: calc(100% - 16px); }.consultation-header { align-items: stretch; flex-direction: column; padding: 21px; }.header-actions { justify-content: flex-start; }.control-card, .entry-form { grid-template-columns: 1fr; }.control-note, .entry-form .field--note { grid-column: auto; }.consultation-kpis { grid-template-columns: 1fr 1fr; }.matrix-heading { flex-direction: column; } }
@media (max-width: 460px) { .consultation-kpis { grid-template-columns: 1fr; } }

/* Mantiene visibles los días bloqueados sin permitir su edición. */
.legend-future { border: 1px dashed #cfd5dc; background: #fafbfc; }
.matrix-wrap input:disabled { border-color: #dde2e8; color: #929aa5; background: #f5f6f8; cursor: not-allowed; }
.matrix-wrap td.is-future input { border-style: dashed; background: #fafbfc; }
.matrix-wrap td.sunday input { border-color: #d9dde2; background: #e8ebef; opacity: .72; }
.matrix-wrap td.is-history input { background: #f1f2f4; }
.matrix-wrap td.is-editable { background: #fff; }
