:root {
    --ink-950: #102c33;
    --ink-900: #173a42;
    --ink-800: #214a53;
    --ink-700: #35616a;
    --ink-500: #6b858a;
    --ink-300: #b8c7c9;
    --ink-200: #d9e1e2;
    --ink-100: #edf2f2;
    --ink-50: #f6f8f8;
    --paper: #ffffff;
    --teal-700: #087f73;
    --teal-600: #0b9586;
    --teal-100: #d9f2ee;
    --teal-50: #effaf8;
    --gold-500: #d59a36;
    --gold-100: #f9ebcf;
    --red-600: #b8403d;
    --red-100: #fae2e0;
    --blue-600: #3f6fa4;
    --shadow-sm: 0 1px 2px rgba(16, 44, 51, 0.05), 0 6px 18px rgba(16, 44, 51, 0.04);
    --shadow-md: 0 18px 50px rgba(16, 44, 51, 0.11);
    --radius-sm: 8px;
    --radius-md: 14px;
    --sidebar-width: 268px;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink-950);
    background: var(--ink-50);
    font-synthesis: none;
}
.support-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.delivery-section { margin-top:1.25rem; padding:1.25rem; }
.support-receipt { max-width:800px; margin:2rem auto; font-size:1rem; line-height:1.8; }
.support-receipt table { width:100%; border-collapse:collapse; text-align:left; }
.support-receipt th,.support-receipt td { padding:.5rem; border-bottom:1px solid #ccc; }
.receipt-signature { text-align:center; margin-top:6rem; }
@media print { .sidebar,.topbar,.receipt-controls,#blazor-error-ui {display:none!important;} .app-shell,.app-stage {display:block!important;min-height:0!important;} .page-content {padding:0!important;width:100%!important;max-width:none!important;} .support-receipt {margin:0;border:0;box-shadow:none;color:black;background:white;} }
.support-filters { display:flex; gap:1rem; margin-bottom:1.5rem; }
.support-line { display:grid; grid-template-columns:1fr 2fr 1fr 1fr auto; gap:.75rem; align-items:center; border-bottom:1px solid var(--ink-200); margin-bottom:1rem; }
.support-fields label { font-size:.875rem; }
@media(max-width: 1000px) { .support-line {grid-template-columns:1fr 1fr;} .support-filters {flex-wrap:wrap;} }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-width: 320px; background: var(--ink-50); color: var(--ink-950); line-height: 1.5; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1:focus { outline: none; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.eyebrow {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--teal-700);
    font-size: 0.73rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}
.eyebrow-light { color: #7bd7cc; }

.brand-mark {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 13px;
    background: var(--teal-600);
    color: white;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Acceso */
.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(390px, 46%) 1fr;
    background: var(--paper);
}

.auth-intro {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: radial-gradient(circle at 85% 15%, rgba(24, 170, 153, 0.22), transparent 28%), linear-gradient(145deg, #0c2a31 0%, #153f47 58%, #0a685f 130%);
    color: white;
}

.auth-intro::before,
.auth-intro::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}
.auth-intro::before { width: 420px; height: 420px; right: -210px; bottom: 4%; }
.auth-intro::after { width: 620px; height: 620px; right: -310px; bottom: -96px; }

.auth-brand,
.sidebar-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}
.auth-brand strong,
.sidebar-brand strong { display: block; font-size: 1rem; letter-spacing: -0.01em; }
.auth-brand small,
.sidebar-brand small {
    display: block;
    margin-top: 0.08rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-intro-copy { position: relative; z-index: 1; max-width: 570px; padding: 4rem 0; }
.auth-intro-copy h1 {
    max-width: 560px;
    margin: 0 0 1.2rem;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    font-weight: 680;
    letter-spacing: -0.055em;
    line-height: 0.99;
}
.auth-intro-copy p {
    max-width: 510px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.02rem;
    line-height: 1.75;
}

.auth-security-note {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 410px;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}
.auth-security-note strong { display: block; margin-bottom: 0.12rem; color: white; font-size: 0.84rem; }
.security-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 50%;
    background: rgba(29, 190, 171, 0.17);
    color: #83ded4;
}
.security-icon svg { width: 20px; height: 20px; }

.auth-content {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem clamp(1.5rem, 7vw, 8rem) 2rem;
    background: linear-gradient(rgba(16, 44, 51, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 44, 51, 0.025) 1px, transparent 1px), var(--paper);
    background-size: 32px 32px;
}
.login-card { width: min(100%, 430px); padding: 0.5rem 0; }
.login-heading { margin-bottom: 2rem; }
.login-heading h2 { margin: 0; color: var(--ink-950); font-size: 2.15rem; letter-spacing: -0.045em; }
.login-heading p { margin: 0.55rem 0 0; color: var(--ink-500); font-size: 0.94rem; }

.form-field { margin-bottom: 1.15rem; }
.form-field label { display: block; margin-bottom: 0.48rem; color: var(--ink-800); font-size: 0.82rem; font-weight: 680; }
.text-input {
    width: 100%;
    height: 50px;
    padding: 0 0.95rem;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    outline: 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-950);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.text-input::placeholder { color: #9aabad; }
.text-input:focus { border-color: var(--teal-600); box-shadow: 0 0 0 4px rgba(11, 149, 134, 0.11); }
.remember-row { display: flex; align-items: center; gap: 0.62rem; margin: 0.25rem 0 1.45rem; color: var(--ink-700); cursor: pointer; font-size: 0.82rem; }
.remember-row input { width: 17px; height: 17px; accent-color: var(--teal-700); }

.primary-button,
.secondary-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.primary-button {
    width: 100%;
    border: 0;
    background: var(--ink-950);
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(16, 44, 51, 0.18);
}
.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--teal-700); box-shadow: 0 13px 28px rgba(8, 127, 115, 0.22); }
.primary-button:focus-visible,
.secondary-button:focus-visible,
.logout-button:focus-visible,
.nav-link:focus-visible { outline: 3px solid rgba(11, 149, 134, 0.28); outline-offset: 2px; }
.primary-button:disabled { cursor: wait; opacity: 0.72; }
.primary-button svg { width: 19px; height: 19px; }

.button-spinner,
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: white; border-radius: 50%; animation: spin 750ms linear infinite; }
.spinner { border-color: rgba(8, 127, 115, 0.2); border-top-color: var(--teal-700); }
@keyframes spin { to { transform: rotate(360deg); } }

.login-help,
.auth-footer { color: var(--ink-500); font-size: 0.76rem; text-align: center; }
.login-help { margin: 1.4rem 0 0; }
.auth-footer { width: 100%; margin: auto 0 0; padding-top: 2.5rem; }

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid #efc4c1;
    border-radius: var(--radius-sm);
    background: var(--red-100);
    color: #84302e;
    font-size: 0.8rem;
}
.form-alert svg { width: 18px; height: 18px; flex: 0 0 18px; }
.form-success {
    margin-bottom: 1.25rem;
    padding: 0.82rem 0.95rem;
    border: 1px solid #b9e4dd;
    border-radius: var(--radius-sm);
    background: var(--teal-50);
    color: #17665d;
    font-size: 0.8rem;
}
.validation-message { display: block; margin-top: 0.35rem; color: var(--red-600); font-size: 0.74rem; }

.setup-card { width: min(100%, 460px); }
.setup-loading { display: flex; align-items: center; gap: 0.7rem; color: var(--ink-500); font-size: 0.82rem; }
.setup-identity { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.4rem; padding: 0.85rem; border: 1px solid var(--ink-200); border-radius: var(--radius-sm); background: var(--ink-50); }
.setup-identity small,
.setup-identity strong { display: block; }
.setup-identity small { color: var(--ink-500); font-size: 0.68rem; }
.setup-identity strong { margin-top: 0.08rem; color: var(--ink-900); font-size: 0.82rem; }
.password-hint { margin: -0.2rem 0 1.25rem; color: var(--ink-500); font-size: 0.74rem; line-height: 1.55; }
.setup-link { width: 100%; }

/* Aplicación */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow-y: auto;
    padding: 1.55rem 1.1rem 1.25rem;
    background: var(--ink-950);
    color: white;
}
.sidebar-brand { padding: 0.2rem 0.45rem 1.75rem; }
.brand-copy { min-width: 0; }
.main-nav { display: flex; flex-direction: column; gap: 0.3rem; }
.nav-section-label { padding: 0.7rem 0.75rem 0.45rem; color: rgba(255, 255, 255, 0.34); font-size: 0.65rem; font-weight: 760; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-section-secondary { margin-top: 1rem; }
.nav-link {
    display: flex;
    min-height: 45px;
    align-items: center;
    gap: 0.82rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.69);
    font-size: 0.84rem;
    font-weight: 570;
    text-decoration: none;
    transition: color 150ms ease, background 150ms ease;
}
.nav-link svg { width: 19px; height: 19px; flex: 0 0 19px; }
.nav-link:hover:not(.nav-link-disabled) { background: rgba(255, 255, 255, 0.055); color: white; }
.nav-link.active { background: rgba(19, 172, 155, 0.18); color: #a4ede5; }
.nav-link small { margin-left: auto; color: rgba(255, 255, 255, 0.23); font-size: 0.57rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-link-disabled { cursor: default; opacity: 0.56; }
.sidebar-foot { display: flex; align-items: center; gap: 0.55rem; margin-top: auto; padding: 1.15rem 0.75rem 0.25rem; border-top: 1px solid rgba(255, 255, 255, 0.07); color: rgba(255, 255, 255, 0.4); font-size: 0.68rem; }
.version-dot { width: 7px; height: 7px; border-radius: 50%; background: #4dceb7; box-shadow: 0 0 0 4px rgba(77, 206, 183, 0.1); }

.app-stage { grid-column: 2; min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--ink-200);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
}
.topbar-context { color: var(--ink-500); font-size: 0.73rem; font-weight: 670; letter-spacing: 0.08em; text-transform: uppercase; }
.user-menu { display: flex; align-items: center; gap: 0.7rem; }
.user-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--teal-100); color: var(--teal-700); font-size: 0.78rem; font-weight: 800; }
.user-copy { min-width: 112px; }
.user-copy strong,
.user-copy small { display: block; }
.user-copy strong { max-width: 170px; overflow: hidden; color: var(--ink-900); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { color: var(--ink-500); font-size: 0.65rem; }
.logout-button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink-500); cursor: pointer; }
.logout-button:hover { background: var(--ink-100); color: var(--ink-900); }
.logout-button svg { width: 18px; height: 18px; }

.page-content { width: min(100%, 1500px); margin: 0 auto; padding: clamp(2rem, 4vw, 3.5rem); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.65rem; }
.page-heading h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.45rem); font-weight: 700; letter-spacing: -0.045em; }
.page-heading p { margin: 0.45rem 0 0; color: var(--ink-500); font-size: 0.9rem; }
.heading-actions { display: flex; align-items: stretch; gap: 0.65rem; }
.date-badge { min-width: 130px; padding: 0.7rem 0.9rem; border: 1px solid var(--ink-200); border-radius: 10px; background: var(--paper); text-align: right; }
.date-badge span,
.date-badge strong { display: block; }
.date-badge span { color: var(--ink-500); font-size: 0.64rem; text-transform: capitalize; }
.date-badge strong { color: var(--ink-800); font-size: 0.75rem; text-transform: uppercase; }
.refresh-button { display: inline-flex; min-width: 118px; align-items: center; justify-content: center; gap: 0.5rem; padding: 0 0.85rem; border: 1px solid var(--ink-200); border-radius: 10px; background: var(--paper); color: var(--ink-700); cursor: pointer; font-size: 0.72rem; font-weight: 680; }
.refresh-button:hover:not(:disabled) { border-color: var(--ink-300); color: var(--teal-700); }
.refresh-button:disabled { cursor: wait; opacity: 0.65; }
.refresh-button svg { width: 16px; height: 16px; }

.status-panel { display: flex; min-height: 74px; align-items: center; gap: 0.9rem; margin-bottom: 1.3rem; padding: 1rem 1.15rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.status-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 11px; background: var(--ink-100); color: var(--ink-700); }
.status-icon svg { width: 21px; height: 21px; }
.status-panel strong,
.status-panel small { display: block; }
.status-panel strong { font-size: 0.84rem; }
.status-panel small { margin-top: 0.08rem; color: var(--ink-500); font-size: 0.72rem; }
.status-detail { margin-left: auto; padding: 0.38rem 0.65rem; border-radius: 99px; background: var(--ink-100); color: var(--ink-700); font-size: 0.65rem; font-weight: 650; }
.status-ready { border-color: #b9e4dd; background: var(--teal-50); }
.status-ready .status-icon { background: var(--teal-100); color: var(--teal-700); }
.status-pending { border-color: #eadab9; background: #fffaf0; }
.status-pending .status-icon { background: var(--gold-100); color: #986516; }
.status-warning { border-color: #efc4c1; background: #fff7f6; }
.status-warning .status-icon { background: var(--red-100); color: var(--red-600); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.metric-card { position: relative; display: flex; min-height: 185px; flex-direction: column; padding: 1.2rem; overflow: hidden; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.metric-card::after { position: absolute; width: 90px; height: 90px; right: -42px; top: -42px; border-radius: 50%; background: currentColor; content: ""; opacity: 0.06; }
.metric-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 1.15rem; border-radius: 10px; background: currentColor; }
.metric-icon svg { width: 19px; height: 19px; color: white; }
.metric-label { color: var(--ink-700); font-size: 0.76rem; font-weight: 650; }
.metric-card > strong { margin: 0.12rem 0 0.25rem; color: var(--ink-950); font-size: 2rem; letter-spacing: -0.04em; }
.metric-card > small { margin-top: auto; color: var(--ink-500); font-size: 0.67rem; }
.metric-people { color: var(--teal-600); }
.metric-requests { color: var(--blue-600); }
.metric-support { color: var(--gold-500); }
.metric-stock { color: #745fa0; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr); gap: 1rem; }
.operations-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.8fr); gap: 1rem; margin-bottom: 1rem; }
.workspace-card { padding: 1.4rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.auto-update-notice { margin: 0 0 0.85rem; color: var(--ink-500); font-size: 0.75rem; line-height: 1.5; }
.notice-card { padding: 1rem 1.3rem; margin-bottom: 0.75rem; }
.notice-card h2 { margin: 0 0 0.55rem; font-size: 1.15rem; line-height: 1.35; letter-spacing: -0.025em; }
.notice-card > p { margin: 0.45rem 0 0; }
.notice-card > ul { margin: 0.65rem 0 0; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.card-heading h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.025em; }
.workspace-card > p { max-width: 680px; margin: 0.85rem 0 1.2rem; color: var(--ink-500); font-size: 0.8rem; line-height: 1.7; }
.step-number { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: var(--ink-950); color: white; font-size: 0.72rem; font-weight: 780; }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.feature-list span { display: flex; min-height: 48px; align-items: center; gap: 0.55rem; padding: 0.6rem 0.7rem; border-radius: 9px; background: var(--ink-50); color: var(--ink-700); font-size: 0.7rem; }
.feature-list i { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); font-size: 0.62rem; font-style: normal; font-weight: 760; }
.check-list { display: grid; gap: 0.78rem; margin: 1.05rem 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: center; gap: 0.62rem; color: var(--ink-700); font-size: 0.75rem; }
.check-list span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); font-size: 0.66rem; font-weight: 800; }

.live-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.55rem; border-radius: 99px; background: var(--teal-50); color: var(--teal-700); font-size: 0.62rem; font-weight: 720; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-600); box-shadow: 0 0 0 3px rgba(11, 149, 134, 0.12); }
.module-list { margin-top: 1.15rem; border-top: 1px solid var(--ink-100); }
.module-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(70px, auto) minmax(68px, auto); align-items: center; gap: 0.8rem; min-height: 72px; border-bottom: 1px solid var(--ink-100); }
.module-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-300); box-shadow: 0 0 0 4px var(--ink-100); }
.module-dot-active { background: var(--teal-600); box-shadow: 0 0 0 4px var(--teal-100); }
.module-copy strong,
.module-copy small,
.module-value strong,
.module-value small { display: block; }
.module-copy strong { color: var(--ink-900); font-size: 0.8rem; }
.module-copy small { margin-top: 0.08rem; color: var(--ink-500); font-size: 0.67rem; }
.module-value { text-align: right; }
.module-value strong { color: var(--ink-900); font-size: 0.9rem; }
.module-value small { color: var(--ink-500); font-size: 0.6rem; }
.module-state { min-width: 62px; padding: 0.28rem 0.45rem; border-radius: 99px; background: var(--ink-100); color: var(--ink-700); font-size: 0.59rem; font-weight: 720; text-align: center; }
.module-state-active { background: var(--teal-100); color: var(--teal-700); }

.attention-count { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--ink-100); color: var(--ink-700); font-size: 0.72rem; font-weight: 780; }
.attention-list { display: grid; gap: 0.7rem; margin: 1.15rem 0 0; padding: 0; list-style: none; }
.attention-item { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.82rem; border: 1px solid var(--ink-100); border-radius: 10px; background: var(--ink-50); }
.attention-item strong,
.attention-item small { display: block; }
.attention-item strong { color: var(--ink-900); font-size: 0.73rem; }
.attention-item small { margin-top: 0.15rem; color: var(--ink-500); font-size: 0.64rem; line-height: 1.5; }
.attention-symbol { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 7px; background: var(--teal-100); color: var(--teal-700); font-size: 0.64rem; font-weight: 800; }
.attention-warning .attention-symbol { background: var(--gold-100); color: #8c5d12; }
.attention-neutral .attention-symbol { background: #e7e8f2; color: #595a82; }
.attention-success .attention-symbol { background: var(--teal-100); color: var(--teal-700); }
.dashboard-empty { color: var(--ink-500); }
.compact-empty { margin-top: 1.15rem; padding: 1rem; border-radius: 10px; background: var(--ink-50); }
.compact-empty strong,
.compact-empty span { display: block; }
.compact-empty strong { color: var(--ink-800); font-size: 0.76rem; }
.compact-empty span { margin-top: 0.2rem; font-size: 0.67rem; }

.readiness-strip { display: grid; grid-template-columns: repeat(3, minmax(120px, 0.65fr)) minmax(260px, 1.35fr); margin-bottom: 1rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.readiness-strip > div { min-height: 92px; padding: 1rem 1.1rem; border-right: 1px solid var(--ink-100); }
.readiness-strip > div:last-child { border-right: 0; }
.readiness-strip span,
.readiness-strip strong,
.readiness-strip small { display: block; }
.readiness-label { color: var(--ink-500); font-size: 0.63rem; font-weight: 680; text-transform: uppercase; }
.readiness-strip strong { margin-top: 0.18rem; color: var(--ink-900); font-size: 1.2rem; }
.readiness-strip small { color: var(--ink-500); font-size: 0.62rem; }
.readiness-note { background: var(--teal-50); }
.readiness-note span { color: var(--teal-700); font-size: 0.64rem; font-weight: 680; text-transform: uppercase; }
.readiness-note strong { color: var(--teal-700); font-size: 0.92rem; }

/* Personas */
.people-heading { align-items: center; }
.page-primary-button { width: auto; min-width: 158px; min-height: 46px; padding: 0 1rem; }
.page-message { margin-bottom: 1rem; }
.person-create-card { margin-bottom: 1rem; border-color: #b9e4dd; }
.person-create-card > p { margin-bottom: 1.35rem; }
.draft-badge { padding: 0.35rem 0.62rem; border-radius: 99px; background: var(--gold-100); color: #895b13; font-size: 0.62rem; font-weight: 750; text-transform: uppercase; }
.person-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 0.85rem; }
.person-form-actions { display: flex; justify-content: flex-end; gap: 0.65rem; padding-top: 0.2rem; }
.person-form-actions .secondary-button { cursor: pointer; }
.save-person-button { width: auto; min-width: 175px; min-height: 44px; padding: 0 1rem; }
.people-directory-card { padding: 0; overflow: hidden; }
.directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--ink-100); }
.directory-toolbar h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.025em; }
.directory-toolbar .eyebrow { margin-bottom: 0.25rem; }
.search-control { position: relative; display: flex; width: min(100%, 470px); align-items: center; }
.search-control > svg { position: absolute; left: 0.85rem; width: 17px; height: 17px; color: var(--ink-500); pointer-events: none; }
.search-input { width: 310px; height: 42px; padding: 0 7.1rem 0 2.5rem; border: 1px solid var(--ink-200); border-radius: 9px; outline: 0; background: var(--ink-50); color: var(--ink-900); font-size: 0.76rem; transition: border-color 150ms ease, box-shadow 150ms ease; }
.search-input:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(11, 149, 134, 0.1); }
.search-input::placeholder { color: #92a5a8; }
.search-clear { position: absolute; right: 4.5rem; display: grid; width: 24px; height: 24px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-500); cursor: pointer; font-size: 1rem; }
.search-clear:hover { background: var(--ink-200); color: var(--ink-900); }
.search-submit { position: absolute; right: 4px; height: 34px; padding: 0 0.72rem; border: 0; border-radius: 7px; background: var(--ink-900); color: white; cursor: pointer; font-size: 0.68rem; font-weight: 700; }
.search-submit:hover:not(:disabled) { background: var(--teal-700); }
.search-submit:disabled { cursor: wait; opacity: 0.65; }
.directory-state { display: flex; min-height: 240px; align-items: center; justify-content: center; gap: 0.8rem; padding: 2rem; color: var(--ink-500); }
.directory-state strong,
.directory-state small { display: block; }
.directory-state strong { color: var(--ink-800); font-size: 0.8rem; }
.directory-state small { margin-top: 0.1rem; font-size: 0.7rem; }
.directory-state .secondary-button { margin-left: 0.6rem; cursor: pointer; }
.directory-error .state-symbol { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--red-100); color: var(--red-600); font-size: 0.78rem; font-weight: 800; }
.people-empty-state { display: flex; min-height: 310px; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; }
.people-empty-icon { display: grid; width: 56px; height: 56px; place-items: center; margin-bottom: 1rem; border-radius: 16px; background: var(--teal-50); color: var(--teal-700); }
.people-empty-icon svg { width: 28px; height: 28px; }
.people-empty-state strong { color: var(--ink-900); font-size: 0.95rem; }
.people-empty-state p { max-width: 440px; margin: 0.35rem 0 1rem; color: var(--ink-500); font-size: 0.76rem; }
.people-empty-state .secondary-button { cursor: pointer; }
.people-table-wrap { overflow-x: auto; }
.people-table { width: 100%; border-collapse: collapse; }
.people-table th { padding: 0.72rem 1rem; border-bottom: 1px solid var(--ink-200); background: var(--ink-50); color: var(--ink-500); font-size: 0.62rem; font-weight: 750; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.people-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--ink-100); color: var(--ink-700); font-size: 0.72rem; vertical-align: middle; }
.people-table tbody tr:hover { background: #fbfdfd; }
.person-identity { display: flex; min-width: 235px; align-items: center; gap: 0.68rem; }
.person-identity-link { border-radius: 8px; text-decoration: none; }
.person-identity-link:hover strong { color: var(--teal-700); }
.person-initials { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 9px; background: var(--teal-100); color: var(--teal-700); font-size: 0.68rem; font-weight: 800; }
.person-identity strong,
.person-identity small { display: block; }
.person-identity strong { max-width: 300px; overflow: hidden; color: var(--ink-900); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.person-identity small { margin-top: 0.08rem; color: var(--ink-500); font-size: 0.6rem; }
.folio-value { color: var(--ink-800); font-family: "Cascadia Mono", Consolas, monospace; font-size: 0.68rem; }
.person-status { display: inline-flex; min-width: 68px; justify-content: center; padding: 0.28rem 0.48rem; border-radius: 99px; background: var(--ink-100); color: var(--ink-700); font-size: 0.6rem; font-weight: 720; }
.person-status.status-active { background: var(--teal-100); color: var(--teal-700); }
.person-status.status-draft { background: var(--gold-100); color: #895b13; }
.person-status.status-blocked { background: var(--red-100); color: var(--red-600); }
.directory-footer { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.4rem; color: var(--ink-500); font-size: 0.66rem; }
.pagination-controls { display: flex; align-items: center; gap: 0.55rem; }
.pagination-controls button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--ink-200); border-radius: 8px; background: var(--paper); color: var(--ink-800); cursor: pointer; font-size: 1.1rem; }
.pagination-controls button:hover:not(:disabled) { border-color: var(--teal-600); color: var(--teal-700); }
.pagination-controls button:disabled { cursor: default; opacity: 0.38; }
.pagination-controls strong { color: var(--ink-800); font-size: 0.7rem; }
.pagination-controls small { color: var(--ink-500); font-size: 0.6rem; font-weight: 500; }
.person-action-cell { width: 1%; text-align: right; }
.person-open-link { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--teal-700); font-size: 0.7rem; font-weight: 720; text-decoration: none; }
.person-open-link svg { width: 14px; height: 14px; }

/* Ficha de persona */
.detail-loading { display: flex; min-height: calc(100vh - 190px); align-items: center; justify-content: center; gap: 0.85rem; color: var(--ink-500); }
.detail-loading strong,
.detail-loading small { display: block; }
.detail-loading strong { color: var(--ink-800); font-size: 0.9rem; }
.detail-loading small { margin-top: 0.1rem; font-size: 0.78rem; }
.detail-feedback { display: grid; min-height: 260px; place-items: center; align-content: center; gap: 0.45rem; padding: 2rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--paper); text-align: center; }
.detail-feedback strong { font-size: 1rem; }
.detail-feedback span { color: var(--ink-500); font-size: 0.85rem; }
.detail-feedback .secondary-button { margin-top: 0.75rem; cursor: pointer; }
.detail-feedback-error { border-color: #efc4c1; background: #fffafa; }
.detail-not-found { min-height: calc(100vh - 180px); }
.detail-not-found .secondary-button { text-decoration: none; }
.person-detail-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.65rem 1.5rem; margin-bottom: 1.3rem; }
.back-link { grid-column: 1 / -1; display: inline-flex; width: fit-content; align-items: center; gap: 0.25rem; color: var(--ink-500); font-size: 0.8rem; font-weight: 650; text-decoration: none; }
.back-link:hover { color: var(--teal-700); }
.back-link svg { width: 16px; height: 16px; }
.person-heading-main { display: flex; min-width: 0; align-items: center; gap: 1rem; }
.person-detail-avatar { display: grid; width: 58px; height: 58px; flex: 0 0 58px; place-items: center; border-radius: 17px; background: var(--teal-100); color: var(--teal-700); font-size: 1rem; font-weight: 800; }
.person-heading-main .eyebrow { margin-bottom: 0.2rem; }
.person-heading-main h1 { margin: 0; overflow: hidden; font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -0.045em; text-overflow: ellipsis; white-space: nowrap; }
.person-heading-main p { margin: 0.25rem 0 0; color: var(--ink-500); font-size: 0.85rem; }
.person-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; }
.person-detail-status { min-width: 84px; margin-bottom: 0.4rem; padding: 0.38rem 0.7rem; font-size: 0.7rem; }
.activate-person-button { min-height: 36px; margin-bottom: 0.4rem; padding: 0 0.8rem; border: 0; border-radius: 8px; background: var(--teal-700); color: white; cursor: pointer; font-size: 0.76rem; font-weight: 720; }
.activate-person-button:hover { background: var(--ink-950); }
.new-request-link { display: inline-flex; min-height: 36px; align-items: center; padding: 0 0.8rem; margin-bottom: 0.4rem; border: 1px solid var(--teal-600); border-radius: 8px; background: var(--paper); color: var(--teal-700); font-size: 0.76rem; font-weight: 720; text-decoration: none; }
.new-request-link:hover { background: var(--teal-50); }
.inline-confirm { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 0.9rem 1rem; border: 1px solid #e4c990; border-radius: var(--radius-md); background: #fffaf0; box-shadow: var(--shadow-sm); }
.inline-confirm strong,
.inline-confirm span { display: block; }
.inline-confirm strong { color: var(--ink-900); font-size: 0.86rem; }
.inline-confirm span { margin-top: 0.15rem; color: var(--ink-600, var(--ink-700)); font-size: 0.76rem; }
.inline-confirm-actions { display: flex; flex: 0 0 auto; gap: 0.55rem; }
.inline-confirm-actions .secondary-button,
.inline-confirm-actions .confirm-button { width: auto; min-height: 38px; padding: 0 0.8rem; font-size: 0.74rem; }
.person-summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 1rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.person-summary-strip > div { min-height: 78px; padding: 0.95rem 1.1rem; border-right: 1px solid var(--ink-100); }
.person-summary-strip > div:last-child { border-right: 0; }
.person-summary-strip span,
.person-summary-strip strong { display: block; }
.person-summary-strip span { color: var(--ink-500); font-size: 0.74rem; }
.person-summary-strip strong { margin-top: 0.18rem; color: var(--ink-900); font-size: 0.9rem; }
.person-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr); align-items: start; gap: 1rem; }
.person-detail-column { display: grid; gap: 1rem; }
.detail-card { min-width: 0; }
.detail-card > .card-heading { margin-bottom: 1rem; }
.card-action-button { min-height: 36px; padding: 0 0.75rem; border: 1px solid var(--ink-200); border-radius: 8px; background: var(--paper); color: var(--teal-700); cursor: pointer; font-size: 0.78rem; font-weight: 700; }
.card-action-button:hover { border-color: var(--teal-600); background: var(--teal-50); }
.detail-data-list { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--ink-100); }
.detail-data-list > div { min-height: 74px; padding: 0.9rem 0; border-bottom: 1px solid var(--ink-100); }
.detail-data-list > div:nth-child(odd) { padding-right: 1rem; }
.detail-data-list dt { color: var(--ink-500); font-size: 0.76rem; }
.detail-data-list dd { margin: 0.18rem 0 0; color: var(--ink-900); font-size: 0.9rem; font-weight: 650; }
.detail-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.85rem; }
.detail-field-wide { grid-column: 1 / -1; }
.detail-form-actions { display: flex; justify-content: flex-end; gap: 0.65rem; padding-top: 0.2rem; }
.detail-form-actions .secondary-button { cursor: pointer; }
.detail-save-button { width: auto; min-width: 152px; min-height: 42px; padding: 0 0.9rem; font-size: 0.8rem; }
.detail-form-label { margin: -0.15rem 0 0.5rem; color: var(--ink-800); font-size: 0.78rem; font-weight: 720; }
.contact-form-grid { margin-top: 0.35rem; }
.contact-options { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 1rem; padding: 0.75rem; border-radius: 9px; background: var(--ink-50); }
.contact-options label { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink-700); cursor: pointer; font-size: 0.8rem; }
.contact-options input { width: 17px; height: 17px; accent-color: var(--teal-700); }
.detail-empty { display: flex; min-height: 150px; flex-direction: column; align-items: center; justify-content: center; padding: 1.25rem; border: 1px dashed var(--ink-200); border-radius: 10px; background: var(--ink-50); text-align: center; }
.detail-empty strong { color: var(--ink-800); font-size: 0.88rem; }
.detail-empty > span { max-width: 390px; margin-top: 0.25rem; color: var(--ink-500); font-size: 0.78rem; }
.contact-list { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--ink-100); list-style: none; }
.contact-list li { min-height: 70px; padding: 0.75rem 0; border-bottom: 1px solid var(--ink-100); }
.contact-row-main { display: flex; align-items: center; gap: 0.7rem; }
.contact-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; background: var(--ink-100); color: var(--teal-700); font-size: 0.8rem; font-weight: 800; }
.contact-copy { min-width: 0; }
.contact-copy strong,
.contact-copy small { display: block; }
.contact-copy strong { overflow: hidden; color: var(--ink-900); font-size: 0.86rem; text-overflow: ellipsis; white-space: nowrap; }
.contact-copy small { margin-top: 0.08rem; color: var(--ink-500); font-size: 0.74rem; }
.contact-flags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem; margin-left: auto; }
.contact-flags span { padding: 0.25rem 0.4rem; border-radius: 99px; background: var(--teal-50); color: var(--teal-700); font-size: 0.65rem; font-weight: 700; }
.contact-actions { display: flex; gap: 0.35rem; }
.contact-actions button { padding: 0.25rem 0.35rem; border: 0; background: transparent; color: var(--teal-700); cursor: pointer; font-size: 0.68rem; font-weight: 700; }
.contact-actions button:hover { text-decoration: underline; }
.contact-actions .contact-deactivate { color: var(--red-600); }
.contact-pending { border-radius: 9px; background: #fffafa; }
.contact-confirm { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0.7rem 0 0 2.7rem; padding: 0.65rem 0.75rem; border: 1px solid #efc4c1; border-radius: 8px; background: var(--red-100); }
.contact-confirm > span { color: #84302e; font-size: 0.72rem; }
.contact-confirm > div { display: flex; flex: 0 0 auto; gap: 0.4rem; }
.contact-confirm .secondary-button,
.danger-button { min-height: 34px; padding: 0 0.65rem; border-radius: 7px; cursor: pointer; font-size: 0.68rem; font-weight: 700; }
.danger-button { border: 0; background: var(--red-600); color: white; }
.danger-button:disabled { cursor: wait; opacity: 0.7; }
.address-card { position: sticky; top: 88px; }
.history-note { margin: -0.2rem 0 1rem; padding: 0.7rem 0.8rem; border-radius: 8px; background: var(--gold-100); color: #7f591d; font-size: 0.76rem; }
.address-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 0.7rem; }
.address-street-field { grid-column: span 2; }
.address-wide-field { grid-column: span 2; }
.address-full-field { grid-column: 1 / -1; }
.text-area { width: 100%; min-height: 88px; padding: 0.7rem 0.9rem; resize: vertical; border: 1px solid var(--ink-200); border-radius: var(--radius-sm); outline: 0; background: rgba(255, 255, 255, 0.9); color: var(--ink-950); font: inherit; transition: border-color 150ms ease, box-shadow 150ms ease; }
.text-area:focus { border-color: var(--teal-600); box-shadow: 0 0 0 4px rgba(11, 149, 134, 0.11); }
.address-empty { min-height: 265px; }
.address-empty-icon { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 0 0.75rem !important; border-radius: 14px; background: var(--teal-100); color: var(--teal-700) !important; }
.address-empty-icon svg { width: 24px; height: 24px; }
.address-display { padding-top: 0.2rem; }
.address-display > strong,
.address-display > span { display: block; }
.address-display > strong { color: var(--ink-900); font-size: 1rem; line-height: 1.5; }
.address-display > span { margin-top: 0.25rem; color: var(--ink-700); font-size: 0.84rem; }
.address-reference { margin-top: 1.2rem; padding: 0.9rem; border-radius: 9px; background: var(--ink-50); }
.address-reference small { color: var(--ink-500); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.address-reference p { margin: 0.25rem 0 0; color: var(--ink-700); font-size: 0.8rem; line-height: 1.6; }
.address-since { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--ink-100); color: var(--ink-500); font-size: 0.72rem; }
.address-history-section { margin-top: 1.1rem; padding-top: 0.8rem; border-top: 1px solid var(--ink-100); }
.address-history-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 0.35rem 0; border: 0; background: transparent; color: var(--ink-800); cursor: pointer; font-size: 0.76rem; text-align: left; }
.address-history-toggle span { font-weight: 700; }
.address-history-toggle strong { color: var(--teal-700); font-size: 0.7rem; }
.address-history-list { display: grid; gap: 0; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.address-history-list li { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 0.55rem; padding: 0 0 1rem; }
.address-history-list li:not(:last-child)::before { position: absolute; top: 9px; bottom: -2px; left: 5px; width: 1px; background: var(--ink-200); content: ""; }
.address-history-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 5px; border: 2px solid var(--paper); border-radius: 50%; background: var(--ink-300); box-shadow: 0 0 0 1px var(--ink-200); }
.address-history-list strong,
.address-history-list span,
.address-history-list small { display: block; }
.address-history-list strong { color: var(--ink-800); font-size: 0.78rem; }
.address-history-list span { margin-top: 0.1rem; color: var(--ink-500); font-size: 0.71rem; }
.address-history-list small { margin-top: 0.2rem; color: var(--ink-500); font-size: 0.66rem; }

/* Solicitudes */
.request-overview { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 1rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.request-overview > div { min-height: 76px; padding: 0.9rem 1rem; border-right: 1px solid var(--ink-100); }
.request-overview > div:last-child { border-right: 0; }
.request-overview span,
.request-overview strong { display: block; }
.request-overview span { color: var(--ink-500); font-size: 0.74rem; }
.request-overview strong { margin-top: 0.16rem; color: var(--ink-900); font-size: 0.91rem; }
.requests-card { padding: 0; overflow: hidden; }
.request-toolbar { align-items: stretch; flex-direction: column; gap: 1rem; padding: 1.2rem 1.3rem; }
.request-toolbar form { width: 100%; min-width: 0; }
.request-filter-bar { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 0.65rem; min-width: 0; }
.request-search-control { flex: 1 1 20rem; width: auto; min-width: 0; }
.request-search-control .search-input { width: 100%; min-width: 0; height: 44px; padding-right: 0.85rem; }
.request-filter-bar .request-status-filter { flex: 0 1 14rem; min-width: 0; min-height: 44px; max-width: 100%; }
/* This button is beside the filters, not positioned inside the people search field. */
.request-filter-bar .search-submit { position: static; flex: 0 0 auto; height: 44px; padding: 0 1.2rem; }
.request-filter-bar .request-clear { min-height: 44px; padding: 0 0.7rem; }
.request-status-filter { min-height: 38px; padding: 0 2rem 0 0.7rem; border: 1px solid var(--ink-200); border-radius: 8px; outline: 0; background: var(--paper); color: var(--ink-700); font-size: 0.74rem; }
.request-status-filter:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(11, 149, 134, 0.1); }
.request-clear { min-height: 36px; padding: 0 0.35rem; border: 0; background: transparent; color: var(--ink-500); cursor: pointer; font-size: 0.72rem; font-weight: 700; }
.request-clear:hover { color: var(--teal-700); }
.request-subject-link,
.request-person-link { display: block; min-width: 0; color: inherit; text-decoration: none; }
.request-subject-link strong,
.request-subject-link small,
.request-person-link strong,
.request-person-link small { display: block; }
.request-subject-link strong { max-width: 320px; overflow: hidden; color: var(--ink-900); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.request-subject-link small,
.request-person-link small { margin-top: 0.1rem; color: var(--ink-500); font-size: 0.66rem; }
.request-person-link strong { max-width: 220px; overflow: hidden; color: var(--ink-800); font-size: 0.76rem; text-overflow: ellipsis; white-space: nowrap; }
.request-subject-link:hover strong,
.request-person-link:hover strong { color: var(--teal-700); }
.priority-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 0 0.48rem; border-radius: 99px; font-size: 0.66rem; font-weight: 740; }
.priority-normal { background: var(--ink-100); color: var(--ink-700); }
.priority-low { background: #edf5fb; color: var(--blue-600); }
.priority-high { background: var(--gold-100); color: #805916; }
.priority-urgent { background: var(--red-100); color: var(--red-600); }
.status-progress { background: #e9f0f8; color: var(--blue-600); }
.status-waiting { background: var(--gold-100); color: #805916; }
.request-empty-state { min-height: 330px; border-top: 1px solid var(--ink-100); }

.request-create-heading { max-width: 780px; margin-bottom: 1.2rem; }
.request-create-heading .back-link { margin-bottom: 1.1rem; }
.request-create-heading h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -0.045em; }
.request-create-heading p { margin: 0.35rem 0 0; color: var(--ink-500); font-size: 0.88rem; }
.request-person-picker { max-width: 900px; }
.step-badge { display: inline-flex; min-height: 28px; align-items: center; padding: 0 0.55rem; border-radius: 99px; background: var(--teal-50); color: var(--teal-700); font-size: 0.68rem; font-weight: 750; }
.request-person-search { width: min(100%, 560px); margin-bottom: 1rem; }
.request-person-options { display: grid; gap: 0; border-top: 1px solid var(--ink-100); }
.request-person-options > a { display: flex; min-height: 74px; align-items: center; gap: 0.75rem; padding: 0.75rem 0.2rem; border-bottom: 1px solid var(--ink-100); color: inherit; text-decoration: none; }
.request-person-options > a:hover { background: var(--teal-50); }
.request-person-options strong,
.request-person-options small { display: block; }
.request-person-options strong { color: var(--ink-900); font-size: 0.84rem; }
.request-person-options small { color: var(--ink-500); font-size: 0.71rem; }
.choose-person { margin-left: auto; color: var(--teal-700); font-size: 0.72rem; font-weight: 720; }
.request-picker-empty { min-height: 250px; }
.request-picker-empty .secondary-button { margin-top: 0.75rem; text-decoration: none; }
.request-create-grid { display: grid; grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.selected-person-card { position: sticky; top: 88px; display: flex; flex-direction: column; align-items: flex-start; }
.selected-person-avatar { display: grid; width: 54px; height: 54px; place-items: center; margin: 0.45rem 0 0.75rem; border-radius: 15px; background: var(--teal-100); color: var(--teal-700); font-size: 0.9rem; font-weight: 800; }
.selected-person-card h2 { margin: 0; color: var(--ink-900); font-size: 1.05rem; line-height: 1.35; }
.selected-person-card > strong { margin: 0.25rem 0 0.7rem; color: var(--ink-500); font-size: 0.74rem; }
.selected-person-card > a { margin-top: 1.2rem; color: var(--teal-700); font-size: 0.74rem; font-weight: 700; }
.request-form-card > p { margin: -0.35rem 0 1.2rem; color: var(--ink-500); font-size: 0.8rem; }
.request-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.85rem; }
.request-form-full { grid-column: 1 / -1; }
.request-description { min-height: 145px; }
.request-create-actions { padding-top: 0.55rem; }

.request-detail-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.65rem 1.5rem; margin-bottom: 1.2rem; }
.request-detail-heading .back-link { grid-column: 1 / -1; }
.request-detail-heading h1 { max-width: 850px; margin: 0; font-size: clamp(1.7rem, 3vw, 2.25rem); letter-spacing: -0.04em; line-height: 1.18; }
.request-owner-link { display: inline-block; margin-top: 0.35rem; color: var(--teal-700); font-size: 0.78rem; font-weight: 650; text-decoration: none; }
.request-owner-link:hover { text-decoration: underline; }
.request-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.45rem; padding-bottom: 0.25rem; }
.request-summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 1rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.request-summary-strip > div { min-height: 78px; padding: 0.9rem 1rem; border-right: 1px solid var(--ink-100); }
.request-summary-strip > div:last-child { border-right: 0; }
.request-summary-strip span,
.request-summary-strip strong { display: block; }
.request-summary-strip span { color: var(--ink-500); font-size: 0.72rem; }
.request-summary-strip strong { margin-top: 0.18rem; color: var(--ink-900); font-size: 0.82rem; }
.request-detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.62fr); align-items: start; gap: 1rem; }
.request-detail-main { display: grid; gap: 1rem; }
.request-type-badge { padding: 0.28rem 0.5rem; border-radius: 99px; background: var(--ink-100); color: var(--ink-700); font-size: 0.68rem; font-weight: 700; }
.request-description-copy { margin: 0; color: var(--ink-800); font-size: 0.88rem; line-height: 1.75; white-space: pre-line; }
.request-area { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; padding: 0.75rem; border-radius: 8px; background: var(--ink-50); }
.request-area span { color: var(--ink-500); font-size: 0.72rem; }
.request-area strong { color: var(--ink-800); font-size: 0.78rem; }
.take-request-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem; border-radius: 10px; background: var(--teal-50); }
.take-request-panel strong,
.take-request-panel span { display: block; }
.take-request-panel strong { color: var(--ink-900); font-size: 0.84rem; }
.take-request-panel span { margin-top: 0.15rem; color: var(--ink-600, var(--ink-700)); font-size: 0.74rem; }
.request-actions-card .request-take-confirm { margin: 0 0 0.65rem; }
.request-actions-card .request-assignment-feedback { margin: 0 0 0.65rem; }
.notification-sound-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--ink-200); border-radius: 8px; background: var(--paper); color: var(--ink-700); cursor: pointer; }
.notification-sound-toggle svg { width: 20px; height: 20px; }
.notification-sound-toggle[aria-pressed="true"] { color: var(--teal-700); background: var(--teal-50); }
.notification-sound-toggle[aria-pressed="true"] .sound-muted-mark { display: none; }
.action-toast-host { position: fixed; z-index: 100; top: 78px; right: 16px; width: min(370px,calc(100vw - 32px)); pointer-events: none; }
.action-toast { display: flex; align-items: center; gap: 0.65rem; padding: 0.85rem; border: 1px solid #b9e4dd; border-left: 4px solid var(--teal-700); border-radius: 10px; background: var(--paper); color: var(--ink-950); box-shadow: var(--shadow-md); font-size: 0.85rem; pointer-events: auto; }
.action-toast-check { color: var(--teal-700); font-size: 1.1rem; font-weight: 700; }
.action-toast-close { margin-left: auto; display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--ink-700); cursor: pointer; font-size: 1.25rem; }
.action-toast-close:hover { background: var(--ink-100); }
@media print { .notification-sound-toggle,.action-toast-host { display: none !important; } }
.request-action-primary { width: auto; min-height: 40px; padding: 0 0.85rem; font-size: 0.74rem; }
.status-change-toggle { min-height: 36px; margin-top: 0.8rem; padding: 0; border: 0; background: transparent; color: var(--teal-700); cursor: pointer; font-size: 0.74rem; font-weight: 720; }
.status-change-toggle:hover { text-decoration: underline; }
.status-change-form { display: grid; grid-template-columns: minmax(180px, 0.38fr) 1fr; gap: 0.8rem; }
.status-reason-field { grid-column: 2; grid-row: 1 / span 2; }
.request-timeline-card { position: sticky; top: 88px; }
.history-count { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 99px; background: var(--ink-100); color: var(--ink-700); font-size: 0.68rem; font-weight: 750; }
.request-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.request-timeline li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 0.65rem; padding-bottom: 1.2rem; }
.request-timeline li:not(:last-child)::before { position: absolute; top: 12px; bottom: -1px; left: 6px; width: 1px; background: var(--ink-200); content: ""; }
.timeline-marker { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 4px; border: 3px solid var(--paper); border-radius: 50%; box-shadow: 0 0 0 1px var(--ink-200); }
.request-timeline strong,
.request-timeline span,
.request-timeline small { display: block; }
.request-timeline strong { color: var(--ink-900); font-size: 0.79rem; }
.request-timeline span { margin-top: 0.08rem; color: var(--ink-600, var(--ink-700)); font-size: 0.7rem; }
.request-timeline small { color: var(--ink-500); font-size: 0.66rem; }
.request-timeline p { margin: 0.45rem 0 0; padding: 0.55rem 0.65rem; border-radius: 7px; background: var(--ink-50); color: var(--ink-700); font-size: 0.7rem; line-height: 1.55; }
.evidence-heading { align-items: center; }
.evidence-heading-actions { display: flex; align-items: center; gap: 0.55rem; }
.compact-button { min-height: 36px; padding: 0 0.72rem; cursor: pointer; font-size: 0.72rem; }
.compact-feedback { min-height: 120px; margin-bottom: 0.8rem; }
.evidence-configuration-note { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; border: 1px dashed #dfbd78; border-radius: 10px; background: #fffaf0; }
.evidence-configuration-note strong { color: #805d19; font-size: 0.8rem; }
.evidence-configuration-note span { color: #876d3c; font-size: 0.74rem; line-height: 1.55; }
.evidence-form { margin-top: 0.25rem; padding-top: 1rem; border-top: 1px solid var(--ink-100); }
.evidence-file-field { margin-bottom: 0.55rem; }
.evidence-dropzone { position: relative; display: grid; min-height: 118px; place-items: center; align-content: center; gap: 0.18rem; padding: 1.15rem; overflow: hidden; border: 1px dashed var(--ink-300); border-radius: 10px; background: var(--ink-50); text-align: center; transition: border-color 150ms ease, background 150ms ease; }
.evidence-dropzone:hover { border-color: var(--teal-600); background: var(--teal-50); }
.evidence-dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.evidence-dropzone strong { color: var(--teal-700); font-size: 0.82rem; }
.evidence-dropzone span { color: var(--ink-500); font-size: 0.69rem; }
.selected-evidence-files { display: grid; gap: 0.35rem; margin: 0.65rem 0 0; padding: 0; list-style: none; }
.selected-evidence-files li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 0.55rem; padding: 0.48rem 0.6rem; border-radius: 8px; background: var(--ink-50); }
.selected-evidence-files li > span { display: grid; height: 28px; place-items: center; border-radius: 6px; background: var(--paper); color: var(--teal-700); font-size: 0.57rem; font-weight: 800; }
.selected-evidence-files strong { overflow: hidden; color: var(--ink-800); font-size: 0.73rem; text-overflow: ellipsis; white-space: nowrap; }
.selected-evidence-files small { color: var(--ink-500); font-size: 0.66rem; }
.evidence-empty { display: flex; min-height: 128px; align-items: center; justify-content: center; gap: 0.8rem; padding: 1rem; border: 1px dashed var(--ink-200); border-radius: 10px; background: var(--ink-50); }
.evidence-empty > span { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); font-size: 1.15rem; }
.evidence-empty strong { color: var(--ink-800); font-size: 0.8rem; }
.evidence-empty p { margin: 0.1rem 0 0; color: var(--ink-500); font-size: 0.72rem; }
.evidence-list { display: grid; gap: 0.75rem; }
.evidence-item { overflow: hidden; border: 1px solid var(--ink-100); border-radius: 10px; background: var(--ink-50); }
.evidence-item-copy { padding: 0.85rem 0.9rem 0.75rem; }
.evidence-item-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.evidence-item-title strong { color: var(--ink-900); font-size: 0.82rem; }
.evidence-item-title time { flex: 0 0 auto; color: var(--ink-500); font-size: 0.65rem; }
.evidence-item-copy p { margin: 0.4rem 0; color: var(--ink-700); font-size: 0.74rem; line-height: 1.55; white-space: pre-line; }
.evidence-item-copy > small { color: var(--ink-500); font-size: 0.65rem; }
.evidence-files { display: grid; border-top: 1px solid var(--ink-100); background: var(--paper); }
.evidence-file { display: grid; grid-template-columns: 38px minmax(0, 1fr) 34px; align-items: center; gap: 0.55rem; min-height: 56px; padding: 0.55rem 0.7rem; }
.evidence-file + .evidence-file { border-top: 1px solid var(--ink-100); }
.evidence-file-icon { display: grid; height: 34px; place-items: center; border-radius: 7px; background: var(--teal-50); color: var(--teal-700); font-size: 0.57rem; font-weight: 800; }
.evidence-file-copy { min-width: 0; }
.evidence-file-copy strong,
.evidence-file-copy small { display: block; }
.evidence-file-copy strong { overflow: hidden; color: var(--ink-800); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.evidence-file-copy small { margin-top: 0.08rem; color: var(--ink-500); font-size: 0.64rem; }
.evidence-download { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; color: var(--teal-700); text-decoration: none; }
.evidence-download:hover { background: var(--teal-50); }
.person-edit-timeline { display: grid; gap: .75rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.person-edit-timeline li { padding: .85rem 1rem; border-left: 3px solid var(--teal-700); background: var(--ink-50); border-radius: 8px; }
.person-edit-timeline strong, .person-edit-timeline time, .person-edit-timeline small { display: block; overflow-wrap: anywhere; }
.person-edit-timeline time, .person-edit-timeline small { margin-top: .25rem; color: var(--ink-500); }
.request-evidence-file { grid-template-columns: 38px minmax(0, 1fr) auto; }
.request-evidence-actions { display: flex; align-items: center; gap: 0.4rem; }
.request-evidence-actions .secondary-button { width: auto; min-width: 0; white-space: nowrap; }
@media (max-width: 600px) {
    .request-evidence-file { grid-template-columns: 38px minmax(0, 1fr); }
    .request-evidence-actions { grid-column: 2; justify-self: start; }
}
.evidence-download svg { width: 18px; height: 18px; }
.evidence-file-blocked { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--red-100); color: var(--red-600); font-size: 0.72rem; font-weight: 800; }

.empty-state { display: flex; min-height: calc(100vh - 180px); flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state-code { color: var(--teal-600); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; }
.empty-state h1 { margin: 0.4rem 0; font-size: 2rem; }
.empty-state p { margin: 0 0 1.2rem; color: var(--ink-500); }
.secondary-button { min-height: 42px; padding: 0 1rem; border: 1px solid var(--ink-200); background: white; color: var(--ink-800); font-size: 0.8rem; }

.valid.modified:not([type="checkbox"]) { border-color: var(--teal-600); }
.invalid { border-color: var(--red-600); }
.blazor-error-boundary { padding: 1rem 1rem 1rem 3.7rem; background: var(--red-600); color: white; }
.blazor-error-boundary::after { content: "Ocurrió un error inesperado."; }

#blazor-error-ui { position: fixed; right: 1rem; bottom: 1rem; z-index: 1000; display: none; max-width: 520px; padding: 0.85rem 3rem 0.85rem 1rem; border-radius: 10px; background: var(--ink-950); color: white; box-shadow: var(--shadow-md); font-size: 0.8rem; }
#blazor-error-ui .reload { margin-left: 0.4rem; color: #8be2d8; }
#blazor-error-ui .dismiss { position: absolute; right: 0.9rem; cursor: pointer; }

@media (max-width: 1080px) {
    :root { --sidebar-width: 225px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workspace-grid { grid-template-columns: 1fr; }
    .operations-grid { grid-template-columns: 1fr; }
    .readiness-strip { grid-template-columns: repeat(3, 1fr); }
    .readiness-note { grid-column: 1 / -1; }
    .person-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .person-detail-grid { grid-template-columns: 1fr; }
    .address-card { position: static; }
    .request-create-grid,
    .request-detail-grid { grid-template-columns: 1fr; }
    .selected-person-card,
    .request-timeline-card { position: static; }
}

@media (max-width: 820px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-intro { display: none; }
    .auth-content { padding: 2rem 1.5rem; }
    .app-shell { display: block; }
    .sidebar { position: static; width: 100%; height: auto; padding: 1rem; }
    .sidebar-brand { padding-bottom: 1rem; }
    .main-nav { flex-direction: row; overflow-x: auto; }
    .nav-section-label,
    .nav-link-disabled,
    .sidebar-foot { display: none; }
    .nav-link { min-width: max-content; }
    .app-stage { grid-column: auto; }
    .topbar { position: static; height: 64px; }
    .brand-copy small { display: none; }
    .directory-toolbar { align-items: flex-start; flex-direction: column; }
    .directory-toolbar form,
    .search-control,
    .search-input { width: 100%; }
    .request-filter-bar { width: 100%; align-items: stretch; flex-wrap: wrap; justify-content: flex-start; }
    .request-toolbar form { width: 100%; }
    .request-search-control { min-width: 100%; }
}

@media (max-width: 620px) {
    .topbar-context,
    .user-copy { display: none; }
    .topbar { justify-content: flex-end; padding: 0 1rem; }
    .page-content { padding: 1.5rem 1rem 2.5rem; }
    .page-heading { align-items: flex-start; }
    .date-badge { display: none; }
    .heading-actions { align-self: stretch; }
    .refresh-button { min-height: 44px; }
    .status-panel { align-items: flex-start; }
    .status-detail { display: none; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 160px; }
    .feature-list { grid-template-columns: 1fr; }
    .module-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .module-state { display: none; }
    .readiness-strip { grid-template-columns: 1fr 1fr; }
    .readiness-strip > div:nth-child(2) { border-right: 0; }
    .readiness-note { grid-column: 1 / -1; }
    .people-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
    .page-primary-button { width: 100%; }
    .person-form-grid { grid-template-columns: 1fr; }
    .person-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .person-form-actions .secondary-button,
    .save-person-button { width: 100%; }
    .directory-toolbar { padding: 1rem; }
    .people-table-wrap { overflow: visible; }
    .people-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .people-table,
    .people-table tbody,
    .people-table tr,
    .people-table td { display: block; width: 100%; }
    .people-table tr { padding: 0.85rem 1rem; border-bottom: 1px solid var(--ink-100); }
    .people-table td { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.38rem 0; border: 0; text-align: right; }
    .people-table td::before { color: var(--ink-500); content: attr(data-label); font-size: 0.59rem; font-weight: 720; letter-spacing: 0.05em; text-transform: uppercase; }
    .people-table td:first-child { display: block; padding-bottom: 0.65rem; text-align: left; }
    .people-table td:first-child::before { display: none; }
    .person-identity { min-width: 0; }
    .directory-footer { align-items: flex-start; flex-direction: column; }
    .person-action-cell { display: none !important; }
    .person-detail-heading { grid-template-columns: 1fr; align-items: start; }
    .person-heading-main { align-items: flex-start; }
    .person-heading-main h1 { white-space: normal; }
    .person-heading-actions { justify-content: flex-start; flex-wrap: wrap; }
    .person-detail-status,
    .new-request-link,
    .activate-person-button { margin: 0; }
    .person-summary-strip { grid-template-columns: 1fr 1fr; }
    .person-summary-strip > div:nth-child(2) { border-right: 0; }
    .person-summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink-100); }
    .detail-data-list,
    .detail-form-grid { grid-template-columns: 1fr; }
    .detail-data-list > div:nth-child(odd) { padding-right: 0; }
    .detail-field-wide { grid-column: auto; }
    .detail-form-actions { flex-direction: column-reverse; }
    .detail-form-actions .secondary-button,
    .detail-save-button { width: 100%; }
    .contact-row-main { align-items: flex-start; flex-wrap: wrap; }
    .contact-flags { justify-content: flex-start; margin-left: 2.7rem; }
    .contact-actions { margin-left: auto; }
    .contact-confirm { align-items: stretch; flex-direction: column; margin-left: 0; }
    .contact-confirm > div { justify-content: flex-end; }
    .inline-confirm { align-items: stretch; flex-direction: column; }
    .inline-confirm-actions { justify-content: flex-end; }
    .address-form-grid { grid-template-columns: 1fr 1fr; }
    .address-street-field,
    .address-wide-field,
    .address-full-field { grid-column: 1 / -1; }
    .request-overview { grid-template-columns: 1fr; }
    .request-overview > div { border-right: 0; border-bottom: 1px solid var(--ink-100); }
    .request-overview > div:last-child { border-bottom: 0; }
    .request-filter-bar { flex-direction: column; }
    .request-filter-bar .request-search-control,
    .request-filter-bar .request-status-filter { flex: 0 1 auto; width: 100%; }
    .request-status-filter,
    .request-filter-bar .search-submit,
    .request-filter-bar .request-clear { width: 100%; }
    .request-person-options > a { align-items: flex-start; }
    .choose-person { display: none; }
    .request-form-grid,
    .status-change-form { grid-template-columns: 1fr; }
    .request-form-full,
    .status-reason-field { grid-column: auto; grid-row: auto; }
    .request-detail-heading { grid-template-columns: 1fr; align-items: start; }
    .request-heading-actions { justify-content: flex-start; }
    .request-summary-strip { grid-template-columns: 1fr 1fr; }
    .request-summary-strip > div:nth-child(2) { border-right: 0; }
    .request-summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink-100); }
    .take-request-panel { align-items: stretch; flex-direction: column; }
    .request-action-primary { width: 100%; }
    .evidence-heading { align-items: flex-start; }
    .evidence-heading-actions { align-items: flex-end; flex-direction: column; }
    .evidence-item-title { align-items: flex-start; flex-direction: column; gap: 0.15rem; }
    .selected-evidence-files li { grid-template-columns: 34px minmax(0, 1fr); }
    .selected-evidence-files small { grid-column: 2; }
}

.branded-app .sidebar { background: var(--brand-primary, #102c33); }
.branded-app .brand-mark { background: var(--brand-accent, #087f73); background-image: none; color: white; }
.branded-app .nav-link { color: white; }
.branded-app .nav-link.active { background: rgba(0,0,0,0.18); color: white; }
.branded-app .nav-link:hover { background: rgba(0,0,0,0.12); color: white; }
.branded-app .sidebar .nav-section-label,
.branded-app .sidebar-foot,
.branded-app .sidebar-brand small { color: white; }
.branded-app .primary-button,
.branded-app .search-submit { background: var(--brand-primary, #102c33); color: white; }
.branded-app .primary-button:hover:not(:disabled),
.branded-app .search-submit:hover:not(:disabled) { background: var(--brand-accent, #087f73); }
.branded-app .page-heading h1 { color: var(--brand-primary, #102c33); }
.branded-app .metric-people,
.branded-app .metric-support { color: var(--brand-accent, #087f73); }
.branded-app .metric-requests,
.branded-app .metric-stock,
.branded-app .metric-card > strong { color: var(--brand-primary, #102c33); }
.branded-app .eyebrow,
.branded-app .person-open-link { color: var(--brand-accent, #087f73); }
.organization-logo { width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; background: white; border-radius: 8px; padding: 3px; }
.branded-auth .auth-intro { background: linear-gradient(145deg,var(--brand-primary,#102c33),var(--brand-accent,#087f73)); }
.branded-auth .auth-brand,
.branded-auth .auth-brand small,
.branded-auth .auth-intro-copy p,
.branded-auth .eyebrow-light,
.branded-auth .auth-security-note { color: white; }
.branded-auth .auth-brand strong { overflow-wrap: anywhere; }
.branded-auth .brand-mark { background: var(--brand-accent,#087f73); background-image: none; color: white; }
.branded-auth .security-icon { background: rgba(0,0,0,0.15); color: white; }
.branded-auth .auth-security-note { background: rgba(0,0,0,0.1); }
.branded-auth .login-heading h2 { color: var(--brand-primary,#102c33); }
.branded-auth .auth-content .eyebrow { color: var(--brand-accent,#087f73); }
.branded-auth .primary-button { background: var(--brand-primary,#102c33); color: white; }
.branded-auth .primary-button:hover:not(:disabled) { background: var(--brand-accent,#087f73); }
.branded-auth .text-input:focus { border-color: var(--brand-accent,#087f73); box-shadow: 0 0 0 3px rgba(0,0,0,0.1); }
.branded-auth .remember-row input { accent-color: var(--brand-accent,#087f73); }
.brand-copy strong { overflow-wrap: anywhere; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.settings-grid > section { min-width: 0; }
.settings-colors { display: flex; flex-wrap: wrap; gap: 1rem; }
.settings-colors input { display: block; width: 90px; height: 44px; cursor: pointer; }
.settings-colors span { font-size: 0.8rem; }
.settings-preview { display: grid; grid-template-columns: minmax(100px,0.7fr) minmax(0,1fr); border: 1px solid var(--ink-200); border-radius: 10px; overflow: hidden; }
.settings-preview-menu { display: flex; flex-direction: column; gap: 0.8rem; background: var(--brand-primary); color: white; padding: 1rem; overflow-wrap: anywhere; }
.settings-preview-menu img { width: 60px; height: 60px; object-fit: contain; background: white; border-radius: 6px; }
.settings-preview-active { background: rgba(0,0,0,0.18); border-radius: 6px; padding: 0.4rem; }
.settings-preview-body { padding: 1rem; overflow-wrap: anywhere; }
.settings-preview-button,.settings-preview-accent { display: inline-block; background: var(--brand-primary); color: white; border-radius: 6px; padding: 0.5rem 0.7rem; margin: 0.3rem 0.3rem 0 0; }
.settings-preview-accent { background: var(--brand-accent); }
.settings-save,.settings-history { margin-top: 1rem; }
.account-password-card { max-width: 700px; margin-top: 1rem; }
.location-panel { margin-top: 0.8rem; padding-top: 0.75rem; border-top: 1px solid var(--ink-200); min-width: 0; }
.location-panel h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.location-panel > p { font-size: 0.8rem; line-height: 1.5; overflow-wrap: anywhere; }
.address-map { position: relative; overflow: hidden; width: 100%; height: 320px; min-width: 0; isolation: isolate; border: 1px solid var(--ink-200); border-radius: 8px; background: var(--ink-50); }
.location-panel .form-alert[hidden] { display: none; }
.attention-map-card .form-alert[hidden] { display: none; }
.attention-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0.75rem; }
.attention-workspace { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(290px,1fr); gap: 1rem; align-items: start; }
.attention-workspace .workspace-card { min-width: 0; }
.attention-map { height: 480px; margin: 0.65rem 0; }
.attention-home-marker { background: transparent; border: 0; }
.attention-home-marker span { display: block; width: 18px; height: 18px; border: 2px solid white; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #164e83; box-shadow: 0 1px 4px #0009; }
.attention-help { font-size: 0.8rem; line-height: 1.5; margin: 0.75rem 0; color: var(--ink-500); }
.attention-metrics { margin: 0 0 1rem; }
.attention-metrics > div { display: flex; gap: 0.7rem; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--ink-200); padding: 0.6rem 0; }
.attention-metrics dd { margin: 0; font-size: 1.5rem; font-weight: 700; }
.attention-table-wrap { overflow-x: auto; }
.attention-products { width: 100%; border-collapse: collapse; }
.attention-products th,.attention-products td { padding: 0.5rem; text-align: left; border-bottom: 1px solid var(--ink-200); overflow-wrap: anywhere; }
@media(max-width:1100px){.attention-workspace { grid-template-columns: minmax(0,1fr); }}
@media(max-width:640px){.attention-filters { grid-template-columns: minmax(0,1fr); }.attention-map { height:360px; }}
.address-map-marker { background: transparent; border: 0; }
.address-map-marker span { display: block; width: 24px; height: 24px; border: 3px solid white; border-radius: 50%; background: #c32323; box-shadow: 0 0 0 2px #601616,0 2px 6px #0008; }
.location-coordinates { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.65rem; margin-top: 0.7rem; }
.location-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.location-actions .primary-button { width: auto; padding: 0.5rem 0.8rem; min-height: 44px; }
@media (max-width: 640px) { .location-coordinates { grid-template-columns: 1fr; } .address-map { height: 280px; } }
.receipt-organization-logo { display: block; max-width: 150px; max-height: 80px; object-fit: contain; margin-bottom: 1rem; }
.receipt-organization-contact { margin-top: 1rem; padding-top: 0.6rem; border-top: 1px solid #ccc; font-size: 0.8rem; overflow-wrap: anywhere; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }

/* Operational density: screen only; keep authentication and printed receipts unchanged. */
@media screen {
    .page-content .page-heading { gap: 1.1rem; margin-bottom: 1.1rem; }
    .page-content .page-heading h1 { font-size: clamp(1.65rem, 2.5vw, 2.1rem); }
    .page-content .page-heading p { margin-top: 0.3rem; }
    .page-content .workspace-card:not(.support-receipt, .requests-card, .people-directory-card) { padding: 1rem 1.1rem; }
    .page-content .workspace-card:not(.support-receipt) > h2 { margin: 0 0 0.65rem; font-size: 1.15rem; line-height: 1.4; }
    .page-content .workspace-card:not(.support-receipt) > p { margin: 0.55rem 0 0.8rem; line-height: 1.55; }
    .page-content .workspace-card:not(.support-receipt) > p:last-child { margin-bottom: 0; }
    .page-content .form-field { margin-bottom: 0.8rem; }
    .page-content .form-field label { margin-bottom: 0.3rem; }
    .page-content .text-input { height: 44px; }
    .page-content .text-area { min-height: 80px; padding: 0.6rem 0.8rem; }
    .page-content .delivery-section { margin-top: 0.85rem; }
    .page-content .support-filters { flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1rem; }
    .page-content .metric-card { min-height: 145px; padding: 1rem; }
    .page-content .metric-icon { margin-bottom: 0.6rem; }
    .page-content .metric-grid { gap: 0.8rem; margin-bottom: 0.9rem; }
    .page-content .readiness-strip > div { min-height: 76px; padding: 0.7rem 0.85rem; }
    .page-content .person-detail-heading,
    .page-content .request-detail-heading { margin-bottom: 0.9rem; }
    .page-content .person-summary-strip > div,
    .page-content .request-summary-strip > div { min-height: 62px; padding: 0.65rem 0.85rem; }
    .page-content .detail-card > .card-heading { margin-bottom: 0.65rem; }
    .page-content .detail-data-list > div { min-height: 60px; padding-top: 0.6rem; padding-bottom: 0.6rem; }
    .page-content .detail-empty { min-height: 110px; padding: 0.85rem; }
    .page-content .address-empty { min-height: 180px; }
    .page-content .request-timeline li { padding-bottom: 0.8rem; }
    .page-content .directory-state { min-height: 155px; padding: 1.25rem; }
    .page-content .people-empty-state { min-height: 220px; padding: 1.25rem; }
}
@media screen and (min-width: 1025px) {
    .page-content { padding: clamp(1.25rem, 2.25vw, 2rem); }
    .topbar { height: 64px; }
}
@media screen and (min-width: 641px) {
    .page-content .directory-toolbar { padding-top: 0.9rem; padding-bottom: 0.9rem; }
    .page-content .people-table td { padding-top: 0.65rem; padding-bottom: 0.65rem; }
    .page-content .directory-footer { min-height: 50px; padding-top: 0.55rem; padding-bottom: 0.55rem; }
}

/* Navigation controls are client-only: no server requests or page reloads. */
.topbar-navigation { display: flex; align-items: center; gap: 0.8rem; margin-right: auto; min-width: 0; }
.sidebar-toggle { position: fixed; left: var(--sidebar-width); top: 0; z-index: 20; display: grid; place-items: center; width: 26px; height: 48px; padding: 0; border: 1px solid var(--brand-primary,var(--ink-950)); border-left: 0; border-radius: 0 0 8px 0; background: var(--brand-primary,var(--ink-950)); color: white; box-shadow: 2px 1px 5px #102c3312; cursor: pointer; font-size: 1.8rem; line-height: 1; }
.app-shell.sidebar-collapsed > .sidebar-toggle { left: 0; }
.sidebar-toggle:hover { filter: brightness(0.9); }
.sidebar-toggle:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 3px; }
.app-shell.sidebar-collapsed { grid-template-columns: minmax(0,1fr); }
.app-shell.sidebar-collapsed > .sidebar { display: none; }
.app-shell.sidebar-collapsed > .app-stage { grid-column: 1; }
/* Map first: selectors and map fit the initial viewport; detail stays below. */
@media screen {
    .page-content:has(.attention-page) { width: 100%; max-width: none; padding: 0.65rem 1rem 1rem; }
    .attention-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.8rem; margin-bottom: 0.55rem; }
    .attention-heading h1 { margin: 0; font-size: 1.45rem; line-height: 1.3; letter-spacing: -0.03em; color: var(--brand-primary,var(--ink-950)); }
    .attention-heading > span { color: var(--ink-500); font-size: 0.75rem; }
    .page-content .attention-page .attention-filters.workspace-card { padding: 0.5rem 0.7rem; margin-bottom: 0.65rem; gap: 0.65rem; }
    .attention-page .attention-filters .form-field { margin: 0; }
    .attention-page .attention-filters label { font-size: 0.75rem; margin-bottom: 0.15rem; }
    .attention-page .attention-filters .text-input { height: 40px; padding: 0.35rem 0.65rem; font-size: 0.85rem; }
    .attention-page .attention-workspace { grid-template-columns: minmax(0,1fr); gap: 0.7rem; }
    .page-content .attention-page .attention-map-card.workspace-card { padding: 0.5rem; }
    .attention-map-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem 0.8rem; padding: 0 0.25rem 0.35rem; }
    .attention-map-toolbar h2 { margin: 0; font-size: 0.95rem; line-height: 1.25; }
    .attention-map-toolbar small { color: var(--ink-500); font-size: 0.7rem; }
    .attention-map-toolbar .location-actions { margin: 0; align-items: center; gap: 0.6rem; }
    .attention-map-toolbar .secondary-button { min-height: 36px; padding: 0.3rem 0.6rem; font-size: 0.75rem; }
    .attention-map-toolbar .remember-row { margin: 0; gap: 0.35rem; font-size: 0.75rem; }
    .attention-page .attention-map { height: clamp(240px,calc(100dvh - 245px),850px); margin: 0; }
    .attention-page .attention-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin: 0.5rem 0 0.8rem; }
    .attention-page .attention-metrics > div { padding: 0.4rem 0; }
    .attention-notes { margin-top: 0.7rem; padding: 0.55rem 0.7rem; border: 1px solid var(--ink-200); border-radius: 8px; font-size: 0.8rem; }
    .attention-notes > summary { cursor: pointer; color: var(--ink-700); }
}
@media screen and (max-width:640px) {
    .page-content:has(.attention-page) { padding: 0.5rem; }
    .attention-heading > span { display: none; }
    .attention-page .attention-filters { gap: 0.3rem; }
    .attention-page .attention-filters .form-field { display: grid; grid-template-columns: 95px minmax(0,1fr); align-items: center; gap: 0.4rem; }
    .attention-page .attention-map { height: clamp(220px,calc(100dvh - 295px),600px); }
    .attention-page .attention-metrics { grid-template-columns: minmax(0,1fr); gap: 0; }
}
@media screen and (max-width:820px) {
    .sidebar-toggle { left: auto; right: 0; top: 0; border-left: 1px solid var(--brand-primary,var(--ink-950)); border-right: 0; border-radius: 0 0 0 8px; }
    .app-shell.sidebar-collapsed > .sidebar-toggle { left: 0; right: auto; border-left: 0; border-right: 1px solid var(--brand-primary,var(--ink-950)); border-radius: 0 0 8px 0; }
}
/* Fit every desktop navigation item to the available height instead of scrolling. */
@media screen and (min-width:821px) {
    .sidebar { height: 100dvh; overflow: hidden; padding: clamp(6px,1.5dvh,16px) clamp(10px,1.2vw,18px); gap: clamp(3px,0.6dvh,7px); }
    .sidebar-brand { flex: 0 0 auto; padding: 0.1rem 0.35rem clamp(4px,1.5dvh,16px); gap: 0.6rem; }
    .sidebar .organization-logo,.sidebar .brand-mark { width: clamp(32px,6dvh,48px); height: clamp(32px,6dvh,48px); flex-basis: clamp(32px,6dvh,48px); }
    .sidebar-brand strong { font-size: clamp(0.8rem,2.2dvh,1rem); }
    .sidebar-brand small { font-size: clamp(0.55rem,1.5dvh,0.72rem); }
    .sidebar .main-nav { flex: 1 1 auto; min-height: 0; gap: clamp(1px,0.35dvh,4px); }
    .sidebar .nav-link { flex: 1 1 0; min-height: 24px; max-height: 48px; padding: 0.2rem 0.65rem; gap: 0.65rem; font-size: clamp(0.68rem,1.8dvh,0.84rem); line-height: 1.2; }
    .sidebar .nav-link svg { width: clamp(15px,2.7dvh,19px); height: clamp(15px,2.7dvh,19px); flex-basis: clamp(15px,2.7dvh,19px); }
    .sidebar .nav-section-label { flex: 0 0 auto; padding: clamp(3px,0.7dvh,7px) 0.65rem; font-size: clamp(0.55rem,1.3dvh,0.65rem); line-height: 1.2; }
    .sidebar .nav-section-secondary { margin-top: clamp(2px,0.8dvh,8px); }
    .sidebar-foot { flex: 0 0 auto; margin-top: 0; padding: clamp(5px,1dvh,10px) 0.65rem 0; font-size: 0.62rem; }
}
/* Extremely short/zoomed desktop windows use two columns, retaining all links. */
@media screen and (min-width:821px) and (max-height:420px) {
    .sidebar { padding: 5px 8px; }
    .sidebar-brand { padding-bottom: 2px; }
    .sidebar-brand small,.sidebar .nav-section-label,.sidebar-foot { display: none; }
    .sidebar .main-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: minmax(24px,1fr); gap: 3px; }
    .sidebar .nav-link { max-height: none; min-width: 0; padding: 3px 5px; gap: 4px; font-size: 0.65rem; overflow-wrap: anywhere; }
}
@media print { .sidebar-toggle { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
