/* Arelo UI template v0: shell administrativo compartible entre ICOS apps. */

/* Paletas reutilizables: acceso, sala de espera y shell administrativo. */
.arelo-theme-morado,
.app-shell[data-admin-theme="morado"] {
    --brand: #7963a8;
    --brand-strong: #5e478d;
    --arelo-band-bg: #7963a8;
    --arelo-band-ink: #fff;
    --arelo-band-muted: #f7f4fc;
    --arelo-mark-bg: #ece4f6;
    --arelo-mark-ink: #44325f;
    --arelo-nav-active: #64518d;
    --arelo-surface-soft: #f3eff8;
    --arelo-band-border: #9d8cbf;
    --arelo-focus: rgba(121, 99, 168, .18);
}

.arelo-theme-azul,
.app-shell[data-admin-theme="azul"] {
    --brand: #356b91;
    --brand-strong: #234f70;
    --arelo-band-bg: #aecfe8;
    --arelo-band-ink: #1c3849;
    --arelo-band-muted: #304f63;
    --arelo-mark-bg: #e8f2f9;
    --arelo-mark-ink: #1c3849;
    --arelo-nav-active: #93bedf;
    --arelo-surface-soft: #eef5fa;
    --arelo-band-border: #8db7d5;
    --arelo-focus: rgba(53, 107, 145, .18);
}

.arelo-theme-verde,
.app-shell[data-admin-theme="verde"] {
    --brand: #476b4d;
    --brand-strong: #33533a;
    --arelo-band-bg: #86a98b;
    --arelo-band-ink: #17371f;
    --arelo-band-muted: #1e3c25;
    --arelo-mark-bg: #dfede2;
    --arelo-mark-ink: #17371f;
    --arelo-nav-active: #a0bda4;
    --arelo-surface-soft: #eff5f0;
    --arelo-band-border: #6b9272;
    --arelo-focus: rgba(71, 107, 77, .18);
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .app-sidebar {
    background: var(--arelo-band-bg);
    color: var(--arelo-band-ink);
    border-right-color: var(--arelo-band-border);
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .app-sidebar :is(.brand-name, .user-name, .nav-item) {
    color: var(--arelo-band-ink);
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .app-sidebar :is(.brand-subtitle, .user-role, .nav-section-label) {
    color: var(--arelo-band-muted);
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .app-sidebar :is(.brand-mark, .avatar, .nav-icon) {
    color: var(--arelo-mark-ink);
    background: var(--arelo-mark-bg);
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .app-sidebar .nav-item:is(:hover, .active) {
    color: var(--arelo-band-ink);
    background: var(--arelo-nav-active);
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .app-sidebar :is(.brand-block, .sidebar-user, .nav-divider) {
    border-color: var(--arelo-band-border);
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .app-sidebar :is(.brand-block, .sidebar-user) {
    background: transparent;
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .app-sidebar .nav-divider {
    background: var(--arelo-band-border);
}

.app-shell[data-admin-theme]:not([data-admin-theme="actual"]) .topbar {
    background: var(--arelo-surface-soft);
}

.waiting-room-topbar.arelo-themed-band {
    color: var(--arelo-band-ink);
    background: var(--arelo-band-bg);
    border-bottom-color: var(--arelo-band-border);
}

.waiting-room-topbar.arelo-themed-band .waiting-room-brand span:not(.waiting-room-mark) {
    color: var(--arelo-band-muted);
}

.waiting-room-topbar.arelo-themed-band .waiting-room-mark,
.waiting-room-topbar.arelo-themed-band .realtime-reconnect-button {
    color: var(--arelo-mark-ink);
    background: var(--arelo-mark-bg);
    border-color: var(--arelo-band-border);
}

.waiting-room-topbar.arelo-themed-band .presence-indicator {
    color: var(--arelo-band-ink);
}

.waiting-room-topbar.arelo-themed-band .realtime-reconnect-button:hover:not(:disabled) {
    color: var(--arelo-band-ink);
    background: var(--arelo-nav-active);
}

.waiting-room-topbar.arelo-themed-band .realtime-reconnect-button:focus-visible {
    outline-color: var(--arelo-mark-bg);
}

/* Superficies de acceso: la paleta cambia sin modificar los formularios. */
.arelo-auth-theme {
    --ink: #17202a;
    --muted: #59636f;
    --surface: #fff;
    --line: #d9e0e7;
    --line-strong: #c4ced8;
    color: var(--ink);
    background: var(--arelo-surface-soft);
    color-scheme: light;
}

.arelo-auth-theme .exam-login-brand {
    color: var(--arelo-band-ink);
    background: var(--arelo-band-bg);
    border-right-color: var(--arelo-band-border);
}

.arelo-auth-theme .exam-login-copy h1 {
    color: var(--arelo-band-ink);
    font-size: 3.5rem;
    letter-spacing: 0;
}

.arelo-auth-theme :is(.exam-login-lockup span, .exam-login-copy span, .exam-login-copy p, .exam-login-steps span) {
    color: var(--arelo-band-muted);
}

.arelo-auth-theme .exam-login-copy p {
    letter-spacing: 0;
}

.arelo-auth-theme .exam-login-mark {
    color: var(--arelo-mark-ink);
    background: var(--arelo-mark-bg);
    border-color: var(--arelo-band-border);
}

.arelo-auth-theme .exam-login-steps span {
    border-color: var(--arelo-band-border);
    background: transparent;
}

.arelo-auth-theme .exam-login-panel {
    background: var(--arelo-surface-soft);
}

.arelo-auth-theme .exam-login-card {
    border-color: var(--line);
    background: var(--surface);
    box-shadow: 0 12px 36px rgba(23, 32, 42, .08);
}

.arelo-auth-theme :is(.exam-login-card .form-heading h2, .exam-login-card .form-field, .exam-login-mobile-brand strong) {
    color: var(--ink);
}

.arelo-auth-theme .exam-login-card .form-heading p {
    color: var(--brand-strong);
    letter-spacing: 0;
}

.arelo-auth-theme .exam-login-mobile-brand {
    border-bottom-color: var(--line);
}

.arelo-auth-theme .exam-login-mobile-brand span {
    color: var(--muted);
}

.arelo-auth-theme .field,
.arelo-auth-theme select.field option {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line-strong);
}

.arelo-auth-theme .field:disabled {
    color: var(--muted);
    background: #eef1f4;
}

.arelo-auth-theme .field:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--arelo-focus);
}

.arelo-auth-theme .exam-login-card .password-visibility-button {
    color: var(--brand-strong);
    background: var(--surface);
    border-color: var(--line-strong);
}

.arelo-auth-theme .exam-login-card .password-visibility-button:is(:hover, :focus-visible) {
    color: var(--brand-strong);
    background: var(--arelo-surface-soft);
    border-color: var(--brand);
}

.arelo-auth-theme .exam-login-note {
    color: var(--ink);
    background: var(--arelo-surface-soft);
    border-color: var(--line);
    border-left: 3px solid var(--brand);
}

.exam-login-availability {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: .85rem;
}

.exam-draft-notice {
    flex: 0 0 auto;
    padding: 5px 12px;
    color: var(--muted);
    font-size: .8rem;
    text-align: center;
    background: var(--surface);
}

/* Tema oscuro ------------------------------------------------------------ */
.arelo-theme-dark {
    --arelo-dark-bg: #202124;
    --arelo-dark-surface: #24262b;
    --arelo-dark-surface-raised: #2b2d33;
    --arelo-dark-field: #202124;
    --arelo-dark-field-disabled: #292b30;
    --arelo-dark-text: #f4f5f7;
    --arelo-dark-text-muted: rgba(244, 245, 247, .68);
    --arelo-dark-border: rgba(255, 255, 255, .16);
    --arelo-dark-accent: #f6c85f;
    --arelo-dark-focus: rgba(246, 200, 95, .16);
    color: var(--arelo-dark-text);
    background: var(--arelo-dark-bg);
    color-scheme: dark;
}

.arelo-theme-dark .field {
    border-color: var(--arelo-dark-border);
    color: var(--arelo-dark-text);
    background: var(--arelo-dark-field);
}

.arelo-theme-dark .field::placeholder {
    color: var(--arelo-dark-text-muted);
}

.arelo-theme-dark .field:disabled {
    color: var(--arelo-dark-text-muted);
    background: var(--arelo-dark-field-disabled);
    opacity: .72;
}

.arelo-theme-dark .field:focus {
    border-color: var(--arelo-dark-accent);
    box-shadow: 0 0 0 3px var(--arelo-dark-focus);
}

.arelo-theme-dark select.field,
.arelo-theme-dark select.field option {
    color: var(--arelo-dark-text);
    background-color: var(--arelo-dark-field);
}

.arelo-theme-dark select.field option:disabled {
    color: var(--arelo-dark-text-muted);
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: auto minmax(0, 1fr);
    background: var(--bg);
}

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

.mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 15;
    border: 0;
    background: rgba(8, 22, 40, .45);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    width: 296px;
    height: 100vh;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #17191d;
    color: #eef6ff;
    background: #202124;
    transition: width .18s ease, transform .18s ease;
}

.app-sidebar.collapsed {
    width: 82px;
}

.app-sidebar .brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.app-sidebar .brand-mark,
.app-sidebar .avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #202124;
    background: #f6c85f;
    font-weight: 900;
}

.app-sidebar .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.app-sidebar .brand-text,
.app-sidebar .user-copy {
    min-width: 0;
    flex: 1;
}

.app-sidebar .brand-name,
.app-sidebar .user-name {
    display: block;
    overflow: hidden;
    color: #fff;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar .brand-name {
    font-size: .82rem;
    line-height: 1.15;
}

.app-sidebar .brand-subtitle,
.app-sidebar .user-role {
    color: rgba(238, 246, 255, .66);
    font-size: .78rem;
}

.app-sidebar .sidebar-toggle {
    margin-left: auto;
}

.hamburger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
}

.hamburger-button span {
    display: block;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.app-sidebar .app-nav {
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 14px 10px;
    scrollbar-color: rgba(255, 255, 255, .28) transparent;
    scrollbar-width: thin;
}

.app-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 6px;
    color: rgba(238, 246, 255, .8);
    text-decoration: none;
    font-weight: 750;
}

.app-sidebar .nav-item:hover,
.app-sidebar .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, .11);
}

.app-sidebar .nav-icon {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 6px;
    color: #202124;
    background: #f6c85f;
    font-size: .78rem;
    font-weight: 900;
}

.app-sidebar .nav-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar .nav-divider {
    height: 1px;
    margin: 8px;
    background: rgba(255, 255, 255, .1);
}

.app-sidebar .nav-section-label {
    padding: 8px 12px 4px;
    color: rgba(238, 246, 255, .52);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-sidebar .sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.app-sidebar .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.app-sidebar.collapsed .brand-block {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 14px 0;
}

.app-sidebar.collapsed .brand-mark {
    width: 42px;
    height: 42px;
}

.app-sidebar.collapsed .sidebar-toggle {
    width: 34px;
    height: 34px;
    min-height: 34px;
    margin: 0;
}

.app-sidebar.collapsed .app-nav {
    justify-items: center;
    padding: 14px 0;
}

.app-sidebar.collapsed .nav-item {
    width: 42px;
    justify-content: center;
    padding: 0;
}

.app-sidebar.collapsed .nav-icon {
    width: 34px;
    height: 34px;
}

.app-sidebar.collapsed .nav-divider {
    width: 46px;
    margin: 8px 0;
}

.app-sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 14px 0;
}

.welcome-panel {
    margin-top: 18px;
}

.placeholder-panel {
    display: grid;
    min-height: 170px;
    place-items: center;
    padding: 30px;
    color: var(--muted);
    text-align: center;
    font-weight: 650;
}

.table-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.process-status-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.process-status-band > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.process-status-band > .process-application-choice {
    min-width: min(280px, 100%);
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
}

.process-application-choice .field {
    width: 100%;
    min-height: 36px;
}

.process-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
}

.process-tab {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    background: transparent;
    font-weight: 850;
    white-space: nowrap;
}

.process-tab:hover {
    color: var(--ink);
    background: #f3f6f8;
}

.process-tab.active {
    color: var(--brand-strong);
    border-bottom-color: var(--brand);
}

.process-workspace {
    min-height: 270px;
    padding: 22px 0;
}

.process-workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.process-workspace-header h2 {
    margin: 3px 0 6px;
    font-size: 1.25rem;
}

.process-workspace-header p:last-child {
    max-width: 720px;
    color: var(--muted);
}

.process-preparation-header {
    margin-bottom: 18px;
}

.process-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 1.25fr);
    gap: 12px;
}

.process-summary-card,
.process-create-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 126px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.process-summary-card > div:last-child,
.process-create-card > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.process-summary-card span,
.process-create-card span {
    color: var(--muted);
    font-size: .77rem;
    font-weight: 850;
    text-transform: uppercase;
}

.process-summary-card strong {
    font-size: 1.75rem;
    line-height: 1;
}

.process-summary-card small,
.process-create-card small {
    color: var(--muted);
    line-height: 1.35;
}

.process-summary-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--brand);
    font-weight: 900;
}

.process-summary-icon.secondary {
    color: var(--ink);
    background: #ffc857;
}

.process-summary-icon.exam {
    background: #364152;
}

.process-create-card {
    align-items: center;
    justify-content: space-between;
    background: #f8fafb;
}

.process-create-card strong {
    font-size: 1rem;
}

.process-create-card .primary-button {
    flex: 0 0 auto;
}

.process-configuration-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.process-configuration-block h3 {
    margin: 2px 0 4px;
    font-size: 1rem;
}

.process-configuration-block p:last-child {
    color: var(--muted);
}

.process-roster-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    background: var(--surface);
}

.process-roster-panel > div {
    flex: 1 1 300px;
    min-width: 0;
}

.process-roster-panel > .process-roster-actions {
    flex-basis: 480px;
    flex-wrap: wrap;
}

.process-roster-panel h3,
.process-section-heading h3 {
    margin: 2px 0 4px;
    font-size: 1rem;
}

.process-roster-panel p:last-child {
    color: var(--muted);
}

.process-roster-panel button {
    flex: 0 0 auto;
}

.process-roster-actions,
.process-delete-confirmation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.process-control-panel {
    margin-top: 18px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.process-control-heading {
    margin-bottom: 16px;
}

.process-control-heading h3 {
    margin: 2px 0 0;
    font-size: 1rem;
}

.process-control-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.process-control-group {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
}

.process-control-group h4 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: .875rem;
    font-weight: 600;
}

.process-control-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.process-control-actions > button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    font-size: .875rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 1000px) {
    .process-control-groups {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (max-width: 560px) {
    .process-control-actions {
        grid-template-columns: 1fr;
    }
}

.temporary-delete-button {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
}

.process-delete-confirmation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--danger) 7%, var(--surface));
}

.process-delete-confirmation > div:first-child {
    display: grid;
    gap: 3px;
}

.process-delete-confirmation span {
    color: var(--muted);
    font-size: .82rem;
}

.process-open-dialog-context {
    display: grid;
    gap: 3px;
    margin-top: 18px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-2);
    text-align: left;
}

.process-open-dialog-context span,
.process-open-dialog-context small {
    color: var(--muted);
    font-size: .78rem;
}

.process-open-dialog-context strong {
    color: var(--ink);
    font-size: .92rem;
}

.process-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
}

.test-type-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 8px;
}

.test-type-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.test-type-option.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(18, 119, 113, .12);
}

.test-type-option input {
    width: 17px;
    height: 17px;
    accent-color: var(--brand);
}

.test-type-option span {
    display: grid;
    gap: 2px;
}

.test-type-option small {
    color: var(--muted);
}

.process-import-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.process-action-panel {
    display: flex;
    min-height: 205px;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.process-action-panel.selected {
    border-top: 3px solid var(--brand);
    padding-top: 16px;
}

.process-action-heading {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.process-action-panel h3 {
    margin: 18px 0 5px;
    font-size: 1rem;
}

.process-action-panel p {
    margin-bottom: 18px;
    color: var(--muted);
}

.process-action-meta {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: .82rem;
}

.process-action-meta span {
    color: var(--muted);
}

.process-exam-summary-table-wrap {
    width: 100%;
    margin-bottom: 14px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.process-exam-summary-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .78rem;
}

.process-exam-summary-table th,
.process-exam-summary-table td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.process-exam-summary-table th {
    color: var(--muted);
    font-size: .7rem;
    text-transform: uppercase;
}

.process-exam-summary-table tbody tr:last-child td {
    border-bottom: 0;
}

.process-exam-summary-table tfoot td {
    border-top: 1px solid var(--line-strong);
    border-bottom: 0;
    font-weight: 800;
}

.process-exam-summary-table .numeric-cell {
    text-align: right;
    white-space: nowrap;
}

.process-exam-summary-empty {
    width: 100%;
    margin-bottom: 18px;
    padding: 18px 12px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: .82rem;
}

.process-exam-pending {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: .82rem;
}

.process-exam-pending strong {
    color: var(--ink);
    font-size: 1rem;
}

.process-bosque-selector {
    display: grid;
    width: 100%;
    gap: 7px;
    margin: 0 0 18px;
    padding: 10px 0 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.process-bosque-selector > span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.process-bosque-selector .field {
    width: 100%;
}

.process-bosque-selector small {
    color: var(--muted);
}

.results-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.report-type-band {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.report-type-context {
    display: grid;
    gap: 3px;
}

.report-type-context span,
.report-type-context small {
    color: var(--muted);
    font-size: .78rem;
}

.report-type-context strong {
    color: var(--ink);
    font-size: .94rem;
}

.report-type-selector {
    width: min(320px, 100%);
    margin: 0;
}

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

.results-forest-band {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.results-forest-selector {
    width: min(720px, 100%);
    margin: 0;
}

.results-forest-context {
    display: grid;
    flex: 0 0 auto;
    gap: 3px;
    text-align: right;
}

.results-forest-context span,
.result-module-cell small {
    color: var(--muted);
    font-size: .78rem;
}

.result-module-cell {
    display: grid;
    justify-items: end;
    gap: 4px;
    min-width: 130px;
}

.result-score {
    color: var(--ink);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.results-download-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    z-index: 1410;
    width: min(94vw, 620px);
    max-height: 88vh;
    overflow: hidden;
}

.results-download-body {
    display: grid;
    min-height: 0;
    gap: 20px;
    overflow: auto;
}

.results-download-context {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-2);
}

.results-download-context span,
.results-download-context small,
.results-download-option small,
.results-download-program small {
    color: var(--muted);
    font-size: .78rem;
}

.results-download-context strong {
    color: var(--ink);
    font-size: .94rem;
}

.results-download-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.results-download-fieldset > legend,
.results-download-legend-row > span {
    margin-bottom: 9px;
    color: var(--ink);
    font-size: .85rem;
    font-weight: 800;
}

.results-download-legend-accessible {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px !important;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.results-download-scope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.results-download-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface);
    cursor: pointer;
}

.results-download-option.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(18, 119, 113, .12);
}

.results-download-option input,
.results-download-all input,
.results-download-program input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

.results-download-option span,
.results-download-program span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.results-download-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 9px;
}

.results-download-legend-row > span {
    margin: 0;
}

.results-download-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--brand);
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}

.results-download-programs {
    display: grid;
    max-height: 250px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.results-download-program {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 9px 12px;
    cursor: pointer;
}

.results-download-program + .results-download-program {
    border-top: 1px solid var(--line);
}

.results-download-program b {
    min-width: 28px;
    color: var(--muted);
    font-size: .8rem;
    text-align: right;
}

.results-download-loading,
.results-download-empty {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    font-size: .86rem;
    text-align: center;
}

.results-download-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
    .process-summary-grid.results-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .results-header-actions,
    .results-forest-band,
    .report-type-band {
        align-items: stretch;
        flex-direction: column;
    }

    .results-forest-context {
        text-align: left;
    }

    .process-summary-grid.results-summary-grid {
        grid-template-columns: 1fr;
    }

    .results-download-scope-grid {
        grid-template-columns: 1fr;
    }

    .results-download-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .results-download-actions > * {
        width: 100%;
        justify-content: center;
    }
}

.process-action-panel button {
    margin-top: auto;
}

.process-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.process-metrics.compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.process-metrics > div {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.process-metrics span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.process-metrics strong {
    font-size: 1.35rem;
}

.process-empty-state {
    display: grid;
    min-height: 170px;
    margin-top: 20px;
    place-items: center;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    color: var(--muted);
    background: #f8fafb;
    text-align: center;
    font-weight: 700;
}

.page-header h1:focus,
.page-header h2:focus {
    outline: none;
}

.mobile-menu,
.icon-button.mobile-menu {
    display: none;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-sidebar.collapsed {
        width: 296px;
    }

    .mobile-menu,
    .icon-button.mobile-menu {
        display: inline-flex;
    }

    .process-status-band,
    .process-status-band > div,
    .process-workspace-header {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .process-create-card {
        grid-column: 1 / -1;
    }

    .process-configuration-block {
        align-items: stretch;
        flex-direction: column;
    }

    .process-roster-panel,
    .process-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .process-roster-panel > div,
    .process-roster-panel > .process-roster-actions {
        flex: none;
    }

    .process-roster-panel > .process-roster-actions {
        justify-content: flex-start;
    }

    .process-metrics.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .process-metrics,
    .process-metrics.compact,
    .process-summary-grid,
    .process-import-grid,
    .test-type-selector {
        grid-template-columns: minmax(0, 1fr);
    }

    .process-create-card {
        align-items: stretch;
        flex-direction: column;
    }
}
