html, body {
    font-family: Barlow, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Fase 6A · aspecto del sistema (mismo lenguaje de la web: Barlow, azul marino, rojo del logo) */
.page h1, .page h2, .page .h1, .page .h2, .page .h3, .page .h4 { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 600; letter-spacing: -.005em; }
.page article.content { background: #f5f6f8; min-height: calc(100vh - 3.5rem); }
.page .card { border-color: #cfd4da; border-radius: 4px; }
.page .table { --bs-table-bg: #fff; }
.btn { border-radius: 3px; font-weight: 500; }
.btn-outline-primary { color: #13233a; border-color: #13233a; }
.btn-outline-primary:hover { background-color: #13233a; border-color: #13233a; color: #fff; }
.text-bg-primary { background-color: #2f6fb0 !important; }
.progress-bar { background-color: #2f6fb0; }
/* fin Fase 6A · aspecto del sistema */

a, .btn-link {
    color: #2f6fb0;
}

.btn-primary {
    color: #fff;
    background-color: #13233a;
    border-color: #13233a;
}
.btn-primary:hover, .btn-primary:focus { background-color: #0c1828; border-color: #0c1828; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ---------- Prime ---------- */
:root { --prime-navy: #13233a; --prime-ink: #182230; --prime-accent: #b3202a; --prime-muted: #5d6877; --prime-line: #cfd4da; }
.hero { padding: 3rem 0; max-width: 720px; }
.hero h1 { font-weight: 800; }
.kpi { border: 1px solid var(--prime-line); border-left: 3px solid var(--prime-accent); border-radius: 4px; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .25rem; background: #fff; }
.kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--prime-ink); }
.kpi-label { font-size: .85rem; color: var(--prime-muted); }

.clock { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; background-color: var(--prime-navy); background-image: linear-gradient(rgba(150,190,230,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(150,190,230,.08) 1px, transparent 1px); background-size: 24px 24px; border-top: 4px solid var(--prime-accent); color: #fff; border-radius: 4px; padding: 1.25rem 1.5rem; }
.clock-value { font-family: 'Barlow Condensed', sans-serif; }
.clock-overdue { background: #7f1d1d; }
.clock-item { display: flex; flex-direction: column; gap: .2rem; }
.clock-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #c9d2de; }
.clock-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock-sub { font-size: .85rem; color: #c9d2de; }

.phases { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.phase { display: flex; align-items: center; gap: 1rem; border: 1px solid var(--prime-line); border-radius: 4px; padding: .75rem 1rem; background: #fff; flex-wrap: wrap; }
.phase-num { font-weight: 700; font-size: 1.1rem; width: 2.2rem; color: var(--prime-muted); }
.phase-body { display: flex; flex-direction: column; flex: 1 1 320px; min-width: 0; }
.phase-name { font-weight: 600; }
.phase-dates { font-size: .85rem; color: var(--prime-muted); }
.phase-status { font-size: .85rem; font-weight: 600; }
.phase-completed { background: #f1f7f3; }
.phase-completed .phase-status { color: #166534; }
.phase-inprogress { border-color: var(--prime-accent); border-width: 2px; }
.phase-inprogress .phase-status, .phase-inprogress .phase-num { color: var(--prime-accent); }
.phase-blocked .phase-status { color: #991b1b; }

.lang-switch { display: flex; align-items: center; gap: .4rem; font-size: .85rem; }
.lang-switch a { color: var(--prime-muted); text-decoration: none; font-weight: 600; padding: .35rem .5rem; border-radius: 6px; min-width: 44px; text-align: center; }
.lang-switch a.active { color: #fff; background: var(--prime-navy); }
.lang-switch a:hover:not(.active) { background: #eef1f5; }
.phase-editor { flex-basis: 100%; border-top: 1px solid var(--prime-line); padding-top: .75rem; margin-top: .25rem; }
.page .top-row .lang-switch a { margin-left: 0; text-decoration: none; }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .35rem 1rem; }
.check-grid-states { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.pre-line { white-space: pre-line; }

/* ---------- Web pública (Fase 6A · diseño propio: hoja de planos) ---------- */
.pub, .entry {
    --w-navy: #13233a; --w-deep: #0c1828; --w-red: #b3202a; --w-red-dark: #8f1820; --w-blue: #2f6fb0;
    --w-ink: #182230; --w-steel: #5d6877; --w-concrete: #e8eaec; --w-line: #cfd4da;
    --w-grid: linear-gradient(rgba(150,190,230,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(150,190,230,.07) 1px, transparent 1px),
              linear-gradient(rgba(150,190,230,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(150,190,230,.13) 1px, transparent 1px);
    font-family: Barlow, 'Helvetica Neue', Arial, sans-serif; color: var(--w-ink);
}
.pub { background: #fff; min-height: 100vh; display: flex; flex-direction: column; }
.pub main { flex: 1; }
.pub h1, .pub h2, .pub h3, .entry h1 { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: -.005em; }
.pub-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.pub-page { padding-top: 2.5rem; padding-bottom: 2rem; max-width: 1020px; }
.pub a:focus-visible, .pub button:focus-visible, .pub select:focus-visible, .entry a:focus-visible { outline: 3px solid #7fb2e5; outline-offset: 2px; }

/* Encabezado */
.pub-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--w-line); }
.pub-header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 74px; flex-wrap: wrap; padding-top: .4rem; padding-bottom: .4rem; }
.pub-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--w-navy); }
.pub-brand img { width: 52px; height: auto; }
.pub-brand-text { display: flex; flex-direction: column; line-height: 1; }
.pub-brand-text strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pub-brand-text small { font-size: .78rem; color: var(--w-steel); font-weight: 500; }
.pub-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-left: auto; }
.pub-nav a { color: var(--w-ink); text-decoration: none; font-weight: 500; padding: .5rem 0; border-bottom: 2px solid transparent; }
.pub-nav a:hover { border-bottom-color: var(--w-red); }
.pub-header-actions { display: flex; align-items: center; gap: .6rem; }
.pub .lang-switch a.active, .entry .lang-switch a.active { background: var(--w-navy); }

/* Botones */
.web-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .78rem 1.35rem; border: 2px solid transparent; border-radius: 3px;
           font-family: Barlow, sans-serif; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; background: none; }
.web-btn-sm { padding: .45rem .9rem; font-size: .9rem; }
.web-btn-red { background: var(--w-red); border-color: var(--w-red); color: #fff; }
.web-btn-red:hover { background: var(--w-red-dark); border-color: var(--w-red-dark); color: #fff; }
.web-btn-navy { background: var(--w-navy); border-color: var(--w-navy); color: #fff; }
.web-btn-navy:hover { background: var(--w-deep); color: #fff; }
.web-btn-line { border-color: rgba(255,255,255,.55); color: #fff; }
.web-btn-line:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.web-btn-line-dark { border-color: var(--w-navy); color: var(--w-navy); }
.web-btn-line-dark:hover { background: var(--w-navy); color: #fff; }
.web-btn[disabled] { opacity: .6; cursor: default; }

/* Portada: hoja de planos con cuadro de rótulo */
.web-hero { background-color: var(--w-navy); background-image: var(--w-grid); background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px; color: #fff; padding: 4.5rem 0 5rem; }
.web-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 3.5rem; align-items: center; }
.web-hero h1 { font-size: clamp(2.7rem, 5.6vw, 4.9rem); font-weight: 600; line-height: .96; margin: 0 0 1.4rem; max-width: 15ch; }
.web-hero-lead { font-size: 1.15rem; line-height: 1.6; color: #cfdae6; max-width: 34em; margin-bottom: 2rem; }
.web-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.web-sheet { margin: 0; border: 1px solid rgba(207,218,230,.45); background: var(--w-deep); padding: 10px; }
.web-sheet img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.web-titleblock { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .95rem; }
.web-titleblock th, .web-titleblock td { border: 1px solid rgba(207,218,230,.35); padding: .55rem .75rem; vertical-align: top; }
.web-titleblock th { width: 30%; font-weight: 500; color: #9fb3c8; font-size: .85rem; }
.web-titleblock td { font-weight: 600; overflow-wrap: anywhere; }
.web-titleblock-light { margin: 1.5rem 0; background: #fff; }
.web-titleblock-light th, .web-titleblock-light td { border-color: var(--w-line); }
.web-titleblock-light th { color: var(--w-steel); }
.web-titleblock-light a { color: var(--w-navy); }

/* Secciones */
.web-section { padding: 5rem 0; }
.web-section-concrete { background: var(--w-concrete); }
.web-section-navy { background: var(--w-navy); color: #fff; }
.web-h2 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 600; line-height: 1.02; margin-bottom: .9rem; max-width: 18ch; }
.web-h3 { font-size: 1.5rem; font-weight: 600; margin: 1.6rem 0 .4rem; }
.web-lead { font-size: 1.08rem; line-height: 1.65; color: var(--w-steel); max-width: 40em; margin-bottom: 2rem; }
.web-section-navy .web-lead { color: #cfdae6; }
.web-disclaimer { font-size: .85rem; color: var(--w-steel); margin: .9rem 0 0; }
.web-aside { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 3.5rem; align-items: start; }
.web-aside > header { position: sticky; top: 100px; }
.web-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem; align-items: center; }
.web-split-top { align-items: start; }

.web-rows { margin: 0; border-bottom: 1px solid var(--w-line); }
.web-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.5rem; padding: 1.3rem 0; border-top: 1px solid var(--w-line); }
.web-rows dt { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; font-weight: 600; line-height: 1.15; color: var(--w-navy); }
.web-rows dd { margin: 0; color: var(--w-steel); line-height: 1.6; }

.web-industries { list-style: none; padding: 0; margin: 0 0 2.25rem; display: flex; flex-wrap: wrap; gap: .55rem 1.6rem; max-width: 980px; }
.web-industries li { font-weight: 600; display: flex; align-items: center; gap: .55rem; }
.web-industries li::before { content: ""; width: 8px; height: 8px; background: var(--w-red); flex: none; }
.web-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 190px; grid-auto-flow: dense; gap: 10px; }
.web-mosaic figure { position: relative; margin: 0; overflow: hidden; background: var(--w-navy); }
.web-mosaic figure:first-child { grid-column: span 2; grid-row: span 2; }
.web-mosaic figure:nth-child(4), .web-mosaic figure:nth-child(7), .web-mosaic figure:nth-child(10) { grid-column: span 2; }
.web-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.web-mosaic figcaption { position: absolute; left: 0; bottom: 0; background: var(--w-navy); color: #fff; font-size: .85rem; font-weight: 600; padding: .35rem .7rem; }
.web-video { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.4rem; align-items: center; margin-top: 2.5rem; padding: 1.4rem 1.6rem; background: #fff; border: 1px solid var(--w-line); }
.web-video h3 { font-size: 1.45rem; font-weight: 600; margin: 0 0 .2rem; }
.web-video p { margin: 0; color: var(--w-steel); }
.web-play { width: 56px; height: 56px; border-radius: 50%; background: var(--w-red); position: relative; }
.web-play::after { content: ""; position: absolute; left: 22px; top: 18px; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.web-soon { font-weight: 600; color: var(--w-steel); font-size: .9rem; }

.web-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.web-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.5rem; margin: 0 0 .5rem; }
.web-values > div { border-left: 3px solid var(--w-red); padding-left: .85rem; }
.web-values dt { font-family: 'Barlow Condensed', sans-serif; font-size: 1.2rem; font-weight: 600; }
.web-values dd { margin: 0; color: var(--w-steel); font-size: .95rem; }
.web-tags { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.web-tags li { border: 1px solid var(--w-line); border-radius: 3px; padding: .3rem .7rem; font-weight: 500; font-size: .92rem; }

.web-timeline { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; position: relative; }
.web-timeline::before { content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 2px; background: rgba(207,218,230,.35); }
.web-timeline li { position: relative; }
.web-node { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--w-navy); border: 2px solid var(--w-red); font-family: 'Barlow Condensed', sans-serif; font-size: 1.35rem; font-weight: 600; margin-bottom: 1rem; position: relative; }
.web-timeline h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: .35rem; }
.web-timeline p { color: #cfdae6; margin: 0; line-height: 1.55; }

.web-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.web-doors article { display: flex; flex-direction: column; border: 1px solid var(--w-line); border-top: 5px solid var(--w-blue); padding: 1.6rem; background: #fff; }
.web-doors article:nth-child(2) { border-top-color: var(--w-red); }
.web-doors article:nth-child(3) { border-top-color: var(--w-navy); }
.web-doors h3 { font-size: 1.75rem; font-weight: 600; margin-bottom: .3rem; }
.web-door-lead { color: var(--w-steel); margin-bottom: 1rem; }
.web-doors ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.web-doors li { padding: .5rem 0 .5rem 1.1rem; border-top: 1px solid #e3e6ea; position: relative; font-size: .97rem; }
.web-doors li::before { content: ""; position: absolute; left: 0; top: 1rem; width: 6px; height: 6px; background: var(--w-red); }
.web-doors .web-btn { margin-top: auto; align-self: flex-start; }
.web-subs { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; margin-top: 1.25rem; padding: 1.4rem 1.6rem; background: var(--w-concrete); }
.web-subs .web-h3 { margin-top: 0; }
.web-subs > div:first-child { max-width: 40em; }
.web-subs-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.web-appt { background: #fff; border: 1px solid var(--w-line); }
.web-calendly { display: block; width: 100%; height: 700px; border: 0; }
.web-link { display: inline-block; margin: .8rem 1rem 1rem; color: var(--w-blue); font-weight: 600; }

.web-form { background: #fff; border: 1px solid var(--w-line); border-top: 5px solid var(--w-red); padding: 1.6rem; }
.web-form .web-h3 { margin-top: 0; margin-bottom: 1rem; }

/* Pie */
.pub-footer { background: var(--w-deep); color: #b8c5d3; padding: 3rem 0 2rem; font-size: .95rem; }
.pub-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.pub-footer-brand { display: flex; gap: .9rem; align-items: center; max-width: 380px; }
.pub-footer-brand img { width: 44px; height: auto; background: #fff; padding: 3px; border-radius: 3px; }
.pub-footer-brand strong { display: block; color: #fff; }
.pub-footer-links { display: flex; flex-direction: column; gap: .4rem; }
.pub-footer a { color: #fff; text-decoration: none; }
.pub-footer a:hover { text-decoration: underline; }
.pub-footer-copy { flex-basis: 100%; border-top: 1px solid #22344d; padding-top: 1rem; color: #8396ab; font-size: .88rem; }

/* Entradas de portales */
.entry { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background-color: var(--w-navy); background-image: var(--w-grid); background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px; }
.entry-sheet { width: 100%; max-width: 540px; background: #fff; border-top: 6px solid var(--w-red); padding: 2rem 2.1rem; }
.entry-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.6rem; font-weight: 600; color: var(--w-navy); }
.entry-head img { width: 48px; height: auto; }
.entry-head .lang-switch { margin-left: auto; }
.entry h1 { font-size: 2.3rem; font-weight: 600; line-height: 1.05; margin-bottom: .8rem; }
.entry-text { color: var(--w-steel); line-height: 1.6; margin-bottom: 1.4rem; }
.entry-note { color: var(--w-steel); font-size: .95rem; margin: 1.1rem 0 0; }
.entry-note a, .entry-back { color: var(--w-blue); font-weight: 600; }
.entry-back { display: inline-block; margin-top: 1.4rem; }

@media (max-width: 980px) {
  .web-hero-grid, .web-aside, .web-split { grid-template-columns: 1fr; gap: 2.5rem; }
  .web-aside > header { position: static; }
  .web-doors { grid-template-columns: 1fr; }
  .web-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .web-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .web-timeline::before { display: none; }
}
@media (max-width: 760px) {
  .pub-nav { order: 3; width: 100%; margin-left: 0; gap: 1.1rem; overflow-x: auto; flex-wrap: nowrap; }
  .pub-header-actions { margin-left: auto; }
  .pub-brand-text small { display: none; }
  .web-hero { padding: 3rem 0 3.5rem; }
  .web-section { padding: 3.25rem 0; }
  .web-rows > div { grid-template-columns: 1fr; gap: .35rem; }
  .web-video { grid-template-columns: auto minmax(0, 1fr); }
  .web-soon { grid-column: 1 / -1; }
  .web-values, .web-timeline { grid-template-columns: 1fr; }
  .web-mosaic figure:first-child { grid-row: span 1; }
  .entry-sheet { padding: 1.6rem 1.3rem; }
}

/* Aviso de error de Blazor (global, para cualquier diseño). Blazor lo muestra solo si hay un error real. */
#blazor-error-ui { background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); box-sizing: border-box; display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---------- Reloj de horas ---------- */
.time-card { border: 1px solid var(--prime-line); border-radius: 16px; padding: 1.25rem 1.5rem; background: #fff; }
.time-card-on { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.time-state { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; font-size: 1.1rem; }
.time-dot { width: 14px; height: 14px; border-radius: 50%; background: #16a34a; flex-shrink: 0; }
.time-dot-off { background: #9ca3af; }
.time-elapsed { color: var(--prime-muted); font-size: .95rem; }
.time-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.time-actions input { max-width: 420px; flex: 1 1 220px; }
.time-btn { min-width: 220px; min-height: 56px; font-weight: 700; }
.team-totals { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .9rem; }
.kpi-text { font-size: 1.15rem; }
@media (max-width: 640px) { .time-btn { width: 100%; } }

/* ---------- Panel de campo ---------- */
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.field-card { border-radius: 14px; }
.on-clock { margin-top: .2rem; }
@media (max-width: 420px) { .field-grid { grid-template-columns: 1fr; } }

/* ---------- Estado del cronograma ---------- */
.sched-health { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 1rem; border-radius: 14px; padding: 1rem 1.25rem; border: 1px solid var(--prime-line); background: #fff; }
.sched-ok { border-left: 0; box-shadow: inset 4px 0 0 #16a34a; }
.sched-late { box-shadow: inset 4px 0 0 #b91c1c; }
.sched-health .clock-label { color: var(--prime-muted); display: block; }
.sched-forecast { display: flex; flex-direction: column; min-width: 220px; }
.sched-forecast strong { font-size: 1.3rem; }
.sched-late #sched-variance { color: #b91c1c; font-weight: 600; }
.sched-issues { flex: 1 1 320px; }
.phase-history ul { padding-left: 1.1rem; }

/* Compras y entregas */
.pur-card.pur-late { border-left: 4px solid var(--bs-danger); }
.pur-card .pur-amount { font-variant-numeric: tabular-nums; }
.pur-summary .badge { font-weight: 500; }

/* Portal del cliente */
.portal-card { overflow: hidden; transition: box-shadow .15s; }
.portal-card:hover { box-shadow: 0 .4rem 1rem rgba(0,0,0,.08); }
.portal-cover { width: 100%; height: 170px; object-fit: cover; display: block; background: #e9ecef; }
.portal-cover-empty { display: flex; align-items: center; justify-content: center; color: #6c757d; font-weight: 600; letter-spacing: .05em; }
.portal-summary { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 1.5rem; background: #fff; border: 1px solid #dee2e6; border-radius: .5rem; padding: 1.25rem; }
.portal-summary .progress { height: 14px; }
.portal-percent { font-size: 1.75rem; line-height: 1; }
.portal-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.portal-facts > div { display: flex; flex-direction: column; }
.portal-timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid #dee2e6; }
.portal-timeline li { position: relative; padding: 0 0 .9rem 1.25rem; }
.portal-timeline .tl-dot { position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: #ced4da; border: 2px solid #fff; }
.portal-timeline .tl-completed .tl-dot { background: var(--bs-success); }
.portal-timeline .tl-inprogress .tl-dot { background: var(--bs-primary); box-shadow: 0 0 0 3px rgba(13,110,253,.2); }
.portal-timeline .tl-blocked .tl-dot { background: var(--bs-danger); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.photo-item { margin: 0; background: #fff; border: 1px solid #dee2e6; border-radius: .5rem; overflow: hidden; }
.photo-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-item figcaption { padding: .4rem .6rem; font-size: .85rem; display: flex; flex-direction: column; gap: .15rem; }
.photo-item .photo-date { color: #6c757d; }
.photo-item.photo-internal { border-style: dashed; }
.meet-minutes { background: #f8f9fa; border-radius: .35rem; padding: .5rem .75rem; }
.pre-wrap { white-space: pre-wrap; }
@media (max-width: 640px) { .portal-summary { grid-template-columns: 1fr; } }

/* RFI y submittals */
.rev-overdue { border-left: 4px solid var(--bs-danger); }
.rev-answer { background: #f0f6ff; border-radius: .35rem; padding: .5rem .75rem; }

/* Trabajo de subcontratistas */
.task-progress { width: 160px; }
.task-progress .progress { height: 8px; }
@media (max-width: 640px) { .task-progress { width: 100%; text-align: left !important; } }

/* Avisos */
.notif-bell { position: relative; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 32px)); background: #fff; border: 1px solid #dee2e6; border-radius: .5rem; z-index: 1050; max-height: 70vh; overflow-y: auto; }
.notif-item { display: flex; flex-direction: column; gap: .15rem; width: 100%; text-align: left; border: 0; background: transparent; padding: .6rem 1rem; border-bottom: 1px solid #f1f3f5; font-size: .9rem; }
.notif-item:hover { background: #f8f9fa; }
.notif-item .notif-time { font-size: .75rem; color: #6c757d; }
.notif-unread { background: #f0f6ff; }
.notif-unread .notif-text, .notif-row.notif-unread > div > div:first-child { font-weight: 600; }

/* Finanzas */
.fin-table td, .fin-table th { white-space: normal; }
.fin-table .fin-amount { font-variant-numeric: tabular-nums; }
.fin-over { background: #fff5f5; }
.kpi-alert { border-color: var(--bs-danger); }
.kpi-alert .kpi-value { color: var(--bs-danger); }
.fin-nav .nav-link { padding: .3rem .8rem; }

/* Fase 5 · Integraciones */
.call-fab { position: fixed; right: 16px; bottom: 16px; z-index: 1040; display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-radius: 999px; background: #198754; color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 .4rem 1rem rgba(0,0,0,.2); }
.call-fab:hover { background: #157347; color: #fff; }
@media (max-width: 640px) { .call-fab span { display: none; } .call-fab { padding: .8rem; } }
.cam-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border: 0; border-radius: .35rem; display: block; }
.cam-offline { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; background: #f1f3f5; color: #6c757d; border-radius: .35rem; font-weight: 600; }
.ai-thread { display: flex; flex-direction: column; gap: .5rem; max-height: 50vh; overflow-y: auto; }
.ai-msg { max-width: 85%; padding: .5rem .75rem; border-radius: .6rem; }
.ai-user { align-self: flex-end; background: #0d6efd; color: #fff; }
.ai-bot { align-self: flex-start; background: #f1f3f5; }
.ai-alert.ai-critical { border-left: 4px solid var(--bs-danger); }
.ai-alert.ai-warning { border-left: 4px solid var(--bs-warning); }

/* Fase 6C · embudo de ventas, calendario compartido y paneles nuevos */
.crm-search { max-width: 260px; }
.pipeline-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; max-width: 100%; }
.pipeline-col { background: #f6f7f9; border: 1px solid var(--prime-line); border-radius: .5rem; padding: .5rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.pipeline-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .9rem; }
.pipeline-won { background: #eef8f1; }
.pipeline-lost { background: #f3f3f3; }
.pipeline-card { display: block; background: #fff; border: 1px solid var(--prime-line); border-radius: .4rem; padding: .5rem .6rem; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.pipeline-card:hover { border-color: var(--prime-accent); }
.pipeline-steps { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding: 0; margin: 0; font-size: .8rem; }
.pipeline-steps li { padding: .2rem .55rem; border-radius: 1rem; background: #eef0f3; color: var(--prime-muted); }
.pipeline-steps li.step-done { background: #d9eadf; color: #1e5631; }
.pipeline-steps li.step-current { background: var(--prime-navy); color: #fff; }
.pipeline-steps li.step-lost { text-decoration: line-through; }
.opp-timeline li { border-bottom: 1px solid var(--prime-line); padding: .4rem 0; }
.cal-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; padding: .15rem .55rem; border-radius: 1rem; border: 1px solid var(--prime-line); background: #fff; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--prime-line); border-left: 1px solid var(--prime-line); }
.cal-dow { font-size: .75rem; font-weight: 600; text-transform: uppercase; padding: .25rem; border-right: 1px solid var(--prime-line); border-bottom: 1px solid var(--prime-line); background: #f6f7f9; overflow: hidden; }
.cal-cell { min-height: 92px; padding: .2rem; border-right: 1px solid var(--prime-line); border-bottom: 1px solid var(--prime-line); display: flex; flex-direction: column; gap: .15rem; min-width: 0; overflow: hidden; }
.cal-out { background: #fafafa; color: #9aa3ae; }
.cal-today { box-shadow: inset 0 0 0 2px var(--prime-accent); }
.cal-num { font-size: .75rem; font-weight: 600; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.cal-day { border: 1px solid var(--prime-line); border-radius: .4rem; padding: .4rem; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.cal-event { display: block; font-size: .75rem; padding: .1rem .35rem; border-radius: .25rem; border-left: 3px solid var(--prime-muted); background: #f1f3f5; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-week .cal-event { white-space: normal; }
.cal-meeting { border-left-color: #0d6efd; }
.cal-inspection { border-left-color: #6f42c1; }
.cal-visit { border-left-color: var(--prime-accent); }
.cal-training, .cal-onboarding { border-left-color: #198754; }
.cal-insurance, .cal-contract { border-left-color: #dc3545; }
@media (max-width: 760px) {
    .cal-week { grid-template-columns: 1fr; }
    .cal-cell { min-height: 64px; }
    .cal-month .cal-event { font-size: .65rem; padding: 0 .2rem; }
    .crm-search { max-width: none; }
}
/* fin Fase 6C · estilos */

/* Aviso de versión nueva (js/version.js) */
.update-banner { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 2000; align-items: center; gap: .75rem; max-width: calc(100% - 2rem); padding: .6rem .75rem .6rem 1rem; background: var(--prime-navy); color: #fff; border-left: 4px solid var(--prime-accent); border-radius: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: .95rem; }
.update-banner:not([hidden]) { display: flex; }
.update-banner button { border: 0; border-radius: 3px; background: var(--prime-accent); color: #fff; font-weight: 600; padding: .35rem .8rem; white-space: nowrap; }
