:root {
    --app-bg: #f4f6f9;
    --app-surface: #ffffff;
    --app-border: #e4e8ef;
    --app-border-strong: #d3d9e3;
    --app-primary: #0f2744;
    --app-primary-soft: #173b60;
    --app-accent: #0e7c66;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-ok-bg: #e7f4ef;
    --app-ok-text: #145c43;
    --app-shadow-sm: 0 2px 8px rgba(15, 39, 66, .06);
    --app-shadow-md: 0 10px 28px rgba(15, 39, 66, .09);
    --app-focus: rgba(14, 124, 102, .18);
}

/* ARCA counterparty creation wizard */
.page-breadcrumb { display:flex; align-items:center; gap:.45rem; margin-bottom:.65rem; color:#94a3b8; font-size:.76rem; }
.page-breadcrumb a { color:#64748b; text-decoration:none; }
.page-breadcrumb a:hover { color:#0e7c66; }
.counterparty-create-header { margin-bottom:1rem; }
.wizard-progress-card { margin-bottom:1rem; padding:1rem 1.15rem .8rem; background:#fff; border:1px solid #e4e8ef; border-radius:12px; box-shadow:0 1px 3px rgba(15,23,42,.05); }
.wizard-progress-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.65rem; }
.wizard-progress-heading > div { display:flex; align-items:baseline; gap:.7rem; }
.wizard-progress-heading strong { font-size:.8rem; color:#475569; }
.wizard-progress-percent { color:#0e7c66; font-size:.78rem; font-weight:800; }
.wizard-progress-track { height:4px; overflow:hidden; margin-bottom:.85rem; background:#eef2f6; border-radius:99px; }
.wizard-progress-track span { display:block; width:25%; height:100%; background:#10a37f; border-radius:inherit; transition:width .2s ease; }
.wizard-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:.5rem; padding:0; margin:0; list-style:none; }
.wizard-steps button { width:100%; display:flex; align-items:center; gap:.55rem; padding:.25rem; border:0; color:#94a3b8; background:transparent; text-align:left; }
.wizard-steps button > span { display:grid; place-items:center; width:25px; height:25px; flex:0 0 25px; border:1px solid #d8dee8; border-radius:50%; background:#fff; font-size:.7rem; font-weight:800; }
.wizard-steps small { font-size:.73rem; font-weight:700; }
.wizard-steps .is-active button { color:#0f2744; }
.wizard-steps .is-active button > span { color:#fff; border-color:#0f2744; background:#0f2744; box-shadow:0 0 0 4px #edf2f7; }
.wizard-steps .is-complete button { color:#0e7c66; }
.wizard-steps .is-complete button > span { color:#fff; border-color:#10a37f; background:#10a37f; }
.counterparty-wizard-layout { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:1rem; align-items:start; }
.wizard-main, .counterparty-preview { background:#fff; border:1px solid #e4e8ef; border-radius:12px; box-shadow:0 1px 3px rgba(15,23,42,.05); }
.wizard-panel { min-width:0; padding:1.25rem; border:0; margin:0; }
.counterparty-wizard.is-enhanced .wizard-panel:not(.is-active) { display:none; }
.wizard-panel-heading { display:flex; gap:.8rem; align-items:flex-start; padding-bottom:1rem; margin-bottom:1rem; border-bottom:1px solid #eef1f5; }
.wizard-panel-number { display:grid; place-items:center; width:35px; height:35px; flex:0 0 35px; border-radius:9px; color:#08705d; background:#e6f5f0; font-size:.72rem; font-weight:800; }
.wizard-panel-heading h2 { margin:0 0 .15rem; color:#0f172a; font-size:1rem; font-weight:750; }
.wizard-panel-heading p { margin:0; color:#64748b; font-size:.78rem; }
.form-grid-two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.form-field { min-width:0; }
.form-field-wide { grid-column:1/-1; }
.form-field[hidden] { display:none !important; }
.form-hint { display:block; margin-top:.35rem; color:#94a3b8; font-size:.69rem; line-height:1.4; }
.wizard-actions { display:flex; align-items:center; gap:.65rem; padding:.9rem 1.25rem; border-top:1px solid #e9edf3; background:#fafbfc; border-radius:0 0 12px 12px; }
.wizard-actions-spacer { flex:1; }
.wizard-review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.wizard-review-grid > div { min-height:70px; padding:.75rem .85rem; border:1px solid #e8ecf2; border-radius:9px; background:#f8fafc; }
.wizard-review-grid span { display:block; margin-bottom:.3rem; color:#94a3b8; font-size:.66rem; font-weight:700; text-transform:uppercase; }
.wizard-review-grid strong { display:block; overflow-wrap:anywhere; color:#1e293b; font-size:.78rem; line-height:1.4; }
.wizard-save-note { display:flex; gap:.35rem; flex-direction:column; margin-top:1rem; padding:.8rem .9rem; border:1px solid #bce6da; border-radius:9px; color:#075d4e; background:#effaf6; }
.wizard-save-note strong { font-size:.78rem; }.wizard-save-note span { font-size:.72rem; }
.counterparty-preview { position:sticky; top:82px; padding:1.2rem; overflow:hidden; }
.counterparty-preview::before { content:""; display:block; height:4px; margin:-1.2rem -1.2rem 1rem; background:linear-gradient(90deg,#0f2744,#10a37f); }
.counterparty-preview-avatar { display:grid; place-items:center; width:48px; height:48px; margin:1rem 0 .7rem; border-radius:12px; color:#fff; background:#0f2744; font-size:.85rem; font-weight:800; }
.counterparty-preview h2 { margin:0; overflow-wrap:anywhere; color:#0f172a; font-size:1rem; line-height:1.3; }
.counterparty-preview > p { margin:.25rem 0 1rem; color:#64748b; font-size:.74rem; }
.counterparty-preview dl { margin:0; }
.counterparty-preview dl > div { padding:.65rem 0; border-top:1px solid #edf0f4; }
.counterparty-preview dt { margin-bottom:.18rem; color:#94a3b8; font-size:.64rem; font-weight:700; text-transform:uppercase; }
.counterparty-preview dd { margin:0; overflow-wrap:anywhere; color:#334155; font-size:.74rem; font-weight:600; }
.counterparty-preview-state { display:flex; align-items:center; gap:.55rem; margin-top:.8rem; padding:.65rem .75rem; border-radius:9px; background:#f8fafc; }
.counterparty-preview-state > span { width:8px; height:8px; border-radius:50%; background:#d97706; }
.counterparty-preview-state div { display:flex; flex-direction:column; }.counterparty-preview-state strong { color:#334155; font-size:.72rem; }.counterparty-preview-state small { color:#94a3b8; font-size:.67rem; }
@media (max-width: 960px) { .counterparty-wizard-layout { grid-template-columns:1fr; }.counterparty-preview { position:static; order:-1; }.counterparty-preview dl { display:grid; grid-template-columns:repeat(3,1fr); gap:.5rem; }.counterparty-preview dl > div { border-top:0; } }
@media (max-width: 640px) { .wizard-progress-card { padding:.85rem; }.wizard-progress-heading > div { display:block; }.wizard-steps { gap:.15rem; }.wizard-steps button { flex-direction:column; align-items:center; text-align:center; }.wizard-steps small { font-size:.62rem; }.form-grid-two,.wizard-review-grid { grid-template-columns:1fr; }.form-field-wide { grid-column:auto; }.wizard-panel { padding:1rem; }.counterparty-preview dl { grid-template-columns:1fr; }.wizard-actions { padding:.8rem 1rem; } }

body {
    min-height: 100vh;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.auth-page {
    background: linear-gradient(135deg, #122b43 0%, #17324d 58%, #244761 100%);
    min-height: 100vh;
}

.auth-shell {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-hero {
    color: #ffffff;
    display: grid;
    gap: 2rem;
    padding: 3rem clamp(2rem, 5vw, 5rem);
}

.auth-brand {
    align-items: center;
    align-self: start;
    display: flex;
    gap: .8rem;
    font-size: 1.05rem;
    font-weight: 800;
}

.auth-brand small {
    color: rgba(255, 255, 255, .65);
    display: block;
    font-size: .72rem;
    font-weight: 700;
    margin-top: .12rem;
}

.auth-hero-copy {
    align-self: center;
    max-width: 720px;
}

.auth-hero-copy .eyebrow {
    color: #5eead4;
}

.auth-hero-copy h1 {
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    font-weight: 750;
    line-height: 1.02;
    margin: 0 0 1.25rem;
    max-width: 820px;
}

.auth-hero-copy p:not(.eyebrow) {
    color: rgba(255, 255, 255, .76);
    font-size: 1.08rem;
    line-height: 1.65;
    margin: 0;
    max-width: 620px;
}

.auth-signal-grid {
    align-self: end;
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-signal-grid article {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    padding: 1rem;
}

.auth-signal-grid strong,
.auth-signal-grid span {
    display: block;
}

.auth-signal-grid strong {
    color: #ffffff;
    margin-bottom: .35rem;
}

.auth-signal-grid span {
    color: rgba(255, 255, 255, .68);
    font-size: .86rem;
    line-height: 1.45;
}

.auth-card {
    align-self: center;
    background: #ffffff;
    border: 1px solid rgba(217, 225, 232, .85);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(16, 38, 60, .28);
    display: grid;
    gap: 1.25rem;
    margin: 0;
    max-width: 560px;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    width: min(100%, 560px);
}

.auth-logo {
    align-items: center;
    color: var(--app-primary);
    display: flex;
    flex-direction: column;
    font-size: 1.15rem;
    font-weight: 800;
    gap: .65rem;
    justify-content: center;
    text-align: center;
}

.auth-logo .app-brand-mark {
    background: var(--app-primary);
    color: #ffffff;
    height: 44px;
    width: 44px;
}

.auth-logo small {
    color: var(--app-muted);
    display: block;
    font-size: .72rem;
    font-weight: 700;
    margin-top: .12rem;
}

.auth-card-header h2 {
    color: var(--app-primary);
    font-size: 1.75rem;
    margin: 0 0 .45rem;
}

.auth-card-header p:not(.eyebrow) {
    color: var(--app-muted);
    margin: 0;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-input {
    min-height: 46px;
}

.auth-check {
    align-items: center;
    display: flex;
    gap: .5rem;
    margin: 0;
}

.auth-check .form-check-input {
    margin: 0;
}

.auth-submit {
    min-height: 46px;
}

.auth-link-note {
    color: var(--app-muted);
    font-size: .9rem;
    margin: 0;
    text-align: center;
}

.auth-footnote {
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .78rem;
    gap: .5rem 1rem;
    justify-content: space-between;
    padding-top: 1rem;
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 268px minmax(0, 1fr);
}

.app-sidebar {
    background: linear-gradient(180deg, #122b43 0%, #17324d 58%, #10263c 100%);
    border-right: 1px solid rgba(255, 255, 255, .08);
    color: #ffffff;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-color: rgba(210, 235, 242, .34) transparent;
    scrollbar-gutter: auto;
    scrollbar-width: thin;
    box-shadow: 8px 0 24px rgba(8, 24, 39, .08);
}

.app-sidebar::-webkit-scrollbar { width: 7px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(210, 235, 242, .28); border: 2px solid transparent; border-radius: 8px; background-clip: padding-box; }
.app-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(210, 235, 242, .48); background-clip: padding-box; }

.app-brand {
    align-items: center;
    display: flex;
    gap: .75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0;
    padding: .25rem .35rem .85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.app-brand-logo {
    display: block;
    height: 48px;
    max-width: 188px;
    object-fit: contain;
    object-position: left center;
    width: 100%;
}

.app-mobile-menu-toggle { display: none; }

.app-brand-mark {
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    color: var(--app-primary);
    display: inline-flex;
    font-size: .82rem;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.app-brand small {
    color: rgba(255, 255, 255, .62);
    display: block;
    font-size: .7rem;
    font-weight: 600;
    margin-top: .12rem;
}

.app-nav-group {
    display: grid;
    gap: .25rem;
    margin-bottom: 1rem;
}

.app-nav-heading {
    color: rgba(255, 255, 255, .48);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    padding: .25rem .75rem;
    text-transform: uppercase;
}

.app-nav-link {
    border-radius: 6px;
    align-items: center;
    color: rgba(255, 255, 255, .82);
    display: flex;
    font-size: .94rem;
    gap: .7rem;
    min-height: 42px;
    padding: .625rem .75rem;
    position: relative;
    text-decoration: none;
}

.app-nav-link.active,
.app-nav-link:hover {
    background: rgba(255, 255, 255, .11);
    color: #ffffff;
    transform: translateX(2px);
}

.app-nav-link { transition: background-color .16s ease, color .16s ease, transform .16s ease; }

.app-nav-link.active::before {
    background: #5eead4;
    border-radius: 999px;
    content: "";
    height: 22px;
    left: 0;
    position: absolute;
    width: 3px;
}

.app-nav-count { background: #dffaf4; border-radius: 999px; color: #075e54; font-size: .7rem; font-weight: 800; margin-left: auto; min-width: 24px; padding: .15rem .4rem; text-align: center; }

.app-icon {
    fill: none;
    flex: 0 0 auto;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}

.app-main {
    min-width: 0;
}

.app-topbar {
    align-items: center;
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: .75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    min-width: 190px;
}

.topbar-label {
    color: var(--app-muted);
    font-size: .78rem;
    margin: 0 0 .125rem;
}

.topbar-actions {
    align-items: center;
    display: flex;
    gap: .65rem;
    justify-content: flex-end;
    min-width: 0;
}

.header-actions {
    display: flex;
    gap: .75rem;
}

.app-user {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--app-muted);
    display: flex;
    font-size: .875rem;
    gap: .55rem;
    line-height: 1.15;
    max-width: 290px;
    padding: .35rem .45rem;
}

.app-user-link {
    text-decoration: none;
}

.app-user-avatar {
    align-items: center;
    background: #eef4ff;
    border: 1px solid #d5e4ff;
    border-radius: 999px;
    color: var(--app-primary);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.app-user-text {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.app-user-text > span,
.app-user-text > small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user small {
    color: var(--app-text);
    font-size: .72rem;
    font-weight: 700;
}

.app-user-link:hover {
    background: #f8fafc;
    border-color: var(--app-border);
    color: var(--app-primary);
}

.company-switcher {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-primary);
    display: grid;
    gap: .1rem;
    max-width: 280px;
    min-width: 210px;
    padding: .45rem .7rem;
    text-decoration: none;
}

.company-switcher span {
    color: var(--app-muted);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.company-switcher strong {
    font-size: .88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-switcher:hover {
    background: #eef4ff;
    border-color: #c7d8f5;
    color: var(--app-primary);
}

.company-switcher-empty {
    border-style: dashed;
}

.release-notes {
    position: relative;
}

.release-notes > summary {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-primary);
    cursor: pointer;
    display: flex;
    gap: .5rem;
    min-height: 48px;
    padding: .4rem .65rem;
    user-select: none;
}

.release-notes > summary::-webkit-details-marker {
    display: none;
}

.release-notes > summary::marker {
    content: '';
}

.release-notes > summary > span {
    display: grid;
    gap: .05rem;
    line-height: 1.15;
}

.release-notes > summary small {
    color: var(--app-muted);
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
}

.release-notes > summary strong {
    font-size: .78rem;
    white-space: nowrap;
}

.release-notes > summary:hover,
.release-notes[open] > summary {
    background: #eef4ff;
    border-color: #c7d8f5;
}

.release-notes-panel {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 39, 66, .16);
    min-width: 360px;
    max-width: calc(100vw - 2rem);
    max-height: min(420px, calc(100dvh - 19rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem;
    position: absolute;
    right: 0;
    top: calc(100% + .65rem);
    z-index: 30;
}

.release-notes-panel h2 {
    font-size: 1rem;
    margin: .15rem 0 .2rem;
}

.release-notes-panel header p {
    color: var(--app-muted);
    font-size: .78rem;
    margin: 0;
}

.release-notes-panel ul {
    border-top: 1px solid var(--app-border);
    display: grid;
    gap: .6rem;
    list-style: none;
    margin: .85rem 0 0;
    padding: .85rem 0 0;
}

.release-notes-panel li {
    color: var(--app-text);
    font-size: .84rem;
    padding-left: 1.1rem;
    position: relative;
}

.release-notes-panel li::before {
    background: var(--app-accent);
    border-radius: 999px;
    content: '';
    height: 6px;
    left: 0;
    position: absolute;
    top: .45rem;
    width: 6px;
}

.topbar-icon-action,
.topbar-icon-button {
    align-items: center;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-primary);
    display: inline-flex;
    gap: .45rem;
    justify-content: center;
    min-height: 38px;
    padding: .45rem .65rem;
    text-decoration: none;
}

.topbar-icon-action:hover,
.topbar-icon-button:hover {
    background: #f8fafc;
    border-color: var(--app-border-strong);
    color: var(--app-primary);
}

.topbar-primary-action {
    background: var(--app-primary);
    border-color: var(--app-primary);
    color: #ffffff;
    font-weight: 700;
}

.topbar-primary-action:hover {
    background: var(--app-primary-soft);
    border-color: var(--app-primary-soft);
    color: #ffffff;
}

.topbar-icon-button {
    background: #ffffff;
    height: 38px;
    width: 38px;
}

.topbar-icon-button:disabled {
    background: #f8fafc;
    color: #98a2b3;
    cursor: not-allowed;
}

.topbar-logout {
    color: #8a3342;
}

.status-pill {
    background: var(--app-ok-bg);
    border: 1px solid #b9dfd0;
    border-radius: 999px;
    color: var(--app-ok-text);
    font-size: .82rem;
    font-weight: 600;
    padding: .375rem .75rem;
}

.status-pill-link {
    text-decoration: none;
}

.status-pill-link:hover {
    background: #d9ede5;
    color: var(--app-ok-text);
}

.status-pill-muted {
    background: #f2f4f7;
    border-color: var(--app-border);
    color: var(--app-muted);
}

.status-pill-warning {
    background: #fff7e6;
    border-color: #f4c979;
    color: #7a4b00;
}

.status-pill-warning:hover {
    background: #ffefd1;
    color: #7a4b00;
}

.status-pill-success {
    background: #e8f6ef;
    border-color: #9bd5b8;
    color: #116149;
}

@media (min-width: 769px) and (max-width: 1399px) {
    .app-topbar .topbar-title,
    .app-topbar .app-environment,
    .app-topbar .topbar-icon-button:disabled {
        display: none;
    }

    .app-topbar {
        justify-content: flex-end;
    }

    .app-topbar .company-switcher {
        min-width: 190px;
    }

    .app-topbar .app-user {
        max-width: 250px;
    }
}

.status-pill-info {
    background: #eef4ff;
    border-color: #b8cef3;
    color: #1f4e8c;
}

.status-pill-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.app-flash {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-left-width: 4px;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .07);
    display: flex;
    gap: .75rem;
    margin-bottom: 1rem;
    max-width: 1040px;
    padding: .85rem 1rem;
}

.app-flash-success {
    background: #f4fbf7;
    border-color: #9bd5b8;
    color: #116149;
}

.app-flash-error {
    background: #fff7f7;
    border-color: #efb8b3;
    color: #8f2621;
}

.app-flash-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.app-flash-icon .app-icon {
    height: 20px;
    width: 20px;
}

.app-flash-content {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.app-flash-content strong {
    color: currentColor;
    font-size: .88rem;
}

.app-flash-content > span {
    color: var(--app-text);
    font-size: .86rem;
    overflow-wrap: anywhere;
}

.app-confirm-modal .modal-content {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .22);
}

.app-confirm-modal .modal-header,
.app-confirm-modal .modal-footer {
    border-color: var(--app-border);
    padding: 1rem 1.25rem;
}

.app-confirm-modal .modal-title {
    color: var(--app-text);
    font-size: 1.2rem;
    margin-top: .2rem;
}

.app-confirm-modal .modal-body {
    align-items: flex-start;
    display: flex;
    gap: .85rem;
    padding: 1.25rem;
}

.app-confirm-modal .modal-body p {
    color: var(--app-text);
    margin: 0 0 .35rem;
}

.app-confirm-modal .modal-body small {
    color: var(--app-muted);
}

.app-confirm-icon {
    align-items: center;
    background: #fef2f2;
    border-radius: 50%;
    color: #991b1b;
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}

.app-confirm-icon .app-icon {
    height: 20px;
    width: 20px;
}

.company-config-form {
    max-width: 1180px;
}

.company-config-form fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.company-config-readonly fieldset:disabled {
    opacity: 1;
}

.company-config-readonly .form-control:disabled,
.company-config-readonly .form-select:disabled,
.company-config-readonly .input-group-text {
    background-color: #f8fafc;
    color: var(--app-text);
    opacity: 1;
}

.company-config-readonly .company-framework-option {
    cursor: default;
}

.company-framework-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.company-framework-option {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: .65rem;
    min-width: 0;
    padding: .8rem;
}

.company-framework-option:has(input:checked) {
    background: #eef8f6;
    border-color: #8fc8bf;
}

.company-framework-option input {
    flex: 0 0 auto;
    margin-top: .2rem;
}

.company-framework-option span,
.company-framework-option strong,
.company-framework-option small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.company-framework-option strong {
    color: var(--app-text);
    font-size: .9rem;
}

.company-framework-option small {
    color: var(--app-muted);
    font-size: .78rem;
    margin-top: .15rem;
}

.company-framework-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.company-profile-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.company-applicability {
    max-width: 1180px;
}

.applicability-summary {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.applicability-summary span {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-muted);
    display: grid;
    gap: .1rem;
    padding: .85rem 1rem;
}

.applicability-summary strong {
    color: var(--app-text);
    font-size: 1.65rem;
    line-height: 1;
}

.applicability-legal-note {
    max-width: none;
}

.applicability-review-panel {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.applicability-review-panel .section-heading { margin-bottom: .85rem; }

.applicability-review-current {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
    padding: .85rem;
}

.applicability-review-current div { display: grid; gap: .15rem; }
.applicability-review-current span,
.applicability-review-current small { color: var(--app-muted); font-size: .78rem; }
.applicability-review-current p { grid-column: 1 / -1; margin: 0; }

.applicability-review-form {
    align-items: end;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(200px, .8fr) minmax(300px, 2fr) auto;
    margin-bottom: 1rem;
}

.applicability-review-history summary {
    color: #153b5b;
    cursor: pointer;
    font-weight: 700;
}

.applicability-review-history > div { display: grid; gap: .5rem; margin-top: .75rem; }
.applicability-review-history article { align-items: center; border-top: 1px solid var(--app-border); display: grid; gap: .5rem; grid-template-columns: auto 1fr auto; padding-top: .75rem; }
.applicability-review-history article p { grid-column: 2 / -1; margin: 0; }

.applicability-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.applicability-item {
    background: #fff;
    border: 1px solid var(--app-border);
    border-left: 4px solid #94a3b8;
    border-radius: 8px;
    display: grid;
    gap: .55rem;
    min-width: 0;
    padding: 1rem;
}

.applicability-item-en-uso { border-left-color: #16836f; }
.applicability-item-requiere-validacion { border-left-color: #c27a12; }

.applicability-item header,
.applicability-item footer {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.applicability-item h3,
.applicability-item p { margin: 0; }

.applicability-item h3 { font-size: 1rem; }
.applicability-item p,
.applicability-item footer { color: var(--app-muted); font-size: .86rem; }
.applicability-item footer a { font-weight: 700; white-space: nowrap; }

.applicability-state-en-uso { background: #e7f5ef; border-color: #b8dfd0; color: #116149; }
.applicability-state-por-iniciar { background: #eef1f5; border-color: #d4dae3; color: #4b5563; }
.applicability-state-requiere-validacion { background: #fff4d6; border-color: #ead18c; color: #765100; }

@media (max-width: 900px) {
    .company-framework-grid,
    .company-profile-summary,
    .applicability-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .company-framework-grid,
    .company-profile-summary,
    .applicability-grid,
    .applicability-summary,
    .applicability-review-current,
    .applicability-review-form {
        grid-template-columns: 1fr;
    }

    .applicability-review-current p,
    .applicability-review-history article p { grid-column: 1; }

    .applicability-review-history article { align-items: start; grid-template-columns: 1fr; }
}

body.auth-page.external-form-page {
    display: block;
    min-height: 100vh;
    padding: 32px 18px;
    color: #162f45;
    background: #f3f6f9;
}

.external-form-shell {
    width: min(100%, 920px);
    margin: 0 auto;
}

.external-form-shell .data-panel {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--app-border);
    box-shadow: 0 8px 24px rgba(21, 42, 65, .06);
}

.external-form-shell .panel-heading h2,
.external-form-shell .form-label {
    color: #162f45;
}

.external-form-shell .questionnaire-actions {
    background: rgba(255, 255, 255, .98);
}

.external-form-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    color: #173a59;
}

.external-form-brand span:last-child,
.external-form-brand small {
    display: block;
}

.external-form-brand small {
    margin-top: 2px;
    color: #66788a;
    font-size: .75rem;
}

.external-form-heading {
    margin-bottom: 24px;
}

.external-form-heading h1 {
    margin: 4px 0 8px;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
}

.external-form-heading p:last-child {
    max-width: 720px;
    color: #586b7d;
}

.external-form-footer {
    margin-top: 28px;
    padding: 20px 0;
    border-top: 1px solid var(--app-border);
    color: #66788a;
    font-size: .875rem;
    text-align: center;
}

/* Vinculacion de contrapartes */
.questionnaire-template-list {
    display: grid;
    gap: 18px;
}

.questionnaire-template .panel-heading,
.questionnaire-section .panel-heading {
    align-items: flex-start;
}

.template-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.template-scope > span {
    padding: 7px 10px;
    color: var(--app-muted);
    background: #f4f7f9;
    border: 1px solid var(--app-border);
    border-radius: 5px;
    font-size: 0.82rem;
}

.template-editor {
    border-top: 1px solid var(--app-border);
    padding-top: 14px;
}

.template-editor summary {
    color: #173a59;
    cursor: pointer;
    font-weight: 700;
}

.questionnaire-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.questionnaire-option {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-left: 3px solid #157a74;
    border-radius: 6px;
}

.questionnaire-option h3 {
    margin: 4px 0 6px;
    font-size: 1rem;
}

.questionnaire-option p {
    margin: 0;
    color: var(--app-muted);
    font-size: 0.88rem;
}

.questionnaire-progress {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: 20px;
    align-items: center;
    padding: 18px 20px;
    background: #edf6f4;
    border: 1px solid #bddbd5;
    border-radius: 7px;
}

.questionnaire-progress strong,
.questionnaire-progress span {
    display: block;
}

.questionnaire-progress p {
    margin: 0;
    color: #3f5968;
}

.questionnaire-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.questionnaire-field {
    min-width: 0;
}

.questionnaire-actions {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    justify-content: flex-end;
    padding: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--app-border);
    border-radius: 7px;
    box-shadow: 0 12px 30px rgba(18, 42, 63, 0.12);
}

@media (max-width: 760px) {
    .questionnaire-progress,
    .questionnaire-fields {
        grid-template-columns: 1fr;
    }

    .questionnaire-option {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ARCA visual foundation */
.app-sidebar {
    background: #0a1628;
    border-right-color: rgba(148, 163, 184, .14);
    box-shadow: 8px 0 30px rgba(2, 12, 27, .09);
}

.app-brand {
    align-items: center;
    min-height: 64px;
    padding: .25rem .35rem 1rem;
}

.app-brand-logo {
    height: 52px;
    max-width: 188px;
}

.app-nav-heading {
    color: #60748c;
    font-size: .66rem;
    letter-spacing: .09em;
}

.app-nav-link {
    border-radius: 7px;
    color: #aebdd0;
    min-height: 42px;
}

.app-nav-link:hover {
    background: rgba(255, 255, 255, .055);
    color: #ffffff;
}

.app-nav-link.active {
    background: linear-gradient(90deg, rgba(14, 124, 102, .28), rgba(14, 124, 102, .08));
    color: #ffffff;
}

.app-nav-link.active::before { background: #10a37f; }
.app-topbar { border-bottom-color: #e7ebf0; box-shadow: 0 1px 10px rgba(15, 23, 42, .035); }
.company-switcher { border-color: #dce2e9; box-shadow: none; }
.company-switcher::before { background: #10a37f; }
.topbar-primary-action { background: #0f2744; }
.topbar-primary-action:hover { background: #173b60; }

.page-header h1,
.bootstrap-status h1 { color: #0f172a; font-weight: 760; }
.eyebrow,
.status-kicker { color: #0e7c66; }
.record-summary article:first-child { box-shadow: inset 0 3px 0 #10a37f; }

.auth-page { background: #ffffff; }
.auth-shell-arca {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(460px, 1.05fr) minmax(440px, .95fr);
    justify-items: stretch;
    padding: 0;
}

.auth-shell-arca .auth-hero {
    background: radial-gradient(120% 90% at 0 0, #123a5c 0%, #0a1628 55%);
    grid-template-rows: auto 1fr auto auto;
    min-height: 100vh;
    padding: clamp(2rem, 4vw, 3.5rem);
}

.auth-arca-logo {
    display: block;
    height: 86px;
    max-width: 260px;
    object-fit: contain;
    object-position: left center;
    width: 100%;
}

.auth-shell-arca .auth-hero-copy { max-width: 680px; }
.auth-shell-arca .auth-hero-copy h1 { font-size: clamp(2.25rem, 4vw, 3.1rem); letter-spacing: 0; line-height: 60px; }
.auth-shell-arca .auth-hero-copy .eyebrow { color: #34d399; font-size: .72rem; letter-spacing: .1em; }
.auth-brand-footer { color: rgba(255,255,255,.48); font-size: .75rem; }

.auth-form-panel {
    align-items: center;
    background: #ffffff;
    display: grid;
    justify-items: center;
    min-height: 100vh;
    padding: clamp(1.5rem, 5vw, 5rem);
}

.auth-shell-arca .auth-card {
    border: 0;
    box-shadow: none;
    max-width: 470px;
    padding: 0;
    width: 100%;
}

.auth-logo-mobile { display: none; }
.auth-logo img { display: block; height: 64px; max-width: 210px; width: 100%; }
.auth-card-header .eyebrow {
    background: #e6f5f0;
    border-radius: 999px;
    display: inline-flex;
    font-size: .68rem;
    letter-spacing: .09em;
    padding: .3rem .65rem;
}
.auth-card-header h2 { color: #0f172a; font-size: 1.9rem; font-weight: 760; }
.auth-input { border-radius: 8px; min-height: 48px; }
.auth-submit { background: #0f2744; border-color: #0f2744; border-radius: 8px; min-height: 48px; }
.auth-submit:hover { background: #173b60; border-color: #173b60; }
.auth-secure-note {
    border-top: 1px solid #e4e8ef;
    color: #64748b;
    display: grid;
    font-size: .78rem;
    gap: .18rem;
    line-height: 1.5;
    padding-top: 1.1rem;
}
.auth-secure-note strong { color: #334155; }
.external-brand-logo { display: block; height: 48px; max-width: 170px; width: 100%; }

@media (max-width: 980px) {
    .auth-shell-arca { grid-template-columns: 1fr; }
    .auth-shell-arca .auth-hero { display: none; }
    .auth-form-panel { min-height: 100vh; padding: 2rem 1.25rem; }
    .auth-logo-mobile { display: flex; margin-bottom: .5rem; }
}

/* ARCA compact application scale */
body { font-size: 14px; }
.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.app-sidebar { padding: 1rem .75rem; }
.app-brand { min-height: 58px; padding: 0 .5rem .85rem; }
.app-brand-logo { height: 46px; max-width: 172px; }
.app-nav-group { gap: .12rem; margin-bottom: .8rem; }
.app-nav-heading { font-size: .62rem; letter-spacing: 0; padding: .25rem .7rem; }
.app-nav-link {
    font-size: .82rem;
    gap: .62rem;
    min-height: 38px;
    padding: .48rem .7rem;
}
.app-nav-link .app-icon { height: 16px; width: 16px; }
.app-nav-link.active::before { height: 18px; }
.app-nav-count { font-size: .65rem; min-width: 20px; padding: .1rem .35rem; }
.app-topbar { min-height: 64px; padding: .55rem 1.25rem; }
.topbar-title { min-width: 160px; }
.topbar-label { font-size: .66rem; }
.topbar-title strong { font-size: .86rem; }
.topbar-actions { gap: .45rem; }
.company-switcher { min-height: 44px; padding: .46rem .75rem .46rem .85rem; }
.company-switcher span,
.release-notes small { font-size: .59rem; letter-spacing: 0; }
.company-switcher strong,
.release-notes strong { font-size: .74rem; }
.app-user { min-height: 44px; padding: .3rem .45rem; }
.app-user-text > span { font-size: .75rem; }
.app-user-text small { font-size: .65rem; }
.app-content { padding: 1.45rem 1.75rem 2.25rem; }

.page-header { gap: 1rem; margin-bottom: 1.15rem; padding-bottom: 1rem; }
.page-header h1 { font-size: 1.65rem; line-height: 1.18; margin-bottom: .28rem; }
.page-header .lead { font-size: .84rem; line-height: 1.45; }
.eyebrow { font-size: .67rem; letter-spacing: 0; margin-bottom: .35rem; }
.status-kicker { font-size: .68rem; letter-spacing: 0; margin-bottom: .28rem; text-transform: uppercase; }
.section-heading h2,
.dashboard-card-worklist h2,
.dashboard-personal-work h2 { font-size: 1rem; }
.btn { font-size: .8rem; min-height: 36px; padding: .4rem .72rem; }
.btn-sm { font-size: .73rem; min-height: 32px; }
.form-label { font-size: .76rem; }
.form-control,
.form-select { font-size: .82rem; min-height: 39px; }
.summary-note,
.form-text { font-size: .76rem; }
.state-badge,
.status-pill { font-size: .68rem; }

.dashboard-page-header { align-items: end; }
.dashboard-company-meta { align-items: center; display: flex; flex-wrap: wrap; gap: .3rem; }
.dashboard-hero {
    align-items: center;
    background: linear-gradient(110deg, #0f2744 0%, #113e58 62%, #0e7c66 100%);
    border: 0;
    box-shadow: 0 12px 28px rgba(15, 39, 68, .13);
    min-height: 108px;
    padding: 1rem 1.15rem;
}
.dashboard-hero .eyebrow { color: #6ee7c2; }
.dashboard-hero h2 { color: #ffffff; font-size: 1.05rem; margin-bottom: .18rem; }
.dashboard-hero p:not(.eyebrow) { color: rgba(255,255,255,.7); font-size: .78rem; line-height: 1.4; }
.dashboard-hero-actions { gap: .4rem; }
.dashboard-hero-actions a {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.18);
    border-radius: 7px;
    color: #ffffff;
    font-size: .72rem;
    padding: .42rem .65rem;
}
.dashboard-hero-actions a:first-child { background: #ffffff; border-color: #ffffff; color: #0f2744; }
.dashboard-hero-actions a:hover { background: #ffffff; color: #0f2744; }

.dashboard-personal-work { gap: .7rem; padding: .9rem; }
.dashboard-personal-summary { gap: .55rem; }
.dashboard-personal-summary span {
    background: #ffffff;
    border-color: #e4e8ef;
    box-shadow: inset 0 2px 0 #d9e3eb;
    font-size: .72rem;
    min-height: 74px;
    padding: .65rem .75rem;
}
.dashboard-personal-summary span:first-child { box-shadow: inset 0 2px 0 #0e7c66; }
.dashboard-personal-summary strong { font-size: 1.55rem; }
.dashboard-personal-list { gap: .5rem; }
.dashboard-personal-list > a { gap: .55rem; padding: .65rem .7rem; }
.dashboard-personal-list strong { font-size: .8rem; }
.dashboard-personal-list small { font-size: .72rem; line-height: 1.4; }

.dashboard-company-status {
    background: #ffffff;
    border: 1px solid #e4e8ef;
    border-radius: 8px;
    gap: 0;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: .9rem !important;
    max-width: 1280px;
    overflow: hidden;
}
.dashboard-company-status article {
    border: 0;
    border-left: 1px solid #e4e8ef;
    border-radius: 0;
    box-shadow: none;
    min-height: 76px;
    padding: .75rem .85rem;
}
.dashboard-company-status article:first-child { border-left: 0; }
.dashboard-company-status strong { font-size: .88rem; }

.dashboard-module-grid { gap: .8rem; }
.dashboard-card {
    border-color: #e4e8ef;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .045);
    gap: .65rem;
    padding: .9rem;
}
.dashboard-card header a { color: #2563eb; font-size: .72rem; }
.dashboard-card > strong { color: #0f172a; font-size: 1.75rem; }
.dashboard-metrics { gap: .38rem; }
.dashboard-metrics span {
    background: #f8fafc;
    border-color: #edf0f4;
    font-size: .74rem;
    padding: .45rem .55rem;
}
.dashboard-metrics b { color: #0f2744; font-size: .98rem; }
.dashboard-card-worklist { padding: .95rem; }
.dashboard-worklist-grid { gap: .75rem; }
.dashboard-worklist-group { background: #f8fafc; gap: .5rem; padding: .7rem; }
.dashboard-worklist-group header strong,
.dashboard-work-item strong { font-size: .79rem; }
.dashboard-work-item { gap: .28rem; padding: .6rem; }
.dashboard-work-item small,
.dashboard-worklist-empty p { font-size: .7rem; }
.dashboard-secondary-grid { gap: .8rem; }
.dashboard-event-list small { font-size: .7rem; }

@media (max-width: 1200px) {
    .dashboard-company-status { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-company-status article:nth-child(4) { border-left: 0; }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-content { padding: 1.2rem 1rem 2rem; }
    .dashboard-company-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-company-status article:nth-child(odd) { border-left: 0; }
    .dashboard-company-status article:nth-child(4) { border-left: 1px solid #e4e8ef; }
}

@media (max-width: 620px) {
    .dashboard-company-status { grid-template-columns: 1fr; }
    .dashboard-company-status article { border-left: 0; border-top: 1px solid #e4e8ef; }
    .dashboard-company-status article:first-child { border-top: 0; }
    .dashboard-hero { align-items: stretch; flex-direction: column; }
    .dashboard-hero-actions { justify-content: flex-start; }
}

.future-note-panel {
    align-items: flex-start;
    background: #eef4ff;
    border: 1px solid #b8cef3;
    border-radius: 8px;
    color: #1f4e8c;
    display: grid;
    gap: .25rem;
    margin-bottom: 1rem;
    max-width: 1040px;
    padding: .85rem 1rem;
}

.future-note-panel strong {
    color: #163b67;
}

.quick-filter-panel {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: .85rem 1rem;
}

.quick-filter-panel strong {
    display: block;
}

.quick-filter-panel nav {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
}

.plan-closure-panel {
    background: #ffffff;
    border: 1px solid #c5d7ef;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 1040px;
    padding: 1rem 1.15rem;
}

.plan-closure-panel h2 {
    font-size: 1.1rem;
    margin: .2rem 0 .35rem;
}

.plan-closure-panel p {
    color: var(--app-muted);
    margin: 0;
}

.plan-closure-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-closure-grid strong {
    display: block;
    margin-bottom: .45rem;
}

.plan-closure-list {
    color: var(--app-text);
    display: grid;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.plan-closure-list li {
    align-items: flex-start;
    display: flex;
    gap: .45rem;
}

.plan-closure-list li::before {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 999px;
    content: "";
    flex: 0 0 .55rem;
    height: .55rem;
    margin-top: .45rem;
    width: .55rem;
}

.plan-closure-list-muted {
    color: var(--app-muted);
}

.plan-closure-list-muted li::before {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.risk-map-shell,
.pending-list-panel {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    margin-bottom: 1rem;
    overflow: hidden;
}

.risk-map-toolbar,
.pending-list-panel {
    padding: 1.25rem;
}

.risk-map-toolbar {
    align-items: flex-start;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.risk-map-toolbar h2,
.pending-list-panel h2 {
    font-size: 1.15rem;
    margin: .15rem 0 0;
}

.risk-map-toolbar p {
    color: var(--app-muted);
    margin: 0;
    max-width: 420px;
}

.risk-map-grid {
    display: grid;
    gap: 1px;
    grid-template-columns: minmax(150px, .8fr) repeat(var(--risk-columns), minmax(170px, 1fr));
    overflow-x: auto;
}

.risk-map-axis {
    background: #f8fafc;
    border-bottom: 1px solid var(--app-border);
    color: #334155;
    font-size: .84rem;
    min-height: 58px;
    padding: .85rem;
}

.risk-map-axis-corner,
.risk-map-axis-top {
    align-items: center;
    display: flex;
    font-weight: 700;
}

.risk-map-axis-left {
    display: grid;
    gap: .25rem;
}

.risk-map-axis-left span {
    color: var(--app-muted);
}

.risk-map-cell {
    background: color-mix(in srgb, var(--risk-bg) var(--risk-weight), #ffffff);
    border-left: 4px solid var(--risk-border);
    color: var(--risk-text);
    min-height: 150px;
    padding: .85rem;
}

.risk-map-cell-empty {
    --risk-bg: #f8fafc;
    --risk-border: #dbe3ef;
    --risk-text: #64748b;
}

.risk-map-cell-bajo {
    --risk-bg: #dcfce7;
    --risk-border: #22c55e;
    --risk-text: #14532d;
}

.risk-map-cell-medio {
    --risk-bg: #fef3c7;
    --risk-border: #f59e0b;
    --risk-text: #78350f;
}

.risk-map-cell-alto {
    --risk-bg: #ffedd5;
    --risk-border: #f97316;
    --risk-text: #7c2d12;
}

.risk-map-cell-critico {
    --risk-bg: #fee2e2;
    --risk-border: #dc2626;
    --risk-text: #7f1d1d;
}

.risk-map-cell-sin-evaluacion {
    --risk-bg: #e2e8f0;
    --risk-border: #94a3b8;
    --risk-text: #334155;
}

.risk-map-cell-head {
    align-items: baseline;
    display: flex;
    gap: .5rem;
    margin-bottom: .65rem;
}

.risk-map-cell-head strong {
    font-size: 1.55rem;
    line-height: 1;
}

.risk-map-cell ul,
.pending-list-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.risk-map-cell li {
    border-top: 1px solid rgba(15, 23, 42, .12);
    display: grid;
    gap: .1rem;
    padding: .45rem 0;
}

.risk-map-cell a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.risk-map-cell a:hover {
    text-decoration: underline;
}

.risk-map-cell li span,
.risk-map-more,
.risk-map-empty-label {
    color: rgba(15, 23, 42, .72);
    font-size: .82rem;
}

.risk-map-more {
    display: inline-block;
    margin-top: .25rem;
}

.pending-list-panel {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(220px, .35fr) 1fr;
}

.pending-list-panel ul {
    display: grid;
    gap: .5rem;
}

.pending-list-panel li {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    padding: .7rem .85rem;
}

.risk-dd-recommendation {
    background: #fffaf0;
    border-color: #f4c979;
}

.risk-dd-recommendation h2 {
    color: #7a4b00;
}

.risk-dd-action-panel {
    background: #ffffff;
    margin-top: .85rem;
    max-width: 560px;
}

.risk-dd-action-panel summary {
    color: #7a4b00;
}

.plan-board {
    max-width: none;
    width: 100%;
}

.plan-card-list {
    display: grid;
    gap: 1rem;
}

.plan-activity-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-left: 5px solid #94a3b8;
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    padding: 1rem;
}

.plan-activity-card-baja {
    border-left-color: #22c55e;
}

.plan-activity-card-media {
    border-left-color: #f59e0b;
}

.plan-activity-card-alta {
    border-left-color: #f97316;
}

.plan-activity-card-critica {
    border-left-color: #dc2626;
}

.plan-activity-card-blocked {
    background: linear-gradient(90deg, #fff7ed 0, #ffffff 34%);
    border-color: #fed7aa;
    border-left-color: #dc2626;
}

.plan-card-title-row {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.plan-code {
    color: var(--app-muted);
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.plan-card-title-row h2 {
    font-size: 1.1rem;
    margin: 0;
}

.plan-card-title-row h2 a {
    color: var(--app-text);
    text-decoration: none;
}

.plan-card-title-row h2 a:hover {
    color: var(--app-primary);
}

.plan-card-badges,
.plan-card-signals {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.plan-card-badges {
    justify-content: flex-end;
    min-width: 160px;
}

.plan-card-description {
    color: #475569;
    margin: .75rem 0 1rem;
}

.plan-blocked-alert {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    display: grid;
    gap: .15rem;
    margin-top: .85rem;
    padding: .75rem .85rem;
}

.plan-blocked-alert strong {
    color: #7c2d12;
}

.plan-blocked-alert span {
    font-size: .9rem;
}

.plan-meta-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.plan-meta-grid div {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    display: grid;
    gap: .15rem;
    min-width: 0;
    padding: .7rem .8rem;
}

.plan-meta-grid span,
.plan-progress-head span {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.plan-meta-grid strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.plan-due {
    font-size: .82rem;
    font-style: normal;
    font-weight: 700;
}

.plan-due-vencida {
    color: #991b1b;
}

.plan-due-hoy,
.plan-due-proxima {
    color: #92400e;
}

.plan-due-vigente {
    color: #166534;
}

.plan-due-neutral {
    color: #64748b;
}

.plan-card-signals {
    margin-top: .85rem;
}

.plan-card-side {
    border-left: 1px solid var(--app-border);
    display: grid;
    gap: 1rem;
    grid-template-rows: auto 1fr;
    padding-left: 1rem;
}

.plan-progress {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: .85rem;
}

.plan-progress-head {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    margin-bottom: .65rem;
}

.plan-progress-head strong {
    font-size: 1.35rem;
}

.plan-progress-track {
    background: #e2e8f0;
    border-radius: 999px;
    height: .55rem;
    overflow: hidden;
}

.plan-progress-track span {
    background: #94a3b8;
    display: block;
    height: 100%;
}

.plan-progress-started .plan-progress-track span {
    background: #f59e0b;
}

.plan-progress-steady .plan-progress-track span {
    background: #2563eb;
}

.plan-progress-ok .plan-progress-track span {
    background: #16a34a;
}

.plan-card-actions {
    align-content: start;
    display: grid;
    gap: .55rem;
}

.plan-card-actions > .btn,
.plan-card-actions > form {
    width: 100%;
}

.plan-inline-form {
    display: grid;
    gap: .45rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.app-environment {
    color: var(--app-muted);
    font-size: .875rem;
}

.app-content {
    min-width: 0;
    padding: 2rem 2.5rem 2.5rem;
}

.app-content-wide,
.app-table-wrap {
    min-width: 0;
}

.app-content-wide .page-header,
.app-content-wide .status-grid,
.app-content-wide .record-summary,
.app-content-wide .filter-panel,
.app-content-wide .app-table-wrap,
.app-content-wide .next-step-panel,
.app-content-wide .control-flow-panel,
.app-content-wide .control-readiness-panel,
.app-content-wide .quick-filter-panel,
.app-content-wide .plan-closure-panel,
.app-content-wide .future-note-panel {
    max-width: none;
    width: 100%;
}

.app-content-wide .filter-form-wide {
    max-width: none;
}

.app-content-wide .app-table {
    min-width: 1180px;
}

.app-content-wide .dd-board-table {
    min-width: 1320px;
}

.bootstrap-status {
    max-width: 920px;
}

.eyebrow {
    color: var(--app-accent);
    font-size: .875rem;
    font-weight: 700;
    margin-bottom: .5rem;
    text-transform: uppercase;
}

.bootstrap-status h1 {
    font-size: 2.25rem;
    margin-bottom: .75rem;
}

.bootstrap-status .lead {
    color: var(--app-muted);
    font-size: 1.05rem;
}

.status-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-top: 2rem;
    max-width: 1040px;
}

.status-grid article {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    min-height: 112px;
    padding: 1rem;
}

.status-kicker {
    color: var(--app-muted);
    display: block;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.status-grid strong {
    color: var(--app-text);
    display: block;
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dashboard-hero {
    align-items: flex-start;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7fb 100%);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    max-width: 1280px;
    padding: 1.25rem;
}

.dashboard-hero h2 {
    color: var(--app-text);
    font-size: 1.45rem;
    margin: 0 0 .35rem;
}

.dashboard-hero p {
    color: var(--app-muted);
    margin: 0;
    max-width: 720px;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.dashboard-hero-actions a {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-primary);
    font-size: .84rem;
    font-weight: 700;
    padding: .45rem .75rem;
    text-decoration: none;
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1280px;
}

.dashboard-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    display: grid;
    gap: .85rem;
    min-width: 0;
    padding: 1.1rem;
}

.dashboard-card header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    min-width: 0;
}

.dashboard-card header a {
    color: var(--app-primary);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-card > strong {
    color: var(--app-primary);
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.dashboard-card-warning > strong {
    color: #7a4b00;
}

.dashboard-card-wide {
    min-height: 180px;
}

.dashboard-card-worklist {
    max-width: 1280px;
}

.dashboard-card-worklist h2 {
    font-size: 1.15rem;
    margin: .15rem 0 0;
}

.dashboard-personal-work { max-width: 1280px; }
.dashboard-personal-work h2 { font-size: 1.15rem; margin: .15rem 0 0; }
.dashboard-personal-summary { display: grid; gap: .65rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-personal-summary span { background: #f8fafc; border: 1px solid var(--app-border); border-radius: 7px; color: var(--app-muted); display: grid; gap: .15rem; padding: .7rem; }
.dashboard-personal-summary strong { color: var(--app-text); font-size: 1.35rem; }
.dashboard-personal-list { display: grid; gap: .55rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-personal-list > a { align-items: start; border: 1px solid var(--app-border); border-radius: 7px; color: inherit; display: grid; gap: .65rem; grid-template-columns: auto minmax(0, 1fr); padding: .7rem; text-decoration: none; }
.dashboard-personal-list > a:hover { border-color: #9fcac4; box-shadow: 0 8px 20px rgba(16, 24, 40, .07); }
.dashboard-personal-list strong, .dashboard-personal-list small { display: block; overflow-wrap: anywhere; }
.dashboard-personal-list strong { font-size: .88rem; }
.dashboard-personal-list small { color: var(--app-muted); font-size: .78rem; margin-top: .15rem; }

@media (max-width: 800px) {
    .dashboard-personal-summary, .dashboard-personal-list { grid-template-columns: 1fr; }
}

.dashboard-worklist-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-worklist-group {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    min-width: 0;
    padding: .85rem;
}

.dashboard-worklist-group header {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
}

.dashboard-worklist-group header strong {
    color: var(--app-text);
    font-size: .9rem;
}

.dashboard-worklist-group header a {
    color: var(--app-primary);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-work-item {
    align-content: start;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: .35rem;
    min-width: 0;
    overflow: hidden;
    padding: .7rem;
    text-decoration: none;
}

.dashboard-work-item:hover {
    border-color: #b8cef3;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .08);
}

.dashboard-work-item .state-badge {
    justify-self: start;
    line-height: 1.25;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
}

.dashboard-work-item strong,
.dashboard-work-item small {
    overflow-wrap: anywhere;
}

.dashboard-work-item strong {
    color: var(--app-text);
    font-size: .9rem;
}

.dashboard-work-item small {
    color: var(--app-muted);
    font-size: .8rem;
}

.dashboard-worklist-empty {
    background: #ffffff;
    border: 1px dashed #cfd8e5;
    border-radius: 8px;
    display: grid;
    gap: .2rem;
    min-height: 86px;
    padding: .75rem;
}

.dashboard-worklist-empty strong {
    color: var(--app-text);
    font-size: .84rem;
}

.dashboard-worklist-empty p {
    color: var(--app-muted);
    font-size: .78rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.dashboard-metrics,
.dashboard-event-list {
    display: grid;
    gap: .5rem;
}

.dashboard-metrics span {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    color: var(--app-muted);
    display: flex;
    font-size: .84rem;
    gap: .5rem;
    justify-content: space-between;
    min-width: 0;
    padding: .55rem .65rem;
}

.dashboard-metrics b {
    color: var(--app-primary);
    font-size: 1.18rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.dashboard-event-list > div {
    align-items: flex-start;
    border-top: 1px solid var(--app-border);
    display: grid;
    gap: .2rem;
    min-width: 0;
    padding-top: .55rem;
}

.dashboard-event-list > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.dashboard-event-list strong,
.dashboard-event-list small {
    overflow-wrap: anywhere;
}

.dashboard-event-list small {
    color: var(--app-muted);
    font-size: .8rem;
}

.future-note-card {
    background: #eef4ff;
    border-color: #b8cef3;
}

.report-hero {
    align-items: flex-start;
    background:
        linear-gradient(135deg, rgba(20, 50, 74, .98) 0%, rgba(15, 83, 93, .94) 100%);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
    color: #ffffff;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: 1.5rem;
    position: relative;
}

.report-hero-copy {
    max-width: 740px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.report-hero .status-kicker {
    color: #a7f3d0;
}

.report-hero h2 {
    color: #ffffff;
    font-size: 2rem;
    line-height: 1.12;
    margin: .15rem 0 .35rem;
}

.report-hero p {
    color: rgba(255, 255, 255, .82);
    margin: 0;
    max-width: 760px;
}

.report-hero-lead {
    color: #ffffff !important;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .35rem !important;
}

.report-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.report-hero-actions .btn-outline-secondary {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .28);
    color: #ffffff;
}

.report-meta {
    display: grid;
    gap: .45rem;
    min-width: 280px;
    position: relative;
    z-index: 1;
}

.report-meta span {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    padding: .55rem .65rem;
}

.report-meta b {
    color: #ffffff;
    display: block;
    font-size: .72rem;
    letter-spacing: .03em;
    margin-bottom: .15rem;
    text-transform: uppercase;
}

.report-preview-note {
    align-items: center;
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e3a5f;
    display: flex;
    gap: .75rem;
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: .85rem 1rem;
}

.report-preview-note strong {
    flex: 0 0 auto;
}

.report-preview-note span {
    color: #3f5875;
}

.report-kpi-grid,
.report-module-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 1280px;
}

.report-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.report-module-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.report-kpi-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: .45rem;
    min-height: 158px;
    padding: 1rem;
}

.report-kpi-card strong {
    color: var(--app-primary);
    font-size: 2rem;
    line-height: 1;
}

.report-kpi-card small {
    color: var(--app-muted);
}

.report-kpi-card .state-badge {
    justify-self: start;
    margin-top: .25rem;
}

.report-kpi-card-muted {
    background: #f8fafc;
}

.report-module-card,
.report-priority-board {
    max-width: none;
}

.report-module-card {
    display: grid;
    gap: .85rem;
    min-width: 0;
}

.report-module-card header {
    align-items: center;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding-bottom: .7rem;
}

.report-module-card header a {
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.report-module-card .dashboard-metrics {
    gap: .6rem;
}

.report-module-card .dashboard-metrics span {
    align-items: flex-end;
    min-height: 56px;
    padding: .65rem .75rem;
}

.report-module-card .dashboard-metrics b {
    color: var(--app-primary);
    flex: 0 0 auto;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: right;
}

.report-overview-board {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: 1.25rem;
}

.report-overview-board .report-module-grid {
    margin-bottom: 0;
    margin-top: 1rem;
}

.report-filter-panel {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: .85rem;
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: 1rem;
}

.report-filter-form {
    align-items: end;
    display: grid;
    gap: .85rem;
    grid-template-columns: minmax(160px, 220px) minmax(210px, 300px) minmax(150px, 180px) minmax(150px, 180px) auto;
}

.report-filter-panel nav {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.report-table-board {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: 1.25rem;
}

.report-executive-board {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: 1.25rem;
}

.report-executive-board h2,
.report-executive-board h3 {
    margin: .15rem 0 0;
}

.report-executive-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.report-executive-card {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: .45rem;
    min-height: 140px;
    padding: 1rem;
}

.report-executive-card strong {
    color: var(--app-primary);
    font-size: 2rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.report-overview-board > .report-executive-grid .report-executive-card {
    background: #f8fafc;
}

.report-executive-card small {
    color: var(--app-muted);
}

.report-executive-card-atencion {
    background: #fff7ed;
    border-color: #fed7aa;
}

.report-executive-card-estable {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.report-executive-card-sin-datos {
    background: #f8fafc;
}

.report-executive-split {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
}

.report-distribution-card,
.report-compliance-card {
    max-width: none;
}

.report-distribution-list,
.report-compliance-list {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
}

.report-distribution-row {
    align-items: center;
    display: grid;
    gap: .75rem;
    grid-template-columns: 130px minmax(120px, 1fr) 90px;
}

.report-distribution-row span {
    color: var(--app-muted);
    font-weight: 600;
}

.report-distribution-row strong {
    font-size: .9rem;
    text-align: right;
}

.report-distribution-track {
    background: #e5e7eb;
    border-radius: 999px;
    height: .65rem;
    overflow: hidden;
}

.report-distribution-track i {
    background: var(--app-primary);
    display: block;
    height: 100%;
}

.report-distribution-bajo .report-distribution-track i {
    background: #16a34a;
}

.report-distribution-medio .report-distribution-track i {
    background: #d97706;
}

.report-distribution-alto .report-distribution-track i {
    background: #ea580c;
}

.report-distribution-critico .report-distribution-track i {
    background: #b91c1c;
}

.report-distribution-sin_evaluacion .report-distribution-track i {
    background: #64748b;
}

.report-compliance-list {
    grid-template-columns: minmax(0, 1fr);
}

.report-compliance-list dt {
    margin-top: .25rem;
}

.report-compliance-list dd {
    color: var(--app-primary);
    font-weight: 700;
}

.report-table-board h2 {
    font-size: 1.2rem;
    margin: .15rem 0 0;
}

.report-table-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.report-table-card {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    overflow: hidden;
}

.report-table-card header {
    background: #f8fafc;
    border-bottom: 1px solid var(--app-border);
    padding: .9rem 1rem;
}

.report-table-card header p {
    color: var(--app-muted);
    margin: 0;
}

.report-table-card > .summary-note {
    padding: 1rem;
}

.report-table-wrap {
    overflow-x: auto;
}

.report-table {
    min-width: 840px;
}

.report-table td {
    vertical-align: middle;
}

.report-priority-board {
    margin-bottom: 1rem;
}

.report-priority-board h2 {
    font-size: 1.15rem;
    margin: .15rem 0 0;
}

.report-export-board {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: 1.25rem;
}

.report-export-board h2 {
    font-size: 1.15rem;
    margin: .15rem 0 0;
}

.report-export-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.report-export-card {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    padding: 1rem;
}

.report-export-card .status-list {
    margin: 0;
}

.report-export-list {
    color: var(--app-muted);
    display: grid;
    gap: .45rem;
    margin: 0;
    padding-left: 1.1rem;
}

.report-export-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.report-export-history {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: 1.25rem;
}

.report-export-history h2 {
    font-size: 1.15rem;
    margin: .15rem 0 0;
}

.report-export-history-summary {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.report-export-history-summary article {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 0;
    padding: .85rem;
}

.report-export-history-summary strong {
    color: var(--app-primary);
    display: block;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.state-badge-vencida {
    background: #fff1f3;
    border-color: #f3b8c2;
    color: #9f1239;
}

.report-export-history-list {
    display: grid;
    gap: .75rem;
}

.report-export-history-list article {
    align-items: start;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: .6rem;
    grid-template-columns: minmax(220px, 1.35fr) minmax(140px, .75fr) minmax(160px, 1fr) minmax(220px, 1.4fr);
    padding: .85rem;
}

.report-export-history-list article > div,
.report-export-history-list strong,
.report-export-history-list span,
.report-export-history-list small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-export-history-list strong {
    display: block;
    margin-top: .35rem;
}

.report-export-history-list span,
.report-export-history-list small {
    color: var(--app-muted);
}

.report-future-board,
.report-future-panel {
    max-width: 1280px;
}

.report-future-board {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.25rem;
}

.report-future-board h2 {
    font-size: 1.15rem;
    margin: .15rem 0 0;
}

.report-future-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.report-future-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: .55rem;
    min-width: 0;
    padding: .95rem;
}

.report-future-item header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: space-between;
}

.report-future-item strong,
.report-future-item small {
    overflow-wrap: anywhere;
}

.report-future-item small {
    color: var(--app-muted);
    line-height: 1.45;
}

.panel-link {
    color: var(--app-primary);
    text-decoration: none;
}

.panel-link:hover {
    color: var(--app-accent);
    text-decoration: underline;
}

.risk-institutional-summary { max-width: none; }
.risk-matrix-layout { display:grid; gap:1rem; grid-template-columns:minmax(0,1.45fr) minmax(360px,.55fr); margin-bottom:1rem; }
.risk-matrix-layout.is-readonly { grid-template-columns:minmax(0,1fr); }
.risk-matrix-layout > article, .risk-register { max-width:none; }
.risk-heatmap-panel { overflow:hidden; }
.institutional-heatmap { display:grid; gap:.35rem; grid-template-columns:110px repeat(5,minmax(82px,1fr)); margin:1rem 0; min-width:650px; }
.heatmap-corner,.heatmap-axis-x,.heatmap-axis-y,.heatmap-cell { border:1px solid var(--app-border); border-radius:6px; min-width:0; padding:.55rem; }
.heatmap-axis-x,.heatmap-axis-y { align-items:center; background:#f8fafc; display:grid; gap:.1rem; }
.heatmap-axis-x small,.heatmap-axis-y small { color:var(--app-muted); font-size:.7rem; overflow-wrap:anywhere; }
.heatmap-cell { display:grid; gap:.15rem; min-height:92px; position:relative; }
.heatmap-cell > span { font-size:.72rem; font-weight:700; }
.heatmap-cell > strong { font-size:1.35rem; }
.heatmap-cell > small { font-size:.72rem; font-weight:700; }
.heatmap-cell a { font-size:.7rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.heatmap-bajo { background:#ecfdf5; border-color:#86efac; color:#166534; }
.heatmap-moderado { background:#fffbeb; border-color:#fde68a; color:#92400e; }
.heatmap-alto { background:#fff7ed; border-color:#fdba74; color:#9a3412; }
.heatmap-extremo { background:#fef2f2; border-color:#fca5a5; color:#991b1b; }
.risk-level-bajo { background:#ecfdf5;color:#166534; }.risk-level-moderado{background:#fffbeb;color:#92400e}.risk-level-alto{background:#fff7ed;color:#9a3412}.risk-level-extremo{background:#fef2f2;color:#991b1b}
@media(max-width:1100px){.risk-matrix-layout{grid-template-columns:1fr}.risk-heatmap-panel{overflow-x:auto}}
.risk-detail-header{align-items:flex-start}.risk-detail-summary{max-width:none}.risk-detail-summary strong{font-size:1rem;line-height:1.35}.risk-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-bottom:1rem}.risk-detail-grid>.dashboard-card{max-width:none}.risk-score-comparison{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;margin:1rem 0}.risk-score-value{min-height:170px;border:1px solid #dbe3ec;border-left:4px solid #dc2626;padding:1rem;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:.4rem;background:#fff}.risk-score-value>strong{font-size:2.4rem;line-height:1}.risk-score-value.is-pending{border-left-color:#94a3b8;background:#f8fafc}.risk-score-arrow{font-size:1.5rem;color:#64748b}.future-note-panel.compact{margin-top:1rem}.risk-context-list>div{padding:1rem 0;border-bottom:1px solid #e5eaf0}.risk-context-list>div:last-child{border-bottom:0}.risk-context-list span,.risk-factor-list small{display:block;color:#64748b;font-size:.82rem}.risk-context-list p{margin:.4rem 0 0;line-height:1.55}.risk-factor-list{display:grid;gap:.65rem;margin:1rem 0}.risk-factor-list>div{display:grid;grid-template-columns:auto 1fr;gap:.2rem .75rem;border:1px solid #dbe3ec;padding:.85rem 1rem;background:#fff}.risk-factor-list small{grid-column:2}.factor-code{font-size:.72rem;font-weight:700;color:#0f766e;background:#ecfdf5;padding:.2rem .4rem;align-self:start}.inline-action-form{display:flex;align-items:flex-end;gap:.75rem;margin-top:1rem}.inline-action-form>div{flex:1}.table-primary-link{color:#153b5b;text-decoration:none}.table-primary-link:hover{text-decoration:underline}@media(max-width:900px){.risk-detail-grid{grid-template-columns:1fr}.risk-score-comparison{grid-template-columns:1fr}.risk-score-arrow{transform:rotate(90deg);justify-self:center}.inline-action-form{align-items:stretch;flex-direction:column}}
.risk-factor-catalog,.risk-reevaluation-panel{max-width:none;margin-top:1rem}.risk-catalog-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,.5fr);gap:1rem;align-items:start}.risk-catalog-layout.is-readonly{grid-template-columns:1fr}.catalog-create-form{border-left:1px solid #dbe3ec;padding-left:1rem;display:grid;gap:.8rem}.catalog-create-form h3{margin:.15rem 0 0;font-size:1.05rem}.risk-factor-catalog td small{color:#64748b}.risk-reevaluation-panel .form-grid{margin-top:1rem}@media(max-width:900px){.risk-catalog-layout{grid-template-columns:1fr}.catalog-create-form{border-left:0;border-top:1px solid #dbe3ec;padding:1rem 0 0}}
.institutional-controls-panel{max-width:none;margin:1rem 0}.institutional-control-list{display:grid;gap:.75rem;margin:1rem 0}.institutional-control-list>article{border:1px solid #dbe3ec;border-left:4px solid #0f766e;padding:1rem;background:#fff}.institutional-control-main{display:flex;gap:.75rem;align-items:flex-start}.institutional-control-main>div{display:grid;gap:.2rem}.institutional-control-main small,.institutional-control-meta small{display:block;color:#64748b}.institutional-control-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin-top:.9rem;padding-top:.8rem;border-top:1px solid #edf0f3}.institutional-control-list p{margin:.8rem 0 0;color:#475569}.control-link-form{display:grid;grid-template-columns:minmax(220px,1fr) minmax(190px,.55fr);gap:.75rem;align-items:end;border-top:1px solid #dbe3ec;margin-top:1rem;padding-top:1rem}.control-link-notes{grid-column:1/-1}.control-unlink-action{margin-top:.8rem}.control-unlink-action summary{cursor:pointer;color:#9f1239;font-weight:600}.control-unlink-action form{display:grid;gap:.6rem;margin-top:.7rem;max-width:620px}.empty-inline{display:grid;gap:.25rem;padding:1rem 0;color:#64748b}@media(max-width:760px){.institutional-control-meta,.control-link-form{grid-template-columns:1fr}.control-link-notes{grid-column:auto}}
.risk-history-table .app-table,.risk-factor-catalog .app-table{min-width:0;width:100%}.risk-history-table{overflow-x:visible}@media(max-width:700px){.risk-history-table{overflow-x:auto}.risk-history-table .app-table,.risk-factor-catalog .app-table{min-width:620px}}
.approval-action summary{color:#0f766e;cursor:pointer;font-weight:700}.approval-action form{display:grid;gap:.55rem;margin-top:.65rem;min-width:220px}.risk-history-table td{vertical-align:top}.risk-history-table small{color:#64748b}
.institutional-treatment-panel{max-width:none;margin:1rem 0}.treatment-list{display:grid;gap:.75rem;margin:1rem 0}.treatment-list>article{border:1px solid #dbe3ec;padding:1rem;background:#fff}.treatment-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.75rem;align-items:start}.treatment-heading>div{display:grid;gap:.25rem}.treatment-heading small,.treatment-meta small{display:block;color:#64748b}.treatment-strategy{border-radius:4px;padding:.3rem .55rem;font-size:.75rem;font-weight:800;text-transform:uppercase;background:#e0f2fe;color:#075985}.strategy-mitigar{background:#ecfdf5;color:#166534}.strategy-evitar{background:#fef2f2;color:#991b1b}.strategy-transferir{background:#eef2ff;color:#3730a3}.strategy-aceptar{background:#fffbeb;color:#92400e}.treatment-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;border-top:1px solid #edf0f3;margin:.9rem 0;padding-top:.8rem}.treatment-create-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;border-top:1px solid #dbe3ec;margin-top:1rem;padding-top:1rem}.treatment-create-form .form-grid-full{grid-column:1/-1}@media(max-width:900px){.treatment-create-form,.treatment-meta{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.treatment-heading,.treatment-create-form,.treatment-meta{grid-template-columns:1fr}.treatment-create-form .form-grid-full{grid-column:auto}}
.residual-review-panel{max-width:none;margin:1rem 0}.residual-proposal{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:1rem 0}.residual-proposal>div{border-left:3px solid #0f766e;background:#f8fafc;padding:.85rem;display:grid;gap:.25rem}.residual-proposal>div>strong{font-size:1.2rem}.residual-proposal small,.residual-calculate-action span{color:#64748b}.residual-controls-detail{border-top:1px solid #dbe3ec;padding-top:.8rem}.residual-controls-detail summary{cursor:pointer;font-weight:700}.residual-control-list{display:grid;gap:.5rem;margin-top:.7rem}.residual-control-list>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .75rem;border:1px solid #e5eaf0;padding:.7rem}.residual-control-list small{grid-column:1/-1;color:#64748b}.residual-approval-form{display:grid;grid-template-columns:150px 150px minmax(260px,1fr) auto;gap:.75rem;align-items:end;border-top:1px solid #dbe3ec;margin-top:1rem;padding-top:1rem}.residual-calculate-action{display:flex;align-items:center;gap:.75rem;margin-top:1rem}@media(max-width:850px){.residual-proposal,.residual-approval-form{grid-template-columns:1fr}.residual-calculate-action{align-items:flex-start;flex-direction:column}}
.risk-acceptance-panel{max-width:none;margin:1rem 0}.acceptance-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:1rem 0}.acceptance-summary>div{display:grid;gap:.25rem;border-left:3px solid #0f766e;background:#f8fafc;padding:.85rem}.acceptance-summary small,.acceptance-reason small{color:#64748b}.acceptance-reason{border:1px solid #e5eaf0;padding:1rem}.acceptance-reason p{margin:.35rem 0 .6rem;line-height:1.55}.acceptance-create-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;border-top:1px solid #dbe3ec;margin-top:1rem;padding-top:1rem}.acceptance-create-form .form-grid-full{grid-column:1/-1}.acceptance-second-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:end;margin-top:1rem}.acceptance-history{margin-top:1rem}.acceptance-history summary{cursor:pointer;font-weight:700}@media(max-width:850px){.acceptance-summary,.acceptance-create-form,.acceptance-second-form{grid-template-columns:1fr}.acceptance-create-form .form-grid-full{grid-column:auto}}
.acceptance-inbox{max-width:none;margin:1rem 0}.acceptance-inbox-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;margin:1rem 0}.acceptance-inbox-kpis>div{border-left:3px solid #0f766e;background:#f8fafc;padding:.75rem .9rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem}.acceptance-inbox-kpis span{color:#475569;font-size:.82rem}.acceptance-inbox-kpis strong{font-size:1.45rem}.acceptance-state-vencida,.acceptance-state-revision_atrasada{border-color:#fecaca;color:#991b1b;background:#fef2f2}.acceptance-state-pendiente_segunda{border-color:#fde68a;color:#92400e;background:#fffbeb}.acceptance-state-revision_proxima{border-color:#bae6fd;color:#075985;background:#f0f9ff}@media(max-width:760px){.acceptance-inbox-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

.status-list dt {
    color: var(--app-muted);
    font-weight: 600;
}

.status-list dd {
    margin: 0;
}

.page-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    max-width: 1040px;
}

.page-header h1 {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 .5rem;
}

.page-header .lead {
    color: var(--app-muted);
    font-size: 1rem;
    margin: 0;
}

.empty-state,
.app-form,
.detail-grid,
.record-summary,
.filter-panel,
.next-step-panel,
.app-table-wrap {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    max-width: 1040px;
}

.empty-state,
.app-form,
.filter-panel,
.next-step-panel {
    padding: 1.25rem;
}

.empty-state h2,
.next-step-panel h2 {
    font-size: 1.125rem;
    margin-bottom: .5rem;
}

.empty-state p,
.next-step-panel p {
    color: var(--app-muted);
    margin: 0;
}

.app-table {
    margin-bottom: 0;
    min-width: 920px;
}

.app-table th {
    background: #f8fafc;
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.app-table th,
.app-table td {
    border-color: var(--app-border);
    padding: .85rem 1rem;
}

.app-table tbody tr:hover {
    background: #fbfcfe;
}

.app-table-wrap {
    overflow-x: auto;
}

.table-actions {
    display: grid;
    gap: .6rem;
    justify-content: end;
    min-width: 460px;
}

.table-actions-compact {
    min-width: 0;
}

.table-actions > .btn {
    justify-self: end;
}

.inline-action-form {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

.inline-action-form .form-control {
    max-width: 14rem;
    min-width: 9rem;
}

.table-action-stack {
    gap: .5rem;
    margin-bottom: .5rem;
    min-width: 220px;
}

.evidence-list {
    display: grid;
    gap: .5rem;
    margin-top: .75rem;
}

.evidence-item {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: .15rem;
    padding: .625rem;
}

.evidence-item span,
.evidence-item code {
    color: var(--app-muted);
    font-size: .82rem;
}

.execution-card-list {
    display: grid;
    gap: 1rem;
}

.execution-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
}

.execution-card-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.execution-card-header h3 {
    color: var(--app-text);
    font-size: 1.05rem;
    margin: 0;
}

.execution-card-status {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.execution-meta {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    overflow: hidden;
}

.execution-meta div {
    background: #f8fafc;
    border-right: 1px solid var(--app-border);
    min-width: 0;
    padding: .75rem;
}

.execution-meta div:last-child {
    border-right: 0;
}

.execution-meta dt,
.execution-notes h4,
.execution-evidence-panel h4,
.execution-actions-panel h4 {
    color: var(--app-muted);
    font-size: .75rem;
    font-weight: 800;
    margin: 0 0 .4rem;
    text-transform: uppercase;
}

.execution-meta dd {
    color: var(--app-text);
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}

.execution-card-body {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
}

.execution-notes,
.execution-evidence-panel,
.execution-actions-panel {
    background: #fbfcfe;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    padding: .85rem;
}

.execution-notes p {
    color: var(--app-text);
    overflow-wrap: anywhere;
}

.execution-actions-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.execution-action-form {
    background: #ffffff;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    display: grid;
    gap: .5rem;
    min-width: 0;
    padding: .75rem;
}

.execution-action-form strong {
    color: var(--app-text);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.execution-inline-form {
    display: grid;
    gap: .5rem;
}

.execution-download-link {
    justify-self: start;
}

.document-actions {
    min-width: 300px;
}

.beneficiary-actions {
    min-width: 260px;
}

.beneficiary-summary {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: 1rem;
}

.beneficiary-table-wrap {
    max-width: 100%;
}

.beneficiary-table {
    min-width: 1120px;
}

.beneficiary-table th,
.beneficiary-table td {
    vertical-align: middle;
}

.beneficiary-name {
    font-weight: 600;
    max-width: 180px;
}

.beneficiary-summary article {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    min-height: 92px;
    padding: 1rem;
}

.beneficiary-summary span {
    color: var(--app-muted);
    display: block;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.beneficiary-summary strong {
    color: var(--app-primary);
    display: block;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    margin-top: .2rem;
    overflow-wrap: anywhere;
}

.document-action-panel {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    padding: .45rem .55rem;
}

.document-action-panel summary {
    color: var(--app-primary);
    cursor: pointer;
    font-size: .84rem;
    font-weight: 700;
}

.document-action-panel-danger summary {
    color: #9b1c1c;
}

.document-action-form {
    display: grid;
    gap: .5rem;
    margin-top: .6rem;
}

.inline-fieldset {
    background: #fbfcfe;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 1rem;
}

.inline-fieldset legend,
.inline-fieldset > strong {
    color: var(--app-text);
    display: block;
    font-size: .84rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.inline-fieldset-compact {
    display: grid;
    gap: .5rem;
    padding: .75rem;
}

.consultation-match-row td {
    background: #fbfcfe;
    padding-top: 0;
}

.match-list {
    display: grid;
    gap: .75rem;
    padding: .85rem 0 .25rem;
}

.match-item {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: .85rem;
}

.match-item header {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.match-item dl {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.match-item dt {
    color: var(--app-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.match-item dd {
    margin: .15rem 0 0;
    overflow-wrap: anywhere;
}

.match-item p {
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: .85rem;
    margin: .75rem 0 0;
    padding-top: .75rem;
}

.match-actions {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: .85rem;
}

.match-actions form {
    display: grid;
    gap: .5rem;
}

.pending-matches-table {
    min-width: 1180px;
}

.pending-actions-panel {
    min-width: 280px;
    text-align: left;
}

.pending-actions {
    display: grid;
    gap: .75rem;
    margin-top: .75rem;
}

.pending-actions form {
    display: grid;
    gap: .5rem;
}

.dd-action-stack {
    display: grid;
    gap: .5rem;
    justify-content: end;
}

.compact-list {
    display: grid;
    gap: .5rem;
}

.compact-list article {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: grid;
    gap: .2rem;
    padding: .55rem;
}

.compact-list small {
    color: #64748b;
}

.mini-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.decision-final-card {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
}

.decision-final-card h3 {
    color: var(--app-text);
    font-size: 1.05rem;
    margin: .15rem 0 .35rem;
}

.decision-final-card p {
    max-width: 760px;
}

.decision-final-card .status-pill {
    white-space: nowrap;
}

.decision-final-card-success {
    background: #f1fbf6;
    border-color: #b7e1ca;
}

.decision-final-card-warning {
    background: #fffbeb;
    border-color: #f4d58a;
}

.decision-final-card-danger {
    background: #fff5f5;
    border-color: #fecaca;
}

.decision-summary-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.decision-summary-grid article {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: .25rem;
    min-width: 0;
    min-height: 104px;
    padding: 1rem;
}

.decision-summary-grid strong,
.decision-summary-grid small {
    overflow-wrap: anywhere;
}

.decision-summary-grid small {
    color: #64748b;
}

.decision-warning-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .85rem;
}

.decision-warning-list span {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #9a3412;
    font-size: .82rem;
    padding: .35rem .65rem;
}

.decision-blocker-list {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .85rem;
    padding: .75rem;
}

.decision-blocker-list strong {
    color: #991b1b;
    flex-basis: 100%;
    font-size: .86rem;
}

.decision-blocker-list span {
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 999px;
    color: #991b1b;
    font-size: .82rem;
    padding: .35rem .65rem;
}

.document-action-dates {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.document-history-row td {
    background: #fbfcfe;
    padding-top: 0;
}

.document-history {
    border-top: 1px solid var(--app-border);
    padding: .85rem 0 0;
}

.document-history summary {
    color: var(--app-primary);
    cursor: pointer;
    font-size: .86rem;
    font-weight: 700;
}

.history-empty {
    color: var(--app-muted);
    margin: .75rem 0 0;
}

.version-list {
    display: grid;
    gap: .75rem;
    margin-top: .75rem;
}

.version-item {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: .85rem;
}

.version-item header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.version-item dl {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.version-item dt {
    color: var(--app-muted);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.version-item dd {
    font-size: .84rem;
    margin: .15rem 0 0;
    overflow-wrap: anywhere;
}

.version-item p {
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: .85rem;
    margin: .75rem 0 0;
    padding-top: .75rem;
}

.table-action-form {
    align-items: center;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
}

.table-action-form:has(button:only-child) {
    grid-template-columns: auto;
}

.state-badge {
    background: #f2f4f7;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text);
    display: inline-flex;
    font-size: .82rem;
    font-weight: 600;
    padding: .25rem .625rem;
}

.state-badge-borrador {
    background: #fff7e6;
    border-color: #f4c979;
    color: #7a4b00;
}

.state-badge-pendiente-revision {
    background: #eaf2ff;
    border-color: #b8cef3;
    color: #1f4e8c;
}

.state-badge-activa {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-activo {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-en-revision {
    background: #fff7e6;
    border-color: #f4c979;
    color: #7a4b00;
}

.state-badge-rechazada,
.state-badge-archivada {
    background: #f2f4f7;
    border-color: var(--app-border-strong);
    color: #475467;
}

.state-badge-cumplido {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-cumplida,
.state-badge-efectivo,
.state-badge-adecuado {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-conforme {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-pendiente {
    background: #fff7e6;
    border-color: #f4c979;
    color: #7a4b00;
}

.state-badge-baja {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.state-badge-media {
    background: #eef4ff;
    border-color: #b8cef3;
    color: #1f4e8c;
}

.state-badge-alta {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.state-badge-critica {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.state-badge-borrador,
.state-badge-inactivo,
.state-badge-anulada,
.state-badge-reemplazada,
.state-badge-descartado {
    background: #f2f4f7;
    border-color: var(--app-border-strong);
    color: #475467;
}

.state-badge-verificado {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-opcional {
    background: #eef4ff;
    border-color: #b8cef3;
    color: #1f4e8c;
}

.state-badge-programada {
    background: #eef4ff;
    border-color: #b8cef3;
    color: #1f4e8c;
}

.state-badge-sin-consultar,
.state-badge-sin-diseno,
.state-badge-sin-efectividad,
.state-badge-sin-evaluar {
    background: #f2f4f7;
    border-color: var(--app-border-strong);
    color: #475467;
}

.state-badge-sin-coincidencia,
.state-badge-no-pep,
.state-badge-completada,
.state-badge-seguimiento-normal,
.state-badge-falso-positivo {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-posible-coincidencia,
.state-badge-requiere-revision,
.state-badge-no-concluyente,
.state-badge-con-observaciones,
.state-badge-calculada,
.state-badge-efectividad-pendiente,
.state-badge-pendiente-ejecucion,
.state-badge-sin-evaluacion-ejecucion,
.state-badge-parcialmente-efectivo,
.state-badge-historico {
    background: #fff7e6;
    border-color: #f4c979;
    color: #7a4b00;
}

.state-badge-coincidencia-confirmada,
.state-badge-pep,
.state-badge-inadecuado,
.state-badge-inefectivo,
.state-badge-no-cumplida,
.state-badge-error {
    background: #fff1f3;
    border-color: #f3b8c2;
    color: #9f1239;
}

.state-badge-cargado {
    background: #f2f4f7;
    border-color: var(--app-border-strong);
    color: #475467;
}

.state-badge-exitoso {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-parcial {
    background: #fff7e6;
    border-color: #f4c979;
    color: #7a4b00;
}

.state-badge-fallido {
    background: #fff1f3;
    border-color: #f3b8c2;
    color: #9f1239;
}

.state-badge-futuro,
.state-badge-informado,
.state-badge-sin-iniciar {
    background: #eef4ff;
    border-color: #b8cef3;
    color: #1f4e8c;
}

.state-badge-en-proceso,
.state-badge-en-revision {
    background: #fff7e6;
    border-color: #f4c979;
    color: #7a4b00;
}

.state-badge-aprobada {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-cancelada,
.state-badge-no-ejecutada,
.state-badge-vencida {
    background: #f2f4f7;
    border-color: var(--app-border-strong);
    color: #475467;
}

.state-badge-vigente {
    background: var(--app-ok-bg);
    border-color: #b9dfd0;
    color: var(--app-ok-text);
}

.state-badge-proximo-vencer {
    background: #fff7e6;
    border-color: #f4c979;
    color: #7a4b00;
}

.state-badge-vencido,
.state-badge-anulado,
.state-badge-archivado {
    background: #fff1f3;
    border-color: #f3b8c2;
    color: #9f1239;
}

.state-badge-riesgo-sin-evaluacion {
    background: #f8fafc;
    border-color: #dbe3ef;
    color: #475569;
}

.state-badge-riesgo-sin-vigencia {
    background: #f8fafc;
    border-color: #dbe3ef;
    color: #334155;
}

.state-badge-riesgo-vigente {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.state-badge-riesgo-proxima-30 {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.state-badge-riesgo-vencida {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.state-badge-riesgo-bajo {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.state-badge-riesgo-medio {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.state-badge-riesgo-alto {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.state-badge-riesgo-critico {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.btn {
    border-radius: 6px;
}

.btn-primary {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover {
    background: var(--app-primary-soft);
    border-color: var(--app-primary-soft);
}

.form-control,
.form-select {
    border-color: var(--app-border-strong);
    border-radius: 6px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 .2rem rgba(40, 114, 113, .14);
}

.confirm-check {
    align-items: center;
    color: var(--app-muted);
    display: inline-flex;
    font-size: .82rem;
    gap: .4rem;
    margin: 0;
    white-space: nowrap;
}

.confirm-check input {
    margin: 0;
}

.confirm-check-block {
    align-items: flex-start;
    white-space: normal;
}

.requirement-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-heading h2 {
    font-size: 1.1rem;
    margin: 0;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-full {
    grid-column: 1 / -1;
}

.form-help {
    color: #64748b;
    font-size: .85rem;
    margin: .35rem 0 0;
}

.option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.checklist-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checklist-grid article {
    background: #fbfcfe;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: .55rem;
    min-width: 0;
    padding: .9rem;
}

.checklist-grid strong {
    color: var(--app-text);
}

.checklist-grid p {
    color: var(--app-muted);
    margin: 0;
}

.filter-panel {
    margin-bottom: 1rem;
}

.filter-form {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(180px, 240px) auto;
}

.filter-form-wide {
    grid-template-columns: minmax(220px, 1fr) minmax(130px, 170px) minmax(160px, 210px) minmax(150px, 190px) auto;
}

.dd-filter-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dd-filter-form .filter-actions {
    align-self: end;
    flex-wrap: wrap;
}

.inline-action-panel {
    min-width: 220px;
}

.inline-action-panel summary {
    color: var(--app-primary);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
}

.audit-filter-form {
    align-items: end;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.audit-filter-form > div {
    min-width: 0;
}

.audit-filter-form > div:first-child {
    grid-column: span 2;
}

.audit-filter-form .filter-actions {
    grid-column: span 2;
}

.filter-actions {
    display: flex;
    gap: .5rem;
}

.record-summary {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 1rem;
    padding: .85rem;
}

.record-summary article {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 0;
    min-height: 96px;
    padding: 1rem;
}

.record-summary article:last-child {
    border-right: 1px solid #e2e8f0;
}

.record-summary strong {
    color: var(--app-primary);
    display: block;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.record-summary .state-badge,
.record-summary .status-pill {
    font-size: .82rem;
}

.audit-summary {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.alerts-summary {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.pending-table td:nth-child(2) { min-width: 300px; max-width: 560px; }
.pending-table td:nth-child(2) .summary-note { display: block; margin-top: .25rem; }
.pending-row-overdue { box-shadow: inset 3px 0 #b42318; }

.alerts-filter-panel,
.alerts-board,
.alerts-create-card,
.alerts-note-panel,
.alerts-future-board {
    max-width: none;
}

.alerts-future-board {
    margin-top: 1rem;
}

.alerts-summary .summary-attention {
    background: #f5faf8;
    box-shadow: inset 0 -3px #74b99e;
}

.alerts-summary .summary-danger {
    background: #fff8f7;
    box-shadow: inset 0 -3px #c6433b;
}

.alerts-filter-form {
    align-items: end;
    grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(150px, 1fr)) auto;
}

@media (max-width: 1500px) {
    .alerts-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dd-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .alerts-filter-form .filter-actions,
    .dd-filter-form .filter-actions {
        align-self: end;
    }
}

.alerts-filter-panel nav {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.alerts-focus-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
    max-width: none;
}

.alerts-focus-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
    display: grid;
    gap: .65rem;
    min-width: 0;
    padding: 1rem;
}

.alerts-focus-card strong {
    color: #0f172a;
    font-size: 1.03rem;
    line-height: 1.35;
}

.alerts-focus-card p {
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

.alerts-focus-card .state-badge {
    width: fit-content;
}

.alerts-focus-card .btn {
    justify-self: start;
}

.alerts-focus-card-strong {
    border-color: #9bd5b8;
    box-shadow: 0 14px 32px rgba(17, 97, 73, .08);
}

.alerts-focus-card-escalated {
    border-color: #b8cef3;
    box-shadow: 0 14px 32px rgba(31, 78, 140, .08);
}

.alerts-create-card {
    margin-bottom: 1rem;
}

.alerts-create-composer > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    list-style: none;
}

.alerts-create-composer > summary::-webkit-details-marker {
    display: none;
}

.alerts-create-composer > summary > span:first-child {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.alerts-create-composer > summary strong {
    color: #0f172a;
    font-size: 1.12rem;
}

.alerts-create-composer > summary small {
    color: #64748b;
    line-height: 1.45;
}

.alerts-create-composer[open] > summary {
    border-bottom: 1px solid var(--app-border);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.alerts-composer-close,
.alerts-create-composer[open] .alerts-composer-open {
    display: none;
}

.alerts-create-composer[open] .alerts-composer-close {
    display: inline-flex;
}

.alerts-create-form {
    margin-top: .9rem;
}

.alert-detail-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    margin-bottom: 1rem;
    max-width: none;
}

.alert-detail-card,
.alert-action-card {
    min-width: 0;
}

.alert-detail-card h2,
.alert-action-card h2 {
    font-size: 1.15rem;
    margin: .15rem 0 0;
}

.alert-description {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
}

.alert-description p,
.alert-action-card p {
    color: #334155;
    line-height: 1.55;
    margin: .35rem 0 0;
}

.alerts-table {
    min-width: 1080px;
}

.alerts-table tbody tr {
    --alert-row-background: #ffffff;
}

.alerts-table tbody tr:hover {
    --alert-row-background: #f8fafc;
}

.alerts-table tbody tr.alert-row-overdue {
    --alert-row-background: #fff8f7;
    box-shadow: inset 3px 0 #b42318;
}

.alerts-table tbody tr.alert-row-critical:not(.alert-row-overdue) {
    --alert-row-background: #fffdf5;
    box-shadow: inset 3px 0 #d97706;
}

.alerts-table tbody td {
    background: var(--alert-row-background);
}

.alerts-table .alerts-sticky-code,
.alerts-table .alerts-sticky-action {
    position: sticky;
    z-index: 2;
}

.alerts-table .alerts-sticky-code {
    left: 0;
}

.alerts-table .alerts-sticky-action {
    box-shadow: -8px 0 16px rgba(15, 23, 42, .05);
    right: 0;
    text-align: right;
}

.alerts-table thead .alerts-sticky-code,
.alerts-table thead .alerts-sticky-action {
    background: #f8fafc;
    z-index: 3;
}

.alert-action-card-sticky {
    align-self: start;
    position: sticky;
    top: 1rem;
}

.alerts-inline-empty {
    min-height: 150px;
    padding: 1.5rem;
}

.alerts-empty-state .header-actions {
    justify-content: center;
}

.alerts-future-board-separated {
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .alert-action-card-sticky {
        position: static;
    }

    .alerts-create-composer > summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

.state-badge-prioridad-baja {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.state-badge-prioridad-media {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.state-badge-prioridad-alta {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.state-badge-prioridad-critica {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.state-badge-confirmada {
    background: #e8f6ef;
    border-color: #9bd5b8;
    color: #116149;
}

.state-badge-escalada {
    background: #eef4ff;
    border-color: #b8cef3;
    color: #1f4e8c;
}

.state-badge-descartada {
    background: #f2f4f7;
    border-color: var(--app-border-strong);
    color: #475467;
}

.audit-filter-panel,
.audit-board {
    max-width: 1280px;
}

.audit-export-panel {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 1280px;
    padding: 1rem;
}

.audit-export-main {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.audit-export-main h2 {
    font-size: 1.08rem;
    margin: 0 0 .25rem;
}

.audit-export-main p {
    color: var(--app-muted);
    margin: 0;
}

.audit-export-metrics {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.audit-export-metrics article {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 0;
    padding: .85rem;
}

.audit-export-metrics strong {
    color: var(--app-primary);
    display: block;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.audit-export-last {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    gap: .85rem;
    padding: .85rem;
}

.audit-export-last div {
    min-width: 0;
}

.audit-export-last strong,
.audit-export-last small {
    display: block;
    overflow-wrap: anywhere;
}

.audit-export-last small {
    color: var(--app-muted);
    margin-top: .15rem;
}

.audit-export-list {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.audit-export-list article {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    padding: .75rem;
}

.audit-export-list strong,
.audit-export-list span,
.audit-export-list small {
    display: block;
    overflow-wrap: anywhere;
}

.audit-export-list span,
.audit-export-list small {
    color: var(--app-muted);
    font-size: .82rem;
    margin-top: .15rem;
}

.audit-list-board {
    margin: 0;
    padding: 1rem;
}

.summary-note {
    color: var(--app-muted);
    display: block;
    font-size: .78rem;
    margin-top: .25rem;
}

.detail-grid {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.plan-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    max-width: 1040px;
}

.info-panel,
.timeline-item {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.info-panel {
    padding: 1.25rem;
}

.detail-list {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 1rem;
}

.detail-list div {
    background: #f8fafc;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    min-width: 0;
    padding: .85rem;
}

.detail-list dt {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.rich-text-block {
    border-top: 1px solid var(--app-border);
    padding-top: 1rem;
}

.rich-text-block h3 {
    font-size: 1rem;
    margin: 0 0 .5rem;
}

.rich-text-block p {
    color: #334155;
    margin: 0;
    white-space: pre-wrap;
}

.timeline-list {
    display: grid;
    gap: .75rem;
}

.timeline-item {
    padding: 1rem;
}

.timeline-item p {
    color: #334155;
    margin: .65rem 0;
    white-space: pre-wrap;
}

.evidence-item-header {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.state-badge-seguimiento {
    background: #eef6ff;
    border-color: #b7d5f7;
    color: #1f4e8c;
}

.next-step-panel {
    margin-bottom: 1rem;
}

.casos-board { max-width: none; }
.casos-review-queue { align-items: center; background: #eaf5f2; border: 1px solid #a9d6cb; border-left: 4px solid #287271; display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; margin: 0 0 1rem; padding: .85rem 1rem; }
.casos-review-queue > div:first-child { display: grid; gap: .2rem; }
.casos-review-queue strong { color: #17324d; }
.casos-review-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; min-width: 0; }
.casos-review-links a { color: #145e5b; font-weight: 650; overflow-wrap: anywhere; }
.casos-section#revision-caso .stacked-action-form { border-bottom: 1px solid var(--app-border); margin-bottom: 1rem; max-width: 52rem; padding-bottom: 1rem; }
.casos-section#revision-caso .header-actions { flex-wrap: wrap; }
.casos-review-warning { background: #fff7e6; border-left: 3px solid #b7781f; color: #593b16; padding: .75rem 1rem; }
.casos-close-form { max-width: 52rem; }
.casos-close-result { border-left: 3px solid #287271; padding: .35rem 0 .35rem 1rem; }
.casos-close-result strong, .casos-close-result .summary-note { display: block; }
.casos-close-result p { margin: .75rem 0 0; overflow-wrap: anywhere; }
.casos-evaluation-note { background: #f2f8f6; border-left: 3px solid #287271; margin: .75rem 0 0; padding: .65rem .85rem; }
.casos-reopen-form { margin-top: 1.25rem; max-width: 52rem; }
.casos-closure-history { border-top: 1px solid var(--app-border); margin-top: 1.25rem; padding-top: 1.25rem; }
.casos-closure-history h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; }
.casos-filter-panel { max-width: none; }
.casos-filter-form { align-items: end; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.casos-filter-form > div:first-child { grid-column: span 2; }
.casos-board .table { min-width: 1120px; }
.casos-board thead th { background: #f6f8fb; border-bottom-color: #ccd5df; color: #405266; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.casos-board tbody tr { --caso-row-bg: #fff; }
.casos-board tbody tr:hover { --caso-row-bg: #f7fafb; }
.casos-board tbody tr.caso-row-overdue { --caso-row-bg: #fffafa; box-shadow: inset 3px 0 #c6433b; }
.casos-board tbody tr.caso-row-critical:not(.caso-row-overdue) { --caso-row-bg: #fffcf5; box-shadow: inset 3px 0 #c68122; }
.casos-board tbody td { background: var(--caso-row-bg); transition: background-color .15s ease; }
.casos-board .casos-sticky-case { left: 0; position: sticky; z-index: 2; }
.casos-board .casos-sticky-action { min-width: 155px; position: sticky; right: 0; z-index: 2; }
.casos-board thead .casos-sticky-case, .casos-board thead .casos-sticky-action { background: #eef2f6; z-index: 3; }
.casos-board tbody .casos-sticky-case { box-shadow: 1px 0 0 #e1e7ed; }
.casos-board tbody .casos-sticky-action { box-shadow: -1px 0 0 #e1e7ed; }
.state-badge.plazo-en_plazo { background: #e7f5ef; border-color: #b8dfd0; color: #116149; }
.state-badge.plazo-vence_pronto { background: #fff4d6; border-color: #ead18c; color: #765100; }
.state-badge.plazo-vencido { background: #fde9e7; border-color: #efb8b3; color: #9b2722; }
.state-badge.plazo-sin_fecha { background: #eef1f5; border-color: #d4dae3; color: #4b5563; }
.casos-reprogramaciones { margin-top: 1rem; }
.casos-manual-form { max-width: none; }
.casos-manual-form .stacked-action-form { max-width: 78rem; }
.casos-form-intro { align-items: center; background: #edf7f5; border-left: 3px solid #287271; color: #24485a; display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 1.25rem; padding: .75rem 1rem; }
.casos-form-intro span { color: var(--app-muted); font-size: .9rem; }
.field-optional { color: var(--app-muted); font-size: .72rem; font-weight: 600; margin-left: .3rem; }
.field-meta { color: var(--app-muted); display: flex; font-size: .78rem; gap: 1rem; justify-content: space-between; margin-top: .35rem; }
.invalid-field-message { color: #a52c27; }
.casos-origin-meta { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-bottom: 1rem; }
.casos-code-line { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem .6rem; }
.casos-origin-label { color: #526477; font-size: .7rem; font-weight: 750; text-transform: uppercase; }
.casos-origin-label.is-manual { color: #17675f; }
.casos-board td { max-width: 28rem; }
.casos-board td:first-child { min-width: 230px; }
.casos-board .summary-note { display: block; margin-top: .2rem; }
.casos-pending-count { display: block; white-space: nowrap; }
.casos-title-link { color: #17324d; font-weight: 650; text-decoration: none; }
.casos-title-link:hover { text-decoration: underline; }
.casos-section-nav { background: #fff; border-bottom: 1px solid var(--app-border); box-shadow: 0 8px 16px rgba(16, 38, 60, .04); display: flex; flex-wrap: wrap; gap: .15rem; margin: 0 0 1rem; padding: .35rem .25rem; position: sticky; top: var(--casos-topbar-height, 76px); z-index: 9; }
.casos-section-nav a { border-bottom: 2px solid transparent; color: #526477; font-size: .84rem; font-weight: 700; padding: .45rem .65rem; text-decoration: none; }
.casos-section-nav a:hover, .casos-section-nav a:focus-visible { border-color: #287271; color: #17675f; }
.casos-section { max-width: none; scroll-margin-top: calc(var(--casos-topbar-height, 76px) + var(--casos-nav-height, 48px) + 12px); }
.casos-section { border-top: 3px solid #d9e4e8; }
.casos-section#seguimientos-caso, .casos-section#evidencias-caso { border-top-color: #9bc8c1; }
.casos-section#solicitudes-caso, .casos-section#hallazgos-caso { border-top-color: #ddbf82; }
.casos-section#revision-caso { border-top-color: #92b5dc; }
.casos-section#cierre-caso { border-top-color: #a9b3c1; }
.casos-inline-empty { background: #f8fafb; border: 1px dashed #cfd8e1 !important; min-height: 0; padding: 1.15rem; text-align: left; }
.casos-inline-empty h2 { font-size: 1rem; }
.casos-empty-state .header-actions { justify-content: center; margin-top: .75rem; }
.casos-form-card, .casos-origin-card, .casos-action-card { max-width: none; }
.casos-section .timeline-item { border: 0; border-bottom: 1px solid var(--app-border); border-radius: 0; box-shadow: none; padding: 1rem 0; }
.casos-section .timeline-item:last-child { border-bottom: 0; }
.casos-section .timeline-item > div:first-child { align-items: start; display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; }
.casos-section .timeline-item .summary-note { display: block; }
.casos-section .inline-action-form { max-width: 36rem; }
.casos-request-form { border-bottom: 1px solid var(--app-border); margin-bottom: 1rem; padding-bottom: 1rem; }
.casos-request-form > div:nth-child(3) { max-width: 16rem; }
.casos-answer-form { border-top: 1px solid var(--app-border); margin-top: .9rem; padding-top: .9rem; }
.casos-answer-form .btn { justify-self: start; }
.casos-request-answer { background: #f3f8f7; border-left: 3px solid #287271; margin-top: .85rem; padding: .8rem 1rem; }
.casos-request-answer p { margin: .4rem 0; }
.casos-composer { border-bottom: 1px solid var(--app-border); margin: 0 0 1rem; padding: .25rem 0 1rem; }
.casos-composer summary { color: #17324d; cursor: pointer; font-weight: 700; padding: .35rem 0; width: fit-content; }
.casos-composer summary:hover { color: #287271; }
.pep-manual-composer > summary {
    align-items: center;
    color: #17324d;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    list-style: none;
}
.pep-manual-composer > summary::-webkit-details-marker { display: none; }
.pep-manual-composer > summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1;
}
.pep-manual-composer[open] > summary::after { content: '\2212'; }
.pep-manual-composer > summary strong { display: block; font-size: 1.05rem; margin-top: .15rem; }
.pep-manual-composer > form { margin-top: 1rem; }

/* Transversal UI refresh: shared hierarchy and interaction polish. */
.app-main { background: #f4f7fa; }

.app-topbar {
    box-shadow: 0 3px 14px rgba(15, 39, 66, .055);
    min-height: 76px;
    padding-inline: clamp(1rem, 2vw, 2rem);
}

.topbar-title strong { color: var(--app-primary); font-size: .96rem; letter-spacing: 0; }
.topbar-label { font-size: .72rem; letter-spacing: .02em; }
.topbar-actions { gap: .55rem; }

.company-switcher,
.release-notes > summary {
    background: #fbfcfe;
    box-shadow: 0 1px 2px rgba(15, 39, 66, .03);
    min-height: 50px;
}

.company-switcher { border-left: 3px solid var(--app-accent); padding-left: .8rem; }
.company-switcher:hover,
.release-notes > summary:hover,
.release-notes[open] > summary { background: #f3f8fb; border-color: #b9cedb; }
.app-user-link { min-height: 48px; padding-inline: .55rem; }
.app-environment { background: #f2f4f7; border: 1px solid var(--app-border); border-radius: 999px; font-size: .72rem; padding: .28rem .55rem; }

.app-content { padding: 2rem clamp(1.25rem, 3vw, 3rem) 3rem; }

.page-header {
    align-items: center;
    border-bottom: 1px solid var(--app-border);
    margin-bottom: 1.35rem;
    padding-bottom: 1.15rem;
}

.page-header > div:first-child { min-width: 0; }
.page-header h1 { color: #132f49; font-size: 2rem; font-weight: 750; line-height: 1.16; margin-bottom: .4rem; }
.page-header .lead { line-height: 1.55; max-width: 78ch; }
.eyebrow,
.status-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.header-actions { align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.btn {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-weight: 650;
    gap: .4rem;
    justify-content: center;
    min-height: 40px;
    padding: .48rem .85rem;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.btn:hover:not(:disabled) { box-shadow: 0 5px 14px rgba(15, 39, 66, .11); transform: translateY(-1px); }
.btn:active:not(:disabled) { box-shadow: none; transform: translateY(0); }
.btn:focus-visible,
.topbar-icon-button:focus-visible,
.topbar-icon-action:focus-visible,
.app-nav-link:focus-visible { box-shadow: 0 0 0 .22rem var(--app-focus); outline: 0; }
.btn-sm { min-height: 34px; padding: .34rem .65rem; }
.btn-primary { box-shadow: 0 3px 9px rgba(23, 50, 77, .16); }
.btn-outline-secondary { background: #ffffff; border-color: #aebbc8; color: #34495e; }
.btn-outline-secondary:hover { background: #eef3f7; border-color: #8295a8; color: #17324d; }

.empty-state,
.app-form,
.detail-grid,
.record-summary,
.filter-panel,
.next-step-panel,
.app-table-wrap { box-shadow: var(--app-shadow-sm); }
.next-step-panel,
.filter-panel,
.app-form,
.empty-state { border-color: #d4dee7; }
.next-step-panel + .next-step-panel,
.next-step-panel + .app-table-wrap,
.app-table-wrap + .next-step-panel { margin-top: 1rem; }

.section-heading { border-bottom: 1px solid #e8edf2; padding-bottom: .8rem; }
.section-heading h2 { color: #17324d; font-size: 1.08rem; font-weight: 750; }
.record-summary { background: #ffffff; gap: .75rem; padding: .75rem; }
.record-summary article { background: #f8fafc; border-color: #dde5ec; box-shadow: inset 0 3px 0 #d5e3e8; min-height: 100px; padding: 1rem 1.05rem; }
.record-summary article:first-child { box-shadow: inset 0 3px 0 var(--app-accent); }
.record-summary strong { font-size: 1.5rem; margin-top: .22rem; }
.status-kicker { color: #5e7082; }

.future-note-panel { border-left: 4px solid #5e8eb5; box-shadow: var(--app-shadow-sm); padding: 1rem 1.1rem; }
.future-note-panel strong { color: #17324d; }
.app-table-wrap { border-color: #d4dee7; scrollbar-color: #a9bac8 #f4f7fa; scrollbar-width: thin; }
.app-table th { background: #f1f5f8; border-bottom-width: 1px; color: #526579; font-size: .71rem; letter-spacing: .035em; padding-block: .78rem; vertical-align: middle; }
.app-table td { color: #26384a; line-height: 1.45; vertical-align: middle; }
.app-table tbody tr:nth-child(even) > td { background: rgba(247, 250, 252, .65); }
.app-table tbody tr:hover > td { background: #f1f7f8; }

.form-label { color: #33485c; font-size: .86rem; font-weight: 680; margin-bottom: .38rem; }
.form-control,
.form-select { background-color: #fcfdfe; border-color: #bdc9d5; min-height: 42px; }
.form-control:hover,
.form-select:hover { border-color: #92a7b8; }
.form-control:focus,
.form-select:focus { background-color: #ffffff; box-shadow: 0 0 0 .2rem var(--app-focus); }
.form-text,
.summary-note { color: #6b7c8d; line-height: 1.45; }
.status-pill,
.state-badge { line-height: 1.25; }
.app-flash { box-shadow: var(--app-shadow-md); max-width: none; }
.release-notes-panel,
.app-confirm-modal .modal-content { box-shadow: 0 20px 52px rgba(15, 39, 66, .18); }

@media (max-width: 768px) {
    .app-content { padding: 1.2rem 1rem 2rem; }
    .page-header { align-items: stretch; gap: .9rem; }
    .page-header h1 { font-size: 1.7rem; }
    .header-actions { align-items: stretch; display: grid; grid-template-columns: 1fr; width: 100%; }
    .header-actions > .btn,
    .header-actions > form,
    .header-actions > form .btn { width: 100%; }
    .record-summary { gap: .65rem; }
    .record-summary article { min-height: 86px; padding: .85rem .95rem; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: .5rem; }
    .btn:hover:not(:disabled) { transform: none; }
}
.casos-composer .stacked-action-form { margin-top: .75rem; max-width: 52rem; }
.casos-derived-action { align-items: center; background: #f5faf8; border: 1px solid #b9ddcf; border-radius: 8px; display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr) auto auto; margin-top: .85rem; padding: .85rem; }
.casos-derived-action > div { display: grid; gap: .2rem; min-width: 0; }
.casos-derived-action strong { overflow-wrap: anywhere; }
.casos-derived-composer { margin-top: .85rem; }
.casos-derived-form { margin-top: 1rem; }
.form-span-2 { grid-column: 1 / -1; }
.casos-access-explanation { align-items: start; background: #f8fafc; border: 1px solid var(--app-border); border-radius: 8px; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); margin-bottom: 1rem; padding: 1rem; }
.casos-access-explanation p { color: var(--app-muted); margin: .3rem 0 0; }
.casos-access-explanation .casos-composer { border: 0; margin: 0; padding: 0; }
.casos-team-composer { background: #fbfcfe; border: 1px solid var(--app-border); border-radius: 8px; padding: .85rem; }
.casos-team-list { display: grid; gap: .75rem; }
.casos-team-member { align-items: center; background: #ffffff; border: 1px solid var(--app-border); border-radius: 8px; display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr) auto auto minmax(100px, auto); padding: .85rem; }
.casos-team-member > div:first-child { display: grid; min-width: 0; }
.casos-team-member > div:first-child strong { overflow-wrap: anywhere; }
.casos-team-member.is-retired { background: #f8fafc; color: #64748b; }
.casos-remove-member { border: 0; margin: 0; padding: 0; }
.casos-remove-member summary { color: #b42318; font-size: .85rem; }
@media (max-width: 1100px) { .casos-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .casos-filter-form { grid-template-columns: 1fr; } .casos-filter-form > div:first-child { grid-column: auto; } .casos-section { scroll-margin-top: calc(var(--casos-topbar-height, 76px) + 12px); } .casos-section-nav { flex-wrap: nowrap; overflow-x: auto; position: static; } .casos-section-nav a { white-space: nowrap; } .field-meta { align-items: flex-start; flex-direction: column; gap: .15rem; } }
@media (max-width: 760px) { .casos-derived-action { align-items: flex-start; grid-template-columns: 1fr; } .casos-derived-action .btn { justify-self: start; } }
@media (max-width: 760px) { .casos-access-explanation, .casos-team-member { grid-template-columns: 1fr; } .casos-team-member .casos-composer { justify-self: start; } }

.control-flow-panel {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .05);
    margin-bottom: 1rem;
    max-width: 1040px;
    padding: 1rem;
}

.control-flow-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-flow-step {
    background: #f8fafc;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: .65rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
    padding: .85rem;
    text-decoration: none;
}

.control-flow-step:hover {
    border-color: #b8cef3;
    box-shadow: 0 10px 22px rgba(16, 24, 40, .08);
    transform: translateY(-1px);
}

.control-flow-number {
    align-items: center;
    background: #e8f6ef;
    border: 1px solid #9bd5b8;
    border-radius: 999px;
    color: #116149;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 800;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.control-flow-content {
    display: grid;
    gap: .45rem;
    min-width: 0;
}

.control-flow-content strong {
    color: var(--app-text);
    font-size: .95rem;
}

.control-flow-content .state-badge {
    justify-self: start;
}

.control-flow-content small {
    color: var(--app-muted);
    font-size: .8rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.control-readiness-panel {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .05);
    margin-bottom: 1rem;
    max-width: 1040px;
    padding: 1rem;
}

.control-readiness-panel-ready {
    border-color: #9bd5b8;
}

.control-readiness-panel-pending {
    border-color: #f4c979;
}

.control-readiness-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: .85rem;
}

.control-readiness-grid article {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    display: grid;
    gap: .6rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
    padding: .75rem;
}

.control-readiness-grid article.is-complete {
    background: #f1fbf6;
    border-color: #b7e1ca;
}

.control-readiness-grid article.is-pending {
    background: #fffbeb;
    border-color: #f4d58a;
}

.control-readiness-grid strong {
    background: #ffffff;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: #116149;
    font-size: .68rem;
    font-weight: 800;
    padding: .2rem .45rem;
    text-transform: uppercase;
}

.control-readiness-grid .is-pending strong {
    color: #7a4b00;
}

.control-readiness-grid h3 {
    color: var(--app-text);
    font-size: .92rem;
    margin: 0 0 .2rem;
}

.control-readiness-grid p {
    color: var(--app-muted);
    font-size: .8rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.readiness-action-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.methodology-form {
    border-top: 1px solid var(--app-border);
    margin-top: 1rem;
    padding-top: 1rem;
}

.compact-heading {
    margin-bottom: .85rem;
}

.compact-heading h3 {
    font-size: 1rem;
    margin: 0 0 .2rem;
}

.subsection-panel {
    border-top: 1px solid var(--app-border);
    padding: 1rem 0;
}

.subsection-title {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.subsection-title span,
.muted-copy,
.form-text {
    color: var(--app-muted);
}

.inline-action-panel {
    min-width: 14rem;
}

.inline-action-panel summary {
    color: var(--app-primary);
    cursor: pointer;
    font-weight: 700;
}

.danger-action-panel summary {
    color: var(--bs-danger);
}

.inline-action-panel form {
    margin-top: .65rem;
}

.explanation-panel {
    margin-bottom: .5rem;
}

.risk-explanation {
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    margin-top: .65rem;
    max-width: 42rem;
    padding: .85rem;
}

.risk-explanation-summary {
    display: grid;
    gap: .3rem .75rem;
    grid-template-columns: max-content 1fr;
    margin-bottom: .85rem;
}

.risk-factor-detail {
    border-top: 1px solid var(--app-border);
    padding-top: .75rem;
}

.risk-factor-detail + .risk-factor-detail {
    margin-top: .75rem;
}

.risk-variable-list {
    display: grid;
    gap: .5rem;
}

.risk-variable-row {
    align-items: center;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(9rem, 1.2fr) minmax(8rem, 1fr) max-content max-content max-content;
}

@media (max-width: 900px) {
    .risk-variable-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }
}

.methodology-trace-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
    max-width: none;
}

.methodology-summary,
.methodology-future-note,
.methodology-action-grid,
.methodology-map-panel,
.methodology-section {
    max-width: none;
}

.methodology-blockers {
    margin-bottom: 1rem;
}

.methodology-section-nav {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
    display: flex;
    gap: .35rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding: .45rem;
}

.methodology-section-nav a {
    border-radius: 6px;
    color: #475569;
    flex: 0 0 auto;
    font-size: .86rem;
    font-weight: 700;
    padding: .55rem .75rem;
    text-decoration: none;
}

.methodology-section-nav a:hover,
.methodology-section-nav a:focus-visible {
    background: #eef4ff;
    color: #1f4e8c;
}

.methodology-section {
    scroll-margin-top: 1rem;
}

.methodology-trace-grid article {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    padding: 1rem;
}

.methodology-trace-grid strong,
.methodology-trace-grid small {
    display: block;
    overflow-wrap: anywhere;
}

.methodology-trace-grid small {
    color: var(--app-muted);
    font-size: .8rem;
    margin-top: .25rem;
}

.methodology-map-panel {
    max-width: 1180px;
}

.methodology-map {
    display: grid;
    gap: 1rem;
}

.methodology-factor-card {
    background: #fbfcfe;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 1rem;
}

.methodology-factor-card header {
    align-items: flex-start;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: .85rem;
}

.methodology-factor-card h3 {
    font-size: 1.05rem;
    margin: 0 0 .25rem;
}

.methodology-factor-card small {
    color: var(--app-muted);
}

.methodology-variable-list {
    display: grid;
    gap: .75rem;
}

.methodology-variable-card {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.3fr);
    padding: .85rem;
}

.methodology-option-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.methodology-option-strip > span:not(.state-badge) {
    background: #eef4ff;
    border: 1px solid #b8cef3;
    border-radius: 999px;
    color: #1f4e8c;
    display: inline-flex;
    gap: .35rem;
    padding: .35rem .6rem;
}

.methodology-option-strip small {
    color: #5c6f88;
}

.detail-grid div {
    border-bottom: 1px solid var(--app-border);
    padding: 1rem 1.25rem;
}

.detail-grid dt {
    color: var(--app-muted);
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.compact-detail {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.compact-detail dt {
    color: var(--app-muted);
    font-size: .8rem;
    font-weight: 700;
}

.compact-detail dd {
    margin: .2rem 0 0;
    overflow-wrap: anywhere;
}

.inline-form-row {
    align-items: center;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.inline-form-row-select {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto;
}

.principal-user-form {
    margin-bottom: 1rem;
}

.section-divider {
    border-color: var(--app-border);
    margin: 1rem 0;
}

.action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-bottom: 1rem;
    max-width: 1040px;
}

.action-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    padding: 1.25rem;
}

.action-panel h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.action-panel p {
    color: var(--app-muted);
}

.stacked-fields,
.stacked-action-form {
    display: grid;
    gap: 1rem;
}

.audit-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.audit-event {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 1rem;
}

.audit-event header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.audit-event header strong,
.audit-event header span {
    display: block;
}

.audit-event header span {
    color: var(--app-muted);
    font-size: .85rem;
}

.audit-code {
    color: var(--app-muted);
    display: block;
    font-size: .75rem;
    font-weight: 500;
    margin-top: .2rem;
}

.audit-meta {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 1rem;
}

.audit-meta div {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    min-width: 0;
    padding: .65rem .75rem;
}

.audit-meta dt,
.audit-change-row small {
    color: var(--app-muted);
    display: block;
    font-size: .76rem;
    font-weight: 700;
    margin-bottom: .2rem;
    text-transform: uppercase;
}

.audit-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.audit-change-list {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    overflow: hidden;
}

.audit-change-row {
    display: grid;
    gap: 0;
    grid-template-columns: minmax(130px, 190px) repeat(2, minmax(0, 1fr));
}

.audit-change-row + .audit-change-row {
    border-top: 1px solid var(--app-border);
}

.audit-change-row > span,
.audit-change-row > div {
    min-width: 0;
    padding: .7rem .8rem;
}

.audit-change-row > span {
    background: #f8fafc;
    color: var(--app-text);
    font-size: .86rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.audit-change-row > div {
    border-left: 1px solid var(--app-border);
}

.audit-change-row strong {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.audit-empty {
    color: var(--app-muted);
    margin: 0;
}

.audit-values {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.audit-values span {
    color: var(--app-muted);
    display: block;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.audit-values pre {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    color: var(--app-text);
    font-size: .82rem;
    margin: 0;
    max-height: 220px;
    overflow: auto;
    padding: .75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-event > pre {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    color: var(--app-text);
    font-size: .82rem;
    margin: 0;
    overflow: auto;
    padding: .75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.roles-summary {
    margin-bottom: 1rem;
}

.module-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.25rem;
    max-width: 1180px;
}

.module-strip span {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-muted);
    font-size: .82rem;
    padding: .45rem .7rem;
}

.module-strip strong {
    color: var(--app-primary);
    margin-left: .25rem;
}

.roles-layout {
    display: grid;
    gap: 1rem;
    max-width: 1180px;
}

.role-highlight {
    background: #f7fbff;
    border: 1px solid #bed7f2;
    border-radius: 8px;
    padding: 1.25rem;
}

.role-highlight h2 {
    font-size: 1.35rem;
    margin: 0 0 .35rem;
}

.role-highlight p {
    color: var(--app-muted);
    margin: 0;
    max-width: 760px;
}

.role-highlight-meta,
.role-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .85rem;
}

.role-highlight-meta span,
.role-metrics span {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-muted);
    font-size: .82rem;
    padding: .35rem .65rem;
}

.role-metrics strong {
    color: var(--app-primary);
}

.roles-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    align-items: start;
}

.role-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1.25rem;
}

.role-card header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-width: 0;
}

.role-card header > div {
    min-width: 0;
}

.role-card h2 {
    font-size: 1.1rem;
    margin: .2rem 0 .35rem;
}

.role-card p,
.role-empty {
    color: var(--app-muted);
    margin: 0;
}

.role-code {
    color: var(--app-accent);
    display: block;
    font-size: .75rem;
    font-weight: 700;
}

.permission-groups {
    display: grid;
    gap: .55rem;
    min-width: 0;
}

.permission-group {
    background: #fbfcfe;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    overflow: hidden;
}

.permission-group summary {
    align-items: center;
    color: var(--app-primary);
    cursor: pointer;
    display: flex;
    font-size: .88rem;
    font-weight: 700;
    gap: .75rem;
    justify-content: space-between;
    padding: .65rem .8rem;
}

.permission-group summary strong {
    background: #e9f2ff;
    border-radius: 999px;
    color: var(--app-primary);
    min-width: 2rem;
    padding: .15rem .45rem;
    text-align: center;
}

.permission-list {
    border-top: 1px solid var(--app-border);
    display: grid;
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: .75rem;
}

.permission-list li {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    min-width: 0;
    padding: .65rem .75rem;
}

.permission-list strong,
.permission-list span {
    display: block;
    overflow-wrap: anywhere;
}

.permission-list strong {
    font-size: .85rem;
}

.permission-list span {
    color: var(--app-muted);
    font-size: .82rem;
    margin-top: .15rem;
}

@media (max-width: 768px) {
    .auth-shell {
        padding: 1rem;
    }

    .auth-hero {
        gap: 1.25rem;
        min-height: auto;
        padding: 1.5rem;
    }

    .auth-hero-copy {
        align-self: start;
    }

    .auth-hero-copy h1 {
        font-size: 2rem;
        line-height: 1.08;
    }

    .auth-signal-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        margin: 0;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .report-kpi-grid,
    .report-module-grid,
    .report-executive-grid,
    .report-export-grid,
    .report-future-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-overview-board .section-heading,
    .report-table-board .section-heading,
    .report-export-board .section-heading,
    .report-future-board .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: .5rem;
    }

    .app-sidebar {
        border-right: 0;
        height: auto;
        position: static;
        padding: 1rem;
    }

    .app-sidebar-heading { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
    .app-sidebar .app-brand { border-bottom: 0; margin-bottom: 0; padding-bottom: .25rem; }
    .app-mobile-menu-toggle { background: transparent; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; color: #fff; display: inline-flex; font-size: .9rem; font-weight: 650; padding: .4rem .75rem; }
    .app-mobile-menu-toggle:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }
    .app-sidebar nav { display: none; margin-top: 1rem; }
    .app-sidebar.is-open nav { display: block; }

    .app-brand {
        margin-bottom: 1rem;
    }

    .app-topbar,
    .topbar-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: .5rem;
    }

    .app-topbar {
        padding: 1rem;
        position: static;
    }

    .app-topbar .topbar-title, .app-topbar .app-environment, .app-topbar .topbar-icon-button:disabled { display: none; }
    .app-topbar .topbar-actions { align-items: center; display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr) 40px; width: 100%; }
    .app-topbar .company-switcher { grid-column: 1; grid-row: 1; max-width: none; min-width: 0; }
    .app-topbar .topbar-actions > .status-pill { grid-column: 1; grid-row: 1; justify-self: start; }
    .app-topbar .topbar-primary-action { grid-column: 2; grid-row: 1; height: 40px; padding: .45rem; }
    .app-topbar .topbar-primary-action span { display: none; }
    .app-topbar .app-user { grid-column: 1; grid-row: 2; max-width: none; min-width: 0; padding-left: 0; }
    .app-topbar .topbar-logout { grid-column: 2; grid-row: 2; }
    .app-topbar .release-notes { grid-column: 1 / -1; grid-row: 3; width: 100%; }
    .app-topbar .topbar-actions:has(.topbar-help) .release-notes { grid-column: 1; }
    .app-topbar .topbar-help { grid-column: 2; grid-row: 3; }
    .app-topbar .release-notes > summary { justify-content: flex-start; width: 100%; }
    .app-topbar .release-notes-panel { left: 0; min-width: 0; right: auto; width: min(100%, 420px); }

    .app-content {
        padding: 1.25rem;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        flex-direction: column;
    }

    .dashboard-hero-actions {
        justify-content: flex-start;
    }

    .dashboard-grid,
    .dashboard-grid-secondary,
    .dashboard-worklist-grid {
        grid-template-columns: 1fr;
    }

    .record-summary {
        grid-template-columns: 1fr;
    }

    .plan-activity-card,
    .plan-meta-grid,
    .plan-inline-form,
    .report-hero,
    .report-filter-form,
    .report-executive-split {
        grid-template-columns: 1fr;
    }

    .report-hero {
        flex-direction: column;
    }

    .report-meta {
        min-width: 0;
        width: 100%;
    }

    .report-preview-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-distribution-row {
        grid-template-columns: 1fr;
    }

    .report-export-history-list article {
        grid-template-columns: 1fr;
    }

    .report-distribution-row strong {
        text-align: left;
    }

    .quick-filter-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .quick-filter-panel nav {
        justify-content: flex-start;
    }

    .plan-closure-grid {
        grid-template-columns: 1fr;
    }

    .plan-card-title-row,
    .plan-card-side {
        border-left: 0;
        padding-left: 0;
    }

    .plan-card-title-row {
        flex-direction: column;
    }

    .plan-card-badges {
        justify-content: flex-start;
    }

    .control-flow-grid {
        grid-template-columns: 1fr;
    }

    .risk-map-toolbar,
    .pending-list-panel {
        grid-template-columns: 1fr;
    }

    .risk-map-toolbar {
        flex-direction: column;
    }

    .audit-export-main,
    .audit-export-last {
        align-items: flex-start;
        flex-direction: column;
    }

    .audit-export-metrics {
        grid-template-columns: 1fr;
    }

    .execution-card-header {
        flex-direction: column;
    }

    .execution-card-status {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .control-readiness-grid {
        grid-template-columns: 1fr;
    }

    .readiness-action-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .execution-meta,
    .execution-card-body,
    .execution-actions-grid {
        grid-template-columns: 1fr;
    }

    .execution-meta div {
        border-bottom: 1px solid var(--app-border);
        border-right: 0;
    }

    .execution-meta div:last-child {
        border-bottom: 0;
    }

    .record-summary article {
        border: 1px solid #e2e8f0;
    }

    .record-summary article:last-child {
        border-bottom: 1px solid #e2e8f0;
    }

    .page-header,
    .header-actions,
    .form-actions {
        flex-direction: column;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .plan-detail-grid,
    .detail-list {
        grid-template-columns: 1fr;
    }

    .evidence-item-header {
        flex-direction: column;
    }

    .compact-detail,
    .action-grid,
    .audit-meta,
    .audit-values,
    .audit-summary,
    .alert-detail-layout,
    .alerts-focus-grid,
    .alerts-filter-form,
    .alerts-summary,
    .methodology-trace-grid,
    .methodology-variable-card,
    .filter-form,
    .form-grid,
    .inline-form-row,
    .inline-form-row-select,
    .roles-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        justify-content: flex-start;
    }

    .table-actions {
        justify-content: stretch;
        min-width: 0;
    }

    .table-action-form {
        grid-template-columns: 1fr;
    }

    .document-action-dates {
        grid-template-columns: 1fr;
    }

    .beneficiary-summary {
        grid-template-columns: 1fr;
    }

    .version-item dl {
        grid-template-columns: 1fr;
    }

    .decision-final-card {
        flex-direction: column;
    }

    .decision-final-card .status-pill {
        white-space: normal;
    }

    .match-item dl,
    .match-actions,
    .checklist-grid,
    .decision-summary-grid {
        grid-template-columns: 1fr;
    }

    .audit-change-row {
        grid-template-columns: 1fr;
    }

    .audit-change-row > div {
        border-left: 0;
        border-top: 1px solid var(--app-border);
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .audit-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-filter-form .filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .audit-filter-form > div:first-child,
    .audit-filter-form .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-worklist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .beneficiary-summary {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
}

/* Matrix closure: keep the operational register readable without desktop scrolling. */
.app-content-wide .risk-register .app-table {
    min-width: 880px;
    table-layout: fixed;
}

.risk-register .app-table th:nth-child(1) { width: 22%; }
.risk-register .app-table th:nth-child(2) { width: 13%; }
.risk-register .app-table th:nth-child(3) { width: 29%; }
.risk-register .app-table th:nth-child(4),
.risk-register .app-table th:nth-child(5) { width: 18%; }

@media (max-width: 600px) {
    .record-summary.risk-institutional-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.error-state {
    width: min(100%, 680px);
    margin: clamp(36px, 9vh, 96px) auto;
    padding: clamp(28px, 5vw, 52px);
    text-align: center;
    background: #fff;
    border: 1px solid var(--app-border);
    border-top: 4px solid #157a74;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(18, 42, 63, 0.1);
}

.error-state-forbidden { border-top-color: #b7791f; }

.error-state-code {
    display: inline-grid;
    place-items: center;
    min-width: 72px;
    min-height: 40px;
    margin-bottom: 18px;
    padding: 6px 14px;
    color: #173a59;
    background: #edf4f7;
    border: 1px solid #d5e2e8;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 800;
}

.error-state h1 {
    margin: 8px 0 12px;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
}

.error-state > p:not(.eyebrow) {
    max-width: 540px;
    margin: 0 auto;
    color: var(--app-muted);
}

.error-state-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.standalone-error-page {
    min-height: 100vh;
    margin: 0;
    color: var(--app-text);
    background: #eef3f7;
}

.standalone-error-shell {
    width: min(100% - 32px, 760px);
    margin: 0 auto;
    padding: 32px 0;
}

.standalone-error-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #173a59;
    text-decoration: none;
}

.standalone-error-brand > span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #fff;
    background: #173a59;
    border-radius: 7px;
    font-weight: 800;
}

.standalone-error-brand > img {
    display: block;
    height: 52px;
    max-width: 180px;
    width: 100%;
}

.standalone-error-brand strong,
.standalone-error-brand small { display: block; }

.standalone-error-brand small {
    margin-top: 2px;
    color: #66788a;
    font-size: 0.68rem;
}

.security-confirmation {
    min-height: calc(100vh - 190px);
    display: grid;
    place-items: center;
}

.security-confirmation-card {
    width: min(100%, 560px);
    border: 1px solid var(--app-border);
    box-shadow: 0 18px 45px rgba(21, 42, 65, 0.1);
}

.session-warning {
    position: fixed;
    z-index: 1080;
    right: 24px;
    bottom: 24px;
    width: min(420px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    color: #fff;
    background: #173a59;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(10, 27, 43, 0.28);
}

.session-warning[hidden] {
    display: none;
}

.session-warning strong,
.session-warning span {
    display: block;
}

.session-warning span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

@media (max-width: 600px) {
    .session-warning {
        right: 16px;
        bottom: 16px;
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Final ARCA component precedence */
.page-header h1 { font-size: 1.65rem; line-height: 1.18; margin-bottom: .28rem; }
.page-header .lead { font-size: .84rem; line-height: 1.45; }
.section-heading h2,
.dashboard-card-worklist h2,
.dashboard-personal-work h2 { font-size: 1rem; }
.dashboard-hero {
    align-items: center;
    background: linear-gradient(110deg, #0f2744 0%, #113e58 62%, #0e7c66 100%);
    border: 0;
    box-shadow: 0 12px 28px rgba(15, 39, 68, .13);
    min-height: 108px;
    padding: 1rem 1.15rem;
}
.dashboard-hero .eyebrow { color: #6ee7c2; }
.dashboard-hero h2 { color: #ffffff; font-size: 1.05rem; margin-bottom: .18rem; }
.dashboard-hero p:not(.eyebrow) { color: rgba(255,255,255,.72); font-size: .78rem; line-height: 1.4; }
.dashboard-hero-actions { gap: .4rem; }
.dashboard-hero-actions a {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.18);
    border-radius: 7px;
    color: #ffffff;
    font-size: .72rem;
    padding: .42rem .65rem;
}
.dashboard-hero-actions a:first-child { background: #ffffff; border-color: #ffffff; color: #0f2744; }
.dashboard-hero-actions a:hover { background: #ffffff; color: #0f2744; }
.dashboard-company-status { max-width: 1280px; }
.dashboard-company-status article { min-height: 76px; padding: .75rem .85rem; }
.dashboard-company-status strong { font-size: .88rem; }
.dashboard-card { gap: .65rem; padding: .9rem; }
.dashboard-card > strong { font-size: 1.75rem; }

@media (max-width: 620px) {
    .dashboard-hero { align-items: stretch; flex-direction: column; }
    .dashboard-hero-actions { justify-content: flex-start; }
}

/* ARCA counterparty edit and record detail */
.counterparty-edit-form { overflow:hidden; padding:0; border-color:#e4e8ef; border-radius:12px; box-shadow:0 2px 8px rgba(15,39,68,.05); }
.counterparty-edit-form form > .row { padding:1.15rem 1.25rem; }
.counterparty-edit-intro { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.8rem; padding:1rem 1.25rem; border-bottom:1px solid #e8edf2; background:linear-gradient(110deg,#f8fafc,#f1f7f6); }
.counterparty-edit-avatar { display:grid; place-items:center; width:42px; height:42px; border-radius:10px; color:#fff; background:#0f2744; font-size:.75rem; font-weight:800; }
.counterparty-edit-intro > div:nth-child(2) { display:flex; min-width:0; flex-direction:column; }
.counterparty-edit-intro strong { overflow:hidden; color:#1e293b; font-size:.82rem; text-overflow:ellipsis; white-space:nowrap; }
.counterparty-edit-intro small { margin-top:.15rem; color:#64748b; font-size:.7rem; }
.counterparty-edit-form .form-actions { justify-content:flex-end; margin:0; padding:.9rem 1.25rem; border-top:1px solid #e8edf2; background:#fafbfc; }
.counterparty-edit-form .form-label { margin-bottom:.35rem; color:#334155; font-size:.73rem; font-weight:700; }
.counterparty-detail-header { margin-bottom:1rem; padding-bottom:1rem; border-bottom:1px solid #e1e7ed; }
.counterparty-record-summary { margin-bottom:1rem; border:1px solid #e4e8ef; border-radius:12px; box-shadow:0 2px 8px rgba(15,39,68,.05); }
.counterparty-record-summary article { min-height:88px; }
.counterparty-record-summary strong { overflow-wrap:anywhere; font-size:1rem; line-height:1.3; }
.alerts-summary .alert-responsable-value { font-size:1rem; line-height:1.5; overflow-wrap:anywhere; }
.counterparty-record-summary .state-badge { font-size:.7rem; }
.counterparty-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin:1.15rem 0 .55rem; }
.counterparty-section-heading h2 { margin:.1rem 0 0; color:#0f172a; font-size:.98rem; }
.counterparty-section-heading p { margin:0; color:#64748b; font-size:.72rem; text-align:right; }
.counterparty-detail-grid { overflow:hidden; margin-bottom:1rem; border:1px solid #e4e8ef; border-radius:12px; background:#fff; box-shadow:0 2px 8px rgba(15,39,68,.04); }
.counterparty-detail-grid > div { min-height:72px; border-color:#edf0f4; background:#fff; }
.counterparty-detail-grid dt { color:#94a3b8; font-size:.65rem; letter-spacing:.05em; text-transform:uppercase; }
.counterparty-detail-grid dd { margin-top:.25rem; color:#1e293b; font-size:.8rem; font-weight:650; }
.counterparty-status-grid { gap:.75rem; }
.counterparty-status-grid article { position:relative; min-height:118px; padding:1rem; border:1px solid #e4e8ef; border-radius:10px; background:#fff; box-shadow:0 2px 7px rgba(15,39,68,.04); }
.counterparty-status-grid article::before { content:""; position:absolute; top:0; left:1rem; width:32px; height:3px; border-radius:0 0 4px 4px; background:#10a37f; }
.counterparty-status-grid strong { margin-top:.4rem; font-size:.86rem; }
.counterparty-status-grid > article > span:not(.status-kicker):not(.state-badge) { color:#64748b; font-size:.72rem; line-height:1.4; }
.counterparty-action-grid { align-items:start; gap:.85rem; }
.counterparty-action-grid .action-panel { overflow:hidden; padding:1rem; border-color:#e4e8ef; border-radius:10px; box-shadow:0 2px 7px rgba(15,39,68,.04); }
.counterparty-action-grid .action-panel h2 { margin:-1rem -1rem 1rem; padding:.8rem 1rem; border-bottom:1px solid #e8edf2; background:#f8fafc; font-size:.86rem; }
.counterparty-action-grid .stacked-action-form { gap:.55rem; }
.counterparty-actions-heading { margin-top:1.35rem; }
.counterparty-history-panel { padding:0; overflow:hidden; border-color:#e4e8ef; border-radius:12px; box-shadow:0 2px 8px rgba(15,39,68,.05); }
.counterparty-history-panel > .counterparty-section-heading { margin:0; padding:1rem 1.15rem; border-bottom:1px solid #e8edf2; background:#f8fafc; }
.counterparty-history-panel > .audit-list,
.counterparty-history-panel > p { margin:1rem; }
.usuario-detail .page-header > div,
.usuario-detail .audit-event header > div,
.usuario-detail .detail-grid > div,
.usuario-detail .compact-detail > div,
.usuario-detail .audit-values > div { min-width:0; }
.usuario-detail h1,
.usuario-detail dd,
.usuario-detail .audit-code,
.usuario-detail .audit-event p { overflow-wrap:anywhere; }
@media (max-width: 760px) {
    .usuario-detail .audit-event header { align-items:flex-start; flex-wrap:wrap; gap:.5rem; }
    .usuario-detail .audit-event header > div { flex:1 1 100%; }
}
@media (max-width: 760px) {
    .counterparty-edit-intro { grid-template-columns:auto minmax(0,1fr); }
    .counterparty-edit-intro > .state-badge { grid-column:2; justify-self:start; }
    .counterparty-section-heading { align-items:flex-start; flex-direction:column; gap:.2rem; }
    .counterparty-section-heading p { text-align:left; }
}

/* Bandeja de pendientes */
.record-summary.pending-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: 1.25rem;
    padding: .85rem;
    background: #eaf0f5;
    border: 1px solid #c6d5e2;
    border-radius: 12px;
}
.pending-summary > article,
.pending-summary > article:last-child {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .35rem;
    min-height: 78px;
    padding: .72rem .8rem;
    border: 1px solid #bdcddb;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 39, 68, .07);
}
.pending-summary > .pending-kpi-overview {
    grid-column: span 2;
    min-height: 96px;
    padding: .88rem 1rem;
}
.pending-summary > .pending-kpi-overview strong { font-size: 1.85rem; }
.pending-summary > .pending-kpi-total:first-child {
    background: #16344e;
    border-color: #16344e;
    box-shadow: inset 0 3px #36bba2, 0 2px 5px rgba(15, 39, 68, .15);
}
.pending-summary .pending-kpi-total strong,
.pending-summary .pending-kpi-total .status-kicker { color: #fff; }
.pending-summary > .pending-kpi-overdue { background: #fff3f1; border-color: #c77c71; }
.pending-summary > .pending-kpi-priority { background: #fff7e6; border-color: #ba924f; }
.pending-filter-panel, .pending-board, .pending-note { max-width: none; }
.pending-note { margin-block: 0 1.25rem; }
.pending-filter-panel, .pending-board {
    border: 1px solid #bdcddb;
    border-radius: 12px;
    box-shadow: 0 3px 9px rgba(15, 39, 68, .07);
}
.pending-filter-panel { margin-bottom: 1.25rem; }
.pending-filter-panel h2 {
    margin: 0 0 .8rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid #c6d5e2;
    color: #17324d;
    font-size: 1rem;
    font-weight: 750;
}
.pending-filter-form {
    align-items: end;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) auto;
}
.pending-filter-form > div { min-width: 0; }
.pending-board { gap: 0; padding: 0; }
.pending-board > header {
    flex-wrap: wrap;
    margin: 0;
    padding: .9rem 1rem;
    border-bottom: 1px solid #bdcddb;
    border-radius: 11px 11px 0 0;
    background: #eaf0f5;
}
.pending-board > header h2 { margin: .1rem 0 0; color: #17324d; font-size: 1.12rem; }
.pending-board > .app-table-wrap { min-width: 0; border: 0; border-radius: 0 0 11px 11px; box-shadow: none; }
.pending-table { margin-bottom: 0; }
.pending-table thead { --bs-table-bg: #f3f6f9; }
.pending-table tbody tr:nth-child(even) { --bs-table-bg: #f7f9fc; }
@media (max-width: 1140px) {
    .record-summary.pending-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pending-summary > .pending-kpi-overview { grid-column: auto; }
    .pending-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .record-summary.pending-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pending-summary > .pending-kpi-total { grid-column: 1 / -1; }
    .pending-filter-form { grid-template-columns: minmax(0, 1fr); }
}
