:root {
    --siaj-navy: #103a56;
    --siaj-blue: #176b8f;
    --siaj-teal: #159b98;
    --siaj-gold: #d5a532;
    --siaj-ink: #173042;
    --siaj-muted: #637784;
    --siaj-line: #dbe5e9;
    --siaj-surface: #ffffff;
    --siaj-background: #edf5f5;
    --siaj-radius: 22px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--siaj-ink);
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    font-size: 16px;
    background:
        radial-gradient(circle at 90% 15%, rgba(21, 155, 152, .16), transparent 28rem),
        linear-gradient(135deg, #f8fbfb 0%, var(--siaj-background) 100%);
}

/* Tipografía de interfaz: legible y uniforme. El documento del editor queda
   excluido porque su formato pertenece al escrito y debe conservar la
   libertad tipográfica elegida por el profesional. */
body :where(
    p, a, button, input, select, textarea, label, summary, li,
    th, td, dd, time, code, kbd, span, strong
):not(.siaj-editor__page *) {
    font-size: clamp(12.5px, 1em, 18px) !important;
}

body :where(h1, h2):not(.siaj-editor__page *) {
    font-size: 18px !important;
    line-height: 1.2 !important;
}

body :where(h3, h4, h5, h6, legend):not(.siaj-editor__page *) {
    font-size: 16px !important;
    line-height: 1.25 !important;
}

body :where(small, dt, .eyebrow):not(.siaj-editor__page *) {
    font-size: 12.5px !important;
}

.access-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: clamp(32px, 5vw, 72px) 24px;
    color: white;
    background:
        radial-gradient(circle at 16% 12%, rgba(255, 255, 255, .12), transparent 24rem),
        radial-gradient(circle at 86% 86%, rgba(21, 155, 152, .34), transparent 29rem),
        linear-gradient(145deg, #0d314a 0%, var(--siaj-navy) 42%, #11647a 76%, var(--siaj-teal) 100%);
}

.access-shell::before,
.access-shell::after {
    content: "";
    position: fixed;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
}

.access-shell::before {
    width: min(62vw, 860px);
    height: min(62vw, 860px);
    top: -44vw;
    left: -20vw;
}

.access-shell::after {
    width: min(52vw, 720px);
    height: min(52vw, 720px);
    right: -24vw;
    bottom: -34vw;
}

.access-hero {
    position: relative;
    display: grid;
    justify-items: center;
    gap: clamp(24px, 4vh, 38px);
    width: min(580px, 100%);
    z-index: 1;
    text-align: center;
}

.access-brand {
    display: grid;
    justify-items: center;
}

.access-brand__mark {
    width: clamp(82px, 9vw, 118px);
    height: clamp(82px, 9vw, 118px);
    margin-bottom: 14px;
}

.access-brand__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 13px 28px rgba(0, 0, 0, .2));
}

.access-brand .eyebrow { margin-bottom: 8px; color: #f0c24d; }

body .access-brand__title {
    margin: 0;
    color: white;
    font: 700 clamp(3.6rem, 8vw, 5.5rem)/.92 Georgia, serif;
    font-size: clamp(3.6rem, 8vw, 5.5rem) !important;
    letter-spacing: -.035em;
    text-shadow: 0 8px 28px rgba(5, 26, 39, .28);
}

.access-brand__name {
    margin: 14px 0 0;
    color: #f0c24d;
    font-weight: 750;
    letter-spacing: .015em;
}

.access-brand__message {
    max-width: 500px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, .78);
    line-height: 1.45;
}

.access-hero__decoration {
    position: absolute;
    right: -210px;
    bottom: -70px;
    width: 320px;
    height: 320px;
    opacity: .035;
    transform: rotate(-12deg);
    pointer-events: none;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--siaj-gold);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .16em;
    white-space: nowrap;
    text-transform: uppercase;
}

h1 { margin: 0; font: 700 clamp(4rem, 10vw, 8rem)/.9 Georgia, serif; }

.access-card {
    width: min(460px, 100%);
    padding: clamp(28px, 4vw, 38px);
    color: var(--siaj-ink);
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 20px;
    box-shadow: 0 28px 75px rgba(4, 27, 42, .3);
    backdrop-filter: blur(10px);
}

.access-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.primary-action, .secondary-action {
    min-height: 48px;
    display: grid;
    place-items: center;
    padding: 12px 18px;
    border-radius: 11px;
    font: 700 .96rem/1 inherit;
    text-decoration: none;
    cursor: pointer;
}
.primary-action { border: 0; color: white; background: linear-gradient(90deg, var(--siaj-blue), var(--siaj-teal)); }
.secondary-action { color: var(--siaj-blue); background: white; border: 1px solid #bfd0d8; }
.primary-action:hover { filter: brightness(1.04); }
.secondary-action:hover { background: var(--siaj-background); }

.login-dialog {
    width: min(760px, calc(100% - 32px));
    padding: 0;
    overflow: hidden;
    color: var(--siaj-ink);
    background: white;
    border: 0;
    border-radius: 15px;
    box-shadow: 0 28px 80px rgba(8, 35, 52, .3);
}
.login-dialog::backdrop { background: rgba(8, 31, 47, .58); backdrop-filter: blur(3px); }
.login-dialog__brand { display: flex; align-items: center; gap: 18px; padding: 22px 34px; color: white; background: var(--siaj-navy); }
.login-dialog__brand img { width: 62px; height: 62px; object-fit: contain; }
.login-dialog__brand div { display: grid; gap: 4px; }
.login-dialog__brand strong { font: 700 1.55rem/1 Georgia, serif; }
.login-dialog__brand span { color: var(--siaj-gold); font-size: .82rem; }
.login-dialog__body { padding: 34px; }
.login-dialog__body h2 { margin-bottom: 24px; }
.access-form--dialog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.login-field { display: grid; gap: 7px; }
.access-form--dialog .login-field label { margin: 0; }
.login-dialog__actions { grid-column: 1 / -1; display: flex; justify-content: center; gap: 12px; margin-top: 10px; }
.access-form--dialog .login-dialog__actions button[type="submit"] { min-width: 118px; margin: 0; padding: 12px 18px; }
.dialog-cancel { padding: 12px 18px; color: var(--siaj-blue); background: white; border: 1px solid var(--siaj-line); border-radius: 9px; font: 700 .95rem/1 inherit; cursor: pointer; }
.dialog-cancel:hover { background: var(--siaj-background); }
.password-recovery-link { grid-column: 1 / -1; justify-self: center; margin-top: 2px; color: var(--siaj-blue); font-size: .88rem; font-weight: 650; text-decoration: none; }
.password-recovery-link:hover { text-decoration: underline; }

h2 { margin: 0; font: 700 2rem/1.15 Georgia, serif; }
.helper { margin: 12px 0 28px; color: var(--siaj-muted); }
.access-form { display: grid; gap: 9px; }
.access-form label { margin-top: 8px; font-weight: 650; font-size: .9rem; }
.access-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--siaj-line);
    border-radius: 11px;
    font: inherit;
    outline: none;
}
.access-form input:focus { border-color: var(--siaj-teal); box-shadow: 0 0 0 3px rgba(21,155,152,.13); }
.password-field { position: relative; display: block; width: 100%; }
.password-field input { padding-right: 48px; }
.password-visibility {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    color: var(--siaj-muted);
    background: transparent;
    cursor: pointer;
}
.password-visibility:hover, .password-visibility:focus-visible { color: var(--siaj-blue); background: rgba(23,107,143,.08); outline: none; }
.password-visibility svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.password-visibility .eye-closed { display: none; }
.password-visibility.is-visible .eye-open { display: none; }
.password-visibility.is-visible .eye-closed { display: block; }
.access-form button[type="submit"] {
    margin-top: 17px;
    padding: 15px;
    border: 0;
    border-radius: 11px;
    color: white;
    background: linear-gradient(90deg, var(--siaj-blue), var(--siaj-teal));
    font: 700 1rem/1 inherit;
    cursor: pointer;
}
.prototype-note { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--siaj-line); color: var(--siaj-muted); font-size: .78rem; }
.form-error { margin: 0 0 18px; padding: 12px 14px; color: #8a2430; background: #fff0f1; border: 1px solid #efc7cc; border-radius: 10px; }
.form-error p { margin: 0 0 6px; }
.form-error p:last-child { margin-bottom: 0; }
.session-conflict { display: grid; gap: 8px; margin-bottom: 22px; padding: 16px 18px; color: #684d17; background: #fff8e5; border: 1px solid #ead89b; border-radius: 11px; }
.session-conflict p { margin: 0; line-height: 1.45; }
.session-conflict__actions { flex-wrap: wrap; }
.session-conflict__actions form { margin: 0; }
.session-conflict__actions button { min-height: 44px; margin: 0; padding: 11px 17px; border: 0; border-radius: 9px; color: white; background: var(--siaj-blue); font: 700 .92rem/1.2 inherit; cursor: pointer; }
.session-conflict__actions .dialog-cancel { color: var(--siaj-blue); background: white; border: 1px solid var(--siaj-line); }
.initial-setup { display: block; margin-top: 18px; color: var(--siaj-blue); font-weight: 700; text-align: center; }
.setup-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.setup-card { width: min(560px, 100%); padding: 42px; background: white; border: 1px solid var(--siaj-line); border-radius: var(--siaj-radius); box-shadow: 0 24px 70px rgba(16,58,86,.13); }

/* Estructura común de todas las pantallas autenticadas */
.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(345px, auto) 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 13px clamp(22px, 3vw, 48px);
    color: white;
    background: linear-gradient(105deg, var(--siaj-navy), #105a72 72%, var(--siaj-teal));
    border-bottom: 3px solid rgba(213, 165, 50, .9);
    box-shadow: 0 7px 24px rgba(16, 58, 86, .16);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    color: white;
    text-decoration: none;
}

.app-brand__mark {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    object-fit: contain;
}

.app-brand__wording { display: grid; gap: 2px; min-width: 0; }
.app-brand__wording strong { font: 700 1.65rem/1 Georgia, serif; font-size: 18px !important; letter-spacing: .03em; }
.app-brand__wording small { color: var(--siaj-gold); font-size: 12.5px !important; font-weight: 650; white-space: nowrap; }

.app-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    width: fit-content;
    margin: 0 auto;
    padding: 5px;
    background: rgba(4, 35, 54, .25);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 13px;
}

.app-nav a,
.app-nav span {
    padding: 9px 13px;
    border-radius: 9px;
    color: rgba(255,255,255,.86);
    font-size: 13.5px !important;
    font-weight: 650;
    text-decoration: none;
}

.app-nav a:hover,
.app-nav .is-active { color: white; background: rgba(255,255,255,.13); }
.app-nav .is-active { box-shadow: inset 0 -2px var(--siaj-gold); }


.user-menu { position: relative; justify-self: end; }
.user-menu summary { list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu__trigger { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 10px; color: white; font-size: 12.5px !important; font-weight: 650; cursor: pointer; }
.user-menu__trigger:hover, .user-menu[open] .user-menu__trigger { background: rgba(255,255,255,.12); }
.user-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.15); }
.user-avatar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.user-menu__chevron { color: rgba(255,255,255,.7); }
.user-menu__panel { position: absolute; top: calc(100% + 10px); right: 0; width: 230px; overflow: hidden; padding: 8px; color: var(--siaj-ink); background: white; border: 1px solid var(--siaj-line); border-radius: 13px; box-shadow: 0 18px 45px rgba(16,58,86,.2); }
.user-menu__panel a, .user-menu__panel button { width: 100%; display: block; padding: 10px 12px; border: 0; border-radius: 8px; color: var(--siaj-ink); background: transparent; font: 600 .88rem/1.2 inherit; text-align: left; text-decoration: none; cursor: pointer; }
.user-menu__panel a:hover, .user-menu__panel button:hover { background: var(--siaj-background); }
.user-menu__panel form { margin: 5px 0 0; padding-top: 5px; border-top: 1px solid var(--siaj-line); }

.content-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 72px; }
.section-heading { margin-bottom: 28px; }
.section-heading h1 { margin: 0; font: 700 clamp(2.4rem, 5vw, 3.8rem)/1 Georgia, serif; }
.section-heading p:last-child { margin: 10px 0 0; color: var(--siaj-muted); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-card { padding: 26px; background: rgba(255,255,255,.92); border: 1px solid var(--siaj-line); border-radius: 17px; box-shadow: 0 12px 32px rgba(16,58,86,.07); }
.form-card h2 { margin-bottom: 20px; font-size: 1.45rem; }
.settings-form { display: grid; gap: 15px; }
.settings-form > div { display: grid; gap: 6px; }
.settings-form label { font-size: .88rem; font-weight: 700; }
.settings-form input, .settings-form select { width: 100%; padding: 11px 13px; border: 1px solid var(--siaj-line); border-radius: 9px; font: inherit; background-color: white; }
.settings-form input:focus { outline: 0; border-color: var(--siaj-teal); box-shadow: 0 0 0 3px rgba(21,155,152,.12); }
.settings-form button[type="submit"] { justify-self: start; padding: 11px 16px; border: 0; border-radius: 9px; color: white; background: var(--siaj-blue); font-weight: 700; cursor: pointer; }
.errorlist { margin: 0; padding-left: 18px; color: #9b2835; font-size: .84rem; }
.notice { margin-bottom: 22px; padding: 13px 16px; border-radius: 10px; }
.notice--success { color: #176042; background: #eaf7f0; border: 1px solid #badfc9; }
.notice--warning { color: #6f5012; background: #fff7df; border: 1px solid #ead89b; }
.sessions-card { margin-top: 20px; }
.sessions-list { display: grid; gap: 10px; }
.sessions-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--siaj-line); }
.sessions-list > div:last-child { border-bottom: 0; }
.sessions-list span { color: var(--siaj-muted); font-size: .86rem; }
.profile-relations-card { margin-top: 20px; }
.profile-relations-card > .helper { margin: -10px 0 18px; }
.relationship-list { display: grid; gap: 10px; }
.relationship-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 14px; background: #f4f8f9; border: 1px solid var(--siaj-line); border-radius: 10px; }
.relationship-row > div:first-child { display: grid; gap: 3px; }
.relationship-row span, .relationship-row small { color: var(--siaj-muted); }
.relationship-actions { display: flex; gap: 8px; }
.relationship-actions button { padding: 8px 11px; border: 0; border-radius: 7px; color: white; background: var(--siaj-blue); font-weight: 700; cursor: pointer; }
.relationship-actions .button-danger-outline { color: #94343f; background: white; border: 1px solid #ddbdc2; }
.tax-profile-heading { display: flex; justify-content: space-between; gap: 16px; margin: 18px 0 10px; padding: 11px 13px; color: var(--siaj-blue); background: #eaf3f5; border-radius: 9px; }
.tax-profile-heading span { color: var(--siaj-muted); font-size: .84rem; }
.tax-relations { display: grid; gap: 10px; }
.tax-relation { overflow: visible; border: 1px solid var(--siaj-line); border-radius: 10px; }
.tax-relation.is-historical { opacity: .7; }
.tax-relation > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; }
.tax-relation > header > div { display: grid; gap: 3px; }
.tax-relation small { color: var(--siaj-muted); }
.assigned-officers { padding: 0 14px 10px; }
.assigned-officers > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--siaj-line); font-size: .84rem; }
.assigned-officers p { margin: 0; padding: 8px 0; color: var(--siaj-muted); font-size: .84rem; }
.link-danger { border: 0; color: #94343f; background: transparent; font-weight: 700; cursor: pointer; }

.content-shell--wide { width: min(1380px, calc(100% - 48px)); }
.admin-layout { display: grid; grid-template-columns: minmax(560px, 1.65fr) minmax(280px, .7fr); gap: 22px; align-items: start; }
.form-card--large { min-width: 0; }
.settings-form ul { list-style: none; margin: 0; padding: 0; }
.settings-form ul:not(.errorlist) { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-form ul:not(.errorlist) label { display: flex; align-items: center; gap: 7px; padding: 8px 11px; background: var(--siaj-background); border-radius: 8px; cursor: pointer; }
.settings-form input[type="checkbox"] { width: auto; }
.study-form { max-width: 820px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field-block { display: grid; gap: 6px; }
.field-block--type { grid-column: 1 / -1; width: min(360px, 100%); }
.study-form .form-actions { grid-column: 1 / -1; }
.study-identity-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(180px, .8fr); gap: 18px; }
.field-block.is-disabled { opacity: .48; }
.field-block input:disabled, .field-block input:read-only { background: #e8eef0; cursor: not-allowed; }
.registration-card { width: min(720px, 100%); }
.registration-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 20px; }
.registration-form > button { grid-column: 1 / -1; }
.registration-form .role-field { grid-column: 1 / -1; width: min(480px, 100%); justify-self: center; margin-bottom: 8px; }
.registration-form .full-row { grid-column: 1 / -1; }
.registration-form .tributary-question { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #eef6f6; border: 1px solid #d5e5e7; border-radius: 9px; }
.registration-form .tributary-question label { margin: 0; }
.registration-form .tributary-question input { order: -1; width: auto; }
.registration-form input[type="file"] { padding: 8px; }
.registration-form [data-tributary-field] ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.registration-form [data-tributary-field] ul label { background: #eef5f6; }
.registration-form [data-tributary-field] { transition: opacity .16s ease; }
.registration-form [data-tributary-field].is-disabled { opacity: .48; }
.registration-form [data-tributary-field].is-disabled label { cursor: not-allowed; }
.registration-form [data-lawyer-field] { transition: opacity .16s ease; }
.registration-form [data-lawyer-field].is-disabled { opacity: .48; }
.registration-form [data-lawyer-field].is-disabled label { cursor: not-allowed; }
.registration-form [data-signature-field] { transition: opacity .16s ease; }
.registration-form [data-signature-field].is-disabled { opacity: .48; }
.registration-form [data-signature-field].is-disabled label { cursor: not-allowed; }
.official-assignments { padding: 16px; border: 1px solid var(--siaj-line); border-radius: 10px; }
.official-assignments h3 { margin: 0 0 5px; font-size: 1rem; }
.official-lawyer-group { margin-top: 14px; overflow: hidden; border: 1px solid var(--siaj-line); border-radius: 9px; }
.official-lawyer-group > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; color: var(--siaj-blue); background: #eef5f6; }
.official-lawyer-group > header small { color: var(--siaj-muted); }
.official-assignment-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); gap: 18px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--siaj-line); }
.official-lawyer-group .official-assignment-row { padding: 12px; }
.official-assignment-row:last-child { border-bottom: 0; }
.official-assignment-row > div { display: grid; gap: 6px; }
.official-assignment-row > div:first-child { grid-template-columns: auto 1fr; align-items: center; }
.official-assignment-row input[type="checkbox"] { width: auto; }
.official-assignments.is-disabled { opacity: .48; }
.official-assignments.is-disabled label { cursor: not-allowed; }
.registration-form .is-disabled input:disabled,
.registration-form .is-disabled select:disabled,
.registration-form .is-disabled label { cursor: default; }
.empty-assignment-message { margin: 14px 0 0; color: var(--siaj-muted); font-size: .85rem; }
.activation-summary { display: grid; grid-template-columns: 1.2fr 1.2fr .8fr; gap: 10px; margin: 24px 0; }
.activation-summary > div { display: grid; gap: 5px; padding: 13px 14px; background: #eef3f5; border: 1px solid var(--siaj-line); border-radius: 10px; }
.activation-summary span { color: var(--siaj-muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.activation-summary strong { font-size: .9rem; }
.registration-form .credential-field { padding-top: 13px; border-top: 1px solid var(--siaj-line); }
.field-help { color: var(--siaj-muted); font-size: .76rem; line-height: 1.35; }
.repartition-card { position: sticky; top: 116px; }
.catalog-list { display: grid; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--siaj-line); }
.catalog-list span { display: grid; grid-template-columns: 62px 1fr; gap: 8px; color: var(--siaj-muted); font-size: .84rem; }
.catalog-list strong { color: var(--siaj-blue); }
.inline-form-message { min-height: 1.1rem; margin: 2px 0 0; color: var(--siaj-muted); font-size: .78rem; line-height: 1.35; }
.inline-form-message.is-success { color: #176042; }
.inline-form-message.is-error { color: #9b2835; }
.activation-result { margin-bottom: 24px; padding: 20px 24px; color: #174a3b; background: #e9f8f1; border: 1px solid #b7dfcd; border-radius: 14px; }
.activation-result div { display: grid; gap: 5px; }
.activation-result strong { color: var(--siaj-navy); font: 700 clamp(1.4rem, 3vw, 2rem)/1.2 ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.activation-result small, .security-note { color: var(--siaj-muted); }
.current-code-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding: 17px 20px; background: rgba(255,255,255,.9); border: 1px solid var(--siaj-line); border-radius: 12px; }
.current-code-card > div { display: grid; gap: 3px; }
.current-code-card span { color: var(--siaj-muted); font-size: .72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.current-code-card strong { font-family: ui-monospace, Consolas, monospace; }
.current-code-card small { color: var(--siaj-muted); }
.registry-card { margin-top: 22px; }
.responsive-table { overflow-x: auto; }
.responsive-table table { width: 100%; border-collapse: collapse; }
.responsive-table th, .responsive-table td { padding: 13px 12px; border-bottom: 1px solid var(--siaj-line); text-align: left; font-size: .88rem; }
.responsive-table th { color: var(--siaj-muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.responsive-table td:first-child { display: grid; gap: 3px; }
.responsive-table td small { color: var(--siaj-muted); }
.status-pill { display: inline-block; padding: 5px 9px; color: var(--siaj-blue); background: #e8f3f6; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.inline-action { display: inline; margin-left: 7px; }
.inline-action button { padding: 4px 7px; border: 0; border-radius: 6px; color: var(--siaj-blue); background: transparent; font-size: .75rem; font-weight: 700; cursor: pointer; }
.inline-action button:hover { background: var(--siaj-background); }
.client-row { transition: background .16s ease; }
.client-row:hover { background: #f4f9fa; }
.client-link { display: grid; gap: 3px; color: var(--siaj-ink); text-decoration: none; }
.client-link:hover strong { color: var(--siaj-teal); }
.client-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.client-heading h1 { margin: 0; font: 700 clamp(2.35rem, 5vw, 3.7rem)/1 Georgia, serif; }
.client-heading p:last-child { margin: 10px 0 0; color: var(--siaj-muted); }
.status-pill--large { padding: 8px 13px; font-size: .86rem; }
.status-pill--inactive { color: #6e4b50; background: #f2e8ea; }
.status-control { position: relative; display: inline-block; }
.status-control > summary { list-style: none; cursor: pointer; }
.status-control > summary::-webkit-details-marker { display: none; }
.status-control > div { position: absolute; z-index: 8; top: calc(100% + 8px); left: 0; width: 250px; padding: 14px; background: white; border: 1px solid #e2c8cc; border-radius: 10px; box-shadow: 0 14px 34px rgba(32,45,55,.16); }
.status-control form { display: grid; gap: 10px; }
.status-control label { display: grid; gap: 5px; color: var(--siaj-muted); font-size: .75rem; font-weight: 700; }
.status-control input { width: 100%; padding: 8px 9px; border: 1px solid var(--siaj-line); border-radius: 7px; font: inherit; }
.status-reactivation { display: inline; }
.status-reactivation button { border: 0; cursor: pointer; }
.client-summary-grid, .client-bottom-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; }
.client-bottom-grid { margin-top: 22px; align-items: start; }
.data-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.data-list div { min-width: 0; }
.data-list dt { margin-bottom: 4px; color: var(--siaj-muted); font-size: .72rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.data-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.quota-list { display: grid; gap: 14px; }
.quota-list > div { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; }
.quota-list progress { grid-column: 1 / -1; width: 100%; height: 7px; accent-color: var(--siaj-teal); }
.quota-edit-card { margin-top: 22px; }
.quota-edit-form { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; gap: 16px; align-items: end; }
.quota-edit-form > div { display: grid; gap: 6px; }
.quota-edit-form label { font-size: .82rem; font-weight: 700; }
.quota-edit-form input { width: 100%; padding: 10px 12px; border: 1px solid var(--siaj-line); border-radius: 8px; font: inherit; }
.quota-edit-form small { color: var(--siaj-muted); font-size: .72rem; }
.quota-edit-form button { padding: 11px 15px; border: 0; border-radius: 8px; color: white; background: var(--siaj-blue); font-weight: 700; cursor: pointer; }
.subheading { margin: 24px 0 10px; font-size: .95rem; }
.card-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.card-heading-row h2 { margin: 0 0 5px; }
.card-heading-row p { margin: 0; color: var(--siaj-muted); font-size: .84rem; }
.secondary-button, .danger-button { padding: 9px 12px; border-radius: 8px; font: 700 .8rem/1 inherit; cursor: pointer; }
.secondary-button { color: var(--siaj-blue); background: white; border: 1px solid var(--siaj-line); }
.danger-button { color: white; background: #9b3541; border: 0; }
.confirm-action { position: relative; }
.confirm-action > summary { color: #94343f; font-size: .78rem; font-weight: 700; cursor: pointer; list-style: none; }
.confirm-action > summary::-webkit-details-marker { display: none; }
.confirm-action > div { position: absolute; z-index: 4; right: 0; top: calc(100% + 8px); width: 260px; padding: 14px; background: white; border: 1px solid #e2c8cc; border-radius: 10px; box-shadow: 0 14px 34px rgba(32,45,55,.16); }
.confirm-action p { margin: 0 0 11px; color: var(--siaj-muted); font-size: .78rem; line-height: 1.4; }
.confirm-action--client > div { left: 0; right: auto; }
.code-history { display: grid; gap: 0; }
.code-history > div { display: grid; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--siaj-line); }
.code-history > div:last-child { border-bottom: 0; }
.code-history small { color: var(--siaj-muted); }
.danger-zone { border-color: #e5c9cd; }
.danger-zone > p { color: var(--siaj-muted); line-height: 1.5; }
.activation-shell { background: linear-gradient(145deg, var(--siaj-navy), #0e526b 70%, var(--siaj-teal)); }
.activation-card { width: min(590px, 100%); }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--siaj-blue); font-weight: 700; text-decoration: none; }
.security-note { margin: 22px 0 0; padding-top: 17px; border-top: 1px solid var(--siaj-line); font-size: .8rem; }

.dashboard-shell {
    position: relative;
    isolation: isolate;
    width: min(1280px, calc(100% - 48px));
    min-height: calc(100vh - 92px);
    margin: 0 auto;
    padding: 54px 0 72px;
}

.dashboard-shell::before {
    content: "";
    position: fixed;
    z-index: -1;
    right: clamp(20px, 7vw, 120px);
    bottom: clamp(16px, 6vh, 70px);
    width: clamp(260px, 34vw, 520px);
    aspect-ratio: 1;
    background: url("../images/isotipo-siaj-blanco.png") center / contain no-repeat;
    opacity: .055;
    filter: invert(18%) sepia(25%) saturate(1117%) hue-rotate(158deg) brightness(82%);
    pointer-events: none;
}

.welcome-block {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px;
}

.welcome-block .eyebrow { margin-bottom: 9px; }
.page-title { margin: 0; font: 700 clamp(2.7rem, 5vw, 4.6rem)/.98 Georgia, serif; }
.welcome-block .helper { margin: 12px 0 0; font-size: 1.05rem; }
.today-card {
    flex: 0 0 auto;
    padding: 12px 17px;
    color: var(--siaj-blue);
    background: rgba(255,255,255,.78);
    border: 1px solid var(--siaj-line);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(16,58,86,.06);
    font-size: .9rem;
    font-weight: 650;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.summary-card {
    min-height: 196px;
    display: flex;
    flex-direction: column;
    padding: 26px;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(16,58,86,.09);
    border-radius: 18px;
    box-shadow: 0 15px 38px rgba(16,58,86,.08);
}
.summary-card--urgent { border-top: 4px solid var(--siaj-gold); }
.summary-card__label { margin-bottom: 24px; color: var(--siaj-muted); font-size: .79rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.summary-card strong { font: 700 1.55rem/1.15 Georgia, serif; }
.summary-card p { margin: auto 0 0; color: var(--siaj-muted); font-size: .9rem; line-height: 1.5; }

.dashboard-shell--workday { width: min(1380px, calc(100% - 48px)); padding-top: 22px; }
.agenda-panel,
.daily-list-panel {
    overflow: hidden;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(16,58,86,.1);
    border-radius: 18px;
    box-shadow: 0 15px 38px rgba(16,58,86,.08);
}

.agenda-panel__header,
.daily-list-panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--siaj-line);
}
.agenda-panel__header .eyebrow,
.daily-list-panel .eyebrow { margin-bottom: 5px; }
.agenda-panel__header h2,
.daily-list-panel h2 { font-size: 1.75rem; }
.agenda-panel__header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.agenda-panel__header { gap: 16px; padding: 13px 20px; }
.agenda-panel__header .eyebrow { margin-bottom: 2px; font-size: .69rem; }
.agenda-panel__header h2 { margin: 0; font-size: 1.5rem; }
.agenda-toolbar { display: flex; align-items: center; justify-self: end; gap: 8px; }
.deadline-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    color: var(--siaj-blue);
    background: #f3f8f8;
    border: 1px solid #cfe0e2;
    border-radius: 9px;
    font: 750 .82rem/1 inherit;
    cursor: pointer;
}
.deadline-trigger span { color: var(--siaj-teal); font-size: 1rem; }
.deadline-trigger:hover { background: #e7f2f1; border-color: #aeced0; }
.icon-button,
.agenda-today {
    display: grid;
    place-items: center;
    min-width: 34px;
    min-height: 34px;
    color: var(--siaj-blue);
    background: white;
    border: 1px solid var(--siaj-line);
    border-radius: 9px;
    font-weight: 750;
    text-decoration: none;
}
.agenda-today { padding: 0 13px; font-size: .82rem; }
.icon-button:hover,
.agenda-today:hover { background: var(--siaj-background); }

.agenda-months {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 18px;
    background: #f5f9f9;
    border-bottom: 1px solid var(--siaj-line);
}
.mini-calendar {
    padding: 10px;
    background: white;
    border: 1px solid var(--siaj-line);
    border-radius: 12px;
}
.mini-calendar h3 {
    margin: 0 0 8px;
    color: var(--siaj-blue);
    font-size: .9rem;
    text-align: center;
    text-transform: capitalize;
}
.mini-calendar__weekdays,
.mini-calendar__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mini-calendar__weekdays { margin-bottom: 4px; }
.mini-calendar__weekdays span {
    color: var(--siaj-muted);
    font-size: .62rem;
    font-weight: 750;
    text-align: center;
    text-transform: uppercase;
}
.calendar-day {
    position: relative;
    min-height: 30px;
    display: grid;
    place-items: center;
    color: var(--siaj-ink);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .77rem;
    font-weight: 650;
    text-decoration: none;
}
.calendar-day:hover { background: #e9f4f3; }
.calendar-day.has-events { color: #7b4a0e; background: #f9ead3; border-color: #edcf9f; }
.calendar-day.has-events:hover { background: #f5dfbd; }
.calendar-day.has-deadline { color: #8d3040; background: #f8e1e5; border-color: #edc4cc; }
.calendar-day.has-deadline:hover { background: #f3d4da; }
.calendar-day.is-selected { box-shadow: inset 0 0 0 2px rgba(15,87,115,.72); }
.calendar-day.is-today { color: white; background: var(--siaj-blue); border-color: var(--siaj-gold); box-shadow: inset 0 0 0 1px var(--siaj-gold); }
.calendar-day.has-deadline.is-selected { color: #8d3040; background: #f8e1e5; border-color: #edc4cc; }
.calendar-day.has-deadline.is-today { color: white; background: #a83e50; border-color: var(--siaj-gold); box-shadow: inset 0 0 0 1px var(--siaj-gold); }
.calendar-day small {
    position: absolute;
    right: 2px;
    bottom: 2px;
    min-width: 13px;
    height: 13px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--siaj-teal);
    border-radius: 999px;
    font-size: .52rem;
}
.calendar-day.has-events small { background: #d88724; }
.calendar-day.is-today small { color: var(--siaj-blue); background: white; }
.calendar-day.has-deadline small { color: white; background: #b6495b; }
.calendar-day.has-deadline.is-today small { color: #8d3040; background: white; }
.calendar-day.is-empty { pointer-events: none; }

.agenda-day { padding: 0 24px 24px; }
.agenda-day__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
}
.agenda-day__header > div { display: grid; gap: 3px; }
.agenda-day__header span { color: var(--siaj-muted); font-size: .72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.agenda-day__header strong { text-transform: capitalize; }
.agenda-add { min-height: 40px; padding: 8px 15px; }
.agenda-events { display: grid; gap: 8px; }
.agenda-event {
    position: relative;
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px 15px 14px 18px;
    background: #fbfdfd;
    border: 1px solid var(--siaj-line);
    border-left: 4px solid var(--siaj-teal);
    border-radius: 11px;
}
.agenda-event--vencimiento { border-left-color: #b23b47; }
.agenda-event--audiencia { border-left-color: var(--siaj-gold); }
.agenda-event--recordatorio { border-left-color: var(--siaj-blue); }
.agenda-event.is-done { opacity: .68; background: #edf7f2; }
.agenda-event.is-cancelled { opacity: .55; background: #f4f1f2; }
.agenda-event > time { display: grid; gap: 3px; color: var(--siaj-muted); font-size: .76rem; }
.agenda-event > time strong { color: var(--siaj-ink); }
.agenda-event__main { min-width: 0; display: grid; gap: 5px; }
.agenda-event__main > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-event__main > p { margin: 0; overflow: hidden; color: var(--siaj-muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.agenda-event__heading { display: flex; flex-wrap: wrap; gap: 6px; }
.event-type,
.event-status,
.private-pill { padding: 3px 7px; border-radius: 999px; font-size: .63rem; font-weight: 750; text-transform: uppercase; }
.event-type { color: var(--siaj-blue); background: #e8f3f6; }
.event-status { color: #4c625f; background: #edf2f1; }
.private-pill { color: #614d72; background: #f0eaf4; }
.agenda-event__meta { display: flex; flex-wrap: wrap; gap: 7px 18px; color: var(--siaj-muted); font-size: .73rem; }
.agenda-event__actions { display: flex; align-items: center; gap: 4px; }
.agenda-event__actions form { margin: 0; }
.row-action {
    width: 33px;
    height: 33px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--siaj-blue);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font: 700 1rem/1 inherit;
    text-decoration: none;
    cursor: pointer;
}
.row-action:hover { background: var(--siaj-background); }
.row-action--danger { color: #94343f; }
.agenda-empty,
.daily-list-empty { display: grid; gap: 5px; padding: 27px; color: var(--siaj-muted); text-align: center; }
.agenda-empty strong,
.daily-list-empty strong { color: var(--siaj-ink); }
.agenda-empty span,
.daily-list-empty p { margin: 0; font-size: .84rem; }

.daily-list-panel { margin-top: 22px; }
.daily-list-panel--archive { margin-top: 0; }
.daily-complete-strip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    margin-top: 22px;
    padding: 15px 18px;
    color: var(--siaj-ink);
    background: #edf7f1;
    border: 1px solid #b9d9c4;
    border-left: 4px solid #469767;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(16,58,86,.06);
}
.daily-complete-strip[hidden] { display: none; }
.daily-complete-strip__check {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: white;
    background: #469767;
    border-radius: 50%;
    font-weight: 800;
}
.daily-complete-strip > div { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.daily-complete-strip strong { color: #215f3d; font-size: .88rem; }
.daily-complete-strip div span { color: var(--siaj-muted); font-size: .76rem; }
.daily-complete-strip a {
    padding: 8px 12px;
    color: var(--siaj-blue);
    background: white;
    border: 1px solid #bad0d4;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 750;
    text-decoration: none;
}
.daily-complete-strip a:hover { background: #f5f9f9; }
.portfolio-sync {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 26px;
    align-items: center;
    margin: 16px;
    padding: 20px 22px;
    background: linear-gradient(120deg, #edf7f5, #f8fbfb);
    border: 1px solid #bedfd8;
    border-left: 5px solid var(--siaj-teal);
    border-radius: 12px;
}
.portfolio-sync__copy { display: grid; gap: 5px; }
.portfolio-sync__copy .eyebrow { color: #36796f; }
.portfolio-sync__copy h3 { margin: 0; color: var(--siaj-blue); font-size: 1.15rem; }
.portfolio-sync__copy p:not(.eyebrow) { max-width: 820px; margin: 0; color: var(--siaj-muted); font-size: .82rem; line-height: 1.5; }
.portfolio-sync__copy a { width: fit-content; margin-top: 4px; color: var(--siaj-blue); font-size: .78rem; font-weight: 750; }
.portfolio-sync > .primary-action { min-height: 42px; padding: 10px 15px; white-space: nowrap; }
.portfolio-sync > .primary-action:disabled { opacity: .48; cursor: not-allowed; filter: grayscale(.18); }
.portfolio-progress { grid-column: 1 / -1; display: grid; gap: 8px; }
.portfolio-progress[hidden] { display: none; }
.portfolio-progress__track { height: 11px; overflow: hidden; background: #d9e7e5; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(9,52,61,.12); }
.portfolio-progress__track > span { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, var(--siaj-blue), var(--siaj-teal)); border-radius: inherit; transition: width .35s ease; }
.portfolio-progress__status { display: flex; justify-content: space-between; gap: 16px; color: var(--siaj-muted); font-size: .74rem; }
.portfolio-progress__status strong { color: var(--siaj-ink); font-weight: 750; }
.portfolio-progress > p { margin: 2px 0 0; padding: 9px 11px; color: #8e2e3a; background: #faecee; border: 1px solid #efc8cd; border-radius: 8px; font-size: .76rem; }
.sync-lock {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 22px;
    cursor: wait;
    background: rgba(6, 34, 49, .72);
    backdrop-filter: blur(5px);
}
.sync-lock[hidden] { display: none; }
.sync-lock__card {
    width: min(520px, 100%);
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 15px 18px;
    align-items: center;
    padding: 26px;
    color: var(--siaj-ink);
    background: white;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(3, 25, 38, .34);
}
.sync-lock__spinner {
    width: 48px;
    height: 48px;
    grid-row: 1;
    border: 5px solid #d7e8e5;
    border-top-color: var(--siaj-teal);
    border-radius: 50%;
    animation: sync-spin .85s linear infinite;
}
.sync-lock__card .eyebrow { margin-bottom: 4px; color: #36796f; }
.sync-lock__card h2 { margin: 0; color: var(--siaj-blue); font-size: 1.35rem; }
.sync-lock__card p:not(.eyebrow) { margin: 5px 0 0; color: var(--siaj-muted); font-size: .82rem; }
.sync-lock__track { height: 10px; grid-column: 1 / -1; overflow: hidden; background: #d9e7e5; border-radius: 999px; }
.sync-lock__track span { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, var(--siaj-blue), var(--siaj-teal)); border-radius: inherit; transition: width .35s ease; }
.sync-lock__card > strong { color: var(--siaj-blue); font-size: .82rem; }
.sync-lock__card > small { justify-self: end; color: var(--siaj-muted); font-size: .72rem; text-align: right; }
.is-portfolio-syncing { overflow: hidden; }
.is-portfolio-syncing,
.is-portfolio-syncing * { cursor: wait !important; }
@keyframes sync-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .sync-lock__spinner { animation-duration: 1.8s; }
}
.daily-list-panel > header { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr); padding-top: 19px; padding-bottom: 19px; }
.daily-list-panel > header .status-pill { justify-self: end; }
.daily-source-statuses { display: grid; justify-items: end; gap: 7px; }
.daily-source-statuses .status-pill { width: max-content; max-width: 100%; }
.status-pill--pending { color: #72530e; background: #fff4cf; }
.daily-sync-button { border: 0; font: inherit; cursor: pointer; }
.daily-sync-button:not(:disabled):hover { filter: brightness(.96); }
.daily-sync-button:disabled { opacity: .62; cursor: not-allowed; }
.daily-list-empty { min-height: 128px; place-content: center; }
.daily-list-csrf { display: none; }
.daily-list-date { display: flex; align-items: end; gap: 7px; }
.daily-list-date label { display: grid; gap: 3px; color: var(--siaj-muted); font-size: .65rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.daily-list-date input { min-height: 36px; padding: 6px 9px; border: 1px solid var(--siaj-line); border-radius: 8px; color: var(--siaj-ink); background: white; font: inherit; }
.daily-list-date a,
.daily-list-date button { min-width: 36px; min-height: 36px; display: grid; place-items: center; padding: 6px 10px; color: var(--siaj-blue); background: white; border: 1px solid var(--siaj-line); border-radius: 8px; font: 700 .82rem/1 inherit; text-decoration: none; cursor: pointer; }
.daily-list-date button { background: #eef6f6; }
.daily-list-results { display: grid; gap: 10px; padding: 14px; background: #f3f6f6; border-top: 1px solid var(--siaj-line); }
.daily-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 18px; padding: 16px 18px; background: white; border: 1px solid #dbe4e5; border-left: 4px solid #a9bdc2; border-radius: 11px; box-shadow: 0 3px 10px rgba(13,45,60,.06); transition: background .2s ease, border-color .2s ease; }
.daily-card.is-viewed { background: #eaf6ef; border-color: #a9d2b7; border-left-color: #469767; }
.daily-card__identity { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--siaj-blue); font-size: .76rem; }
.daily-card__identity small { color: var(--siaj-muted); font-size: inherit; }
.daily-card__identity .daily-source-badge { display: inline-block; margin-right: 5px; padding: 3px 6px; color: #71500c; background: #fff2cb; border: 1px solid #ead18a; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.daily-card__title { padding: 0; overflow: hidden; color: #0d4f73; background: transparent; border: 0; font: 750 .88rem/1.4 inherit; text-align: left; text-overflow: ellipsis; cursor: pointer; }
.daily-card__title:link { text-decoration: none; }
.daily-card__title:hover { text-decoration: underline; }
.daily-card__judge { grid-column: 2; grid-row: 1 / span 2; align-self: center; max-width: 300px; font-size: .72rem; text-align: right; }
.daily-card__movement { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; padding-top: 9px; color: var(--siaj-muted); border-top: 1px solid rgba(121,145,151,.25); font-size: .73rem; }
.daily-card__movement strong { color: var(--siaj-ink); font-weight: 600; }
.daily-card__actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; border-top: 1px solid rgba(121,145,151,.25); }
.daily-viewed-label { color: #2c7550; font-size: .69rem; font-weight: 750; }
.daily-agenda { padding: 7px 12px; color: #704c05; background: #fff4d7; border: 1px solid #e9c66f; border-radius: 8px; font: 750 .7rem/1 inherit; cursor: pointer; }
.daily-agenda:hover { background: #ffe9af; border-color: #d5a93d; }
.daily-eye { width: 58px; height: 34px; display: grid; place-items: center; padding: 0; color: var(--siaj-blue); background: #e3eff7; border: 1px solid #afc9d8; border-radius: 10px; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }
.daily-eye:link { text-decoration: none; }
.daily-eye:hover { color: var(--siaj-navy); background: #dceef5; border-color: #83b2c5; transform: translateY(-1px); }
.daily-eye:focus-visible { outline: 3px solid rgba(213,165,50,.4); outline-offset: 2px; }
.daily-eye__icon { display: block; width: 23px; height: 23px; }
.daily-card__detail { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 12px 14px; background: rgba(255,255,255,.7); border-radius: 8px; }
.daily-card__detail[hidden] { display: none; }
.daily-card__detail div { display: grid; gap: 2px; }
.daily-card__detail span { color: var(--siaj-muted); font-size: .62rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.daily-card__detail strong { font-size: .76rem; }
.daily-card__detail p { flex: 1 1 320px; margin: 0; color: var(--siaj-muted); font-size: .75rem; line-height: 1.45; }

.agenda-dialog,
.deadline-dialog,
.private-auth-dialog,
.private-view-dialog {
    width: min(720px, calc(100% - 30px));
    max-height: calc(100vh - 32px);
    padding: 0;
    color: var(--siaj-ink);
    background: white;
    border: 0;
    border-radius: 15px;
    box-shadow: 0 28px 80px rgba(8,35,52,.3);
}
.agenda-dialog::backdrop,
.deadline-dialog::backdrop,
.private-auth-dialog::backdrop,
.private-view-dialog::backdrop { background: rgba(8,31,47,.58); backdrop-filter: blur(3px); }
.agenda-form > header,
.deadline-dialog header,
.private-auth-dialog header,
.private-view-dialog header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    color: white;
    background: var(--siaj-navy);
}
.agenda-form > header span,
.deadline-dialog header span,
.private-auth-dialog header span,
.private-view-dialog header span { color: var(--siaj-gold); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.agenda-form > header h2,
.deadline-dialog header h2,
.private-auth-dialog header h2,
.private-view-dialog header h2 { margin-top: 4px; font-size: 1.55rem; }
.dialog-close { padding: 0; color: white; background: transparent; border: 0; font: 400 1.8rem/1 inherit; cursor: pointer; }
.agenda-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; padding: 24px 26px; }
.agenda-form__grid .full-row { grid-column: 1 / -1; }
.field-block--with-action { align-content: start; }
.event-deadline-shortcut { justify-self: start; margin-top: 3px; padding: 5px 0; color: var(--siaj-blue); background: transparent; border: 0; font: 750 .72rem/1.2 inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.event-deadline-shortcut:hover { color: #083c59; }
.agenda-form .field-block label,
.private-auth-dialog label { font-size: .8rem; font-weight: 700; }
.agenda-form input,
.agenda-form select,
.agenda-form textarea,
.private-auth-dialog input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--siaj-line);
    border-radius: 8px;
    font: inherit;
}
.agenda-form textarea { resize: vertical; }
.agenda-form input:focus,
.agenda-form select:focus,
.agenda-form textarea:focus,
.private-auth-dialog input:focus { outline: 0; border-color: var(--siaj-teal); box-shadow: 0 0 0 3px rgba(21,155,152,.13); }
.private-choice { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; background: #f5f1f7; border: 1px solid #e1d6e7; border-radius: 9px; }
.private-choice input { width: auto; margin-top: 3px; }
.private-choice span { display: grid; gap: 3px; }
.private-choice small { color: var(--siaj-muted); font-size: .75rem; line-height: 1.4; }
.agenda-form > footer,
.deadline-dialog footer,
.private-auth-dialog footer,
.private-view-dialog footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 17px 26px; border-top: 1px solid var(--siaj-line); }
.agenda-form > footer .primary-action,
.agenda-form > footer .secondary-action,
.private-auth-dialog footer .primary-action,
.private-auth-dialog footer .secondary-action { min-height: 42px; padding: 9px 15px; }
.private-auth-dialog form > p,
.private-auth-dialog form > label,
.private-auth-dialog form > input { margin-left: 26px; margin-right: 26px; }
.private-auth-dialog form > p { margin-top: 24px; color: var(--siaj-muted); line-height: 1.5; }
.private-auth-dialog form > label { display: block; margin-bottom: 6px; }
.private-auth-dialog form > input { width: calc(100% - 52px); margin-bottom: 24px; }
.private-view-dialog dl { display: grid; gap: 0; margin: 0; padding: 10px 26px 22px; }
.private-view-dialog dl > div { display: grid; gap: 5px; padding: 13px 0; border-bottom: 1px solid var(--siaj-line); }
.private-view-dialog dt { color: var(--siaj-muted); font-size: .7rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.private-view-dialog dd { margin: 0; line-height: 1.5; }
.private-view-dialog footer { justify-content: space-between; }
.private-view-dialog footer > span { color: var(--siaj-muted); font-size: .75rem; }

.deadline-dialog { width: min(650px, calc(100% - 30px)); }
.deadline-form__body { display: grid; gap: 18px; padding: 22px 26px; }
.deadline-intro { margin: 0; color: var(--siaj-muted); font-size: .84rem; }
.deadline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.deadline-fields label { display: grid; gap: 6px; font-size: .8rem; font-weight: 700; }
.deadline-fields input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--siaj-line);
    border-radius: 8px;
    font: inherit;
}
.deadline-mode { display: grid; gap: 9px; margin: 0; padding: 14px; border: 1px solid var(--siaj-line); border-radius: 10px; }
.deadline-mode legend { padding: 0 6px; color: var(--siaj-blue); font-size: .8rem; font-weight: 750; }
.deadline-mode label { display: flex; align-items: flex-start; gap: 9px; padding: 7px; border-radius: 8px; cursor: pointer; }
.deadline-mode label:hover { background: #f4f8f8; }
.deadline-mode input { margin-top: 3px; }
.deadline-mode span { display: grid; gap: 2px; }
.deadline-mode small { color: var(--siaj-muted); font-size: .74rem; font-weight: 400; line-height: 1.4; }
.deadline-error,
.deadline-warning { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: .8rem; line-height: 1.45; }
.deadline-error { color: #8e2e3a; background: #faecee; border: 1px solid #efc8cd; }
.deadline-warning { color: #72530e; background: #fff8df; border: 1px solid #ead797; }
.deadline-result { display: grid; gap: 7px; padding: 17px; background: #eef7f5; border: 1px solid #c6e2dc; border-radius: 11px; }
.deadline-result > span { color: var(--siaj-muted); font-size: .68rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.deadline-result > strong { color: var(--siaj-blue); font: 700 1.45rem/1.2 Georgia, serif; text-transform: capitalize; }
.deadline-result > p:not(.deadline-warning) { margin: 0; color: var(--siaj-muted); font-size: .8rem; }
.deadline-result > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.deadline-result > div span { padding: 4px 7px; color: #315c57; background: white; border: 1px solid #cfe1de; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.deadline-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 26px; border-top: 1px solid var(--siaj-line); }
.deadline-dialog footer button { min-height: 42px; padding: 9px 15px; }
.deadline-origin { color: #376f68; }

.portal-onboarding { width: min(1180px, calc(100% - 40px)); }
.portal-welcome {
    display: grid;
    gap: 9px;
    margin-bottom: 22px;
    padding: 28px;
    color: white;
    background: linear-gradient(125deg, var(--siaj-navy), var(--siaj-teal));
    border-radius: 17px;
    box-shadow: 0 14px 35px rgba(12,49,66,.16);
}
.portal-welcome .eyebrow { color: var(--siaj-gold); }
.portal-welcome h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.portal-welcome > p:not(.eyebrow) { max-width: 760px; margin: 0; color: rgba(255,255,255,.82); line-height: 1.55; }
.vault-assurance { display: flex; align-items: center; gap: 12px; margin-top: 9px; padding: 12px 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; }
.vault-assurance > span { color: var(--siaj-gold); }
.vault-assurance div { display: grid; gap: 2px; }
.vault-assurance small { color: rgba(255,255,255,.76); line-height: 1.4; }
.portal-setup-form { display: grid; gap: 18px; }
.portal-setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.portal-config-card { overflow: hidden; background: white; border: 1px solid var(--siaj-line); border-radius: 13px; box-shadow: 0 6px 20px rgba(13,45,60,.06); }
.portal-config-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; background: #f3f8f8; border-bottom: 1px solid var(--siaj-line); }
.portal-config-card > header span:not(.portal-lock) { color: var(--siaj-muted); font-size: .62rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.portal-config-card h2 { margin: 3px 0 0; font-size: 1.05rem; }
.portal-lock { width: 34px; height: 34px; display: grid; place-items: center; background: white; border-radius: 50%; }
.portal-config-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 17px 18px; }
.portal-config-fields .field-block:first-child { grid-column: 1 / -1; }
.portal-config-fields label,
.portal-profile-form label { display: block; margin-bottom: 5px; color: var(--siaj-ink); font-size: .76rem; font-weight: 700; }
.portal-config-fields input,
.portal-config-fields select,
.portal-profile-form input,
.portal-profile-form select { width: 100%; padding: 9px 11px; border: 1px solid var(--siaj-line); border-radius: 8px; font: inherit; }
[data-portal-secret].is-disabled { opacity: .45; }
.errorlist { margin: 5px 0 0; padding: 0; color: #963543; font-size: .72rem; list-style: none; }
.portal-setup-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 0 35px; }
.portal-setup-actions button { min-height: 44px; padding: 10px 16px; }

.portal-vault-card { grid-column: 1 / -1; }
.portal-vault-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.portal-vault-heading h2 { margin: 2px 0 6px; }
.portal-vault-heading .helper { max-width: 760px; margin: 0; }
.portal-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.portal-profile-card { overflow: hidden; border: 1px solid var(--siaj-line); border-radius: 10px; background: white; }
.portal-profile-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px; cursor: pointer; list-style: none; }
.portal-profile-card > summary::-webkit-details-marker { display: none; }
.portal-profile-card > summary > span:first-child { display: grid; gap: 3px; min-width: 0; }
.portal-profile-card > summary small { overflow: hidden; color: var(--siaj-muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.portal-profile-card[open] > summary { background: #f2f7f7; border-bottom: 1px solid var(--siaj-line); }
.portal-profile-form { padding: 15px; }
.portal-profile-form > div { margin-bottom: 12px; }
.portal-profile-form small { display: block; margin-top: 4px; color: var(--siaj-muted); font-size: .68rem; line-height: 1.4; }

.profile-sync-section { margin-top: 20px; }
.profile-sync-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-sync-card { display: grid; align-content: start; gap: 14px; padding: 18px; border: 1px solid var(--siaj-line); border-radius: 12px; background: #f9fbfb; }
.profile-sync-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.profile-sync-card__heading > div { display: grid; gap: 5px; min-width: 0; }
.profile-sync-card__heading strong { color: var(--siaj-blue); }
.profile-sync-card__heading span:not(.status-pill),
.profile-sync-card__last { color: var(--siaj-muted); line-height: 1.45; }
.profile-sync-card__last { min-height: 38px; margin: 0; }
.profile-sync-card > .primary-action { width: fit-content; min-height: 42px; border: 0; }
.profile-sync-card > .primary-action:disabled { opacity: .48; cursor: not-allowed; filter: grayscale(.2); }
.profile-sync-progress { display: grid; gap: 9px; }
.profile-sync-error { margin: 0; color: #912b38; }

/* Procesos: búsqueda de cartera y navegación alfabética */
.process-shell { display: grid; gap: 18px; }
.process-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.process-heading h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.process-heading > div > p:last-child { margin: 9px 0 0; color: var(--siaj-muted); }
.process-new-action { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 16px; color: white; background: linear-gradient(135deg, #178a9d, #0f708a); border: 1px solid #0f708a; border-radius: 11px; box-shadow: 0 9px 20px rgba(15,112,138,.18); font-size: .79rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.process-new-action:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(15,112,138,.24); }
.process-new-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.process-panel { overflow: hidden; background: white; border: 1px solid var(--siaj-line); border-radius: 17px; box-shadow: 0 12px 32px rgba(16,58,86,.07); }
.process-state-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 13px 18px 0; border-bottom: 1px solid var(--siaj-line); }
.process-state-tabs a { padding: 9px 13px 11px; color: var(--siaj-muted); border-bottom: 3px solid transparent; font-size: .78rem; font-weight: 750; text-decoration: none; }
.process-state-tabs a:hover { color: var(--siaj-blue); }
.process-state-tabs a.is-active { color: var(--siaj-blue); border-bottom-color: var(--siaj-gold); }
.process-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; color: var(--siaj-muted); background: #f4f8f8; font-size: .72rem; }
.process-results-heading strong { color: var(--siaj-ink); font-size: .78rem; }
.process-list { display: grid; }
.process-row { display: grid; grid-template-columns: minmax(300px, 1.35fr) minmax(220px, .8fr) auto auto; gap: 18px; align-items: center; min-height: 74px; padding: 12px 18px; color: inherit; border-top: 1px solid #e5ecee; text-decoration: none; }
.process-row:first-child { border-top: 0; }
.process-row:hover { background: #f1f8f7; }
.process-row__main, .process-row__meta { min-width: 0; display: grid; gap: 5px; }
.process-row__main strong { color: #0e5277; font-size: .79rem; line-height: 1.4; }
.process-row__main span, .process-row__meta small { overflow: hidden; color: var(--siaj-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.process-row__meta > span { width: fit-content; max-width: 100%; overflow: hidden; padding: 4px 7px; color: #315c57; background: #edf6f4; border-radius: 999px; font-size: .64rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.process-status { width: max-content; padding: 5px 8px; color: #276347; background: #e7f4ec; border: 1px solid #bfdec9; border-radius: 999px; font-size: .63rem; font-weight: 800; text-transform: uppercase; }
.process-status--archivado { color: #56636a; background: #eef1f2; border-color: #d2dade; }
.process-status--cancelado { color: #8b3340; background: #faecee; border-color: #e9c4c9; }
.process-status--plan_pago { color: #74530d; background: #fff5d8; border-color: #ead28d; }
.process-status--preparacion { color: #7d5705; background: #fff4d2; border-color: #e5ca77; }
.process-row__arrow { color: #8aa4ad; font-size: 1.15rem; }
.process-empty { min-height: 170px; display: grid; place-content: center; gap: 5px; padding: 28px; color: var(--siaj-muted); text-align: center; }
.process-empty strong { color: var(--siaj-ink); }
.process-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--siaj-line); font-size: .73rem; }
.process-pagination a { color: var(--siaj-blue); font-weight: 750; text-decoration: none; }
.process-pagination span { color: var(--siaj-muted); }
.process-search-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 36px); padding: 0; color: var(--siaj-ink); background: white; border: 0; border-radius: 15px; box-shadow: 0 28px 80px rgba(8,35,52,.3); }
.process-search-dialog::backdrop { background: rgba(8,31,47,.58); backdrop-filter: blur(3px); }
.process-search-dialog > section > header { display: flex; justify-content: space-between; gap: 20px; padding: 20px 24px; color: white; background: var(--siaj-navy); }
.process-search-dialog header span { color: var(--siaj-gold); font-size: .68rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.process-search-dialog h2 { margin-top: 3px; font-size: 1.45rem; }
.process-search-dialog header button { color: white; background: transparent; border: 0; font: 400 1.8rem/1 inherit; cursor: pointer; }
.process-search-dialog__body { display: grid; gap: 9px; padding: 22px 24px; }
.process-search-dialog__body > label:first-child { font-size: .76rem; font-weight: 750; }
.process-search-dialog__body > input { width: 100%; padding: 13px 14px; border: 1px solid #b9cdd4; border-radius: 9px; font: 600 1rem/1 inherit; }
.process-search-dialog__body > input:focus { outline: 0; border-color: var(--siaj-teal); box-shadow: 0 0 0 3px rgba(21,155,152,.13); }
.process-search-dialog__body > p { margin: 0; color: var(--siaj-muted); font-size: .7rem; }
.process-suggestions { max-height: 360px; overflow-y: auto; border-top: 1px solid var(--siaj-line); }
.process-suggestions a { display: grid; gap: 4px; padding: 11px 10px; color: inherit; border-bottom: 1px solid var(--siaj-line); text-decoration: none; }
.process-suggestions a:hover, .process-suggestions a.is-selected { background: #edf7f5; }
.process-suggestions strong { color: #0e5277; font-size: .78rem; line-height: 1.4; }
.process-suggestions span { color: var(--siaj-muted); font-size: .68rem; }
.process-search-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--siaj-line); }
.process-search-dialog footer > span { color: var(--siaj-muted); font-size: .67rem; }
.process-search-dialog footer .secondary-action { min-height: 38px; padding: 7px 13px; font-size: .74rem; }
.process-create-shell { max-width: 1040px; }
.process-create-card { overflow: hidden; background: white; border: 1px solid var(--siaj-line); border-radius: 18px; box-shadow: 0 18px 48px rgba(16,58,86,.1); }
.process-create-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 30px; color: white; background: var(--siaj-navy); }
.process-create-card > header h1 { margin-top: 3px; color: white; font-size: 2rem; }
.process-create-card > header > span { padding: 6px 9px; color: #d8edef; background: rgba(255,255,255,.1); border-radius: 999px; font-size: .68rem; font-weight: 750; }
.process-create-intro { padding: 22px 30px; background: #f3f8f7; border-bottom: 1px solid var(--siaj-line); }
.process-create-intro strong { color: var(--siaj-navy); }
.process-create-intro p { max-width: 780px; margin: 5px 0 0; color: var(--siaj-muted); font-size: .77rem; line-height: 1.55; }
.process-create-card form { display: grid; gap: 0; }
.process-create-card fieldset { margin: 0; padding: 24px 30px; border: 0; border-bottom: 1px solid var(--siaj-line); }
.process-create-card legend { margin-bottom: 14px; color: var(--siaj-navy); font-family: Georgia, serif; font-size: 1.15rem; font-weight: 700; }
.process-create-grid { display: grid; gap: 15px; }
.process-create-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.process-create-card label { display: grid; align-content: start; gap: 6px; color: #385665; font-size: .72rem; font-weight: 750; }
.process-create-card input, .process-create-card select { width: 100%; min-height: 44px; box-sizing: border-box; padding: 10px 12px; color: var(--siaj-ink); background: white; border: 1px solid #bcd0d7; border-radius: 9px; font: 600 .8rem/1.2 inherit; }
.process-create-card input:focus, .process-create-card select:focus { outline: 0; border-color: var(--siaj-teal); box-shadow: 0 0 0 3px rgba(21,155,152,.12); }
.process-catalog-other { grid-column: auto; }
.process-catalog-other:has(input[hidden]) { display: none; }
.process-parties-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.process-parties-grid section { display: grid; gap: 13px; padding: 18px; background: #f8fbfa; border: 1px solid #d6e2e5; border-radius: 12px; }
.process-parties-grid h2 { color: var(--siaj-navy); font-size: .95rem; }
.process-parties-grid label small { color: var(--siaj-muted); font-size: .63rem; font-weight: 500; line-height: 1.4; }
.process-create-card .field-error { color: #a52c3c; }
.process-create-card > form > footer { display: flex; align-items: center; justify-content: flex-end; gap: 11px; padding: 18px 30px; }
.process-create-card > form > footer a, .process-create-card > form > footer button { min-height: 43px; box-sizing: border-box; padding: 10px 16px; border-radius: 9px; font: 750 .78rem/1 inherit; text-decoration: none; cursor: pointer; }
.process-create-card > form > footer a { color: var(--siaj-blue); background: white; border: 1px solid #bdd0d8; }
.process-create-card > form > footer button { display: inline-flex; align-items: center; gap: 9px; color: white; background: linear-gradient(90deg, var(--siaj-blue), var(--siaj-teal)); border: 1px solid #147f91; box-shadow: 0 7px 16px rgba(15,112,138,.16); }
.process-create-card > form > footer button:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(15,112,138,.22); }
.process-official-form { display: inline-flex; align-items: center; text-decoration: none; }
.process-preparation-panel { margin: 0 24px 24px; overflow: hidden; border: 1px solid #d3e0e3; border-radius: 14px; }
.process-preparation-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; background: #f2f8f7; border-bottom: 1px solid #d3e0e3; }
.process-preparation-panel h2 { margin-top: 3px; color: var(--siaj-navy); font-size: 1.25rem; }
.process-preparation-panel > header > span { padding: 5px 8px; color: #7d5705; background: #fff0bf; border-radius: 999px; font-size: .64rem; font-weight: 800; text-transform: uppercase; }
.process-preparation-panel ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 20px; list-style: none; counter-reset: preparation; }
.process-preparation-panel li { position: relative; display: grid; align-content: start; gap: 5px; padding: 30px 12px 0; color: var(--siaj-muted); border-top: 2px solid #d8e2e5; counter-increment: preparation; }
.process-preparation-panel li::before { content: counter(preparation); position: absolute; top: -14px; left: 0; width: 26px; height: 26px; display: grid; place-items: center; color: #647d86; background: white; border: 2px solid #c9d8dc; border-radius: 50%; font-size: .66rem; font-weight: 800; }
.process-preparation-panel li.is-current { color: var(--siaj-ink); border-color: var(--siaj-gold); }
.process-preparation-panel li.is-current::before { color: white; background: var(--siaj-gold); border-color: var(--siaj-gold); }
.process-preparation-panel li strong { font-size: .72rem; line-height: 1.35; }
.process-preparation-panel li small { font-size: .62rem; line-height: 1.45; }
.process-join-demand { display: inline-flex; margin: 0; }
.process-join-demand button { min-height: 34px; padding: 7px 12px; border: 1px solid #cc8f19; border-radius: 9px; color: #72500b; background: #fff5d6; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.process-join-demand button:hover:not(:disabled) { background: #ffe8a3; }
.process-join-demand button:disabled { color: #8a969b; background: #edf1f2; border-color: #d5dfe2; cursor: not-allowed; }
.process-provisional-parties { padding: 0 20px 20px; }
.process-provisional-parties h3 { margin-bottom: 8px; color: var(--siaj-navy); font-size: .8rem; }
.process-provisional-parties > div { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-top: 1px solid #e2eaec; font-size: .7rem; }
.process-provisional-parties span, .process-provisional-parties small { color: var(--siaj-muted); }
.process-judicial-form-ready { display: flex; align-items: center; gap: 12px; margin: 0 20px 20px; padding: 13px 15px; color: #255d43; background: #e9f5ed; border: 1px solid #bdddc8; border-radius: 10px; }
.process-judicial-form-ready > span { width: 28px; height: 28px; display: grid; place-items: center; color: white; background: #35855d; border-radius: 50%; font-weight: 900; }
.process-judicial-form-ready > div { display: grid; gap: 3px; }
.process-judicial-form-ready small { color: #59756a; font-size: .65rem; }
.process-ficha-dialog { width: min(92vw, 600px); padding: 0; color: var(--siaj-ink); background: white; border: 0; border-radius: 18px; box-shadow: 0 28px 85px rgba(8,35,52,.32); }
.process-ficha-dialog::backdrop { background: rgba(8,31,47,.58); backdrop-filter: blur(3px); }
.process-ficha-dialog form { display: grid; }
.process-ficha-dialog header { padding: 23px 27px 19px; color: white; background: var(--siaj-navy); }
.process-ficha-dialog header h2 { margin: 3px 0 5px; color: white; font-size: 1.5rem; }
.process-ficha-dialog header p:last-child { margin: 0; color: #c7e0e4; font-size: .7rem; }
.process-ficha-dialog__body { display: grid; gap: 11px; padding: 24px 27px; }
.process-ficha-dialog__body > strong { color: var(--siaj-navy); font-family: Georgia, serif; font-size: 1.05rem; }
.process-ficha-dialog__body > p { margin: 0; color: var(--siaj-muted); font-size: .76rem; line-height: 1.55; }
.process-ficha-dialog__body label { display: grid; gap: 7px; margin-top: 7px; color: #365665; font-size: .72rem; font-weight: 800; }
.process-ficha-dialog__body input[type="file"] { width: 100%; box-sizing: border-box; padding: 11px; color: var(--siaj-ink); background: #f7faf9; border: 1px dashed #9dbbc5; border-radius: 9px; }
.process-ficha-dialog__body > small { color: var(--siaj-muted); font-size: .64rem; }
.process-ficha-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 27px; background: #f6f9f9; border-top: 1px solid var(--siaj-line); }
.process-ficha-dialog footer button { min-height: 42px; padding: 9px 15px; color: var(--siaj-blue); background: white; border: 1px solid #bdd0d8; border-radius: 9px; font: 750 .77rem/1 inherit; cursor: pointer; }
.process-ficha-dialog footer button.is-primary { color: white; background: linear-gradient(90deg, var(--siaj-blue), var(--siaj-teal)); border-color: #147f91; }

@media (max-width: 850px) {
    .process-heading { align-items: flex-start; }
    .process-create-grid--three, .process-parties-grid { grid-template-columns: 1fr; }
    .process-preparation-panel ol { grid-template-columns: 1fr; gap: 0; padding-left: 34px; }
    .process-preparation-panel li { min-height: 54px; padding: 0 0 20px 28px; border-top: 0; border-left: 2px solid #d8e2e5; }
    .process-preparation-panel li::before { top: -3px; left: -14px; }
    .process-provisional-parties > div { grid-template-columns: 110px minmax(0, 1fr); }
    .process-provisional-parties small { grid-column: 2; }
}

@media (max-width: 560px) {
    .process-heading { display: grid; }
    .process-new-action { width: fit-content; }
    .process-create-card > header, .process-create-card fieldset, .process-create-intro { padding-left: 20px; padding-right: 20px; }
    .process-create-card > form > footer { padding: 15px 20px; }
    .process-file-actions { flex-wrap: wrap; }
}
.process-back { width: fit-content; display: block; margin-bottom: 14px; color: var(--siaj-blue); font-size: .78rem; font-weight: 750; text-decoration: none; }
.process-detail-card, .process-movements { background: white; border: 1px solid var(--siaj-line); border-radius: 16px; box-shadow: 0 12px 32px rgba(16,58,86,.07); }
.process-detail-card { position: relative; }
.process-detail-sticky { position: sticky; top: 95px; z-index: 12; overflow: hidden; background: white; border-radius: 15px 15px 0 0; box-shadow: 0 7px 16px rgba(16,58,86,.08); }
.process-detail-sticky > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px; border-bottom: 1px solid var(--siaj-line); }
.process-detail-card h1 { max-width: 950px; font: 700 clamp(1.4rem, 3vw, 2.1rem)/1.25 Georgia, serif; }
.process-detail-sticky > header p:last-child { margin: 9px 0 0; color: var(--siaj-muted); font-size: .74rem; }
.process-detail-nav-row { display: flex; align-items: stretch; background: #f7faf9; border-bottom: 1px solid var(--siaj-line); }
.process-detail-tabs { min-width: 0; flex: 1; display: flex; gap: 4px; padding: 0 20px; overflow-x: auto; }
.process-detail-tabs a { display: flex; align-items: center; gap: 7px; padding: 14px 12px 12px; color: var(--siaj-muted); border-bottom: 3px solid transparent; font-size: .77rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.process-detail-tabs a:hover { color: var(--siaj-blue); }
.process-detail-tabs a.is-active { color: var(--siaj-blue); border-bottom-color: var(--siaj-gold); }
.process-detail-tabs a span { min-width: 20px; padding: 2px 5px; color: #4f666d; background: #e5edef; border-radius: 999px; font-size: .6rem; text-align: center; }
.process-file-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 20px 6px 8px; }
.process-file-update { display: flex; align-items: center; margin: 0; }
.process-write-action {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    box-sizing: border-box;
    padding: 8px 12px;
    color: white;
    background: linear-gradient(135deg, #36a9c9, #177fa6);
    border: 1px solid #177fa6;
    border-radius: 8px;
    box-shadow: 0 5px 14px rgba(23,127,166,.2);
    font-size: .72rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}
.process-write-action:hover { color: white; background: linear-gradient(135deg, #2798ba, #126f93); }
.process-write-action:focus-visible { outline: 3px solid rgba(21,155,152,.28); outline-offset: 2px; }
.process-file-update .secondary-action {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #7e2632;
    border-radius: 8px;
    color: white;
    background: linear-gradient(135deg, #a63d49, #8a2430);
    box-shadow: 0 5px 14px rgba(138,36,48,.18);
    font-size: .72rem;
    white-space: nowrap;
}
.process-file-update .secondary-action:hover { background: linear-gradient(135deg, #96303d, #741c27); }
.process-file-update .secondary-action:focus-visible { outline: 3px solid rgba(166,61,73,.28); outline-offset: 2px; }
.process-file-update .secondary-action:disabled { opacity: .72; cursor: wait; }
.process-update-lock .sync-lock__spinner { border-top-color: #a63d49; }
.process-update-lock .sync-lock__card .eyebrow { color: #8a2430; }
.process-update-lock .sync-lock__card > small { grid-column: 1 / -1; justify-self: start; }
.is-process-updating { overflow: hidden; }
.is-process-updating,
.is-process-updating * { cursor: wait !important; }
.process-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 10px 24px 24px; }
.process-detail-grid > div { display: grid; gap: 5px; padding: 14px 12px; border-bottom: 1px solid var(--siaj-line); }
.process-detail-grid dt { color: var(--siaj-muted); font-size: .65rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.process-detail-grid dd { margin: 0; font-size: .78rem; line-height: 1.45; }
.process-state-editor { grid-column: span 2; }
.process-state-editor dd { display: grid; gap: 7px; }
.process-state-editor form { display: flex; align-items: center; gap: 8px; }
.process-state-editor select { min-width: 190px; min-height: 40px; padding: 8px 34px 8px 11px; color: var(--siaj-ink); background: white; border: 1px solid #bfd0d8; border-radius: 8px; font: inherit; }
.process-state-editor .secondary-action { min-height: 40px; padding: 8px 12px; border-radius: 8px; font-size: .72rem; }
.process-state-pending { color: #b32636; font-size: .69rem; font-weight: 800; }
.process-state-confirmed { color: #4f6b62; font-size: .66rem; }
.process-movements { margin-top: 18px; }
.process-movements > header { padding: 20px 24px; background: #f4f8f8; border-bottom: 1px solid var(--siaj-line); }
.process-movements h2 { font-size: 1.35rem; }
.process-movements > div { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 13px 24px; border-bottom: 1px solid var(--siaj-line); font-size: .75rem; }
.process-movements time { color: var(--siaj-muted); }
.process-movements > div > span { display: grid; gap: 4px; }
.process-movements small { color: var(--siaj-muted); }
.process-movements > p { padding: 24px; color: var(--siaj-muted); }
.process-movements--embedded { margin-top: 0; border: 0; border-radius: 0; box-shadow: none; }
.process-movements > .process-movement-siaj--borrador,
.process-movements > .process-movement-siaj--listo { background: #fff0f2; border-left: 4px solid #bd4b5b; }
.process-movements > .process-movement-siaj--presentado { background: #eaf6ef; border-left: 4px solid #3e8a62; }
.process-movement-siaj__heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.process-movement-siaj__heading > strong { color: #153e57; }
.process-movement-siaj__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.process-movement-siaj__actions > a { padding: 6px 10px; color: #0e6f8f; border: 1px solid #b9d9e3; border-radius: 8px; background: #fff; font-size: .66rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.process-draft-status { padding: 5px 9px; border-radius: 999px; background: #fff1cf; color: #805d05; font-size: .62rem; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.process-draft-status--presentado { background: #dff3e8; color: #216d47; }
.process-draft-status--listo { background: #e5f1fb; color: #215f88; }
.process-signature-status { padding: 5px 9px; color: #216d47; background: #dff3e8; border-radius: 999px; font-size: .61rem; font-weight: 800; white-space: nowrap; }
.process-draft-delete { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; color: #ad293b; background: #fff; border: 1px solid #e6b7be; border-radius: 8px; cursor: pointer; }
.process-draft-delete:hover { color: #fff; background: #ad293b; }
.process-draft-delete svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.process-upload-action { min-height: 32px; padding: 6px 11px; color: #fff; background: #1785a4; border: 1px solid #1785a4; border-radius: 8px; cursor: pointer; font: inherit; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.process-upload-action:hover { background: #0c6f8c; }
.process-upload-action:disabled { color: #7d8d93; background: #e7edef; border-color: #cbd6da; cursor: not-allowed; opacity: .78; }
.process-upload-action:disabled:hover { background: #e7edef; }
.process-upload-action.is-pending { color: #744f00; background: #fff1c9; border-color: #e1bd61; }
.process-delete-dialog { width: min(92vw, 510px); padding: 0; color: var(--siaj-ink); background: #fff; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(8,42,62,.28); }
.process-delete-dialog::backdrop { background: rgba(8,35,53,.55); }
.process-delete-dialog form { display: grid; gap: 15px; padding: 24px; }
.process-delete-dialog h2 { margin: 0; color: var(--siaj-navy); font-size: 1.35rem; }
.process-delete-dialog p { margin: 0; line-height: 1.55; }
.process-delete-dialog small { color: var(--siaj-muted); line-height: 1.45; }
.process-delete-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 5px; }
.process-delete-dialog button { min-height: 42px; padding: 9px 15px; border: 1px solid #bfd0d8; border-radius: 9px; background: #fff; cursor: pointer; font: inherit; font-weight: 750; }
.process-delete-dialog button.is-danger { color: #fff; background: #a72c3c; border-color: #a72c3c; }
.process-upload-dialog { width: min(94vw, 640px); max-height: min(88vh, 760px); padding: 0; color: var(--siaj-ink); background: #fff; border: 0; border-radius: 20px; box-shadow: 0 24px 80px rgba(8,42,62,.3); }
.process-upload-dialog::backdrop { background: rgba(8,35,53,.58); }
.process-upload-dialog form, .process-upload-waiting, .process-upload-step { display: grid; }
.process-upload-dialog [hidden] { display: none !important; }
.process-upload-dialog header { padding: 24px 28px 20px; color: #fff; background: var(--siaj-navy); }
.process-upload-dialog header h2 { margin: 3px 0 5px; color: #fff; font-size: 1.55rem; }
.process-upload-dialog header p { margin: 0; opacity: .86; }
.process-upload-dialog__body, .process-upload-waiting > div { display: grid; gap: 16px; padding: 22px 28px; }
.process-upload-dialog__question { min-height: 150px; align-content: center; text-align: center; }
.process-upload-dialog__question strong { color: var(--siaj-navy); font-family: Georgia, serif; font-size: 1.3rem; }
.process-upload-dialog__question small { max-width: 490px; margin: 0 auto; color: var(--siaj-muted); line-height: 1.55; }
.process-upload-dialog fieldset { display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px solid #cbdbe1; border-radius: 12px; }
.process-upload-dialog fieldset[disabled] { opacity: .55; }
.process-upload-dialog legend { padding: 0 6px; color: var(--siaj-navy); font-weight: 800; }
.process-upload-dialog label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.process-upload-choice { padding: 11px 12px; background: #f6fafa; border: 1px solid #dce7ea; border-radius: 10px; }
.process-upload-choice > span { display: grid; gap: 2px; }
.process-upload-choice small, .process-upload-dialog fieldset > small, .process-upload-waiting small { color: var(--siaj-muted); line-height: 1.45; }
.process-upload-signed-file { display: grid !important; gap: 7px !important; padding: 14px; background: #eef7fa; border: 1px solid #bad9e3; border-radius: 12px; color: var(--siaj-navy); font-weight: 800; }
.process-upload-signed-file[hidden] { display: none !important; }
.process-upload-signed-file input { padding: 8px; background: #fff; border: 1px solid #c5d7dd; border-radius: 8px; font: inherit; }
.process-upload-signed-file small { color: var(--siaj-muted); font-weight: 500; }
.process-upload-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 28px 22px; background: #f5f8f8; border-top: 1px solid var(--siaj-line); }
.process-upload-dialog button, .process-upload-cargo { min-height: 42px; padding: 10px 15px; color: #15516d; background: #fff; border: 1px solid #b9ced8; border-radius: 9px; cursor: pointer; font: inherit; font-weight: 750; }
.process-upload-dialog button.is-primary, .process-upload-cargo { color: #fff; background: #137f9e; border-color: #137f9e; }
.process-upload-dialog button:disabled { cursor: wait; opacity: .6; }
.process-upload-error { margin: 0; padding: 10px 12px; color: #8e2231; background: #fff0f2; border: 1px solid #ecc2c8; border-radius: 9px; font-weight: 700; }
.process-upload-waiting code { padding: 4px 7px; color: #123e56; background: #eef5f6; border-radius: 5px; font-size: .85rem; }
.process-upload-waiting__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.process-upload-cargo { justify-content: center; text-align: center; }
.process-upload-cargo input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.process-upload-notice { display: grid; gap: 5px; padding: 14px 16px; color: #164e67; background: #edf7f9; border: 1px solid #c3dfe6; border-radius: 12px; }
.process-upload-notice span { color: var(--siaj-muted); font-size: .76rem; line-height: 1.45; }
.process-upload-notice > div { display: flex; flex-wrap: wrap; gap: 7px; }
.process-upload-notice button { width: fit-content; min-height: 34px; margin-top: 5px; padding: 6px 10px; font-size: .7rem; }
.process-sign-review { display: grid; gap: 12px; padding: 14px; background: #fff8e8; border: 1px solid #e7cf91; border-radius: 12px; }
.process-sign-review > p { display: grid; gap: 4px; margin: 0; }
.process-sign-review > p span { color: var(--siaj-muted); font-size: .74rem; line-height: 1.45; }
.process-sign-review__links { display: flex; gap: 9px; }
.process-sign-review__links a { padding: 7px 10px; color: #126d8c; background: #fff; border: 1px solid #b9d6df; border-radius: 8px; font-size: .7rem; font-weight: 750; text-decoration: none; }
.process-sign-review label { align-items: flex-start; color: #703e0c; font-size: .74rem; font-weight: 750; line-height: 1.4; }
.electronic-file__heading, .electronic-file-row { display: grid; grid-template-columns: 115px minmax(280px, 1.25fr) minmax(180px, .75fr) 105px; gap: 16px; align-items: center; }
.electronic-file__heading { padding: 10px 20px; color: var(--siaj-muted); background: #f1f6f6; border-bottom: 1px solid var(--siaj-line); font-size: .62rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.electronic-file-row { min-height: 78px; padding: 12px 20px; border-bottom: 1px solid var(--siaj-line); transition: background .18s ease; }
.electronic-file-row:last-child { border-bottom: 0; }
.electronic-file-row:hover { background: #f7fbfa; }
.electronic-file-row.is-viewed { background: #eaf6ef; }
.electronic-file-row > time { display: grid; gap: 3px; color: var(--siaj-ink); font-size: .72rem; font-weight: 700; }
.electronic-file-row > time small { color: var(--siaj-muted); font-size: .65rem; font-weight: 500; }
.electronic-file-row__title, .electronic-file-row__meta { min-width: 0; display: grid; gap: 5px; }
.electronic-file-row__title strong { color: #0e5277; font-size: .77rem; line-height: 1.4; }
.electronic-file-row__title small, .electronic-file-row__meta span { overflow: hidden; color: var(--siaj-muted); font-size: .67rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.electronic-file-row__meta strong { font-size: .72rem; }
.document-type { width: fit-content; padding: 3px 6px; color: #315c57; background: #e7f3f1; border-radius: 999px; font-size: .59rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.document-type--escrito { color: #634d72; background: #f0eaf4; }
.document-type--cedula { color: #73520c; background: #fff2cf; }
.electronic-file-row__access { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.document-viewed { color: #2c7550; font-size: .64rem; font-weight: 750; }
.document-unavailable { color: var(--siaj-muted); font-size: .65rem; text-align: right; }

@media (max-width: 1180px) {
    .app-header { grid-template-columns: 1fr auto; gap: 10px 20px; }
    .app-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
    .process-detail-sticky { top: 132px; }
    .dashboard-shell { min-height: calc(100vh - 132px); }
}

@media (max-width: 850px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .welcome-block { align-items: flex-start; flex-direction: column; }
    .profile-grid { grid-template-columns: 1fr; }
    .relationship-row, .tax-relation > header { align-items: flex-start; flex-direction: column; }
    .admin-layout { grid-template-columns: 1fr; }
    .repartition-card { position: static; }
    .study-form { grid-template-columns: 1fr; }
    .client-summary-grid, .client-bottom-grid { grid-template-columns: 1fr; }
    .quota-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quota-edit-form button { grid-column: 1 / -1; justify-self: start; }
    .field-block--type, .study-form .form-actions, .study-identity-row { grid-column: 1; }
    .agenda-months { grid-template-columns: 1fr; }
    .mini-calendar:first-child,
    .mini-calendar:last-child { display: none; }
    .agenda-event { grid-template-columns: 88px minmax(0, 1fr); }
    .agenda-event__actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--siaj-line); padding-top: 7px; }
    .portal-setup-grid,
    .portal-profile-grid,
    .profile-sync-grid { grid-template-columns: 1fr; }
    .process-row { grid-template-columns: minmax(0, 1fr) auto; }
    .process-row__meta { grid-column: 1; }
    .process-status { grid-column: 2; grid-row: 1; }
    .process-row__arrow { grid-column: 2; grid-row: 2; justify-self: end; }
    .process-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .electronic-file__heading { display: none; }
    .electronic-file-row { grid-template-columns: 100px minmax(0, 1fr) auto; }
    .electronic-file-row__meta { grid-column: 2; }
    .electronic-file-row__access { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 560px) {
    .access-shell { align-items: start; padding: 28px 18px; }
    .access-hero { gap: 22px; }
    .access-brand__mark { width: 76px; height: 76px; margin-bottom: 10px; }
    body .access-brand__title { font-size: clamp(3.25rem, 18vw, 4.2rem) !important; }
    .access-brand__name { max-width: 300px; margin-top: 10px; }
    .access-brand__message { max-width: 330px; margin-top: 8px; }
    .access-card { padding: 26px 22px; }
    .app-header { position: relative; padding: 13px 18px; }
    .app-brand__mark { width: 48px; height: 48px; flex-basis: 48px; }
    .app-brand__wording small { display: none; }
    .user-menu__trigger > span:not(.user-avatar):not(.user-menu__chevron) { display: none; }
    .app-nav { gap: 2px; }
    .app-nav a, .app-nav span { padding: 8px; font-size: 12.5px !important; }
    .dashboard-shell { width: min(100% - 30px, 1280px); padding-top: 36px; }
    .content-shell { width: min(100% - 30px, 1120px); padding-top: 34px; }
    .sessions-list > div { flex-direction: column; gap: 5px; }
    .study-identity-row { grid-template-columns: 1fr; }
    .access-card__actions { grid-template-columns: 1fr; }
    .login-dialog__brand { padding: 18px 22px; }
    .login-dialog__body { padding: 26px 22px; }
    .access-form--dialog { grid-template-columns: 1fr; }
    .login-dialog__actions, .password-recovery-link { grid-column: 1; }
    .registration-form { grid-template-columns: 1fr; }
    .registration-form > button { grid-column: 1; }
    .official-assignment-row { grid-template-columns: 1fr; }
    .activation-summary { grid-template-columns: 1fr; }
    .client-heading, .card-heading-row { align-items: flex-start; flex-direction: column; }
    .data-list { grid-template-columns: 1fr; }
    .quota-edit-form { grid-template-columns: 1fr; }
    .dashboard-shell--workday { width: min(100% - 22px, 1380px); }
    .agenda-panel__header { grid-template-columns: 1fr auto; padding: 13px 14px; }
    .agenda-panel__header > div:first-child { grid-column: 1; }
    .agenda-panel__header .deadline-trigger { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: center; }
    .agenda-panel__header .agenda-toolbar { grid-column: 2; grid-row: 1; }
    .daily-list-panel > header { padding: 18px; }
    .portfolio-sync { grid-template-columns: 1fr; margin: 12px; padding: 18px; }
    .portfolio-sync > .primary-action { justify-self: start; }
    .portfolio-progress__status { align-items: flex-start; flex-direction: column; gap: 3px; }
    .sync-lock__card { grid-template-columns: 42px minmax(0, 1fr); padding: 20px; }
    .sync-lock__spinner { width: 38px; height: 38px; border-width: 4px; }
    .sync-lock__card > small { grid-column: 1 / -1; justify-self: start; text-align: left; }
    .daily-list-panel > header { grid-template-columns: 1fr; gap: 14px; }
    .daily-complete-strip { grid-template-columns: auto minmax(0, 1fr); }
    .daily-complete-strip a { grid-column: 1 / -1; text-align: center; }
    .daily-list-panel > header .status-pill { justify-self: start; }
    .daily-source-statuses { justify-items: start; }
    .daily-list-date { justify-self: stretch; }
    .daily-card { grid-template-columns: 1fr; }
    .daily-card__judge { grid-column: 1; grid-row: auto; max-width: none; text-align: left; }
    .daily-card__actions { justify-content: flex-start; padding-top: 8px; }
    .agenda-months { padding: 14px; }
    .agenda-day { padding: 0 14px 14px; }
    .agenda-day__header { align-items: flex-start; flex-direction: column; }
    .agenda-event { grid-template-columns: 1fr; gap: 10px; }
    .agenda-event__actions { grid-column: 1; }
    .agenda-form__grid { grid-template-columns: 1fr; padding: 20px; }
    .agenda-form__grid .full-row { grid-column: 1; }
    .deadline-fields { grid-template-columns: 1fr; }
    .deadline-dialog footer { flex-wrap: wrap; padding: 15px 20px; }
    .private-view-dialog footer { align-items: flex-start; flex-direction: column; }
    .portal-onboarding { width: min(100% - 24px, 1180px); }
    .portal-welcome { padding: 22px; }
    .portal-config-fields { grid-template-columns: 1fr; }
    .portal-config-fields .field-block:first-child { grid-column: 1; }
    .portal-setup-actions { align-items: stretch; flex-direction: column-reverse; }
    .portal-vault-heading { flex-direction: column; }
    .process-row { grid-template-columns: 1fr; gap: 9px; }
    .process-status, .process-row__arrow { grid-column: 1; grid-row: auto; }
    .process-row__arrow { display: none; }
    .process-search-dialog footer { align-items: flex-start; flex-direction: column; }
    .process-detail-sticky { position: static; }
    .process-detail-sticky > header { flex-direction: column; }
    .process-detail-nav-row { align-items: stretch; flex-direction: column; }
    .process-file-actions { align-items: stretch; flex-direction: column; padding: 8px 14px 12px; }
    .process-file-update .secondary-action, .process-write-action { justify-content: center; width: 100%; }
    .process-detail-grid { grid-template-columns: 1fr; }
    .process-state-editor { grid-column: 1; }
    .process-state-editor form { align-items: stretch; flex-direction: column; }
    .process-state-editor select, .process-state-editor .secondary-action { width: 100%; }
    .process-movements > div { grid-template-columns: 1fr; gap: 5px; }
    .process-movement-siaj__heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .process-movement-siaj__actions { flex-wrap: wrap; }
    .electronic-file-row { grid-template-columns: 1fr; gap: 8px; }
    .electronic-file-row__meta, .electronic-file-row__access { grid-column: 1; grid-row: auto; }
    .electronic-file-row__access { justify-content: flex-start; }
}
