:root {
    --portal-bg: #ede6db;
    --portal-page-surface:
        radial-gradient(circle at top left, rgba(193, 96, 49, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(20, 115, 106, 0.16), transparent 34%),
        linear-gradient(180deg, #ebe2d5 0%, #f8f5ef 48%, #efe5da 100%);
    --portal-page-orb-teal: rgba(20, 115, 106, 0.2);
    --portal-page-orb-accent: rgba(193, 96, 49, 0.18);
    --portal-bg-soft: rgba(255, 250, 245, 0.9);
    --portal-surface: rgba(255, 255, 255, 0.84);
    --portal-surface-strong: rgba(255, 255, 255, 0.94);
    --portal-surface-deep: #162420;
    --portal-card-surface-end: rgba(249, 245, 239, 0.88);
    --portal-card-surface-soft-end: rgba(248, 244, 239, 0.9);
    --portal-empty-state-start: rgba(255, 255, 255, 0.95);
    --portal-support-surface: rgba(255, 250, 245, 0.98);
    --portal-ink: #1c2d29;
    --portal-ink-soft: #4a5a55;
    --portal-line: rgba(28, 45, 41, 0.5);
    --portal-line-strong: rgba(28, 45, 41, 0.6);
    --portal-accent: #a84f27;
    --portal-accent-strong: #753115;
    --portal-teal: #0f675f;
    --portal-teal-soft: rgba(15, 103, 95, 0.12);
    --portal-primary-start: #8e3f1f;
    --portal-primary-end: #0d5f58;
    --portal-primary-surface: linear-gradient(135deg, var(--portal-primary-start), var(--portal-primary-end));
    --portal-primary-text: #fffaf5;
    --portal-hero-surface: linear-gradient(135deg, #10211e 0%, #123c37 56%, #6f371f 100%);
    --portal-hero-title: #fffdf8;
    --portal-hero-text: rgba(255, 246, 236, 0.96);
    --portal-hero-muted: rgba(255, 236, 214, 0.9);
    --portal-hero-eyebrow: #ffe0ba;
    --portal-hero-line: rgba(255, 250, 245, 0.28);
    --portal-hero-panel-bg: rgba(255, 250, 245, 0.12);
    --portal-scheduler-shell-border: rgba(20, 115, 106, 0.14);
    --portal-scheduler-shell-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 238, 230, 0.96));
    --portal-scheduler-nav-bg: linear-gradient(180deg, rgba(255, 251, 247, 0.98), rgba(238, 229, 219, 0.96));
    --portal-scheduler-header-bg: linear-gradient(135deg, rgba(193, 96, 49, 0.09), rgba(20, 115, 106, 0.11));
    --portal-scheduler-slot-bg: rgba(255, 255, 255, 0.74);
    --portal-scheduler-slot-border: rgba(28, 45, 41, 0.08);
    --portal-scheduler-appointment-text: #fff9f3;
    --portal-scheduler-appointment-default-surface: linear-gradient(135deg, #8e3f1f, #0d5f58);
    --portal-scheduler-appointment-default-accent: var(--portal-accent);
    --portal-scheduler-appointment-online-surface: linear-gradient(135deg, #0f675f, #182b26);
    --portal-scheduler-appointment-online-accent: var(--portal-teal);
    --portal-scheduler-appointment-warning-surface: linear-gradient(135deg, #8a4f24, #6d431e);
    --portal-scheduler-appointment-warning-accent: #d18a4d;
    --portal-scheduler-appointment-danger-surface: linear-gradient(135deg, #8b3f30, #4f2119);
    --portal-scheduler-appointment-danger-accent: #a94f36;
    --portal-scheduler-appointment-pending-surface: linear-gradient(135deg, #3f6689, #213242);
    --portal-scheduler-appointment-pending-accent: #6b9bc2;
    --portal-scheduler-appointment-adhoc-surface: linear-gradient(135deg, #80542c, #4e5334);
    --portal-scheduler-appointment-adhoc-accent: #d18a4d;
    --portal-shadow: 0 24px 60px rgba(28, 45, 41, 0.12);
    --portal-shadow-soft: 0 12px 28px rgba(28, 45, 41, 0.1);
    --portal-focus-outline: rgba(6, 91, 84, 0.95);
    --portal-focus-halo: 0 0 0 3px rgba(6, 91, 84, 0.22);
    --portal-focus-on-dark-outline: rgba(255, 224, 186, 0.98);
    --portal-focus-on-dark-halo: 0 0 0 3px rgba(255, 224, 186, 0.28);
    --portal-focus-primary-outline: #fff1cf;
    --portal-focus-primary-halo: 0 0 0 3px rgba(6, 91, 84, 0.36), 0 0 0 5px rgba(255, 241, 207, 0.82);
    --portal-font-2xs: 0.75rem;
    --portal-font-xs: 0.78rem;
    --portal-font-sm: 0.82rem;
    --portal-font-md: 0.92rem;
    --portal-font-lg: 1rem;
    --portal-font-xl: 1.08rem;
    --portal-font-2xl: 1.25rem;
    --portal-font-3xl: 1.62rem;
    --portal-font-4xl: 2rem;
    --portal-space-1: 0;
    --portal-space-2: 0.08rem;
    --portal-space-3: 0.16rem;
    --portal-space-4: 0.3rem;
    --portal-space-5: 0.42rem;
    --portal-space-6: 0.55rem;
    --portal-space-7: 0.7rem;
    --portal-space-8: 0.9rem;
    --portal-radius-xs: 8px;
    --portal-radius-sm: 16px;
    --portal-radius: 22px;
    --portal-radius-pill: 999px;
    --portal-width-desktop: 1440px;
    --portal-width-laptop: 1280px;
    --portal-width-tablet: 1024px;
    --portal-width-compact: 768px;
    --portal-shell-width: min(var(--portal-width-laptop), calc(100vw - 1.35rem));
    --portal-card-padding: var(--portal-space-8);
    --portal-action-gap: var(--portal-space-5);
    --portal-hero-padding: clamp(0.58rem, 1.15vw, 0.92rem);
    color-scheme: light;
}

:root[data-theme="dark"] {
    --portal-bg: #101714;
    --portal-page-surface:
        radial-gradient(circle at top left, rgba(240, 160, 111, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(113, 211, 199, 0.12), transparent 34%),
        linear-gradient(180deg, #0f1714 0%, #15201c 48%, #101713 100%);
    --portal-page-orb-teal: rgba(113, 211, 199, 0.1);
    --portal-page-orb-accent: rgba(240, 160, 111, 0.08);
    --portal-bg-soft: rgba(27, 39, 35, 0.96);
    --portal-surface: rgba(34, 48, 43, 0.92);
    --portal-surface-strong: rgba(38, 53, 48, 0.98);
    --portal-surface-deep: #0a100e;
    --portal-card-surface-end: rgba(24, 35, 31, 0.94);
    --portal-card-surface-soft-end: rgba(25, 37, 33, 0.94);
    --portal-empty-state-start: rgba(38, 53, 48, 0.98);
    --portal-support-surface: rgba(30, 43, 38, 0.99);
    --portal-ink: #f4efe7;
    --portal-ink-soft: #c7d2cc;
    --portal-line: rgba(231, 239, 235, 0.48);
    --portal-line-strong: rgba(231, 239, 235, 0.68);
    --portal-accent: #f0a06f;
    --portal-accent-strong: #ffc7a5;
    --portal-teal: #71d3c7;
    --portal-teal-soft: rgba(113, 211, 199, 0.16);
    --portal-primary-start: #914723;
    --portal-primary-end: #0f665e;
    --portal-primary-text: #fffaf5;
    --portal-hero-surface: linear-gradient(135deg, #08110f 0%, #0d302b 56%, #532a19 100%);
    --portal-hero-title: #fffdf8;
    --portal-hero-text: rgba(255, 246, 236, 0.98);
    --portal-hero-muted: rgba(255, 236, 214, 0.94);
    --portal-hero-eyebrow: #ffe0ba;
    --portal-hero-line: rgba(255, 250, 245, 0.42);
    --portal-hero-panel-bg: rgba(255, 250, 245, 0.1);
    --portal-scheduler-shell-border: rgba(113, 211, 199, 0.38);
    --portal-scheduler-shell-bg: linear-gradient(180deg, rgba(30, 44, 39, 0.98), rgba(16, 25, 22, 0.98));
    --portal-scheduler-nav-bg: linear-gradient(180deg, rgba(38, 53, 48, 0.99), rgba(24, 35, 31, 0.98));
    --portal-scheduler-header-bg: linear-gradient(135deg, rgba(240, 160, 111, 0.14), rgba(113, 211, 199, 0.13));
    --portal-scheduler-slot-bg: rgba(22, 32, 28, 0.92);
    --portal-scheduler-slot-border: rgba(231, 239, 235, 0.24);
    --portal-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    --portal-shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.32);
    --portal-focus-outline: #8ce7da;
    --portal-focus-halo: 0 0 0 3px rgba(140, 231, 218, 0.32);
    --portal-focus-on-dark-outline: #ffe0ba;
    --portal-focus-on-dark-halo: 0 0 0 3px rgba(255, 224, 186, 0.34);
    --portal-focus-primary-outline: #fff1cf;
    --portal-focus-primary-halo: 0 0 0 3px rgba(140, 231, 218, 0.38), 0 0 0 5px rgba(255, 241, 207, 0.86);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --portal-bg: #101714;
        --portal-page-surface:
            radial-gradient(circle at top left, rgba(240, 160, 111, 0.08), transparent 28%),
            radial-gradient(circle at top right, rgba(113, 211, 199, 0.12), transparent 34%),
            linear-gradient(180deg, #0f1714 0%, #15201c 48%, #101713 100%);
        --portal-page-orb-teal: rgba(113, 211, 199, 0.1);
        --portal-page-orb-accent: rgba(240, 160, 111, 0.08);
        --portal-bg-soft: rgba(27, 39, 35, 0.96);
        --portal-surface: rgba(34, 48, 43, 0.92);
        --portal-surface-strong: rgba(38, 53, 48, 0.98);
        --portal-surface-deep: #0a100e;
        --portal-card-surface-end: rgba(24, 35, 31, 0.94);
        --portal-card-surface-soft-end: rgba(25, 37, 33, 0.94);
        --portal-empty-state-start: rgba(38, 53, 48, 0.98);
        --portal-support-surface: rgba(30, 43, 38, 0.99);
        --portal-ink: #f4efe7;
        --portal-ink-soft: #c7d2cc;
        --portal-line: rgba(231, 239, 235, 0.48);
        --portal-line-strong: rgba(231, 239, 235, 0.68);
        --portal-accent: #f0a06f;
        --portal-accent-strong: #ffc7a5;
        --portal-teal: #71d3c7;
        --portal-teal-soft: rgba(113, 211, 199, 0.16);
        --portal-primary-start: #914723;
        --portal-primary-end: #0f665e;
        --portal-primary-text: #fffaf5;
        --portal-hero-surface: linear-gradient(135deg, #08110f 0%, #0d302b 56%, #532a19 100%);
        --portal-hero-title: #fffdf8;
        --portal-hero-text: rgba(255, 246, 236, 0.98);
        --portal-hero-muted: rgba(255, 236, 214, 0.94);
        --portal-hero-eyebrow: #ffe0ba;
        --portal-hero-line: rgba(255, 250, 245, 0.42);
        --portal-hero-panel-bg: rgba(255, 250, 245, 0.1);
        --portal-scheduler-shell-border: rgba(113, 211, 199, 0.38);
        --portal-scheduler-shell-bg: linear-gradient(180deg, rgba(30, 44, 39, 0.98), rgba(16, 25, 22, 0.98));
        --portal-scheduler-nav-bg: linear-gradient(180deg, rgba(38, 53, 48, 0.99), rgba(24, 35, 31, 0.98));
        --portal-scheduler-header-bg: linear-gradient(135deg, rgba(240, 160, 111, 0.14), rgba(113, 211, 199, 0.13));
        --portal-scheduler-slot-bg: rgba(22, 32, 28, 0.92);
        --portal-scheduler-slot-border: rgba(231, 239, 235, 0.24);
        --portal-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
        --portal-shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.32);
        --portal-focus-outline: #8ce7da;
        --portal-focus-halo: 0 0 0 3px rgba(140, 231, 218, 0.32);
        --portal-focus-on-dark-outline: #ffe0ba;
        --portal-focus-on-dark-halo: 0 0 0 3px rgba(255, 224, 186, 0.34);
        --portal-focus-primary-outline: #fff1cf;
        --portal-focus-primary-halo: 0 0 0 3px rgba(140, 231, 218, 0.38), 0 0 0 5px rgba(255, 241, 207, 0.86);
        color-scheme: dark;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.portal-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.portal-stat {
    display: grid;
    gap: var(--portal-space-3);
}

.portal-stat-value {
    font-size: var(--portal-font-4xl);
    font-weight: 700;
    line-height: 1;
}

.portal-stat-value.portal-stat--compact {
    font-size: var(--portal-font-2xl);
}

.portal-stat-label {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 600;
}

.portal-stack-tight {
    display: grid;
    gap: var(--portal-space-3);
}

.portal-actions-end {
    justify-content: flex-end;
}

.portal-actions-center {
    justify-content: center;
}

.portal-mt-2 { margin-top: var(--portal-space-3); }
.portal-mt-3 { margin-top: var(--portal-space-5); }
.portal-mt-4 { margin-top: var(--portal-space-7); }
.portal-mt-5 { margin-top: var(--portal-space-8); }
.portal-mb-5 { margin-bottom: var(--portal-space-8); }
.portal-ml-3 { margin-left: var(--portal-space-6); }
.portal-pt-6 { padding-top: calc(var(--portal-space-8) + var(--portal-space-6)); }
.portal-w-full { width: 100%; }
.portal-w-7 { width: 7rem; }
.portal-w-8 { width: 8rem; }
.portal-w-9 { width: 9rem; }
.portal-w-13 { width: 13rem; }
.portal-max-w-8 { max-width: 8rem; }
.portal-max-w-9 { max-width: 9rem; }
.portal-max-w-10 { max-width: 10rem; }
.portal-max-w-32 { max-width: 32rem; }
.portal-min-w-0 { min-width: 0; }
.portal-overflow-auto { overflow: auto; }
.portal-text-center { text-align: center; }
.portal-order-1 { order: 1; }
.portal-order-2 { order: 2; }

.portal-fill-end {
    height: 100%;
    align-items: end;
}

.portal-scroll-panel {
    height: 24rem;
    overflow: auto;
}

.portal-actions-divider {
    border-top: 1px solid var(--portal-line);
    padding-top: var(--portal-space-6);
}

.portal-split-start {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--portal-space-7);
}

.portal-version-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--portal-space-6);
    max-height: 25rem;
    overflow: auto;
    padding-right: var(--portal-space-3);
}

.portal-version-timeline-item {
    border-left: 4px solid transparent;
}

.portal-version-timeline-item.is-selected {
    border-left-color: var(--portal-teal);
    background: var(--portal-teal-soft);
}

.portal-virtualized-grid {
    height: 32rem;
    min-height: 18rem;
}

.portal-grid-cell-numeric {
    display: block;
    text-align: right;
}

.portal-empty-state-icon {
    color: var(--portal-teal);
    font-size: var(--portal-font-4xl);
    opacity: 0.6;
}

.portal-icon-teal {
    color: var(--portal-teal);
}

.portal-accent-icon {
    color: var(--portal-accent);
    font-size: var(--portal-font-3xl);
}

.portal-material-icon {
    font-family: "Material Icons";
}

.portal-reconnect-hidden {
    display: none;
}

.portal-command-frame-embed {
    width: 100%;
    min-height: 64rem;
    border: 0;
    border-radius: var(--portal-radius);
    background: var(--portal-surface-strong);
}

.portal-static-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-top: var(--portal-space-6);
}

.portal-static-table-heading,
.portal-static-table-cell {
    padding: var(--portal-space-5);
    border-bottom: 1px solid var(--portal-line);
    text-align: left;
}

.portal-static-table-heading {
    vertical-align: top;
    color: var(--portal-ink-soft);
    font-weight: 600;
}

.portal-static-table-heading--key {
    width: 28%;
}

.portal-static-table-cell {
    vertical-align: top;
    overflow-wrap: anywhere;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--portal-page-surface);
    color: var(--portal-ink);
    font-family: "Roboto Flex", "Segoe UI Variable Text", "Segoe UI", sans-serif;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: -1;
    border-radius: var(--portal-radius-pill);
    filter: blur(10px);
}

body::before {
    top: -10rem;
    right: -8rem;
    width: 28rem;
    height: 28rem;
    background: radial-gradient(circle, var(--portal-page-orb-teal), transparent 68%);
}

body::after {
    left: -7rem;
    top: 8rem;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, var(--portal-page-orb-accent), transparent 66%);
}

.portal-layout :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus,
.portal-auth-layout :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus,
.rz-dialog :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus {
    outline: none;
}

.portal-layout :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus:not(:focus-visible),
.portal-auth-layout :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus:not(:focus-visible),
.rz-dialog :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus:not(:focus-visible) {
    box-shadow: none;
}

.portal-layout :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus-visible,
.portal-auth-layout :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus-visible,
.rz-dialog :is(a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 2px solid var(--portal-focus-outline);
    outline-offset: 2px;
    box-shadow: var(--portal-focus-halo);
}

.portal-sidebar :is(a[href], button):focus-visible {
    outline-color: var(--portal-focus-on-dark-outline);
    box-shadow: var(--portal-focus-on-dark-halo);
}

.portal-layout .portal-brand:not(a):focus,
.portal-layout .portal-brand:not(a):focus-visible,
.portal-layout .portal-brand:not(a)[tabindex]:focus,
.portal-layout .portal-brand:not(a)[tabindex]:focus-visible,
.portal-auth-layout .portal-brand:not(a):focus,
.portal-auth-layout .portal-brand:not(a):focus-visible,
.portal-auth-layout .portal-brand:not(a)[tabindex]:focus,
.portal-auth-layout .portal-brand:not(a)[tabindex]:focus-visible,
.portal-layout .portal-brand:not(a) :is(.portal-brand-mark, .portal-brand-name, .portal-brand-byline, .portal-shell-surface-kicker, .portal-shell-current-surface):focus,
.portal-layout .portal-brand:not(a) :is(.portal-brand-mark, .portal-brand-name, .portal-brand-byline, .portal-shell-surface-kicker, .portal-shell-current-surface):focus-visible,
.portal-auth-layout .portal-brand:not(a) :is(.portal-brand-mark, .portal-brand-name, .portal-brand-byline, .portal-shell-surface-kicker, .portal-shell-current-surface):focus,
.portal-auth-layout .portal-brand:not(a) :is(.portal-brand-mark, .portal-brand-name, .portal-brand-byline, .portal-shell-surface-kicker, .portal-shell-current-surface):focus-visible {
    outline: none;
    box-shadow: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.portal-shell-title {
    font-family: "Roboto Flex", "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.portal-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--portal-space-7);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.portal-hero-return-link {
    color: var(--portal-hero-text);
}

.portal-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--portal-radius-sm);
    padding: var(--portal-hero-padding);
    background: var(--portal-hero-surface);
    color: var(--portal-hero-title);
    box-shadow: 0 14px 32px rgba(28, 45, 41, 0.12);
}

.portal-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255, 224, 186, 0.13), transparent 32%),
        linear-gradient(120deg, rgba(6, 16, 14, 0.18), transparent 58%);
    pointer-events: none;
}

.portal-hero > * {
    position: relative;
    z-index: 1;
}

.portal-hero h1 {
    margin: 0;
    font-size: var(--portal-font-3xl);
    line-height: 1.02;
}

.portal-hero :is(h1, h2, h3, .rz-text-h1, .rz-text-h2, .rz-text-h3, .portal-shell-title) {
    color: var(--portal-hero-title);
}

.portal-hero p {
    margin: 0.32rem 0 0;
    max-width: 68ch;
    font-size: var(--portal-font-sm);
    line-height: 1.32;
    color: var(--portal-hero-text);
}

.portal-hero :is(p, .rz-text-body1, .rz-text-body2, .portal-muted) {
    color: var(--portal-hero-text);
}

.portal-hero .portal-muted {
    color: var(--portal-hero-muted);
}

.portal-hero-grid {
    display: grid;
    gap: var(--portal-space-7);
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.95fr);
    align-items: stretch;
}

.portal-hero-copy {
    display: grid;
    align-content: start;
    gap: var(--portal-space-5);
}

.portal-hero-copy p {
    margin-top: 0;
}

.portal-home-hero {
    display: grid;
    gap: var(--portal-space-8);
}

.portal-home-status-band {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-6);
}

.portal-home-status-pill {
    min-width: 9rem;
    display: grid;
    gap: var(--portal-space-3);
    padding: 0.5rem 0.7rem;
    border-radius: var(--portal-radius-sm);
    background: var(--portal-hero-panel-bg);
    border: 1px solid var(--portal-hero-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portal-home-status-pill span {
    color: var(--portal-hero-muted);
    font-size: var(--portal-font-2xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-home-status-pill strong {
    color: var(--portal-hero-title);
    font-size: var(--portal-font-lg);
    font-weight: 700;
}

.portal-hero-eyebrow,
.portal-eyebrow,
.portal-section-kicker,
.portal-sidebar-kicker {
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.portal-hero-eyebrow {
    color: var(--portal-hero-eyebrow);
}

.portal-hero-panel {
    background: var(--portal-hero-panel-bg);
    border: 1px solid var(--portal-hero-line);
    box-shadow: none;
    backdrop-filter: blur(14px);
    color: var(--portal-hero-title);
}

.portal-hero-panel .rz-card-content {
    height: 100%;
    padding: 0.82rem 0.9rem;
}

.portal-hero .rz-progressbar {
    border-radius: var(--portal-radius-pill);
    background: rgba(255, 255, 255, 0.16);
}

.portal-hero .rz-progressbar .rz-progressbar-value {
    background: linear-gradient(90deg, rgba(255, 240, 216, 0.92), rgba(255, 187, 131, 0.96));
}

.portal-status-list {
    display: grid;
    gap: var(--portal-space-6);
}

.portal-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--portal-space-8);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--portal-hero-line);
}

.portal-status-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.portal-status-row span {
    color: var(--portal-hero-muted);
}

.portal-status-row strong {
    color: var(--portal-hero-title);
    font-weight: 700;
}

.portal-status-list.is-compact {
    gap: var(--portal-space-5);
}

.portal-status-list.is-compact .portal-status-row {
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(28, 45, 41, 0.08);
}

.portal-status-list.is-compact .portal-status-row span {
    color: var(--portal-ink-soft);
}

.portal-status-list.is-compact .portal-status-row strong {
    color: var(--portal-ink);
}

.portal-section-card,
.portal-kpi,
.portal-surface-card {
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-line);
    background: linear-gradient(180deg, var(--portal-surface-strong), var(--portal-card-surface-end));
    box-shadow: var(--portal-shadow-soft);
    backdrop-filter: blur(16px);
    transition: transform 150ms ease, box-shadow 200ms ease, border-color 150ms ease;
}

.portal-section-card:hover,
.portal-kpi:hover,
.portal-surface-card:hover {
    border-color: var(--portal-line-strong);
    box-shadow: 0 16px 40px rgba(28, 45, 41, 0.12);
}

.portal-kpi {
    padding: 0.95rem 1rem;
    min-height: 100%;
}

.portal-muted {
    color: var(--portal-ink-soft);
}

.portal-layout {
    --rz-sidebar-width: 16rem;
    min-height: 100vh;
    background: transparent;
}

.portal-layout .rz-body {
    padding: 0.72rem 0.7rem 1.05rem;
    min-width: 0;
    overflow-x: hidden;
}

.portal-layout .portal-sidebar.rz-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(12, 21, 19, 0.98), rgba(24, 43, 38, 0.96)),
        radial-gradient(circle at top right, rgba(20, 115, 106, 0.22), transparent 34%);
    color: #f8f2eb;
    border-right: 0;
    z-index: 1100;
    transition: width 180ms ease, padding 180ms ease, opacity 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.portal-layout .portal-sidebar.rz-sidebar-expanded {
    width: var(--rz-sidebar-width);
    padding: 0.7rem 0.6rem 0.78rem;
    opacity: 1;
    box-shadow: 14px 0 34px rgba(17, 29, 26, 0.2);
}

.portal-layout .portal-sidebar.rz-sidebar-collapsed {
    min-width: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    opacity: 0;
    box-shadow: none;
    border-right: 0;
    pointer-events: none;
}

.portal-sidebar-shell {
    min-height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--portal-space-6);
}

.portal-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--portal-space-6);
    padding: 0.08rem 0.08rem 0 0.04rem;
}

.portal-sidebar-heading {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-2);
}

.portal-sidebar-caption {
    color: rgba(248, 242, 235, 0.6);
    font-size: var(--portal-font-2xs);
    line-height: 1.18;
}

.portal-sidebar-close {
    display: none;
    width: 2.1rem;
    height: 2.1rem;
    border: 0;
    border-radius: var(--portal-radius-pill);
    background: rgba(255, 255, 255, 0.08);
    color: #fff7f0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 120ms ease, transform 120ms ease;
}

.portal-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.portal-layout .portal-sidebar.rz-sidebar-collapsed .portal-sidebar-close {
    display: none;
}

.portal-sidebar-overview {
    display: grid;
    gap: var(--portal-space-5);
}

.portal-sidebar-current-pill {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--portal-space-6);
    padding: 0.56rem 0.66rem;
    border-radius: var(--portal-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portal-sidebar-current-icon {
    width: 1.85rem;
    height: 1.85rem;
    flex-shrink: 0;
    border-radius: var(--portal-radius-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fffdf9;
}

.portal-sidebar-current-copy {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-2);
}

.portal-sidebar-current-label {
    color: rgba(248, 242, 235, 0.58);
    font-size: var(--portal-font-2xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
}

.portal-sidebar-current-title {
    color: #fffdf9;
    font-weight: 700;
    font-size: var(--portal-font-md);
    line-height: 1.08;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-sidebar-current-tags {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--portal-space-4);
    flex-wrap: wrap;
}

.portal-sidebar-current-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.42rem;
    border-radius: var(--portal-radius-pill);
    background: rgba(255, 255, 255, 0.12);
    color: #fffaf4;
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.portal-sidebar-current-tag.is-warning {
    background: rgba(193, 96, 49, 0.2);
}

.portal-sidebar-group-icon {
    width: 1.9rem;
    height: 1.9rem;
    flex-shrink: 0;
    border-radius: var(--portal-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.09);
}

.portal-sidebar-group-labels {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-2);
}

.portal-sidebar-group-title {
    font-size: var(--portal-font-sm);
    font-weight: 700;
    line-height: 1.08;
}

.portal-sidebar-group-meta {
    color: rgba(248, 242, 235, 0.66);
    font-size: var(--portal-font-2xs);
    line-height: 1.12;
}

.portal-sidebar-nav {
    flex: 1;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: var(--portal-space-6);
    overflow-y: auto;
    padding-top: 0.08rem;
    padding-right: 0.08rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.portal-sidebar-group {
    display: grid;
    gap: var(--portal-space-4);
    padding: 0.18rem;
    border-radius: var(--portal-radius);
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
}

.portal-sidebar-group.is-current {
    border-color: rgba(193, 96, 49, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portal-sidebar-group-toggle {
    width: 100%;
    border: 0;
    padding: 0.44rem 0.48rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--portal-space-7);
    border-radius: var(--portal-radius-sm);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 120ms ease;
}

.portal-sidebar-group-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.portal-sidebar-group-toggle-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--portal-space-6);
}

.portal-sidebar-group-arrow {
    color: rgba(248, 242, 235, 0.74);
    transition: transform 160ms ease;
}

.portal-sidebar-group.is-expanded .portal-sidebar-group-arrow {
    transform: rotate(180deg);
}

.portal-sidebar-links {
    display: grid;
    gap: var(--portal-space-5);
    padding: 0 0.12rem 0.14rem;
}

.portal-sidebar-link-block {
    display: grid;
    gap: var(--portal-space-4);
}

.portal-sidebar-link,
.portal-sidebar-child-link {
    text-decoration: none;
}

.portal-sidebar-link {
    display: block;
    min-width: 0;
    padding: 0.72rem 0.74rem;
    border-radius: var(--portal-radius-sm);
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.98), rgba(244, 235, 226, 0.96));
    border: 1px solid rgba(28, 45, 41, 0.08);
    box-shadow: 0 8px 18px rgba(17, 29, 26, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.84);
    color: var(--portal-ink);
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.portal-sidebar-link:hover {
    transform: translateY(-1px);
    border-color: rgba(193, 96, 49, 0.18);
    box-shadow: 0 12px 24px rgba(17, 29, 26, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.portal-sidebar-link.is-active {
    background: var(--portal-primary-surface);
    border-color: transparent;
    color: var(--portal-primary-text);
    box-shadow: 0 14px 24px rgba(17, 29, 26, 0.18);
}

.portal-sidebar-link.is-disabled,
.portal-sidebar-child-link.is-disabled {
    opacity: 0.72;
    cursor: default;
}

.portal-sidebar-link-main {
    display: flex;
    align-items: flex-start;
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-sidebar-link-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: var(--portal-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 115, 106, 0.1);
    color: var(--portal-teal);
}

.portal-sidebar-link.is-active .portal-sidebar-link-icon {
    background: rgba(255, 255, 255, 0.14);
    color: var(--portal-primary-text);
}

.portal-sidebar-link-copy {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-3);
}

.portal-sidebar-link-title-row {
    display: flex;
    align-items: center;
    gap: var(--portal-space-4);
    flex-wrap: wrap;
}

.portal-sidebar-link-title {
    font-size: var(--portal-font-md);
    font-weight: 700;
    line-height: 1.12;
}

.portal-sidebar-link-badge,
.portal-sidebar-child-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.36rem;
    border-radius: var(--portal-radius-pill);
    background: rgba(28, 45, 41, 0.08);
    color: inherit;
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.portal-sidebar-link.is-active .portal-sidebar-link-badge {
    background: rgba(255, 255, 255, 0.16);
}

.portal-sidebar-link-description {
    color: inherit;
    opacity: 0.82;
    font-size: var(--portal-font-xs);
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-sidebar-child-list {
    display: grid;
    gap: var(--portal-space-4);
    padding-left: 0.8rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-sidebar-child-link {
    display: flex;
    align-items: center;
    gap: var(--portal-space-5);
    min-width: 0;
    padding: 0.42rem 0.56rem;
    border-radius: var(--portal-radius-sm);
    background: rgba(248, 243, 236, 0.84);
    border: 1px solid rgba(28, 45, 41, 0.08);
    color: var(--portal-ink);
    transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.portal-sidebar-child-link:hover {
    transform: translateX(0.08rem);
    background: rgba(255, 249, 244, 0.96);
    border-color: rgba(193, 96, 49, 0.16);
}

.portal-sidebar-child-link.is-active {
    background: linear-gradient(135deg, rgba(193, 96, 49, 0.16), rgba(20, 115, 106, 0.18));
    border-color: rgba(20, 115, 106, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.portal-sidebar-child-icon {
    width: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-accent-strong);
    flex-shrink: 0;
}

.portal-sidebar-child-title {
    min-width: 0;
    flex: 1;
    font-size: var(--portal-font-xs);
    font-weight: 600;
    line-height: 1.1;
}

.portal-sidebar-scrim {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(10, 18, 16, 0.48);
    transition: opacity 180ms ease, visibility 180ms ease;
    z-index: 1080;
}

.portal-sidebar-scrim.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.portal-layout .rz-header {
    padding: 0.26rem 0;
    background: rgba(249, 244, 237, 0.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--portal-line);
    box-shadow: 0 8px 18px rgba(28, 45, 41, 0.05);
}

.portal-auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.portal-auth-header {
    padding: 1rem 0 0;
}

.portal-auth-main {
    display: flex;
    align-items: center;
    padding: 1.5rem 0 2.5rem;
}

.portal-auth-frame {
    width: min(1100px, var(--portal-shell-width));
    margin: 0 auto;
}

.portal-auth-brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--portal-space-8);
    padding: 1.15rem 1.35rem;
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-line);
    background: rgba(249, 244, 237, 0.82);
    box-shadow: 0 12px 28px rgba(28, 45, 41, 0.08);
    backdrop-filter: blur(16px);
}

.portal-auth-brand-row {
    align-items: flex-start;
}

.portal-auth-layout .portal-page {
    width: 100%;
}

.portal-login-shell {
    width: min(72rem, 100%);
    margin: 0 auto;
    display: grid;
    gap: var(--portal-space-8);
    align-items: stretch;
}

.portal-login-hero {
    min-height: 100%;
    display: grid;
    gap: var(--portal-space-8);
    align-content: center;
    padding: clamp(1.5rem, 3vw, 2.2rem);
}

.portal-login-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-7);
}

.portal-login-highlight {
    padding: 0.42rem 0.8rem;
    border-radius: var(--portal-radius-pill);
    border: 1px solid var(--portal-hero-line);
    background: var(--portal-hero-panel-bg);
    color: var(--portal-hero-title);
    font-size: var(--portal-font-md);
    font-weight: 700;
}

.portal-login-panel {
    overflow: hidden;
    align-self: center;
}

.portal-login-card {
    display: grid;
    gap: var(--portal-space-8);
    padding: clamp(1.35rem, 3vw, 1.95rem);
    min-height: 100%;
}

.portal-login-heading {
    display: grid;
    gap: var(--portal-space-4);
}

.portal-login-form {
    display: grid;
    gap: var(--portal-space-8);
}

.portal-login-field {
    display: grid;
    gap: var(--portal-space-5);
}

.portal-login-label {
    color: var(--portal-ink);
    font-weight: 700;
}

.portal-login-input {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.9rem 1rem;
    box-sizing: border-box;
    border-radius: var(--portal-radius-sm);
    border: 1px solid rgba(28, 45, 41, 0.18);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
    color: var(--portal-ink);
    font: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.portal-login-input::placeholder {
    color: rgba(95, 113, 107, 0.82);
}

.portal-login-input:focus-visible {
    outline: none;
    border-color: rgba(20, 115, 106, 0.55);
    box-shadow: var(--portal-focus-halo);
    transform: translateY(-1px);
}

.portal-login-submit {
    min-height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--portal-radius-pill);
    padding: 0.9rem 1.2rem;
    background: var(--portal-primary-surface);
    box-shadow: 0 12px 28px rgba(28, 45, 41, 0.12);
    color: var(--portal-primary-text);
    font: inherit;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.portal-login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(28, 45, 41, 0.16);
    filter: saturate(1.02);
}

.portal-login-submit:focus-visible {
    outline: 2px solid var(--portal-focus-primary-outline);
    outline-offset: 2px;
    box-shadow: var(--portal-focus-primary-halo), 0 12px 28px rgba(28, 45, 41, 0.12);
}

.portal-login-submit:disabled {
    cursor: wait;
    transform: none;
    box-shadow: none;
    filter: saturate(0.88);
    opacity: 0.78;
}

.portal-login-status {
    display: grid;
    gap: var(--portal-space-7);
    padding: 0.78rem 0.84rem;
    border-radius: var(--portal-radius-xs);
    border: 1px solid rgba(20, 115, 106, 0.24);
    background: rgba(20, 115, 106, 0.08);
    color: var(--portal-ink);
}

.portal-login-status[hidden],
.portal-login-recovery-actions[hidden] {
    display: none !important;
}

.portal-login-status-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--portal-space-6);
}

.portal-login-status-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: rgba(20, 115, 106, 0.12);
    color: var(--portal-teal);
}

.portal-login-status-copy {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-2);
}

.portal-login-status-copy strong {
    font-size: var(--portal-font-md);
    line-height: 1.16;
}

.portal-login-status-copy span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
    line-height: 1.28;
}

.portal-login-recovery-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--portal-space-5);
}

.portal-login-secondary {
    min-height: 2.32rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-pill);
    border: 1px solid rgba(28, 45, 41, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: var(--portal-ink);
    padding: 0.46rem 0.82rem;
    font: inherit;
    font-size: var(--portal-font-sm);
    font-weight: 700;
    line-height: 1.12;
    text-decoration: none;
    cursor: pointer;
}

.portal-login-secondary:hover {
    border-color: rgba(20, 115, 106, 0.38);
    color: var(--portal-teal);
}

.portal-login-footnote {
    margin: 0;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: var(--portal-space-6);
}

.portal-brand-mark {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: var(--portal-radius-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--portal-primary-surface);
    color: var(--portal-primary-text);
    font-weight: 800;
    font-size: var(--portal-font-xs);
    box-shadow: 0 10px 20px rgba(28, 45, 41, 0.11);
}

.portal-brand-copy,
.portal-shell-status-panel {
    display: grid;
    gap: var(--portal-space-3);
}

.portal-brand-line {
    display: flex;
    align-items: center;
    gap: var(--portal-space-5);
    flex-wrap: wrap;
}

.portal-shell-header,
.portal-shell-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-width: 0;
}

.portal-shell-header-card {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.92fr);
    gap: var(--portal-space-5);
    padding: 0.38rem 0.5rem;
    border-radius: var(--portal-radius-sm);
    border: 1px solid var(--portal-line);
    background: rgba(249, 244, 237, 0.82);
    box-shadow: 0 8px 18px rgba(28, 45, 41, 0.06);
    backdrop-filter: blur(16px);
}

.portal-shell-branding {
    display: flex;
    align-items: center;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-shell-brand {
    min-width: 0;
}

.portal-shell-surface-kicker {
    margin: 0;
    color: var(--portal-accent-strong);
    letter-spacing: 0.12em;
    line-height: 1;
    font-size: var(--portal-font-2xs);
}

.portal-brand-name {
    margin: 0;
    color: var(--portal-ink);
    font-size: var(--portal-font-3xl);
    line-height: 0.96;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.portal-shell-brand-title {
    font-size: var(--portal-font-2xs);
    line-height: 1;
    margin: 0;
    color: var(--portal-ink-soft);
    font-weight: 600;
}

.portal-brand-byline {
    white-space: normal;
}

.portal-shell-header .portal-brand-mark {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: var(--portal-radius-xs);
    font-size: var(--portal-font-2xs);
}

.portal-shell-header .portal-brand-copy {
    gap: var(--portal-space-2);
}

.portal-shell-header .portal-brand-name {
    font-size: var(--portal-font-xl);
    line-height: 0.98;
}

.portal-shell-header .portal-brand-byline {
    display: none;
}

.portal-shell-header .portal-brand-line {
    gap: var(--portal-space-4);
}

.portal-shell-current-surface {
    color: var(--portal-ink);
    font-weight: 600;
    line-height: 1;
}

.portal-shell-title {
    line-height: 1;
    margin: 0;
}

.portal-shell-description,
.portal-shell-telemetry,
.portal-shell-feedback {
    margin: 0;
}

.portal-shell-description {
    font-size: var(--portal-font-md);
    line-height: 1.22;
    max-width: 62ch;
}

.portal-shell-status-panel {
    justify-items: end;
    align-content: start;
    gap: var(--portal-space-3);
    padding-left: 0.34rem;
    border-left: 1px solid var(--portal-line);
    min-width: 0;
}

.portal-shell-badge-row {
    row-gap: var(--portal-space-3) !important;
    column-gap: var(--portal-space-3) !important;
}

.portal-global-search {
    position: relative;
    width: 100%;
    z-index: 20;
}

.portal-global-search-control {
    min-height: 2rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--portal-space-4);
    padding: 0.18rem 0.22rem 0.18rem 0.56rem;
    border-radius: var(--portal-radius-pill);
    border: 1px solid rgba(28, 45, 41, 0.14);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.portal-global-search-icon {
    color: var(--portal-teal);
    font-size: var(--portal-font-lg);
}

.portal-global-search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--portal-ink);
    font: inherit;
    font-size: var(--portal-font-sm);
    line-height: 1.2;
}

.portal-global-search-input::placeholder {
    color: rgba(95, 113, 107, 0.82);
}

.portal-global-search-control:has(.portal-global-search-input:focus-visible) {
    outline: 2px solid var(--portal-focus-outline);
    outline-offset: 2px;
    box-shadow: var(--portal-focus-halo);
}

.portal-global-search-submit.rz-button {
    width: 1.58rem;
    min-height: 1.58rem !important;
    padding: 0 !important;
    border-radius: var(--portal-radius-pill);
    background: rgba(20, 115, 106, 0.1);
}

.portal-global-search-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    width: min(30rem, calc(100vw - 1.5rem));
    max-height: min(28rem, calc(100vh - 8rem));
    overflow: auto;
    display: grid;
    gap: var(--portal-space-4);
    padding: 0.42rem;
    border-radius: var(--portal-radius-xs);
    border: 1px solid var(--portal-line);
    background: var(--portal-support-surface);
    box-shadow: 0 18px 42px rgba(28, 45, 41, 0.18);
}

.portal-global-search-result {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--portal-space-5);
    padding: 0.48rem 0.56rem;
    border-radius: var(--portal-radius-xs);
    border: 1px solid transparent;
    background: transparent;
    color: var(--portal-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.portal-global-search-result:hover,
.portal-global-search-result:focus-visible {
    border-color: rgba(20, 115, 106, 0.18);
    background: rgba(20, 115, 106, 0.08);
    outline: 2px solid var(--portal-focus-outline);
    outline-offset: 2px;
    box-shadow: var(--portal-focus-halo);
}

.portal-global-search-result-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--portal-radius-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 115, 106, 0.12);
    color: var(--portal-teal);
}

.portal-global-search-result-copy {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-2);
}

.portal-global-search-result-title {
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.portal-global-search-result-subtitle {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.portal-global-search-result-badge {
    justify-self: end;
    padding: 0.16rem 0.42rem;
    border-radius: var(--portal-radius-pill);
    background: rgba(193, 96, 49, 0.12);
    color: var(--portal-accent-strong);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    white-space: nowrap;
}

.portal-global-search-state {
    padding: 0.62rem 0.7rem;
    border-radius: var(--portal-radius-xs);
    background: rgba(28, 45, 41, 0.05);
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
    font-weight: 700;
}

.portal-global-search-state.is-error {
    background: rgba(168, 77, 53, 0.12);
    color: #8f3325;
}

.portal-shell-userbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--portal-space-3);
    padding-top: 0.12rem;
    border-top: 1px solid rgba(28, 45, 41, 0.08);
}

.portal-shell-usercopy {
    display: flex;
    align-items: center;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-shell-usercopy .rz-text {
    overflow-wrap: anywhere;
}

.portal-shell-user-actions {
    gap: var(--portal-space-2);
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    position: relative;
}

.portal-shell-primary-action.rz-button {
    box-shadow: 0 8px 18px rgba(20, 115, 106, 0.16);
}

.portal-shell-support-menu {
    position: relative;
    display: inline-flex;
}

.portal-shell-support-trigger.rz-button {
    min-width: 0;
}

.portal-shell-support-panel {
    position: absolute;
    top: calc(100% + 0.42rem);
    right: 0;
    z-index: 45;
    width: min(21rem, calc(100vw - 1rem));
    max-height: min(32rem, calc(100vh - 7rem));
    overflow: auto;
    display: grid;
    gap: var(--portal-space-6);
    padding: 0.55rem;
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 250, 245, 0.98);
    box-shadow: 0 18px 42px rgba(28, 45, 41, 0.18);
}

.portal-shell-support-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--portal-space-6);
    padding: 0.08rem 0.12rem 0.34rem;
    border-bottom: 1px solid rgba(28, 45, 41, 0.08);
    color: var(--portal-ink);
    font-size: var(--portal-font-xs);
    font-weight: 800;
    line-height: 1.15;
}

.portal-shell-support-panel-header span:last-child {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
}

.portal-shell-support-section {
    display: grid;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-shell-support-section-title {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.portal-shell-support-item {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--portal-space-6);
    padding: 0.48rem 0.56rem;
    border: 1px solid transparent;
    border-radius: var(--portal-radius-xs);
    background: transparent;
    color: var(--portal-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.portal-shell-support-item:hover,
.portal-shell-support-item:focus-visible {
    border-color: rgba(20, 115, 106, 0.18);
    background: rgba(20, 115, 106, 0.08);
}

.portal-shell-support-item-icon {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: rgba(20, 115, 106, 0.12);
    color: var(--portal-teal);
}

.portal-shell-support-item-copy {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-2);
}

.portal-shell-support-item-label {
    font-size: var(--portal-font-sm);
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.portal-shell-support-item-meta {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.portal-shell-support-env-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--portal-space-4);
}

.portal-shell-support-env {
    min-width: 0;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--portal-space-3);
    padding: 0.32rem 0.42rem;
    border: 1px solid rgba(28, 45, 41, 0.14);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.74);
    color: var(--portal-ink);
    font: inherit;
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
}

.portal-shell-support-env.is-active {
    border-color: rgba(20, 115, 106, 0.32);
    background: rgba(20, 115, 106, 0.12);
    color: var(--portal-teal);
    cursor: default;
}

.portal-shell-support-env:disabled {
    opacity: 0.9;
}

.portal-shell-support-env .rz-icon {
    font-size: var(--portal-font-md);
}

.portal-shell-support-message {
    padding: 0.48rem 0.56rem;
    border: 1px solid rgba(20, 115, 106, 0.16);
    border-radius: var(--portal-radius-xs);
    background: rgba(20, 115, 106, 0.08);
    color: var(--portal-ink);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1.25;
}

.portal-shell-status-panel .portal-page-action-bar {
    gap: var(--portal-space-3);
    min-width: min(100%, 28rem);
}

.portal-shell-status-panel .rz-button {
    min-height: 1.78rem !important;
    padding-block: 0.16rem;
    padding-inline: 0.54rem;
    font-size: var(--portal-font-xs);
}

.portal-page .rz-row,
.portal-page .rz-column,
.portal-page [class*="rz-col-"],
.portal-section-card,
.portal-hero,
.portal-kpi,
.portal-surface-card,
.portal-shell-header-card {
    min-width: 0;
    max-width: 100%;
}

.portal-sidebar-toggle.rz-button {
    border-radius: var(--portal-radius-pill);
    background: rgba(28, 45, 41, 0.06);
    flex-shrink: 0;
    min-height: 1.7rem !important;
    width: 1.7rem;
    padding: 0;
}

.portal-eyebrow {
    color: var(--portal-ink-soft);
}

@media (min-width: 1024px) {
    .portal-login-shell {
        grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    }
}

.portal-surface-card {
    min-height: 100%;
}

.portal-section-card .rz-card-content,
.portal-surface-card .rz-card-content {
    height: 100%;
    padding: var(--portal-card-padding);
}

.portal-summary-grid {
    display: grid;
    gap: var(--portal-space-8);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portal-analytics-sticky-scope {
    position: sticky;
    top: 0.65rem;
    z-index: 4;
}

.portal-analytics-scope-strip,
.portal-analytics-card-header {
    min-width: 0;
}

.portal-analytics-scope-badges {
    justify-content: flex-end;
    max-width: min(100%, 36rem);
}

.portal-analytics-issue-card-grid,
.portal-analytics-report-card-grid {
    display: grid;
    gap: var(--portal-space-7);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.portal-analytics-issue-card,
.portal-analytics-report-card {
    display: grid;
    align-content: start;
    gap: var(--portal-space-6);
}

.portal-analytics-fast-workflow .rz-card-content {
    padding-block: 0.85rem;
}

.portal-analytics-focus-status {
    min-width: min(100%, 18rem);
    display: grid;
    gap: var(--portal-space-2);
}

.portal-analytics-workflow-actions {
    align-items: center;
    justify-content: flex-end;
}

.portal-analytics-fast-filter-row,
.portal-analytics-saved-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    align-items: center;
    min-width: 0;
}

.portal-analytics-fast-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-4);
    min-width: 0;
    padding: 0.24rem;
    border: 1px solid rgba(28, 45, 41, 0.11);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.62);
}

.portal-analytics-shortcuts {
    box-shadow: none;
}

.portal-analytics-issue-card.is-focused {
    outline: 2px solid var(--portal-focus-primary-outline);
    outline-offset: 2px;
    box-shadow: var(--portal-focus-primary-halo), 0 10px 22px rgba(28, 45, 41, 0.1);
}

.portal-analytics-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: start;
}

.portal-analytics-card-header > * {
    min-width: 0;
}

.portal-analytics-card-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--portal-space-4);
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    line-height: 1.2;
}

.portal-analytics-primary-action,
.portal-analytics-row-actions {
    align-items: center;
}

.portal-analytics-action-menu {
    position: relative;
}

.portal-analytics-action-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-4);
    min-height: 2rem;
    padding: 0.24rem 0.56rem;
    border: 1px solid rgba(28, 45, 41, 0.16);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.66);
    color: var(--portal-ink);
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: var(--portal-font-sm);
    line-height: 1.1;
}

.portal-analytics-action-menu > summary::-webkit-details-marker {
    display: none;
}

.portal-analytics-action-menu[open] > summary {
    border-color: rgba(20, 115, 106, 0.34);
    background: rgba(240, 250, 246, 0.92);
}

.portal-analytics-action-menu > .portal-actions {
    margin-top: 0.4rem;
    padding: 0.42rem;
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(28, 45, 41, 0.11);
}

.portal-analytics-issue-grid-frame {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.portal-analytics-kpi-row .portal-summary-card {
    padding: 0.75rem 0.82rem;
}

.portal-analytics-kpi-row .portal-summary-card .portal-muted {
    line-height: 1.25;
}

.portal-full-width {
    width: 100%;
}

.portal-grid-export-button {
    align-items: center;
    background: var(--portal-surface-strong);
    border: 1px solid var(--portal-line-strong);
    border-radius: var(--portal-radius-pill);
    color: var(--portal-accent-strong);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--portal-font-xs);
    font-weight: 700;
    margin-left: 0.75rem;
    padding: 0.36rem 0.72rem;
}

.portal-grid-export-button:hover,
.portal-grid-export-button:focus-visible {
    background: var(--portal-teal-soft);
    outline: 2px solid var(--portal-teal);
    outline-offset: 2px;
}

.portal-badge {
    border-radius: var(--portal-radius-pill);
    padding: 0.14rem 0.54rem;
    font-size: var(--portal-font-2xs);
}

.portal-page .rz-badge,
.rz-dialog .rz-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-4);
    line-height: 1.1;
}

.portal-route-ready-badge.rz-badge {
    font-weight: 800;
}

.portal-data-confidence-bar {
    min-width: 0;
    max-width: 100%;
}

.portal-data-confidence-bar .rz-badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.portal-data-confidence-bar[data-route-ready-state="data-loading"] .portal-route-ready-badge,
.portal-state-card[data-route-ready-state="data-loading"] .portal-route-ready-badge,
.portal-route-performance-budget[data-route-ready-state="data-loading"] .portal-route-ready-badge {
    box-shadow: inset 0 -2px 0 rgba(15, 103, 95, 0.22);
}

.portal-data-confidence-bar[data-route-ready-state="failed"] .portal-route-ready-badge,
.portal-state-card[data-route-ready-state="failed"] .portal-route-ready-badge {
    box-shadow: inset 0 -2px 0 rgba(159, 46, 46, 0.24);
}

.portal-route-performance-budget {
    border: 1px solid rgba(214, 143, 52, 0.26);
    border-left: 0.32rem solid var(--rz-warning);
    background: rgba(255, 247, 234, 0.86);
}

.portal-route-performance-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
}

.portal-route-performance-icon {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: rgba(214, 143, 52, 0.14);
    color: #94621d;
}

.portal-route-performance-copy {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-route-performance-title {
    font-weight: 800;
}

.portal-route-performance-badges,
.portal-route-performance-actions {
    justify-content: flex-end;
    align-items: flex-start;
}

.portal-route-performance-badges .rz-badge {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-route-performance-evidence {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--portal-space-6);
    margin-top: 0.7rem;
    min-width: 0;
}

.portal-route-performance-evidence-item {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
    padding: 0.58rem 0.65rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.68);
}

.portal-route-performance-evidence-item span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    text-transform: uppercase;
}

.portal-route-performance-evidence-item strong {
    min-width: 0;
    color: var(--portal-ink);
    font-size: var(--portal-font-sm);
    overflow-wrap: anywhere;
}

.portal-route-performance-actions {
    margin-top: 0.66rem;
}

.portal-page :is(.rz-badge-danger, .rz-badge-error, .rz-badge-warning, .rz-badge-success, .rz-badge-info, .rz-badge-base, .rz-badge-light)::before,
.rz-dialog :is(.rz-badge-danger, .rz-badge-error, .rz-badge-warning, .rz-badge-success, .rz-badge-info, .rz-badge-base, .rz-badge-light)::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 0.74rem;
    height: 0.74rem;
    border-radius: var(--portal-radius-pill);
    font-family: "Material Symbols";
    font-size: var(--portal-font-2xs);
    font-weight: 600;
    line-height: 1;
    font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 20;
    opacity: 0.96;
}

.portal-page :is(.rz-badge-danger, .rz-badge-error)::before,
.rz-dialog :is(.rz-badge-danger, .rz-badge-error)::before {
    content: "error";
}

.portal-page .rz-badge-warning::before,
.rz-dialog .rz-badge-warning::before {
    content: "warning";
}

.portal-page .rz-badge-success::before,
.rz-dialog .rz-badge-success::before {
    content: "check_circle";
}

.portal-page .rz-badge-info::before,
.rz-dialog .rz-badge-info::before {
    content: "info";
}

.portal-page .rz-badge-base::before,
.rz-dialog .rz-badge-base::before {
    content: "label";
}

.portal-page .rz-badge-light::before,
.rz-dialog .rz-badge-light::before {
    content: "radio_button_unchecked";
}

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
}

.portal-workbench-return {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-7);
    align-items: center;
    min-width: 0;
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(42, 107, 94, 0.18);
    border-left: 0.32rem solid var(--portal-teal);
    border-radius: var(--portal-radius-xs);
    background: rgba(240, 250, 246, 0.82);
    box-shadow: 0 10px 22px rgba(28, 45, 41, 0.06);
    transition: all 200ms ease;
}

.portal-workbench-return:hover {
    border-color: rgba(42, 107, 94, 0.32);
    box-shadow: 0 14px 30px rgba(28, 45, 41, 0.1);
    transform: translateY(-1px);
}

.portal-workbench-return.is-drifted {
    border-left-color: #c16031;
    background: rgba(255, 248, 242, 0.9);
}

.portal-workbench-return.is-drifted:hover {
    border-color: rgba(193, 96, 49, 0.32);
    box-shadow: 0 14px 30px rgba(193, 96, 49, 0.12);
}

.portal-workbench-return-copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-6);
    align-items: center;
    min-width: 0;
}

.portal-workbench-return-copy > .rz-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: rgba(42, 107, 94, 0.12);
    color: var(--portal-teal);
}

.portal-workbench-return-title {
    font-weight: 800;
}

.portal-workbench-return-badges {
    justify-content: flex-end;
    align-items: center;
}

.portal-workbench-lane-brief .rz-card-content {
    padding: 0.9rem;
}

.portal-workbench-lane-brief-grid {
    display: grid;
    grid-template-columns: minmax(14rem, 1.05fr) minmax(0, 2fr) auto;
    gap: var(--portal-space-8);
    align-items: center;
    min-width: 0;
}

.portal-workbench-lane-copy {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-workbench-lane-title {
    font-weight: 800;
}

.portal-workbench-lane-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    align-items: center;
    min-width: 0;
}

.portal-workbench-lane-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-4);
    min-height: 2rem;
    min-width: 0;
    padding: 0.2rem 0.36rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 252, 247, 0.8);
    transition: all 150ms ease;
}

.portal-workbench-lane-badge:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(28, 45, 41, 0.18);
    box-shadow: 0 4px 12px rgba(28, 45, 41, 0.08);
}

.portal-workbench-lane-badge > span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.portal-workbench-lane-badge .rz-badge {
    max-width: 17rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.portal-workbench-lane-action {
    justify-content: flex-end;
}

.portal-manual-command-bar {
    position: sticky;
    top: 0.65rem;
    z-index: 35;
    border: 1px solid rgba(28, 45, 41, 0.14);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 36px rgba(28, 45, 41, 0.13);
    transition: box-shadow 200ms ease, border-color 150ms ease;
}

.portal-manual-command-bar:hover {
    border-color: rgba(28, 45, 41, 0.22);
    box-shadow: 0 20px 44px rgba(28, 45, 41, 0.16);
}

.portal-manual-command-bar .rz-card-content {
    padding: 0.56rem 0.68rem;
}

.portal-empty-state {
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, var(--portal-empty-state-start), var(--portal-card-surface-soft-end));
    border-style: dashed;
    border-color: rgba(28, 45, 41, 0.15);
}

.portal-empty-state:hover {
    border-color: rgba(15, 103, 95, 0.25);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 242, 0.95));
}

.portal-suggestions-card {
    background: linear-gradient(135deg, rgba(255, 248, 242, 0.95), rgba(255, 252, 247, 0.9));
    border-left: 0.25rem solid var(--portal-accent);
}

.portal-suggestion-actions {
    gap: var(--portal-space-6);
}

.portal-suggestion-actions .rz-button {
    transition: all 150ms ease;
}

.portal-suggestion-actions .rz-button:hover {
    transform: translateX(2px);
}

.portal-manual-command-frame {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) auto;
    align-items: center;
    row-gap: var(--portal-space-5);
    column-gap: var(--portal-space-7);
    min-width: 0;
}

.portal-manual-command-context {
    display: grid;
    gap: var(--portal-space-2);
    min-width: 0;
}

.portal-manual-command-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.portal-manual-command-statuses {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr));
    gap: var(--portal-space-4);
    align-items: center;
    min-width: 0;
}

.portal-manual-command-status {
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-4);
    min-height: 1.58rem;
    min-width: 0;
    max-width: 100%;
    padding: 0.1rem 0.28rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.76);
    overflow: hidden;
}

.portal-manual-command-status-label {
    color: var(--portal-ink-soft);
    flex: 0 0 auto;
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.portal-manual-command-status .rz-badge {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-manual-command-actions {
    grid-column: 2;
    grid-row: 1;
    max-width: min(52rem, 100%);
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--portal-space-4);
}

.portal-manual-command-actions .rz-button {
    min-height: 1.92rem;
    padding-block: 0.2rem;
}

.portal-manual-action-row {
    align-items: flex-start;
}

.portal-manual-action {
    display: grid;
    gap: var(--portal-space-1);
    align-content: start;
    min-width: 0;
    max-width: max-content;
}

.portal-manual-action .rz-button {
    justify-self: start;
}

.portal-manual-action-reason {
    min-width: 0;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.portal-manual-command-action-note {
    flex: 1 1 100%;
    min-width: 0;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1.16;
    text-align: right;
    overflow-wrap: anywhere;
}

.portal-workbench-shortcuts {
    display: grid;
    gap: var(--portal-space-6);
    padding: 0.68rem 0.78rem;
    border: 1px solid rgba(15, 103, 95, 0.18);
    border-left: 0.26rem solid var(--portal-teal);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(28, 45, 41, 0.08);
}

.portal-workbench-shortcuts-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--portal-space-7);
    min-width: 0;
}

.portal-workbench-shortcuts-title {
    font-weight: 800;
}

.portal-workbench-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: var(--portal-space-5);
}

.portal-workbench-shortcut {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: center;
    padding: 0.42rem 0.48rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.72);
}

.portal-workbench-shortcut kbd {
    min-width: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.34rem;
    border: 1px solid rgba(28, 45, 41, 0.18);
    border-bottom-width: 0.16rem;
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.92);
    color: var(--portal-ink);
    font: inherit;
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.portal-workbench-shortcut div {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-2);
}

.portal-workbench-shortcut strong,
.portal-workbench-shortcut span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.18;
}

.portal-workbench-shortcut strong {
    font-size: var(--portal-font-xs);
    font-weight: 800;
}

.portal-workbench-shortcut span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
}

.portal-workbench-shortcuts-message {
    padding: 0.42rem 0.5rem;
    border: 1px solid rgba(15, 103, 95, 0.16);
    border-radius: var(--portal-radius-xs);
    background: rgba(15, 103, 95, 0.08);
    color: var(--portal-ink);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1.25;
}

.portal-workbench-saved-views {
    display: grid;
    gap: var(--portal-space-6);
    padding: 0.72rem;
    border: 1px solid rgba(28, 45, 41, 0.12);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 24px rgba(28, 45, 41, 0.07);
}

.portal-workbench-saved-views-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--portal-space-7);
    min-width: 0;
}

.portal-workbench-saved-views-title {
    font-weight: 800;
}

.portal-workbench-saved-view-message {
    max-width: 22rem;
    padding: 0.42rem 0.52rem;
    border: 1px solid rgba(15, 103, 95, 0.16);
    border-radius: var(--portal-radius-xs);
    background: rgba(15, 103, 95, 0.08);
    color: var(--portal-ink);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1.24;
}

.portal-workbench-saved-view-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--portal-space-5);
}

.portal-workbench-saved-view {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-6);
    align-items: start;
    padding: 0.5rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.72);
}

.portal-workbench-saved-view.is-active {
    border-color: rgba(15, 103, 95, 0.32);
    background: rgba(15, 103, 95, 0.08);
}

.portal-workbench-saved-view-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: rgba(15, 103, 95, 0.12);
    color: var(--portal-teal);
}

.portal-workbench-saved-view-copy {
    min-width: 0;
    display: grid;
    gap: var(--portal-space-2);
}

.portal-workbench-saved-view-copy strong,
.portal-workbench-saved-view-copy span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.portal-workbench-saved-view-copy strong {
    font-size: var(--portal-font-sm);
    font-weight: 800;
}

.portal-workbench-saved-view-copy span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
}

.portal-workbench-saved-view-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
}

.portal-scenario-freshness {
    display: grid;
    gap: var(--portal-space-4);
    min-width: 0;
    margin-top: 0.46rem;
    padding: 0.48rem 0.56rem;
    border: 1px solid rgba(28, 45, 41, 0.12);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.72);
}

.portal-scenario-freshness.is-current {
    border-left: 0.32rem solid var(--rz-success);
    background: rgba(240, 250, 246, 0.8);
}

.portal-scenario-freshness.is-stale {
    border-left: 0.32rem solid var(--rz-danger);
    background: rgba(255, 241, 239, 0.84);
}

.portal-scenario-freshness.is-warning,
.portal-scenario-freshness.is-readonly {
    border-left: 0.32rem solid var(--rz-warning);
    background: rgba(255, 247, 234, 0.82);
}

.portal-scenario-freshness-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: center;
    min-width: 0;
}

.portal-scenario-freshness-icon {
    width: 1.72rem;
    height: 1.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: rgba(42, 107, 94, 0.12);
    color: var(--portal-teal);
}

.portal-scenario-freshness-icon .rz-icon {
    font-size: var(--portal-font-xl);
}

.portal-scenario-freshness.is-stale .portal-scenario-freshness-icon {
    background: rgba(179, 38, 30, 0.12);
    color: #9f261d;
}

.portal-scenario-freshness.is-warning .portal-scenario-freshness-icon,
.portal-scenario-freshness.is-readonly .portal-scenario-freshness-icon {
    background: rgba(214, 143, 52, 0.14);
    color: #94621d;
}

.portal-scenario-freshness-copy {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-scenario-freshness-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: center;
    min-width: 0;
}

.portal-scenario-freshness-title {
    font-weight: 800;
}

.portal-scenario-freshness-controls {
    display: grid;
    gap: var(--portal-space-3);
    justify-items: end;
    min-width: 0;
}

.portal-scenario-freshness-badges,
.portal-scenario-freshness-actions {
    justify-content: flex-end;
    align-items: center;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-scenario-freshness-badges .rz-badge {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-scenario-freshness-actions .rz-button {
    min-height: 1.72rem;
    padding-block: 0.14rem;
    padding-inline: 0.48rem;
}

.portal-scenario-freshness-meta {
    display: flex;
    flex-wrap: wrap;
    row-gap: var(--portal-space-3);
    column-gap: var(--portal-space-7);
    min-width: 0;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1.18;
}

.portal-scenario-freshness-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-scenario-freshness-evidence {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-scenario-freshness-evidence-item {
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-3);
    min-width: 0;
    max-width: min(22rem, 100%);
    padding: 0.12rem 0.32rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-pill);
    background: rgba(255, 255, 255, 0.54);
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1.1;
}

.portal-scenario-freshness-evidence-item .rz-icon {
    font-size: var(--portal-font-2xs);
    flex: 0 0 auto;
}

.portal-scenario-freshness-evidence-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-manual-risk {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
    padding: 0.78rem;
    border: 1px solid rgba(28, 45, 41, 0.13);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.82);
}

.portal-manual-risk.is-safe {
    border-left: 0.32rem solid var(--rz-success);
    background: rgba(240, 250, 246, 0.78);
}

.portal-manual-risk.is-warning {
    border-left: 0.32rem solid var(--rz-warning);
    background: rgba(255, 247, 234, 0.78);
}

.portal-manual-risk.is-blocked {
    border-left: 0.32rem solid var(--rz-danger);
    background: rgba(255, 241, 239, 0.78);
}

.portal-manual-risk.is-preflight {
    border-left: 0.32rem solid rgba(28, 45, 41, 0.28);
    background: rgba(246, 243, 236, 0.72);
}

.portal-manual-risk-icon {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: rgba(42, 107, 94, 0.12);
    color: var(--portal-teal);
}

.portal-manual-risk.is-warning .portal-manual-risk-icon {
    background: rgba(214, 143, 52, 0.14);
    color: #94621d;
}

.portal-manual-risk.is-blocked .portal-manual-risk-icon {
    background: rgba(179, 38, 30, 0.12);
    color: #9f261d;
}

.portal-manual-risk-main {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-manual-risk-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: start;
    min-width: 0;
}

.portal-manual-risk-title {
    font-weight: 800;
}

.portal-manual-risk-badges {
    justify-content: flex-end;
    gap: var(--portal-space-4);
}

.portal-manual-risk-drilldown {
    display: grid;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-manual-risk-signal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
    padding: 0.42rem 0.5rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.64);
}

.portal-manual-risk-signal span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-draft-sync {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    padding: 0.78rem;
    border: 1px solid rgba(28, 45, 41, 0.13);
    border-left: 0.32rem solid var(--portal-teal);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.68);
}

.portal-draft-sync.is-synced {
    border-left-color: var(--rz-success);
    background: rgba(240, 250, 246, 0.78);
}

.portal-draft-sync.is-dirty,
.portal-draft-sync.is-pending,
.portal-draft-sync.is-readonly,
.portal-draft-sync.is-stale {
    border-left-color: var(--rz-warning);
    background: rgba(255, 247, 234, 0.78);
}

.portal-draft-sync-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
}

.portal-draft-sync-title {
    font-weight: 800;
}

.portal-draft-sync-badges,
.portal-draft-sync-actions {
    justify-content: flex-end;
    gap: var(--portal-space-4);
}

.portal-draft-sync-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-draft-sync-signal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
    padding: 0.48rem 0.55rem;
    border: 1px solid rgba(28, 45, 41, 0.09);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.72);
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
    line-height: 1.32;
}

.portal-draft-sync-signal span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-manual-recovery-rail {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    padding: 0.78rem;
    border: 1px solid rgba(28, 45, 41, 0.13);
    border-left: 0.32rem solid var(--portal-teal);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.68);
}

.portal-manual-recovery-header,
.portal-manual-recovery-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
}

.portal-manual-recovery-title {
    font-weight: 800;
}

.portal-manual-recovery-badges,
.portal-manual-recovery-command-row,
.portal-manual-recovery-item-badges {
    justify-content: flex-end;
    gap: var(--portal-space-4);
}

.portal-manual-recovery-checkpoint {
    min-width: min(24rem, 100%);
}

.portal-manual-recovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-manual-recovery-panel {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
    align-content: start;
}

.portal-manual-recovery-panel-header,
.portal-manual-recovery-item-header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.portal-manual-recovery-list {
    display: grid;
    gap: var(--portal-space-5);
    max-height: 14rem;
    overflow: auto;
    padding-right: 0.1rem;
}

.portal-manual-recovery-item {
    display: grid;
    gap: var(--portal-space-4);
    min-width: 0;
    padding: 0.56rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.78);
}

.portal-manual-recovery-item strong,
.portal-manual-recovery-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-manual-draft-cta {
    border: 1px solid rgba(42, 107, 94, 0.24);
    background: linear-gradient(180deg, rgba(240, 250, 246, 0.96), rgba(255, 255, 255, 0.9));
    box-shadow: 0 14px 30px rgba(28, 45, 41, 0.09);
}

.portal-manual-draft-cta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
    gap: var(--portal-space-8);
    align-items: center;
    min-width: 0;
}

.portal-manual-draft-cta-copy,
.portal-manual-draft-cta-form {
    display: grid;
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-manual-draft-cta-title {
    font-weight: 800;
}

.portal-scenario-stepper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-scenario-step {
    display: grid;
    gap: var(--portal-space-6);
    min-width: 0;
    align-content: start;
    padding: 0.68rem;
    border: 1px solid rgba(28, 45, 41, 0.11);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.78);
}

.portal-scenario-step.is-complete {
    border-left: 0.28rem solid var(--rz-success);
}

.portal-scenario-step.is-current {
    border-color: rgba(214, 143, 52, 0.38);
    background: rgba(255, 247, 234, 0.8);
}

.portal-scenario-step.is-next {
    border-color: rgba(42, 107, 94, 0.48);
    background: rgba(240, 250, 246, 0.94);
    box-shadow: 0 12px 26px rgba(42, 107, 94, 0.12);
}

.portal-scenario-step-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
}

.portal-scenario-step-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: var(--portal-teal-soft);
    color: var(--portal-teal);
}

.portal-scenario-step-detail {
    min-width: 0;
    color: var(--portal-ink-soft);
    overflow-wrap: anywhere;
}

.portal-scenario-step .rz-button {
    justify-self: start;
}

.portal-scenario-step.is-next .rz-button {
    justify-self: stretch;
}

.portal-scenario-utilities {
    justify-content: flex-end;
    padding-top: 0.1rem;
}

.portal-publish-readiness {
    border: 1px solid rgba(28, 45, 41, 0.13);
    background: rgba(255, 255, 255, 0.9);
}

.portal-publish-readiness.is-ready {
    border-left: 0.32rem solid var(--rz-success);
}

.portal-publish-readiness.is-warning {
    border-left: 0.32rem solid var(--rz-warning);
}

.portal-publish-readiness.is-blocked {
    border-left: 0.32rem solid var(--rz-danger);
}

.portal-publish-readiness.is-compact .rz-card-content {
    padding: 0.78rem 0.85rem;
}

.portal-publish-readiness-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-8);
    align-items: start;
    min-width: 0;
}

.portal-publish-readiness-title {
    font-weight: 800;
}

.portal-publish-readiness-actions {
    justify-content: flex-end;
    align-items: flex-start;
}

.portal-publish-readiness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-publish-readiness-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-6);
    align-items: start;
    min-width: 0;
    padding: 0.68rem;
    border: 1px solid rgba(28, 45, 41, 0.11);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.58);
}

.portal-publish-readiness-item.is-clear {
    border-color: rgba(35, 134, 88, 0.22);
    background: rgba(240, 250, 246, 0.78);
}

.portal-publish-readiness-item.is-warning {
    border-color: rgba(214, 143, 52, 0.28);
    background: rgba(255, 247, 234, 0.78);
}

.portal-publish-readiness-item.is-blocked {
    border-color: rgba(179, 38, 30, 0.28);
    background: rgba(255, 241, 239, 0.78);
}

.portal-publish-readiness-item-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--portal-radius-xs);
    background: rgba(42, 107, 94, 0.12);
    color: var(--portal-teal);
}

.portal-publish-readiness-item.is-warning .portal-publish-readiness-item-icon {
    background: rgba(214, 143, 52, 0.14);
    color: #94621d;
}

.portal-publish-readiness-item.is-blocked .portal-publish-readiness-item-icon {
    background: rgba(179, 38, 30, 0.12);
    color: #9f261d;
}

.portal-publish-readiness-item-copy {
    display: grid;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-publish-readiness-item-title {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    align-items: center;
    min-width: 0;
}

.portal-publish-readiness-item-title strong {
    overflow-wrap: anywhere;
}

.portal-publish-readiness-evidence {
    gap: var(--portal-space-4);
}

.portal-communication-preview {
    border: 1px solid rgba(42, 107, 94, 0.18);
    border-left: 0.32rem solid var(--portal-teal);
    background: linear-gradient(180deg, rgba(242, 248, 246, 0.9), rgba(255, 255, 255, 0.96));
}

.portal-communication-audience-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--portal-space-7);
    min-width: 0;
}

.portal-communication-audience-panel,
.portal-communication-session-list,
.portal-communication-message-panel {
    display: grid;
    gap: var(--portal-space-6);
    min-width: 0;
    padding: 0.72rem;
    border: 1px solid rgba(28, 45, 41, 0.11);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.84);
}

.portal-communication-audience-heading,
.portal-communication-audience-row,
.portal-communication-session-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-6);
    align-items: start;
    min-width: 0;
}

.portal-communication-audience-heading .rzi {
    color: var(--portal-teal);
}

.portal-communication-audience-row span {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-communication-audience-row em {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
    font-style: normal;
    overflow-wrap: anywhere;
}

.portal-communication-session-row {
    grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.2fr) auto;
    padding: 0.62rem;
    border: 1px solid rgba(28, 45, 41, 0.09);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.5);
}

.portal-communication-session-before-after {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-communication-session-before-after span {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
    padding: 0.48rem;
    border: 1px solid rgba(28, 45, 41, 0.08);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.82);
    overflow-wrap: anywhere;
}

.portal-communication-signals {
    gap: var(--portal-space-4);
}

.portal-communication-message {
    width: 100%;
    min-height: 13rem;
    resize: vertical;
    border: 1px solid rgba(28, 45, 41, 0.15);
    border-radius: var(--portal-radius-xs);
    padding: 0.75rem;
    color: var(--portal-ink);
    background: rgba(255, 255, 255, 0.92);
    font: 0.92rem/1.45 Consolas, "Segoe UI", sans-serif;
    overflow-wrap: anywhere;
}

.portal-session-inspector-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 1.05fr);
    gap: var(--portal-space-8);
    min-width: 0;
    padding: 0.82rem;
    border: 1px solid rgba(28, 45, 41, 0.11);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.64);
}

.portal-session-inspector-panel.is-empty {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.portal-session-inspector-panel.is-empty .rzi {
    color: var(--portal-accent);
    font-size: var(--portal-font-3xl);
}

.portal-session-inspector-main,
.portal-session-inspector-related,
.portal-session-related-copy {
    display: grid;
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-session-inspector-title {
    font-weight: 800;
}

.portal-session-inspector-metrics {
    display: grid;
    gap: var(--portal-space-5);
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
}

.portal-session-inspector-metric {
    display: grid;
    gap: var(--portal-space-2);
    min-width: 0;
    padding: 0.48rem 0.56rem;
    border: 1px solid rgba(28, 45, 41, 0.09);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.76);
}

.portal-session-inspector-metric span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    text-transform: uppercase;
}

.portal-session-inspector-metric strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-session-related-list {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-session-related-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: center;
    min-width: 0;
    padding: 0.58rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.82);
}

.portal-session-related-row.is-selected {
    border-color: rgba(42, 107, 94, 0.54);
    background: rgba(231, 244, 240, 0.86);
}

.portal-session-related-row.is-target {
    border-color: rgba(162, 111, 53, 0.58);
    background: rgba(255, 247, 229, 0.86);
}

.portal-session-related-copy strong,
.portal-session-related-copy span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-session-related-copy span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xs);
}

.portal-session-related-actions {
    justify-content: flex-end;
}

.portal-selected-basket {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    max-height: 28rem;
    overflow: auto;
    padding: 0.78rem;
    position: sticky;
    top: 4.7rem;
    z-index: 4;
    border: 1px solid rgba(42, 107, 94, 0.18);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 32px rgba(28, 45, 41, 0.1);
}

.portal-selected-basket.has-bulk-review {
    max-height: none;
    overflow: visible;
    position: static;
}

.portal-selected-basket-header,
.portal-selected-basket-row,
.portal-selected-basket-target {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
}

.portal-selected-basket-title {
    font-weight: 800;
}

.portal-selected-basket-actions,
.portal-selected-basket-row-actions {
    justify-content: flex-end;
}

.portal-selected-basket-warnings,
.portal-selected-basket-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-selected-basket-list {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-selected-basket-row,
.portal-selected-basket-target {
    padding: 0.62rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.52);
}

.portal-selected-basket-row.is-anchor {
    border-color: rgba(42, 107, 94, 0.58);
    background: rgba(231, 244, 240, 0.78);
}

.portal-selected-basket-row.is-blocked {
    border-left: 0.28rem solid var(--rz-danger);
}

.portal-selected-basket-row.is-protected {
    border-left: 0.28rem solid var(--rz-warning);
}

.portal-selected-basket-target {
    border-color: rgba(162, 111, 53, 0.5);
    background: rgba(255, 247, 229, 0.82);
}

.portal-selected-basket-row-main {
    display: grid;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-selected-basket-row-title {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    align-items: center;
    min-width: 0;
}

.portal-selected-basket-row-title strong,
.portal-selected-basket-row-main > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-selected-basket-row-main > span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
}

.portal-bulk-review {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    padding: 0.82rem;
    border: 1px solid rgba(28, 45, 41, 0.12);
    border-left: 0.32rem solid var(--portal-amber);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(28, 45, 41, 0.08);
}

.portal-bulk-review.is-reviewed {
    border-left-color: var(--portal-teal);
    background: rgba(248, 252, 250, 0.94);
}

.portal-bulk-review-header,
.portal-bulk-review-item,
.portal-bulk-review-outlier,
.portal-bulk-review-signal,
.portal-bulk-review-label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: start;
    min-width: 0;
}

.portal-bulk-review-title {
    font-weight: 800;
}

.portal-bulk-review-actions {
    justify-content: flex-end;
}

.portal-bulk-review-label {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 0.62rem 0.68rem;
    border: 1px solid rgba(42, 107, 94, 0.18);
    border-radius: var(--portal-radius-xs);
    background: rgba(231, 244, 240, 0.68);
}

.portal-bulk-review-label .rz-icon {
    color: var(--portal-teal);
    font-size: var(--portal-font-2xl);
}

.portal-bulk-review-label div {
    display: grid;
    gap: var(--portal-space-2);
    min-width: 0;
}

.portal-bulk-review-label span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    text-transform: uppercase;
}

.portal-bulk-review-label strong {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.28;
}

.portal-bulk-review-grid,
.portal-bulk-review-evidence {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-bulk-review-group,
.portal-bulk-review-panel {
    display: grid;
    gap: var(--portal-space-6);
    min-width: 0;
    padding: 0.62rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.55);
}

.portal-bulk-review-group-header,
.portal-bulk-review-panel-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: center;
    min-width: 0;
}

.portal-bulk-review-panel-header {
    grid-template-columns: minmax(0, 1fr) auto;
}

.portal-bulk-review-group-header .rz-icon {
    color: var(--portal-blue);
    font-size: var(--portal-font-2xl);
}

.portal-bulk-review-group-header div,
.portal-bulk-review-item div,
.portal-bulk-review-outlier div {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-bulk-review-group-header strong,
.portal-bulk-review-group-header span,
.portal-bulk-review-item strong,
.portal-bulk-review-item span,
.portal-bulk-review-outlier strong,
.portal-bulk-review-outlier span,
.portal-bulk-review-signal span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-bulk-review-group-header span,
.portal-bulk-review-item span,
.portal-bulk-review-outlier span,
.portal-bulk-review-signal span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xs);
    line-height: 1.32;
}

.portal-bulk-review-items,
.portal-bulk-review-list {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-bulk-review-item,
.portal-bulk-review-outlier,
.portal-bulk-review-signal {
    padding: 0.52rem 0.56rem;
    border: 1px solid rgba(28, 45, 41, 0.09);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.84);
}

.portal-bulk-review-outlier {
    grid-template-columns: auto minmax(0, 1fr);
}

.portal-target-candidates {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    padding: 0.78rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.58);
}

.portal-target-candidates-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
}

.portal-target-candidates-title {
    font-weight: 800;
}

.portal-target-candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-target-candidate-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: start;
    min-width: 0;
    padding: 0.68rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 8px 18px rgba(28, 45, 41, 0.05);
}

.portal-target-candidate-card.is-selected {
    border-color: rgba(162, 111, 53, 0.58);
    background: rgba(255, 247, 229, 0.88);
}

.portal-target-candidate-card.is-blocked {
    border-left: 0.28rem solid var(--rz-danger);
}

.portal-target-candidate-card.is-protected {
    border-left: 0.28rem solid var(--rz-warning);
}

.portal-target-candidate-main {
    display: grid;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-target-candidate-title {
    display: flex;
    gap: var(--portal-space-5);
    align-items: center;
    min-width: 0;
}

.portal-target-candidate-title > span {
    color: var(--portal-accent);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
}

.portal-target-candidate-title strong,
.portal-target-candidate-main > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-target-candidate-main > span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
}

.portal-target-candidate-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-target-candidate-actions {
    justify-content: flex-end;
}

.portal-structural-composer {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    padding: 0.78rem;
    border: 1px solid rgba(28, 45, 41, 0.11);
    border-left: 0.32rem solid var(--portal-accent);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 24px rgba(28, 45, 41, 0.06);
}

.portal-structural-composer.is-ready {
    border-left-color: var(--rz-success);
    background: rgba(239, 249, 244, 0.82);
}

.portal-structural-composer.is-blocked {
    border-left-color: var(--rz-danger);
    background: rgba(255, 241, 239, 0.82);
}

.portal-structural-composer.is-warning,
.portal-structural-composer.is-setup {
    border-left-color: var(--rz-warning);
    background: rgba(255, 247, 229, 0.82);
}

.portal-structural-composer-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
}

.portal-structural-composer-title {
    font-weight: 800;
}

.portal-structural-composer-badges,
.portal-structural-composer-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.portal-structural-composer-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-structural-composer-row {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
    padding: 0.68rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 18px rgba(28, 45, 41, 0.05);
}

.portal-structural-composer-row.is-missing {
    border-style: dashed;
    background: rgba(255, 247, 229, 0.78);
}

.portal-structural-composer-row.is-outcome {
    border-color: rgba(42, 107, 94, 0.28);
    background: rgba(231, 244, 240, 0.72);
}

.portal-structural-composer-row.is-target {
    border-left: 0.24rem solid var(--rz-warning);
}

.portal-structural-composer-row-header > div {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-structural-composer-row-header span {
    color: var(--portal-accent);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.portal-structural-composer-row-header strong,
.portal-structural-composer-row-header em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-structural-composer-row-header em {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xs);
    font-style: normal;
}

.portal-structural-composer-signals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-structural-composer-signal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
    padding: 0.48rem 0.55rem;
    border: 1px solid rgba(28, 45, 41, 0.08);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.62);
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
    line-height: 1.32;
}

.portal-structural-composer-signal span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-resource-heatmap {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    padding: 0.78rem;
    border: 1px solid rgba(28, 45, 41, 0.11);
    border-left: 0.32rem solid var(--portal-teal);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.64);
}

.portal-resource-heatmap-header,
.portal-resource-heatmap-slot-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: start;
    min-width: 0;
}

.portal-resource-heatmap-title {
    font-weight: 800;
}

.portal-resource-heatmap-context,
.portal-resource-heatmap-actions {
    justify-content: flex-end;
}

.portal-resource-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
    max-height: 24rem;
    overflow: auto;
    padding-right: 0.12rem;
}

.portal-resource-heatmap-slot {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
    padding: 0.62rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 8px 18px rgba(28, 45, 41, 0.05);
}

.portal-resource-heatmap-slot.is-clean {
    border-left: 0.28rem solid var(--rz-success);
}

.portal-resource-heatmap-slot.is-pressure {
    border-left: 0.28rem solid var(--rz-warning);
    background: rgba(255, 247, 234, 0.82);
}

.portal-resource-heatmap-slot.is-busy {
    border-left: 0.28rem solid var(--rz-danger);
    background: rgba(255, 241, 239, 0.82);
}

.portal-resource-heatmap-slot.is-selected {
    border-color: rgba(42, 107, 94, 0.62);
    box-shadow: 0 10px 22px rgba(42, 107, 94, 0.13);
}

.portal-resource-heatmap-slot.is-source:not(.is-selected) {
    border-color: rgba(162, 111, 53, 0.42);
}

.portal-resource-heatmap-slot-header > div {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-resource-heatmap-slot-header strong,
.portal-resource-heatmap-slot-header span,
.portal-resource-heatmap-summary {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-resource-heatmap-slot-header span,
.portal-resource-heatmap-summary {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xs);
    line-height: 1.32;
}

.portal-resource-heatmap-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-conflict-map {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    padding: 0.78rem;
    border: 1px solid rgba(28, 45, 41, 0.11);
    border-left: 0.32rem solid var(--portal-blue);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(28, 45, 41, 0.07);
}

.portal-conflict-map-header,
.portal-conflict-map-fix,
.portal-conflict-map-group-header,
.portal-conflict-map-node,
.portal-conflict-map-signal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: start;
    min-width: 0;
}

.portal-conflict-map-title {
    font-weight: 800;
}

.portal-conflict-map-badges,
.portal-conflict-map-actions {
    justify-content: flex-end;
}

.portal-conflict-map-fix {
    padding: 0.68rem;
    border: 1px solid rgba(42, 107, 94, 0.18);
    border-radius: var(--portal-radius-xs);
    background: rgba(231, 244, 240, 0.68);
}

.portal-conflict-map-signals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-conflict-map-signal {
    padding: 0.52rem 0.58rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.6);
}

.portal-conflict-map-signal span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
    line-height: 1.32;
}

.portal-conflict-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-conflict-map-group {
    display: grid;
    gap: var(--portal-space-6);
    min-width: 0;
    padding: 0.62rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.58);
}

.portal-conflict-map-group-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.portal-conflict-map-group-header .rz-icon {
    color: var(--portal-teal);
    font-size: var(--portal-font-2xl);
}

.portal-conflict-map-node-list {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-conflict-map-node {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    padding: 0.52rem;
    border: 1px solid rgba(28, 45, 41, 0.09);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.86);
}

.portal-conflict-map-node.is-primary {
    border-color: rgba(42, 107, 94, 0.48);
    background: rgba(231, 244, 240, 0.82);
}

.portal-conflict-map-node .rz-icon {
    margin-top: 0.1rem;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xl);
}

.portal-conflict-map-node > div {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-conflict-map-node strong,
.portal-conflict-map-node a,
.portal-conflict-map-node span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-conflict-map-node span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xs);
    line-height: 1.32;
}

.portal-preview-diff-panel {
    border: 1px solid rgba(42, 107, 94, 0.16);
    box-shadow: 0 14px 30px rgba(28, 45, 41, 0.08);
}

.portal-preview-diff-panel.is-sticky {
    position: sticky;
    top: 5.2rem;
    z-index: 6;
}

.portal-preview-diff-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
}

.portal-preview-diff-title {
    font-weight: 800;
}

.portal-preview-diff-actions {
    justify-content: flex-end;
}

.portal-preview-diff-grid {
    display: grid;
    gap: var(--portal-space-6);
    max-height: 24rem;
    overflow: auto;
    padding-right: 0.12rem;
}

.portal-preview-diff-row {
    display: grid;
    gap: var(--portal-space-6);
    min-width: 0;
    padding: 0.68rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.86);
}

.portal-preview-diff-row.is-added {
    border-left: 0.28rem solid var(--rz-success);
}

.portal-preview-diff-row.is-removed {
    border-left: 0.28rem solid var(--rz-warning);
}

.portal-preview-diff-row.is-changed {
    border-left: 0.28rem solid var(--rz-info);
}

.portal-preview-diff-row-header,
.portal-preview-diff-before-after {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--portal-space-6);
    align-items: start;
    min-width: 0;
}

.portal-preview-diff-row-title {
    font-weight: 700;
}

.portal-preview-diff-cell {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
    padding: 0.58rem;
    border: 1px solid rgba(28, 45, 41, 0.08);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.62);
}

.portal-preview-diff-cell span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    text-transform: uppercase;
}

.portal-preview-diff-cell strong,
.portal-preview-diff-cell em {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-preview-diff-cell em {
    color: var(--portal-ink-soft);
    font-style: normal;
    font-size: var(--portal-font-sm);
}

.portal-preview-diff-evidence {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-preview-diff-evidence-card {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
    padding: 0.68rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.76);
}

.portal-preview-diff-signal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
}

.portal-preview-diff-signal span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-preview-diff-constraints {
    display: grid;
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-constraint-evidence {
    --portal-status-accent: rgba(42, 107, 94, 0.32);
    --portal-status-symbol: "rule";
    display: grid;
    gap: var(--portal-space-4);
    position: relative;
    min-width: 0;
    padding: 0.52rem 2rem 0.52rem 0.62rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-left: 0.28rem solid var(--portal-status-accent);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.72);
}

.portal-constraint-evidence::before {
    content: var(--portal-status-symbol);
    position: absolute;
    inset-block-start: 0.52rem;
    inset-inline-end: 0.52rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: var(--portal-radius-pill);
    background: rgba(255, 255, 255, 0.72);
    color: var(--portal-status-accent);
    font-family: "Material Symbols";
    font-size: var(--portal-font-md);
    font-variation-settings: "FILL" 1, "wght" 650, "GRAD" 0, "opsz" 20;
    line-height: 1;
}

.portal-constraint-evidence:has(.rz-badge-danger),
.portal-constraint-evidence:has(.rz-badge-error) {
    --portal-status-accent: #b91c1c;
    --portal-status-symbol: "error";
}

.portal-constraint-evidence:has(.rz-badge-warning) {
    --portal-status-accent: #b45309;
    --portal-status-symbol: "warning";
}

.portal-constraint-evidence:has(.rz-badge-success) {
    --portal-status-accent: #2f7d62;
    --portal-status-symbol: "check_circle";
}

.portal-constraint-evidence-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
}

.portal-constraint-evidence-main > span:last-child {
    min-width: 0;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xs);
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.portal-constraint-evidence-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-timetable-card .portal-constraint-evidence {
    background: rgba(246, 243, 236, 0.58);
    box-shadow: none;
}

.portal-row-provenance {
    --portal-provenance-accent: #2a6b5e;
    display: grid;
    gap: var(--portal-space-4);
    min-width: 0;
    padding: 0.5rem 0.58rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-left: 0.28rem solid var(--portal-provenance-accent);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.74);
}

.portal-row-provenance.is-draft-override,
.portal-row-provenance.is-manual-repair {
    --portal-provenance-accent: #c16031;
    border-color: rgba(193, 96, 49, 0.25);
    background: rgba(255, 247, 237, 0.76);
}

.portal-row-provenance.is-command-repair,
.portal-row-provenance.is-solver-generated {
    --portal-provenance-accent: #1d6a8a;
    border-color: rgba(29, 106, 138, 0.24);
    background: rgba(236, 248, 252, 0.76);
}

.portal-row-provenance.is-dataverse-fallback {
    --portal-provenance-accent: #b45309;
    border-color: rgba(180, 83, 9, 0.3);
    background: rgba(255, 251, 235, 0.82);
}

.portal-row-provenance.is-published,
.portal-row-provenance.is-sidecar-current {
    --portal-provenance-accent: #2f7d62;
    border-color: rgba(47, 125, 98, 0.22);
    background: rgba(231, 244, 240, 0.72);
}

.portal-row-provenance-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
}

.portal-row-provenance-main .rz-icon {
    color: var(--portal-provenance-accent);
    font-size: var(--portal-font-xl);
    line-height: 1.2;
}

.portal-row-provenance-main > span:last-child {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
}

.portal-row-provenance-main > span:last-child > span:last-child {
    min-width: 0;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xs);
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.portal-row-provenance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-timetable-card .portal-row-provenance {
    background: rgba(255, 255, 255, 0.62);
    box-shadow: none;
}

.portal-draft-compare-overlay {
    --portal-draft-accent: rgba(28, 45, 41, 0.2);
    --portal-draft-symbol: "sync_alt";
    display: grid;
    gap: var(--portal-space-4);
    position: relative;
    min-width: 0;
    padding: 0.52rem 2rem 0.52rem 0.62rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-left: 0.28rem solid var(--portal-draft-accent);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.74);
}

.portal-draft-compare-overlay::before {
    content: var(--portal-draft-symbol);
    position: absolute;
    inset-block-start: 0.52rem;
    inset-inline-end: 0.52rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: var(--portal-radius-pill);
    background: rgba(255, 255, 255, 0.72);
    color: var(--portal-draft-accent);
    font-family: "Material Symbols";
    font-size: var(--portal-font-md);
    font-variation-settings: "FILL" 1, "wght" 650, "GRAD" 0, "opsz" 20;
    line-height: 1;
}

.portal-draft-compare-overlay.is-moved,
.portal-draft-compare-overlay.is-new {
    --portal-draft-accent: #2a6b5e;
    border-color: rgba(42, 107, 94, 0.28);
    background: rgba(231, 244, 240, 0.72);
}

.portal-draft-compare-overlay.is-moved {
    --portal-draft-symbol: "open_with";
}

.portal-draft-compare-overlay.is-new {
    --portal-draft-symbol: "add_circle";
}

.portal-draft-compare-overlay.is-room-changed,
.portal-draft-compare-overlay.is-lecturer-changed,
.portal-draft-compare-overlay.is-delivery-changed,
.portal-draft-compare-overlay.is-split,
.portal-draft-compare-overlay.is-merged {
    --portal-draft-accent: #c16031;
    border-color: rgba(193, 96, 49, 0.3);
    background: rgba(255, 247, 237, 0.76);
}

.portal-draft-compare-overlay.is-room-changed {
    --portal-draft-symbol: "meeting_room";
}

.portal-draft-compare-overlay.is-lecturer-changed {
    --portal-draft-symbol: "person";
}

.portal-draft-compare-overlay.is-delivery-changed {
    --portal-draft-symbol: "wifi";
}

.portal-draft-compare-overlay.is-split {
    --portal-draft-symbol: "call_split";
}

.portal-draft-compare-overlay.is-merged {
    --portal-draft-symbol: "merge_type";
}

.portal-draft-compare-overlay.is-cancelled {
    --portal-draft-accent: #b91c1c;
    --portal-draft-symbol: "block";
    border-color: rgba(185, 28, 28, 0.3);
    background: rgba(254, 242, 242, 0.76);
}

.portal-draft-compare-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
}

.portal-draft-compare-main > span:last-child {
    min-width: 0;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-xs);
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.portal-draft-compare-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-timetable-card .portal-draft-compare-overlay {
    background: rgba(255, 255, 255, 0.62);
    box-shadow: none;
}

.portal-timetable-matrix {
    display: grid;
    gap: var(--portal-space-8);
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    max-height: 42rem;
    overflow: auto;
    padding-right: 0.15rem;
}

.portal-timetable-slot {
    display: grid;
    gap: var(--portal-space-7);
    min-width: 0;
    padding: 0.72rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(246, 243, 236, 0.62);
}

.portal-timetable-slot-header {
    display: flex;
    justify-content: space-between;
    gap: var(--portal-space-7);
    align-items: flex-start;
    min-width: 0;
}

.portal-timetable-slot-cards {
    display: grid;
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-timetable-card {
    display: grid;
    gap: var(--portal-space-5);
    width: 100%;
    min-width: 0;
    padding: 0.68rem;
    border: 1px solid rgba(28, 45, 41, 0.12);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.86);
    color: var(--portal-ink);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(28, 45, 41, 0.06);
}

.portal-timetable-card:hover,
.portal-timetable-card:focus-visible {
    border-color: rgba(42, 107, 94, 0.42);
    box-shadow: 0 12px 24px rgba(42, 107, 94, 0.13);
    outline: 2px solid var(--portal-focus-outline);
    outline-offset: 2px;
}

.portal-timetable-card.is-selected {
    border-color: rgba(42, 107, 94, 0.78);
    background: rgba(231, 244, 240, 0.9);
}

.portal-timetable-card.is-keyboard-focus {
    outline: 2px solid var(--portal-focus-outline);
    outline-offset: 2px;
    box-shadow: var(--portal-focus-halo), 0 12px 24px rgba(42, 107, 94, 0.13);
}

.portal-timetable-card.is-blocked {
    border-left: 0.28rem solid var(--rz-danger);
}

.portal-timetable-card.is-protected {
    border-left: 0.28rem solid var(--rz-warning);
}

.portal-timetable-card.is-draft {
    border-left: 0.28rem solid var(--portal-accent);
}

.portal-timetable-card.is-compare-delta {
    --portal-compare-accent: var(--portal-accent);
    box-shadow: inset 0 -0.22rem 0 var(--portal-compare-accent), 0 8px 18px rgba(28, 45, 41, 0.06);
}

.portal-timetable-card.is-compare-delta:hover,
.portal-timetable-card.is-compare-delta:focus-visible {
    box-shadow: inset 0 -0.22rem 0 var(--portal-compare-accent), 0 12px 24px rgba(42, 107, 94, 0.13);
}

.portal-timetable-card.is-compare-moved,
.portal-timetable-card.is-compare-new {
    --portal-compare-accent: var(--portal-teal);
}

.portal-timetable-card.is-compare-room-changed,
.portal-timetable-card.is-compare-lecturer-changed,
.portal-timetable-card.is-compare-delivery-changed,
.portal-timetable-card.is-compare-split,
.portal-timetable-card.is-compare-merged {
    --portal-compare-accent: var(--portal-accent);
}

.portal-timetable-card.is-compare-cancelled {
    --portal-compare-accent: var(--rz-danger);
}

.portal-timetable-card-head,
.portal-timetable-card-meta,
.portal-timetable-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    align-items: center;
    min-width: 0;
}

.portal-timetable-card-head {
    justify-content: space-between;
}

.portal-timetable-card-head > span:first-child,
.portal-timetable-card-meta > span,
.portal-timetable-card-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-timetable-card-head > span:first-child {
    display: inline-flex;
    gap: var(--portal-space-5);
    max-width: 100%;
}

.portal-timetable-card-title {
    display: block;
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
    font-weight: 600;
}

.portal-timetable-card-students,
.portal-timetable-card-meta {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
}

.portal-page-action-bar {
    display: grid;
    gap: var(--portal-space-4);
    justify-items: end;
    min-width: min(100%, 32rem);
}

.portal-page-action-bar.is-compact {
    gap: var(--portal-space-3);
}

.portal-page-action-bar.has-top-margin {
    margin-top: 0.5rem;
}

.portal-page-action-bar-copy {
    display: grid;
    gap: var(--portal-space-2);
    justify-items: end;
    text-align: right;
    width: 100%;
}

.portal-page-action-buttons {
    justify-content: flex-end;
    width: 100%;
}

.portal-page-action-buttons.is-start {
    justify-content: flex-start;
}

.portal-page-action-buttons.is-center {
    justify-content: center;
}

.portal-page-action-buttons.is-between {
    justify-content: space-between;
}

.portal-page-action-buttons.is-end {
    justify-content: flex-end;
}

.portal-page .rz-button,
.portal-layout .rz-button {
    border-radius: var(--portal-radius-pill);
    font-weight: 600;
    min-height: 2.35rem;
}

.portal-page .rz-button.rz-primary,
.portal-layout .rz-button.rz-primary {
    border: 0;
    background: var(--portal-primary-surface);
    box-shadow: 0 12px 28px rgba(28, 45, 41, 0.12);
    color: var(--portal-primary-text);
}

.portal-page .rz-button.rz-primary .rz-button-text,
.portal-layout .rz-button.rz-primary .rz-button-text {
    color: inherit;
}

.portal-page .rz-button.rz-primary:focus-visible,
.portal-layout .rz-button.rz-primary:focus-visible {
    outline: 2px solid var(--portal-focus-primary-outline);
    outline-offset: 2px;
    box-shadow: var(--portal-focus-primary-halo), 0 12px 28px rgba(28, 45, 41, 0.12);
}

.portal-page .rz-button.rz-variant-outlined,
.portal-layout .rz-button.rz-variant-outlined {
    background: rgba(255, 255, 255, 0.58);
    border-color: rgba(28, 45, 41, 0.16);
}

.portal-filter-panel {
    overflow: hidden;
}

.portal-filter-heading {
    display: grid;
    gap: var(--portal-space-4);
    max-width: 70ch;
}

.portal-filter-toolbar {
    min-width: min(100%, 32rem);
}

.portal-filter-chips {
    align-items: center;
}

.portal-filter-body {
    display: grid;
    gap: var(--portal-space-8);
    padding-top: 0.85rem;
    border-top: 1px solid var(--portal-line);
}

.portal-summary-card {
    position: relative;
    overflow: hidden;
    padding: 0.92rem 1rem;
}

.portal-grid-shell .rz-datatable,
.portal-grid-shell .rz-data-grid {
    border-radius: var(--portal-radius-sm);
    overflow: hidden;
}

.portal-grid-shell .rz-datatable-tablewrapper table,
.portal-grid-shell .rz-data-grid-data table {
    font-size: var(--portal-font-md);
}

.portal-grid-shell .rz-cell-data,
.portal-grid-shell .rz-column-title {
    line-height: 1.2;
}

.portal-grid-shell .rz-grid-table td,
.portal-grid-shell .rz-grid-table th {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.portal-grid-shell .rz-frozen-cell {
    background: var(--rz-grid-cell-background-color, #fff);
    background-clip: padding-box;
}

.portal-grid-shell thead .rz-frozen-cell {
    background: var(--rz-grid-header-background-color, #f8fafc);
}

.portal-grid-shell .rz-frozen-cell-left-end,
.portal-grid-shell .rz-frozen-cell-left-inner {
    box-shadow: 10px 0 14px -14px rgba(15, 23, 42, 0.46);
}

.portal-grid-shell .rz-frozen-cell-right-end,
.portal-grid-shell .rz-frozen-cell-right-inner {
    box-shadow: -10px 0 14px -14px rgba(15, 23, 42, 0.46);
}

.portal-grid-shell td.portal-grid-identity-column,
.portal-grid-shell th.portal-grid-identity-column {
    font-weight: 600;
}

.portal-grid-shell td.portal-grid-action-column,
.portal-grid-shell th.portal-grid-action-column {
    text-align: center;
}

.portal-grid-shell td.portal-grid-action-column .portal-actions {
    justify-content: center;
}

.portal-lecturer-roster-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--portal-space-6);
}

.portal-roster-refreshing {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding-top: 0.2rem;
    opacity: 0.7;
}

.portal-lecturer-refresh-strip {
    display: flex;
    align-items: center;
    gap: var(--portal-space-6);
    padding: 0.46rem 0.7rem;
    border-radius: var(--portal-radius-xs);
    background: rgba(15, 103, 95, 0.07);
    border: 1px solid rgba(15, 103, 95, 0.14);
    color: var(--portal-teal);
    font-size: var(--portal-font-sm);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.portal-kpi-attention .portal-summary-card {
    background: linear-gradient(180deg, rgba(255, 247, 234, 0.98), rgba(249, 241, 230, 0.95));
}

.portal-kpi-attention .portal-summary-card::before {
    background: linear-gradient(180deg, rgba(193, 96, 49, 0.9), rgba(168, 77, 39, 0.88));
}

.portal-kpi-attention .portal-summary-value {
    color: var(--portal-accent-strong);
}

.portal-lecturer-selected-row {
    display: flex;
    align-items: center;
    gap: var(--portal-space-5);
    flex-wrap: wrap;
}

.portal-lecturer-selected-row .portal-inline-link {
    color: var(--portal-teal);
}

.portal-decision-brief-card .portal-decision-brief-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    padding-top: 0.6rem;
    border-top: 1px solid var(--portal-line);
    margin-top: 0.1rem;
}

.portal-grid-preset-shell {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--portal-space-7);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-sm);
    background: rgba(255, 255, 255, 0.74);
}

.portal-grid-preset-heading {
    display: grid;
    gap: var(--portal-space-3);
    min-width: min(100%, 15rem);
}

.portal-grid-preset-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-grid-preset-actions .rz-button {
    min-height: 2rem;
    max-width: 14rem;
}

.portal-grid-preset-actions .rz-button .rz-button-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-grid-view-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--portal-space-4);
    min-width: 0;
}

.portal-grid-view-actions .rz-button {
    min-height: 2rem;
}

.portal-home-launch-grid {
    display: grid;
    gap: var(--portal-space-8);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portal-home-launch-card {
    min-height: 100%;
}

.portal-home-launch-card .rz-card-content {
    display: grid;
    gap: var(--portal-space-8);
}

.portal-home-launch-actions {
    justify-content: space-between;
    align-items: center;
}

.portal-home-task-grid {
    display: grid;
    gap: var(--portal-space-8);
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.portal-home-task-card {
    min-height: 100%;
    border-left: 0.34rem solid rgba(28, 45, 41, 0.18);
}

.portal-home-task-card .rz-card-content {
    height: 100%;
}

.portal-home-task-card.is-danger {
    border-left-color: rgba(184, 64, 51, 0.96);
    background: linear-gradient(180deg, rgba(255, 244, 241, 0.98), rgba(255, 255, 255, 0.9));
}

.portal-home-task-card.is-warning {
    border-left-color: rgba(193, 96, 49, 0.94);
    background: linear-gradient(180deg, rgba(255, 248, 237, 0.98), rgba(255, 255, 255, 0.9));
}

.portal-home-task-card.is-info {
    border-left-color: rgba(76, 119, 158, 0.9);
    background: linear-gradient(180deg, rgba(240, 247, 252, 0.98), rgba(255, 255, 255, 0.9));
}

.portal-home-task-card.is-clear {
    border-left-color: var(--portal-teal);
    background: linear-gradient(180deg, rgba(240, 250, 246, 0.98), rgba(255, 255, 255, 0.9));
}

.portal-home-task-card.is-muted,
.portal-home-task-card.is-loading {
    border-left-color: rgba(95, 113, 107, 0.45);
    background: linear-gradient(180deg, rgba(247, 244, 239, 0.98), rgba(255, 255, 255, 0.9));
}

.portal-home-task-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--portal-space-7);
    align-items: start;
    min-width: 0;
}

.portal-home-task-metric {
    display: flex;
    align-items: end;
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-home-task-metric strong {
    color: var(--portal-ink);
    font-size: var(--portal-font-4xl);
    line-height: 1;
}

.portal-home-task-metric span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-sm);
    line-height: 1.2;
}

.portal-home-task-list {
    display: grid;
    gap: var(--portal-space-5);
}

.portal-home-task-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--portal-space-5);
    align-items: start;
    min-width: 0;
    padding: 0.54rem 0.62rem;
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.72);
    color: var(--portal-ink);
    text-decoration: none;
}

.portal-home-task-item:hover {
    border-color: rgba(20, 115, 106, 0.3);
    box-shadow: 0 10px 18px rgba(28, 45, 41, 0.08);
}

.portal-home-task-item span {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-home-task-item strong,
.portal-home-task-item small {
    overflow-wrap: break-word;
    word-break: normal;
}

.portal-home-task-item .rz-badge {
    justify-self: start;
    max-width: 100%;
    white-space: normal;
    text-align: left;
}

.portal-home-task-item small {
    color: var(--portal-ink-soft);
    line-height: 1.35;
}

.portal-home-task-actions {
    margin-top: auto;
}

.portal-summary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.35rem;
    background: linear-gradient(180deg, var(--portal-accent), var(--portal-teal));
}

.portal-home-health-card .portal-summary-card {
    height: 100%;
}

.portal-home-health-card.is-healthy .portal-summary-card {
    background: linear-gradient(180deg, rgba(240, 250, 246, 0.98), rgba(244, 248, 244, 0.94));
}

.portal-home-health-card.is-healthy .portal-summary-card::before {
    background: linear-gradient(180deg, var(--portal-teal), rgba(83, 166, 117, 0.92));
}

.portal-home-health-card.is-monitoring .portal-summary-card {
    background: linear-gradient(180deg, rgba(255, 247, 234, 0.98), rgba(249, 242, 232, 0.95));
}

.portal-home-health-card.is-monitoring .portal-summary-card::before {
    background: linear-gradient(180deg, rgba(214, 143, 52, 0.95), rgba(193, 96, 49, 0.92));
}

.portal-home-health-card.is-limited .portal-summary-card {
    background: linear-gradient(180deg, rgba(255, 239, 237, 0.98), rgba(250, 241, 239, 0.95));
}

.portal-home-health-card.is-limited .portal-summary-card::before {
    background: linear-gradient(180deg, rgba(184, 64, 51, 0.96), rgba(135, 42, 35, 0.92));
}

.portal-home-health-card.is-checking .portal-summary-card {
    background: linear-gradient(180deg, rgba(244, 239, 233, 0.98), rgba(247, 244, 239, 0.94));
}

.portal-compact-status-card .rz-card-content {
    padding: 1rem 1.15rem;
}

.portal-summary-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-6);
    min-width: 0;
}

.portal-summary-icon {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: var(--portal-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--portal-teal-soft);
    color: var(--portal-teal);
}

.portal-summary-value {
    font-size: var(--portal-font-4xl);
    line-height: 1;
    font-weight: 800;
}

.portal-summary-subtitle {
    font-weight: 600;
}

.portal-summary-meta {
    min-height: 1.25rem;
}

.portal-state-card {
    min-height: 14rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.portal-state-card .rz-card-content,
.portal-state-card .rz-stack {
    width: 100%;
    min-width: 0;
}

.portal-state-card .portal-route-ready-badge,
.portal-state-card .portal-muted {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.portal-state-card.is-loading {
    min-height: 18rem;
}

.portal-state-card.is-recovery {
    min-height: 13rem;
    border-color: rgba(193, 96, 49, 0.24);
    background: linear-gradient(180deg, rgba(255, 248, 242, 0.96), rgba(246, 239, 231, 0.94));
}

.portal-state-icon {
    font-size: var(--portal-font-4xl);
    color: var(--portal-accent-strong);
}

.portal-state-card.is-recovery .portal-state-icon {
    color: #a94f36;
}

.portal-state-recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--portal-space-6);
    width: min(100%, 46rem);
}

.portal-state-recovery-item {
    display: grid;
    gap: var(--portal-space-2);
    min-width: 0;
    padding: 0.58rem 0.7rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.62);
    text-align: left;
}

.portal-state-recovery-item span {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    text-transform: uppercase;
}

.portal-state-recovery-item strong {
    color: var(--portal-ink);
    font-size: var(--portal-font-sm);
    overflow-wrap: anywhere;
}

.portal-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--portal-space-6);
}

.portal-state-alert-copy {
    margin-bottom: 0.55rem;
}

.portal-state-alert-actions {
    justify-content: flex-start;
}

.portal-command-card,
.portal-job-card {
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-line);
    background: linear-gradient(180deg, var(--portal-surface-strong), rgba(248, 244, 239, 0.9));
    padding: 1rem;
    min-height: 100%;
    box-shadow: var(--portal-shadow-soft);
}

.portal-command-card {
    border-radius: var(--portal-radius-xs);
    padding: 0.65rem 0.75rem;
}

.portal-command-card.is-blocked {
    background: linear-gradient(180deg, rgba(253, 244, 234, 0.98), rgba(246, 236, 228, 0.96));
}

.portal-job-card.is-selected {
    border-color: rgba(20, 115, 106, 0.4);
    box-shadow: 0 16px 36px rgba(20, 115, 106, 0.14);
}

.portal-command-list .rz-datalist-content,
.portal-job-list .rz-datalist-content {
    display: grid;
    gap: var(--portal-space-7);
}

.portal-command-list .rz-datalist-data,
.portal-job-list .rz-datalist-data {
    display: grid;
    gap: var(--portal-space-7);
}

.portal-command-list .rz-datalist-data {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.portal-command-group {
    min-width: 0;
}

.portal-command-card-shell,
.portal-command-card-body,
.portal-command-argument-list,
.portal-command-meta {
    display: grid;
    min-width: 0;
}

.portal-command-card-shell {
    gap: var(--portal-space-6);
}

.portal-command-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--portal-space-6);
    flex-wrap: wrap;
}

.portal-command-card-copy {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
    flex: 1 1 13rem;
}

.portal-command-card-copy > * {
    min-width: 0;
}

.portal-command-card-body {
    gap: var(--portal-space-4);
}

.portal-command-meta {
    gap: var(--portal-space-3);
}

.portal-command-argument-list {
    gap: var(--portal-space-4);
}

.portal-command-argument {
    line-height: 1.35;
}

.portal-command-template {
    display: block;
    white-space: pre-wrap;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.35;
}

.portal-command-card .portal-actions {
    align-items: flex-start;
}

.portal-command-card .rz-badge {
    white-space: nowrap;
}

.portal-command-status {
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-5);
    font-size: var(--portal-font-md);
    color: var(--portal-ink-soft);
}

.portal-command-editor {
    display: grid;
    gap: var(--portal-space-8);
}

.portal-command-detail {
    display: grid;
    gap: var(--portal-space-8);
    min-width: 0;
}

.portal-command-activity-list {
    min-width: 0;
}

.portal-command-activity-row {
    display: grid;
    gap: var(--portal-space-4);
    padding: 0.65rem 0.75rem;
    border-radius: var(--portal-radius-xs);
    border: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.78);
}

.portal-command-activity-row.is-selected {
    border-color: rgba(20, 115, 106, 0.46);
    box-shadow: 0 10px 24px rgba(20, 115, 106, 0.12);
}

.portal-command-activity-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--portal-space-7);
    min-width: 0;
}

.portal-command-activity-main > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.portal-command-activity-meta,
.portal-command-activity-output {
    display: block;
    overflow-wrap: anywhere;
}

.portal-output-area,
.portal-output-area textarea,
.portal-command-editor textarea,
.portal-page pre,
.portal-page code {
    max-width: 100%;
}

.portal-page pre,
.portal-output-area textarea,
.portal-command-editor textarea {
    overflow: auto;
}

.portal-output-area textarea,
.portal-command-editor textarea {
    font-family: Consolas, "Courier New", monospace;
}

.portal-timeline-note {
    display: grid;
    gap: var(--portal-space-3);
}

.portal-student-module-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--portal-space-6);
}

.portal-student-module-card {
    border-radius: var(--portal-radius-sm);
    border: 1px solid var(--portal-line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 239, 233, 0.92));
    box-shadow: var(--portal-shadow-soft);
}

.portal-student-module-card {
    display: grid;
    gap: var(--portal-space-2);
    padding: 0.55rem 0.7rem;
    color: var(--portal-ink);
    text-decoration: none;
    transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.portal-student-module-card:hover {
    transform: translateY(-1px);
    border-color: rgba(20, 115, 106, 0.24);
    box-shadow: 0 16px 34px rgba(20, 115, 106, 0.12);
}

.portal-student-module-code {
    color: var(--portal-accent-strong);
    font-weight: 700;
    font-size: var(--portal-font-sm);
}

.portal-student-module-card .portal-muted {
    font-size: var(--portal-font-2xs);
}

.portal-student-scheduler-shell {
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-scheduler-shell-border);
    background: var(--portal-scheduler-shell-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 18px 36px rgba(28, 45, 41, 0.1);
    overflow: hidden;
}

.portal-scheduler-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--portal-space-7);
    padding: 0.62rem 0.7rem;
    border: 1px solid rgba(28, 45, 41, 0.1);
    border-radius: var(--portal-radius-xs);
    background: rgba(255, 255, 255, 0.72);
}

.portal-scheduler-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    min-width: 0;
}

.portal-scheduler-legend-item {
    --portal-scheduler-appointment-surface: var(--portal-scheduler-appointment-default-surface);
    --portal-scheduler-appointment-accent: var(--portal-scheduler-appointment-default-accent);
    display: inline-flex;
    align-items: center;
    gap: var(--portal-space-4);
    min-height: 1.72rem;
    padding: 0.16rem 0.48rem 0.16rem 0.22rem;
    border: 1px solid rgba(28, 45, 41, 0.08);
    border-radius: var(--portal-radius-pill);
    background: rgba(246, 243, 236, 0.76);
    color: var(--portal-ink);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    white-space: nowrap;
}

.portal-scheduler-legend-swatch {
    width: 1.08rem;
    height: 1.08rem;
    flex: 0 0 auto;
    border-radius: var(--portal-radius-pill);
    border: 2px solid var(--portal-scheduler-appointment-accent);
    background: var(--portal-scheduler-appointment-surface);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.portal-scheduler-legend-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    color: var(--portal-scheduler-appointment-accent);
    font-family: "Material Symbols";
    font-size: var(--portal-font-md);
    font-variation-settings: "FILL" 1, "wght" 650, "GRAD" 0, "opsz" 20;
    line-height: 1;
}

.portal-scheduler-legend-item[data-portal-tone="warning"] .portal-scheduler-legend-swatch {
    border-radius: var(--portal-radius-xs);
    clip-path: polygon(50% 0, 100% 92%, 0 92%);
}

.portal-scheduler-legend-item[data-portal-tone="danger"] .portal-scheduler-legend-swatch {
    width: 0.92rem;
    height: 0.92rem;
    border-radius: var(--portal-radius-xs);
    transform: rotate(45deg);
}

.portal-scheduler-legend-item[data-portal-tone="pending"] .portal-scheduler-legend-swatch {
    border-radius: var(--portal-radius-xs);
    border-style: dashed;
}

.portal-scheduler-legend-item[data-portal-tone="adhoc"] .portal-scheduler-legend-swatch {
    border-radius: var(--portal-radius-xs);
    border-style: dotted;
}

.portal-scheduler-legend-item[data-portal-tone="online"],
.portal-student-scheduler [data-portal-tone="online"] {
    --portal-scheduler-appointment-surface: var(--portal-scheduler-appointment-online-surface);
    --portal-scheduler-appointment-accent: var(--portal-scheduler-appointment-online-accent);
}

.portal-scheduler-legend-item[data-portal-tone="warning"],
.portal-student-scheduler [data-portal-tone="warning"] {
    --portal-scheduler-appointment-surface: var(--portal-scheduler-appointment-warning-surface);
    --portal-scheduler-appointment-accent: var(--portal-scheduler-appointment-warning-accent);
}

.portal-scheduler-legend-item[data-portal-tone="danger"],
.portal-student-scheduler [data-portal-tone="danger"] {
    --portal-scheduler-appointment-surface: var(--portal-scheduler-appointment-danger-surface);
    --portal-scheduler-appointment-accent: var(--portal-scheduler-appointment-danger-accent);
}

.portal-scheduler-legend-item[data-portal-tone="pending"],
.portal-student-scheduler [data-portal-tone="pending"] {
    --portal-scheduler-appointment-surface: var(--portal-scheduler-appointment-pending-surface);
    --portal-scheduler-appointment-accent: var(--portal-scheduler-appointment-pending-accent);
}

.portal-scheduler-legend-item[data-portal-tone="adhoc"],
.portal-student-scheduler [data-portal-tone="adhoc"] {
    --portal-scheduler-appointment-surface: var(--portal-scheduler-appointment-adhoc-surface);
    --portal-scheduler-appointment-accent: var(--portal-scheduler-appointment-adhoc-accent);
}

.portal-scheduler-density-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--portal-space-5);
    min-width: 0;
    cursor: pointer;
}

.portal-scheduler-density-copy {
    display: grid;
    gap: var(--portal-space-1);
    min-width: 0;
    text-align: right;
}

.portal-scheduler-density-label {
    color: var(--portal-ink);
    font-size: var(--portal-font-2xs);
    font-weight: 800;
    line-height: 1.1;
}

.portal-scheduler-density-state {
    color: var(--portal-ink-soft);
    font-size: var(--portal-font-2xs);
    font-weight: 700;
    line-height: 1.1;
}

.portal-student-scheduler {
    height: 44rem;
}

.portal-student-scheduler .rz-scheduler {
    border: 0;
    background: transparent;
}

.portal-student-scheduler .rz-view-header {
    background: var(--portal-scheduler-header-bg);
    color: var(--portal-ink);
    font-weight: 700;
    border-color: var(--portal-scheduler-slot-border);
}

.portal-student-scheduler .rz-scheduler-nav,
.portal-student-scheduler .rz-scheduler-header {
    background: var(--portal-scheduler-nav-bg);
    border-bottom: 1px solid var(--portal-line);
}

.portal-student-scheduler :is(.rz-scheduler-nav, .rz-scheduler-header) .rz-button {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(28, 45, 41, 0.1);
    color: var(--portal-ink);
    box-shadow: none;
}

.portal-student-scheduler :is(.rz-scheduler-nav, .rz-scheduler-header) .rz-button:hover {
    background: rgba(255, 248, 242, 0.96);
    border-color: rgba(193, 96, 49, 0.18);
}

.portal-student-scheduler :is(.rz-scheduler-nav, .rz-scheduler-header) .rz-button.rz-primary {
    background: var(--portal-primary-surface);
    border-color: transparent;
    color: var(--portal-primary-text);
}

.portal-student-scheduler .rz-slot-title,
.portal-student-scheduler .rz-slot-header,
.portal-student-scheduler .rz-slot-content {
    background: var(--portal-scheduler-slot-bg);
    border-color: var(--portal-scheduler-slot-border);
}

.portal-student-scheduler .rz-slot-header,
.portal-student-scheduler .rz-slot-title {
    color: var(--portal-ink);
}

.portal-working-week-scheduler .rz-week-view .rz-view-header .rz-slot-header:last-child,
.portal-working-week-scheduler .rz-week-view .rz-week-view-content > .rz-slots:last-child {
    display: none;
}

.portal-student-scheduler [data-portal-tone] {
    --portal-scheduler-appointment-surface: var(--portal-scheduler-appointment-default-surface);
    --portal-scheduler-appointment-accent: var(--portal-scheduler-appointment-default-accent);
    position: relative;
    background: var(--portal-scheduler-appointment-surface) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-left: 4px solid var(--portal-scheduler-appointment-accent) !important;
    border-radius: var(--portal-radius-sm) !important;
    color: var(--portal-scheduler-appointment-text) !important;
    box-shadow: 0 14px 28px rgba(15, 33, 29, 0.16);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.portal-student-scheduler [data-portal-tone]::before {
    content: "";
    position: absolute;
    inset-block-start: 0.34rem;
    inset-inline-end: 0.34rem;
    width: 0.54rem;
    height: 0.54rem;
    border: 2px solid rgba(255, 255, 255, 0.74);
    border-radius: var(--portal-radius-pill);
    background: var(--portal-scheduler-appointment-accent);
    box-shadow: 0 1px 4px rgba(15, 33, 29, 0.22);
    pointer-events: none;
}

.portal-student-scheduler [data-portal-tone="warning"]::before {
    border-radius: var(--portal-radius-xs);
    clip-path: polygon(50% 0, 100% 92%, 0 92%);
}

.portal-student-scheduler [data-portal-tone="danger"]::before {
    border-radius: var(--portal-radius-xs);
    transform: rotate(45deg);
}

.portal-student-scheduler [data-portal-tone="pending"]::before {
    border-radius: var(--portal-radius-xs);
    border-style: dashed;
}

.portal-student-scheduler [data-portal-tone="adhoc"]::before {
    border-radius: var(--portal-radius-xs);
    border-style: dotted;
}

.portal-student-scheduler [data-portal-tone="online"] {
    border-inline-start-style: double !important;
}

.portal-student-scheduler [data-portal-tone="warning"] {
    border-block-style: dashed !important;
}

.portal-student-scheduler [data-portal-tone="danger"] {
    border-inline-end-style: double !important;
}

.portal-student-scheduler [data-portal-tone="pending"] {
    border-style: dashed !important;
}

.portal-student-scheduler [data-portal-tone="adhoc"] {
    border-style: dotted !important;
}

.portal-student-scheduler [data-portal-tone]:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(15, 33, 29, 0.18);
    filter: saturate(1.04);
}

.portal-student-scheduler-appointment {
    display: grid;
    gap: var(--portal-space-3);
    min-height: 100%;
    padding-inline-end: 0.84rem;
}

.portal-student-scheduler [data-portal-tone] .portal-student-scheduler-appointment::before {
    content: "On-site";
    justify-self: start;
    max-width: 100%;
    padding: 0.08rem 0.34rem;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--portal-radius-pill);
    background: rgba(255, 255, 255, 0.18);
    font-size: var(--portal-font-2xs);
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-student-scheduler [data-portal-tone="online"] .portal-student-scheduler-appointment::before {
    content: "Online";
}

.portal-student-scheduler [data-portal-tone="warning"] .portal-student-scheduler-appointment::before {
    content: "Warning";
}

.portal-student-scheduler [data-portal-tone="danger"] .portal-student-scheduler-appointment::before {
    content: "Blocked";
}

.portal-student-scheduler [data-portal-tone="pending"] .portal-student-scheduler-appointment::before {
    content: "Pending";
}

.portal-student-scheduler [data-portal-tone="adhoc"] .portal-student-scheduler-appointment::before {
    content: "Ad-hoc";
}

.portal-student-scheduler-appointment strong {
    display: block;
    font-size: var(--portal-font-sm);
    line-height: 1.1;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-student-scheduler-appointment span {
    display: block;
    font-size: var(--portal-font-2xs);
    line-height: 1.1;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-student-scheduler-appointment .portal-scheduler-support {
    font-size: var(--portal-font-2xs);
    font-weight: 600;
    opacity: 0.95;
}

.portal-student-scheduler-appointment .portal-scheduler-meta {
    font-size: var(--portal-font-2xs);
    opacity: 0.82;
}

.portal-scheduler-density-compact .portal-student-scheduler {
    height: 36rem;
}

.portal-scheduler-density-compact .portal-student-scheduler [data-portal-tone] {
    border-left-width: 3px !important;
    border-radius: var(--portal-radius-xs) !important;
    box-shadow: 0 8px 18px rgba(15, 33, 29, 0.14);
}

.portal-scheduler-density-compact .portal-student-scheduler-appointment {
    gap: var(--portal-space-2);
}

.portal-scheduler-density-compact .portal-student-scheduler-appointment strong {
    font-size: var(--portal-font-2xs);
    line-height: 1.02;
}

.portal-scheduler-density-compact .portal-student-scheduler-appointment .portal-scheduler-support,
.portal-scheduler-density-compact .portal-student-scheduler-appointment .portal-scheduler-meta,
.portal-scheduler-density-compact .portal-student-scheduler-appointment span {
    font-size: var(--portal-font-2xs);
    line-height: 1.02;
}

@media (width < 1024px) {
    .portal-state-recovery-grid {
        grid-template-columns: 1fr;
    }

    .portal-scheduler-toolbar {
        align-items: stretch;
    }

    .portal-scheduler-density-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .portal-scheduler-density-copy {
        text-align: left;
    }

    .portal-student-scheduler-appointment {
        gap: var(--portal-space-2);
    }

    .portal-student-scheduler-appointment strong {
        font-size: var(--portal-font-xs);
    }

    .portal-student-scheduler-appointment .portal-scheduler-support,
    .portal-student-scheduler-appointment .portal-scheduler-meta,
    .portal-student-scheduler-appointment span {
        font-size: var(--portal-font-2xs);
    }
}

.portal-inline-link {
    color: var(--portal-accent-strong);
    font-weight: 600;
}

.portal-home-section {
    display: grid;
    gap: var(--portal-space-8);
}

.portal-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--portal-space-8);
    flex-wrap: wrap;
}

.portal-group-card {
    overflow: hidden;
}

.portal-surface-heading {
    display: flex;
    align-items: flex-start;
    gap: var(--portal-space-8);
    min-width: 0;
}

.portal-surface-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--portal-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(193, 96, 49, 0.14), rgba(20, 115, 106, 0.16));
    color: var(--portal-accent-strong);
    flex: 0 0 auto;
}

.portal-surface-icon-large {
    width: 2.8rem;
    height: 2.8rem;
    color: var(--portal-teal);
}

.portal-surface-description {
    max-width: 52ch;
}

.portal-page .rz-alert {
    --portal-alert-accent: var(--portal-teal);
    --portal-alert-symbol: "info";
    position: relative;
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-line);
    border-left: 0.38rem solid var(--portal-alert-accent);
    padding-left: 3.05rem;
    box-shadow: var(--portal-shadow-soft);
}

.portal-page .rz-alert::before {
    content: var(--portal-alert-symbol);
    position: absolute;
    inset-block-start: 1rem;
    inset-inline-start: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.34rem;
    height: 1.34rem;
    border-radius: var(--portal-radius-pill);
    background: var(--portal-alert-accent);
    color: #fffaf5;
    font-family: "Material Symbols";
    font-size: var(--portal-font-lg);
    font-variation-settings: "FILL" 1, "wght" 650, "GRAD" 0, "opsz" 20;
    line-height: 1;
}

.portal-page .rz-alert.rz-warning {
    --portal-alert-accent: #b45309;
    --portal-alert-symbol: "warning";
}

.portal-page .rz-alert.rz-success {
    --portal-alert-accent: #2f7d62;
    --portal-alert-symbol: "check_circle";
}

.portal-page :is(.rz-alert.rz-danger, .rz-alert.rz-error) {
    --portal-alert-accent: #b91c1c;
    --portal-alert-symbol: "error";
}

.portal-page :is(.rz-textbox, .rz-dropdown, .rz-multiselect, textarea) {
    border-radius: var(--portal-radius-sm);
    border-color: rgba(28, 45, 41, 0.18);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.portal-page :is(.rz-textbox, .rz-dropdown, .rz-multiselect, textarea):focus-within,
.rz-dialog :is(.rz-textbox, .rz-dropdown, .rz-multiselect, textarea):focus-within {
    border-color: rgba(20, 115, 106, 0.5);
    box-shadow: var(--portal-focus-halo);
}

.portal-page :is(.rz-data-grid, .rz-datatable) :is(th, td, .rz-cell-data):focus-visible {
    outline: 2px solid var(--portal-focus-outline);
    outline-offset: -2px;
}

.portal-page textarea {
    padding: 0.85rem 0.95rem;
}

.portal-page :is(.rz-data-grid, .rz-datatable) {
    border-radius: var(--portal-radius);
    overflow: hidden;
    max-width: 100%;
    border: 1px solid var(--portal-line);
    box-shadow: var(--portal-shadow-soft);
}

.portal-page :is(.rz-data-grid-data, .rz-datatable-tablewrapper) {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scrollbar-width: thin;
}

.portal-page :is(.rz-data-grid, .rz-datatable) th {
    min-width: 6.75rem;
}

.portal-page :is(.rz-data-grid, .rz-datatable) .rz-column-title {
    white-space: nowrap;
}

.portal-page :is(.rz-data-grid, .rz-datatable) :is(table, .rz-grid-table) {
    background: rgba(255, 255, 255, 0.95);
}

.portal-page :is(.rz-data-grid, .rz-datatable) :is(th, td) {
    border-color: rgba(28, 45, 41, 0.08);
}

.portal-page .rz-tabview {
    background: transparent;
}

.portal-page .rz-tabview-nav {
    gap: var(--portal-space-5);
    margin: 0 0 0.95rem;
    padding: 0;
    border-bottom: 0;
    overflow: auto;
}

.portal-page .rz-tabview-nav li {
    margin: 0;
}

.portal-page .rz-tabview-nav li a {
    border-radius: var(--portal-radius-pill);
    border: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--portal-ink-soft);
    font-weight: 600;
}

.portal-page .rz-tabview-panels {
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-line);
    background: linear-gradient(180deg, var(--portal-surface-strong), rgba(248, 244, 239, 0.9));
    box-shadow: var(--portal-shadow-soft);
}

.portal-section-switcher {
    overflow: hidden;
}

.portal-section-switcher-heading {
    display: grid;
    gap: var(--portal-space-4);
}

.portal-section-switcher-track {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-7);
}

.portal-section-pill.rz-button {
    min-height: 3rem;
    border-radius: var(--portal-radius-pill);
    padding-inline: 1rem;
    font-weight: 700;
    box-shadow: none;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-section-pill.rz-button:not(.is-active) {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(28, 45, 41, 0.16);
    color: var(--portal-ink);
}

.portal-section-pill.rz-button:not(.is-active):hover {
    background: rgba(255, 248, 242, 0.96);
    border-color: rgba(193, 96, 49, 0.26);
    color: var(--portal-ink);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(28, 45, 41, 0.1);
}

.portal-section-pill.rz-button:not(.is-active):active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(28, 45, 41, 0.08);
}

.portal-section-pill.rz-button.is-active {
    background: var(--portal-primary-surface);
    border-color: transparent;
    color: var(--portal-primary-text);
    box-shadow: 0 16px 30px rgba(17, 29, 26, 0.18);
    transform: translateY(-1px);
}

.portal-detail-drawer {
    display: grid;
    gap: var(--portal-space-8);
    padding: 0.25rem;
}

.rz-dialog-side-position-right,
.rz-dialog-side-position-left {
    top: 0;
    bottom: 0;
}

.rz-dialog-side-position-top,
.rz-dialog-side-position-bottom {
    left: 0;
    right: 0;
}

.portal-detail-metric-grid,
.portal-detail-field-grid {
    display: grid;
    gap: var(--portal-space-8);
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.portal-detail-metric {
    min-height: 100%;
}

.portal-detail-metric-value {
    font-size: var(--portal-font-2xl);
    font-weight: 700;
    line-height: 1.1;
    margin: 0.2rem 0 0.35rem;
}

.portal-detail-field {
    display: grid;
    gap: var(--portal-space-3);
    min-width: 0;
}

.portal-detail-field .rz-text-body1,
.portal-detail-list-item .rz-text-body2 {
    white-space: pre-wrap;
    word-break: break-word;
}

.portal-detail-list-item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    gap: var(--portal-space-6);
    align-items: start;
}

.portal-detail-list-item .rzi {
    margin-top: 0.18rem;
    color: var(--portal-accent-strong);
}

.portal-doc-index-card,
.portal-doc-request-card {
    padding: 1rem 1.05rem;
    border-radius: var(--portal-radius-sm);
    border: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.portal-doc-index-card.is-selected {
    border-color: rgba(193, 96, 49, 0.34);
    background: linear-gradient(135deg, rgba(193, 96, 49, 0.1), rgba(255, 255, 255, 0.9));
}

.portal-doc-hero {
    padding-block: 0.9rem;
}

.portal-doc-hero h1 {
    font-size: var(--portal-font-4xl);
}

.portal-doc-hero p {
    max-width: 76rem;
}

.portal-doc-sidebar-column,
.portal-doc-main-column {
    min-width: 0;
}

.portal-doc-sidebar-column,
.portal-doc-main-column,
.portal-doc-summary-row {
    align-items: start;
}

.portal-doc-summary-row .portal-summary-card {
    padding: 0.72rem 0.85rem;
}

.portal-doc-summary-row .portal-summary-value {
    font-size: var(--portal-font-2xl);
    line-height: 1.15;
    word-break: break-word;
}

.portal-doc-summary-row .portal-summary-icon {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: var(--portal-radius-xs);
}

.portal-doc-summary-row .portal-summary-meta {
    min-height: 0;
}

.portal-doc-content {
    display: grid;
    gap: var(--portal-space-8);
    line-height: 1.7;
}

.portal-doc-content h1,
.portal-doc-content h2,
.portal-doc-content h3,
.portal-doc-content h4 {
    margin: 0.25rem 0 0;
}

.portal-doc-content p,
.portal-doc-content ul,
.portal-doc-content ol,
.portal-doc-content blockquote,
.portal-doc-content pre {
    margin: 0;
}

.portal-doc-content ul,
.portal-doc-content ol {
    padding-left: 1.25rem;
}

.portal-doc-content blockquote {
    padding: 0.9rem 1rem;
    border-left: 4px solid rgba(20, 115, 106, 0.4);
    background: rgba(20, 115, 106, 0.08);
    border-radius: var(--portal-radius);
}

.portal-doc-content pre {
    overflow: auto;
    padding: 1rem;
    border-radius: var(--portal-radius-sm);
    background: #1a2623;
    color: #f7f1e8;
}

.portal-doc-content code {
    font-family: "Consolas", "Courier New", monospace;
}

.portal-doc-content table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: var(--portal-radius-sm);
    background: rgba(255, 255, 255, 0.78);
}

.portal-doc-content th,
.portal-doc-content td {
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--portal-line);
    text-align: left;
    vertical-align: top;
}

.portal-doc-content a {
    color: var(--portal-accent-strong);
    font-weight: 600;
}

.portal-docs-assistant {
    display: grid;
    gap: var(--portal-space-8);
    padding: 0.25rem;
}

.portal-docs-assistant-context {
    border-left: 0.32rem solid var(--portal-teal);
}

.portal-docs-assistant-suggestions {
    display: grid;
    gap: var(--portal-space-5);
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.portal-docs-assistant-suggestion.rz-button {
    justify-content: flex-start;
    min-height: 2.35rem !important;
    height: auto;
    border-radius: var(--portal-radius-xs);
    white-space: normal;
    text-align: left;
}

.portal-docs-assistant-suggestion .rz-button-text {
    white-space: normal;
    line-height: 1.28;
    text-align: left;
}

.portal-docs-assistant-empty {
    border-style: dashed;
}

.portal-docs-assistant-thread {
    display: grid;
    gap: var(--portal-space-8);
    max-height: 46vh;
    overflow: auto;
    padding-right: 0.2rem;
}

.portal-docs-assistant-turn {
    display: grid;
    gap: var(--portal-space-7);
    padding: 0.95rem 1rem;
    border-radius: var(--portal-radius-sm);
    border: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.portal-docs-assistant-turn.is-user {
    background: linear-gradient(135deg, rgba(193, 96, 49, 0.12), rgba(255, 255, 255, 0.88));
    border-color: rgba(193, 96, 49, 0.24);
}

.portal-docs-assistant-turn.is-assistant {
    background: linear-gradient(135deg, rgba(20, 115, 106, 0.08), rgba(255, 255, 255, 0.92));
    border-color: rgba(20, 115, 106, 0.2);
}

.portal-docs-assistant-turn-header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--portal-space-5);
    align-items: center;
    justify-content: space-between;
}

.portal-docs-assistant-answer {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
}

.portal-docs-assistant-citations {
    display: grid;
    gap: var(--portal-space-6);
}

.portal-docs-assistant-citation {
    display: grid;
    gap: var(--portal-space-4);
    padding: 0.78rem 0.85rem;
    border-radius: var(--portal-radius-sm);
    border: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--portal-ink);
    text-decoration: none;
    transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.portal-docs-assistant-citation:hover {
    border-color: rgba(20, 115, 106, 0.3);
    box-shadow: var(--portal-shadow-soft);
    transform: translateY(-1px);
}

@media (min-width: 1024px) {
    .portal-doc-workspace.rz-row {
        display: grid;
        grid-template-columns: minmax(17.5rem, 0.34fr) minmax(0, 1fr);
        align-items: start;
        gap: var(--portal-space-8) !important;
    }

    .portal-doc-workspace > .rz-column {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    .portal-doc-sidebar-column,
    .portal-doc-main-column {
        max-height: calc(100vh - 11rem);
        overflow: auto;
        padding-right: 0.18rem;
        scrollbar-gutter: stable;
    }

    .portal-doc-sidebar-column {
        position: sticky;
        top: 0.75rem;
    }
}

@media (max-width: 1280px) {
    .portal-hero-grid {
        grid-template-columns: 1fr;
    }

    .portal-layout {
        --rz-sidebar-width: 15.5rem;
    }

    .portal-shell-header-card {
        grid-template-columns: 1fr;
    }

    .portal-shell-status-panel {
        justify-items: start;
        padding-left: 0;
        padding-top: 0.36rem;
        border-left: 0;
        border-top: 1px solid var(--portal-line);
    }

    .portal-global-search-results {
        left: 0;
        right: auto;
        width: min(100%, calc(100vw - 1.5rem));
    }

    :root {
        --portal-shell-width: min(var(--portal-width-tablet), calc(100vw - 1.2rem));
        --portal-card-padding: 0.84rem;
        --portal-action-gap: 0.36rem;
        --portal-hero-padding: clamp(0.54rem, 1.1vw, 0.82rem);
    }

    .portal-shell-header-card {
        gap: var(--portal-space-5);
        padding: 0.34rem 0.46rem;
    }

    .portal-shell-status-panel {
        padding-left: 0.42rem;
    }

    .portal-section-card .rz-card-content,
    .portal-surface-card .rz-card-content,
    .portal-kpi {
        padding: 0.9rem 0.95rem;
    }
}

@media (max-width: 1440px) {
    .portal-workbench-lane-brief-grid {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .portal-workbench-lane-action {
        justify-content: flex-start;
    }

    .portal-manual-command-frame {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .portal-manual-command-actions {
        grid-column: 1;
        grid-row: 2;
    }

    .portal-manual-command-statuses {
        grid-column: 1;
        grid-row: 3;
    }

    .portal-manual-command-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .portal-scenario-freshness-header {
        grid-template-columns: 1fr;
    }

    .portal-scenario-freshness-badges,
    .portal-scenario-freshness-actions {
        justify-content: flex-start;
    }

    .portal-scenario-freshness-controls {
        justify-items: start;
    }

    .portal-manual-command-action-note {
        text-align: left;
    }

    .portal-command-page [class*="rz-col-xl-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (width < 1024px) {
    :root {
        --portal-shell-width: calc(100vw - 1rem);
        --portal-card-padding: 0.76rem;
        --portal-action-gap: 0.32rem;
        --portal-hero-padding: 0.52rem 0.68rem;
    }

    .portal-layout {
        --rz-sidebar-width: min(22rem, calc(100vw - 1.15rem));
    }

    .portal-layout .rz-body {
        padding-top: 0.68rem;
    }

    .portal-layout .portal-sidebar.rz-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        max-width: calc(100vw - 0.65rem);
        border-radius: var(--portal-radius);
    }

    .portal-layout .portal-sidebar.rz-sidebar-expanded {
        width: var(--rz-sidebar-width) !important;
        transform: translateX(0);
    }

    .portal-layout .portal-sidebar.rz-sidebar-collapsed {
        width: var(--rz-sidebar-width) !important;
        padding: 0.7rem 0.6rem 0.78rem !important;
        transform: translateX(calc(-100% - 1rem));
    }

    .portal-layout:has(.portal-sidebar.rz-sidebar-expanded) .portal-sidebar-toggle {
        visibility: hidden;
        pointer-events: none;
    }

    .portal-sidebar-close {
        display: inline-flex;
    }

    .portal-shell-header-card {
        border-radius: var(--portal-radius-sm);
    }

    .portal-page {
        gap: var(--portal-space-6);
    }

    .portal-page-action-bar,
    .portal-filter-toolbar {
        min-width: 0;
        width: 100%;
    }

    .portal-manual-command-bar .rz-card-content {
        padding: 0.62rem 0.72rem;
    }

    .portal-route-performance-grid {
        grid-template-columns: 1fr;
    }

    .portal-route-performance-badges,
    .portal-route-performance-actions {
        justify-content: flex-start;
    }

    .portal-workbench-lane-badges {
        gap: var(--portal-space-4);
    }

    .portal-manual-command-statuses {
        gap: var(--portal-space-4);
    }

    .portal-filter-body {
        gap: var(--portal-space-7);
        padding-top: 0.66rem;
    }

    .portal-shell-badge-row {
        justify-content: flex-start !important;
    }

    .portal-page-action-bar,
    .portal-page-action-bar-copy {
        justify-items: start;
        text-align: left;
    }

    .portal-page-action-buttons {
        justify-content: flex-start;
    }

    .portal-workbench-return {
        grid-template-columns: 1fr;
    }

    .portal-workbench-return-badges {
        justify-content: flex-start;
    }

    .portal-home-launch-actions {
        justify-content: flex-start;
    }

    .portal-sidebar-overview {
        gap: var(--portal-space-4);
    }

    .portal-sidebar-current-pill {
        padding: 0.54rem 0.62rem;
    }
}

@media (max-width: 768px) {
    :root {
        --portal-shell-width: calc(100vw - 0.7rem);
        --portal-card-padding: 0.58rem;
        --portal-action-gap: 0.24rem;
        --portal-hero-padding: 0.42rem 0.52rem;
    }

    .portal-page {
        gap: var(--portal-space-5);
    }

    .portal-section-card .rz-card-content,
    .portal-surface-card .rz-card-content,
    .portal-kpi {
        padding: 0.58rem 0.62rem;
    }

    .portal-hero {
        border-radius: var(--portal-radius-xs);
        box-shadow: 0 8px 18px rgba(28, 45, 41, 0.08);
    }

    .portal-hero h1 {
        font-size: var(--portal-font-xl);
        line-height: 1.08;
        letter-spacing: 0;
    }

    .portal-hero p {
        margin-top: 0.2rem;
        font-size: var(--portal-font-2xs);
        line-height: 1.22;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .portal-hero-eyebrow,
    .portal-section-kicker {
        font-size: var(--portal-font-2xs);
    }

    .portal-manual-command-bar {
        position: static;
        top: auto;
        box-shadow: 0 8px 18px rgba(28, 45, 41, 0.08);
    }

    .portal-manual-command-bar .rz-card-content {
        padding: 0.48rem 0.54rem;
    }

    .portal-manual-command-frame {
        gap: var(--portal-space-5);
    }

    .portal-manual-command-title {
        white-space: normal;
        line-height: 1.18;
    }

    .portal-route-performance-evidence {
        grid-template-columns: 1fr;
    }

    .portal-route-performance-badges,
    .portal-route-performance-actions {
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.08rem;
        scrollbar-width: thin;
    }

    .portal-scenario-freshness {
        padding: 0.54rem;
        gap: var(--portal-space-5);
    }

    .portal-scenario-freshness-main {
        grid-template-columns: 1fr;
    }

    .portal-scenario-freshness-evidence {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.08rem;
        scrollbar-width: thin;
    }

    .portal-scenario-freshness-evidence-item {
        flex: 0 0 auto;
        max-width: 16rem;
    }

    .portal-analytics-sticky-scope {
        top: 0.35rem;
    }

    .portal-analytics-scope-badges,
    .portal-analytics-primary-action,
    .portal-analytics-row-actions {
        justify-content: flex-start;
        max-width: 100%;
    }

    .portal-analytics-card-meta {
        grid-template-columns: 1fr;
    }

    .portal-analytics-action-menu > .portal-actions {
        box-shadow: none;
    }

    .portal-manual-command-statuses {
        display: flex;
    }

    .portal-manual-command-statuses,
    .portal-manual-command-actions,
    .portal-scenario-freshness-badges,
    .portal-scenario-freshness-actions,
    .portal-page-action-buttons,
    .portal-filter-chips,
    .portal-state-actions,
    .portal-grid-preset-actions,
    .portal-command-card .portal-actions {
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.08rem;
        scrollbar-width: thin;
    }

    .portal-manual-command-status {
        flex: 0 0 auto;
        min-height: 1.72rem;
        padding: 0.12rem 0.28rem;
    }

    .portal-manual-command-status-label {
        font-size: var(--portal-font-2xs);
    }

    .portal-manual-command-status .rz-badge {
        max-width: 8.5rem;
    }

    .portal-manual-command-actions .rz-button,
    .portal-page-action-buttons .rz-button,
    .portal-state-actions .rz-button,
    .portal-grid-preset-actions .rz-button,
    .portal-command-card .portal-actions .rz-button {
        flex: 0 0 auto;
    }

    .portal-filter-panel .portal-page-action-buttons {
        flex-wrap: wrap;
        overflow: visible;
    }

    .portal-filter-panel .portal-page-action-buttons .rz-button {
        flex: 1 1 7.2rem;
        max-width: 100%;
    }

    .portal-state-card .portal-state-actions,
    .portal-state-alert-actions {
        flex-wrap: wrap;
        justify-content: center;
        overflow: visible;
    }

    .portal-state-alert-actions {
        justify-content: flex-start;
    }

    .portal-page .rz-button,
    .portal-layout .rz-button {
        min-height: 1.95rem;
        padding-block: 0.18rem;
        padding-inline: 0.54rem;
        font-size: var(--portal-font-2xs);
    }

    .portal-page .rz-button .rz-button-text,
    .portal-layout .rz-button .rz-button-text {
        line-height: 1.12;
        white-space: normal;
    }

    .portal-filter-panel .portal-filter-heading .portal-muted {
        display: none;
    }

    .portal-filter-body {
        gap: var(--portal-space-6);
        padding-top: 0.52rem;
    }

    .portal-page :is(.rz-textbox, .rz-dropdown, .rz-multiselect, textarea) {
        border-radius: var(--portal-radius-xs);
        min-height: 2rem;
    }

    .portal-page textarea {
        padding: 0.55rem 0.64rem;
    }

    .portal-page .rz-alert,
    .portal-page :is(.rz-data-grid, .rz-datatable),
    .portal-page .rz-tabview-panels {
        border-radius: var(--portal-radius-xs);
        box-shadow: none;
    }

    .portal-manual-draft-cta-grid {
        grid-template-columns: 1fr;
    }

    .portal-manual-risk,
    .portal-manual-risk-header,
    .portal-manual-risk-signal,
    .portal-draft-sync-header,
    .portal-draft-sync-signal {
        grid-template-columns: 1fr;
    }

    .portal-manual-risk-badges,
    .portal-draft-sync-badges,
    .portal-draft-sync-actions {
        justify-content: flex-start;
    }

    .portal-manual-recovery-header,
    .portal-manual-recovery-actions {
        grid-template-columns: 1fr;
    }

    .portal-manual-recovery-badges,
    .portal-manual-recovery-command-row,
    .portal-manual-recovery-item-badges {
        justify-content: flex-start;
    }

    .portal-manual-recovery-grid {
        grid-template-columns: 1fr;
    }

    .portal-manual-recovery-list {
        max-height: none;
        overflow: visible;
    }

    .portal-grid-preset-shell {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-grid-preset-actions {
        justify-content: flex-start;
    }

    .portal-grid-preset-actions .rz-button {
        flex: 0 0 auto;
    }

    .portal-scenario-stepper {
        grid-template-columns: 1fr;
    }

    .portal-scenario-utilities {
        justify-content: flex-start;
    }

    .portal-publish-readiness-header,
    .portal-publish-readiness-item {
        grid-template-columns: 1fr;
    }

    .portal-publish-readiness-actions {
        justify-content: flex-start;
    }

    .portal-publish-readiness-grid {
        grid-template-columns: 1fr;
    }

    .portal-communication-audience-grid,
    .portal-communication-session-before-after {
        grid-template-columns: 1fr;
    }

    .portal-draft-sync-grid {
        grid-template-columns: 1fr;
    }

    .portal-session-inspector-panel,
    .portal-session-inspector-panel.is-empty,
    .portal-workbench-shortcuts-header,
    .portal-workbench-saved-views-header,
    .portal-workbench-saved-view,
    .portal-selected-basket-header,
    .portal-selected-basket-row,
    .portal-selected-basket-target,
    .portal-bulk-review-header,
    .portal-bulk-review-item,
    .portal-bulk-review-signal,
    .portal-workbench-return,
    .portal-workbench-return-copy,
    .portal-communication-audience-heading,
    .portal-communication-audience-row,
    .portal-communication-session-row,
    .portal-conflict-map-header,
    .portal-conflict-map-fix,
    .portal-conflict-map-node,
    .portal-conflict-map-signal,
    .portal-target-candidates-header,
    .portal-target-candidate-card,
    .portal-structural-composer-header,
    .portal-structural-composer-signal,
    .portal-resource-heatmap-header,
    .portal-resource-heatmap-slot-header,
    .portal-preview-diff-header,
    .portal-preview-diff-row-header,
    .portal-preview-diff-before-after,
    .portal-preview-diff-signal,
    .portal-constraint-evidence-main,
    .portal-row-provenance-main,
    .portal-row-provenance-main > span:last-child,
    .portal-draft-compare-main,
    .portal-session-related-row {
        grid-template-columns: 1fr;
    }

    .portal-selected-basket {
        max-height: none;
        overflow: visible;
        position: static;
    }

    .portal-selected-basket-actions,
    .portal-selected-basket-row-actions,
    .portal-workbench-shortcuts-header .portal-actions,
    .portal-workbench-saved-view-actions,
    .portal-grid-view-actions,
    .portal-bulk-review-actions,
    .portal-target-candidate-actions,
    .portal-conflict-map-badges,
    .portal-conflict-map-actions,
    .portal-structural-composer-badges,
    .portal-structural-composer-actions,
    .portal-resource-heatmap-context,
    .portal-resource-heatmap-actions,
    .portal-preview-diff-actions,
    .portal-session-related-actions {
        justify-content: flex-start;
    }

    .portal-manual-action {
        max-width: 100%;
    }

    .portal-workbench-shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .portal-workbench-saved-view-list {
        grid-template-columns: 1fr;
    }

    .portal-target-candidate-grid {
        grid-template-columns: 1fr;
    }

    .portal-conflict-map-grid,
    .portal-conflict-map-signals,
    .portal-bulk-review-grid,
    .portal-bulk-review-evidence {
        grid-template-columns: 1fr;
    }

    .portal-structural-composer-flow,
    .portal-structural-composer-signals {
        grid-template-columns: 1fr;
    }

    .portal-resource-heatmap-grid {
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
    }

    .portal-preview-diff-panel.is-sticky {
        position: static;
    }

    .portal-preview-diff-grid {
        max-height: none;
        overflow: visible;
    }

    .portal-timetable-matrix {
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
        gap: var(--portal-space-6);
    }

    .portal-timetable-slot,
    .portal-timetable-card {
        padding: 0.54rem;
    }

    .portal-timetable-slot-header {
        display: grid;
    }

    .portal-layout .rz-header {
        padding: 0.16rem 0;
    }

    .portal-layout .rz-body {
        padding-top: 0.38rem;
    }

    .portal-layout {
        --rz-sidebar-width: calc(100vw - 0.85rem);
    }

    .portal-shell-header-card {
        gap: var(--portal-space-3);
        padding: 0.24rem 0.32rem;
        border-radius: var(--portal-radius-xs);
    }

    .portal-shell-header .portal-brand-mark {
        width: 1.46rem;
        height: 1.46rem;
        border-radius: var(--portal-radius-xs);
        font-size: var(--portal-font-2xs);
    }

    .portal-shell-header .portal-brand-name {
        font-size: var(--portal-font-lg);
    }

    .portal-shell-header .portal-brand-line {
        gap: var(--portal-space-3);
    }

    .portal-shell-status-panel {
        gap: var(--portal-space-2);
        padding-top: 0.18rem;
    }

    .portal-shell-status-panel .portal-page-action-bar-copy,
    .portal-shell-usercopy .rz-text:last-child {
        display: none;
    }

    .portal-shell-status-panel .rz-button {
        min-height: 1.62rem !important;
        padding-inline: 0.42rem;
        font-size: var(--portal-font-2xs);
    }

    .portal-shell-badge-row .rz-badge,
    .portal-filter-chips .rz-badge {
        padding: 0.08rem 0.34rem;
        font-size: var(--portal-font-2xs);
    }

    .portal-auth-main {
        align-items: flex-start;
        padding-top: 1rem;
    }

    .portal-auth-brand {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-login-card {
        padding: 1.1rem;
    }

    .portal-brand {
        align-items: flex-start;
    }

    .portal-brand-mark {
        width: 2rem;
        height: 2rem;
        border-radius: var(--portal-radius-xs);
    }

    .portal-brand-name {
        font-size: var(--portal-font-3xl);
    }

    .portal-brand-byline,
    .portal-shell-current-surface,
    .portal-shell-org-badge {
        display: none;
    }

    .portal-shell-userbar {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--portal-space-3);
        padding-top: 0.16rem;
    }

    .portal-shell-user-actions {
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .portal-shell-support-panel {
        position: fixed;
        top: 4.55rem;
        left: 0.35rem;
        right: 0.35rem;
        width: auto;
        max-height: calc(100vh - 5rem);
    }

    .portal-actions {
        justify-content: flex-start !important;
    }

    .portal-sidebar-current-pill {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .portal-sidebar-current-tags {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 2.4rem;
    }

    .portal-sidebar-link {
        padding: 0.66rem 0.68rem;
    }

    .portal-sidebar-child-list {
        margin-left: 0.72rem;
        padding-left: 0.6rem;
    }

    .portal-home-launch-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth reconnection experience styles */
#components-reconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(237, 230, 219, 0.92);
    backdrop-filter: blur(12px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 300ms ease;
}

#components-reconnect-modal.show,
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying {
    display: flex;
    opacity: 1;
}

#components-reconnect-modal.show-reconnecting,
#components-reconnect-modal.show-failed,
#components-reconnect-modal.show-rejected,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
    opacity: 1;
}

.portal-reconnect-card {
    max-width: 28rem;
    width: calc(100% - 2rem);
    margin: 1rem;
    padding: 1.5rem;
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-line);
    background: linear-gradient(180deg, var(--portal-surface-strong), rgba(249, 245, 239, 0.88));
    box-shadow: var(--portal-shadow);
    text-align: center;
    transform: translateY(1rem);
    transition: transform 300ms ease, opacity 300ms ease;
}

#components-reconnect-modal.show .portal-reconnect-card,
#components-reconnect-modal.show-reconnecting .portal-reconnect-card,
#components-reconnect-modal.show-failed .portal-reconnect-card,
#components-reconnect-modal.show-rejected .portal-reconnect-card,
#components-reconnect-modal.components-reconnect-show .portal-reconnect-card,
#components-reconnect-modal.components-reconnect-retrying .portal-reconnect-card,
#components-reconnect-modal.components-reconnect-failed .portal-reconnect-card,
#components-reconnect-modal.components-reconnect-rejected .portal-reconnect-card {
    transform: translateY(0);
}

.portal-reconnect-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: var(--portal-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(193, 96, 49, 0.12), rgba(20, 115, 106, 0.16));
    color: var(--portal-teal);
    font-size: var(--portal-font-4xl);
    animation: portal-reconnect-pulse 2s ease-in-out infinite;
}

@keyframes portal-reconnect-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

.portal-reconnect-icon.is-failed {
    background: rgba(168, 77, 53, 0.12);
    color: #a94f36;
    animation: none;
}

.portal-reconnect-icon.is-success {
    background: rgba(20, 115, 106, 0.16);
    color: var(--portal-teal);
    animation: none;
}

.portal-reconnect-title {
    margin: 0 0 0.5rem;
    font-size: var(--portal-font-2xl);
    font-weight: 700;
    color: var(--portal-ink);
    line-height: 1.2;
}

.portal-reconnect-message {
    margin: 0 0 1.25rem;
    font-size: var(--portal-font-md);
    line-height: 1.5;
    color: var(--portal-ink-soft);
}

.portal-reconnect-actions {
    display: flex;
    gap: var(--portal-space-6);
    justify-content: center;
    flex-wrap: wrap;
}

.portal-reconnect-btn {
    min-height: 2.5rem;
    padding: 0.6rem 1.2rem;
    border: 0;
    border-radius: var(--portal-radius-pill);
    background: var(--portal-primary-surface);
    color: var(--portal-primary-text);
    font: inherit;
    font-weight: 700;
    font-size: var(--portal-font-md);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
    box-shadow: 0 8px 18px rgba(28, 45, 41, 0.12);
}

.portal-reconnect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(28, 45, 41, 0.16);
}

.portal-reconnect-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.portal-reconnect-btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--portal-ink);
    border: 1px solid var(--portal-line-strong);
}

.portal-reconnect-btn-secondary:hover {
    border-color: rgba(20, 115, 106, 0.38);
    color: var(--portal-teal);
}

.portal-reconnect-progress {
    height: 0.25rem;
    max-width: 12rem;
    margin: 1rem auto 0;
    border-radius: var(--portal-radius-pill);
    background: rgba(20, 115, 106, 0.12);
    overflow: hidden;
}

.portal-reconnect-progress-bar {
    height: 100%;
    width: 0;
    border-radius: var(--portal-radius-pill);
    background: linear-gradient(90deg, var(--portal-accent), var(--portal-teal));
    animation: portal-reconnect-progress 2s ease-in-out infinite;
}

@keyframes portal-reconnect-progress {
    0% { width: 0; transform: translateX(-100%); }
    50% { width: 60%; }
    100% { width: 0; transform: translateX(400%); }
}

/* Hide default Blazor reconnect elements and replace with custom */
#components-reconnect-modal > div:not(.portal-reconnect-card) {
    display: none;
}


/* Mobile agenda fallback (student my-timetable): on narrow viewports hide the
   Radzen scheduler and present the same sessions as a day-grouped agenda list. */
.portal-agenda-list {
    display: none;
}

.portal-agenda-day {
    margin-bottom: 1rem;
}

.portal-agenda-day-header {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--portal-ink);
}

.portal-agenda-item {
    display: flex;
    gap: var(--portal-space-7);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--portal-line);
}

.portal-agenda-time {
    flex: 0 0 auto;
    min-width: 6.5rem;
    font-variant-numeric: tabular-nums;
    color: var(--portal-ink-soft);
}

.portal-agenda-detail {
    display: flex;
    flex-direction: column;
    gap: var(--portal-space-2);
    min-width: 0;
}

@media (max-width: 768px) {
    .portal-schedule-card .portal-student-scheduler-shell {
display: none;
    }

    .portal-agenda-list {
display: block;
    }
}

:root[data-theme="dark"] :where(.portal-layout, .portal-auth-layout, #components-reconnect-modal) [class*="portal-"][class*="-card"]:not(.portal-hero-panel),
:root[data-theme="dark"] :where(.portal-layout, .portal-auth-layout, #components-reconnect-modal) [class*="portal-"][class*="-panel"]:not(.portal-hero-panel),
:root[data-theme="dark"] :where(.portal-layout, .portal-auth-layout, #components-reconnect-modal) [class*="portal-"][class*="-tile"] {
    background: var(--portal-surface);
    border-color: var(--portal-line);
    color: var(--portal-ink);
}

:root[data-theme="dark"] :where(.portal-layout, .portal-auth-layout, #components-reconnect-modal) :is(input, textarea, select, .rz-inputtext) {
    background: var(--portal-bg-soft);
    border-color: var(--portal-line);
    color: var(--portal-ink);
}

:root[data-theme="dark"] .portal-layout .rz-header,
:root[data-theme="dark"] .portal-auth-brand,
:root[data-theme="dark"] .portal-global-search-control,
:root[data-theme="dark"] .portal-global-search-results {
    background: var(--portal-surface-strong);
    border-color: var(--portal-line);
    color: var(--portal-ink);
}

:root[data-theme="dark"] .portal-sidebar-link {
    background: linear-gradient(180deg, rgba(38, 53, 48, 0.98), rgba(24, 35, 31, 0.96));
    border-color: var(--portal-line);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(231, 239, 235, 0.1);
    color: var(--portal-ink);
}

:root[data-theme="dark"] .portal-sidebar-link.is-active {
    background: var(--portal-primary-surface);
    border-color: transparent;
    color: var(--portal-primary-text);
}

:root[data-theme="dark"] .portal-sidebar-child-link {
    background: rgba(34, 48, 43, 0.9);
    border-color: var(--portal-line);
    color: var(--portal-ink);
}

:root[data-theme="dark"] .portal-sidebar-child-link:is(:hover, .is-active) {
    background: var(--portal-teal-soft);
    border-color: var(--portal-teal);
}

:root[data-theme="dark"] .portal-page :is(.rz-textbox, .rz-dropdown, .rz-multiselect, textarea),
:root[data-theme="dark"] .portal-page .rz-button.rz-variant-outlined,
:root[data-theme="dark"] .portal-layout .rz-button.rz-variant-outlined {
    background: var(--portal-bg-soft);
    border-color: var(--portal-line);
    color: var(--portal-ink);
    box-shadow: inset 0 1px 0 rgba(231, 239, 235, 0.1);
}

:root[data-theme="dark"] :is(.portal-sidebar-current-icon, .portal-sidebar-current-tag, .portal-sidebar-group-icon, .portal-sidebar-link-icon, .portal-sidebar-link-badge) {
    background: rgba(113, 211, 199, 0.14);
}

/* Component colours must follow the dark surface, including pseudo-elements
   and Radzen's independently styled status content. */
:root[data-theme="dark"] :is(.portal-login-input, .portal-global-search-input)::placeholder {
    color: var(--portal-ink-soft);
    opacity: 1;
}

.portal-evidence-value {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

:root[data-theme="dark"] :is(.portal-login-secondary, .portal-home-task-item, .portal-scenario-freshness,
    .portal-scenario-freshness-evidence-item, .portal-manual-risk,
    .portal-manual-risk-signal, .portal-publish-readiness, .portal-publish-readiness-item) {
    background: var(--portal-bg-soft);
    color: var(--portal-ink);
    border-color: var(--portal-line);
}

:root[data-theme="dark"] :is(.rz-alert, .rz-badge,
    .portal-scenario-freshness, .portal-manual-risk, .portal-publish-readiness-item) {
    --portal-status-ink: var(--portal-ink);
    --portal-status-surface: var(--portal-bg-soft);
}

:root[data-theme="dark"] :is(.rz-alert.rz-info, .rz-badge-info) {
    --portal-status-ink: #9bcfff;
    --portal-status-surface: #19364b;
}

:root[data-theme="dark"] :is(.rz-alert.rz-success, .rz-badge-success,
    .portal-scenario-freshness.is-current, .portal-manual-risk.is-safe, .portal-publish-readiness-item.is-clear) {
    --portal-status-ink: var(--portal-teal);
    --portal-status-surface: #163b32;
}

:root[data-theme="dark"] :is(.rz-alert.rz-warning, .rz-badge-warning,
    .portal-scenario-freshness.is-warning, .portal-scenario-freshness.is-readonly,
    .portal-manual-risk.is-warning, .portal-publish-readiness-item.is-warning) {
    --portal-status-ink: #ffd18a;
    --portal-status-surface: #3b2d18;
}

:root[data-theme="dark"] :is(.rz-alert.rz-danger, .rz-alert.rz-error, .rz-badge-danger, .rz-badge-error,
    .portal-scenario-freshness.is-stale, .portal-manual-risk.is-blocked, .portal-publish-readiness-item.is-blocked) {
    --portal-status-ink: #ffb4aa;
    --portal-status-surface: #412522;
}

:root[data-theme="dark"] :is(.rz-alert, .rz-badge) {
    background: var(--portal-status-surface);
    color: var(--portal-status-ink);
    border-color: var(--portal-status-ink);
}

:root[data-theme="dark"] .portal-page .rz-alert {
    --portal-alert-accent: var(--portal-status-ink);
}

:root[data-theme="dark"] .portal-page .rz-alert::before {
    color: var(--portal-status-surface);
}

:root[data-theme="dark"] .rz-alert :is(.rz-alert-icon, .rz-alert-title, .rz-alert-message,
    .rz-alert-content, .rz-button.rz-variant-text) {
    color: inherit;
}

:root[data-theme="dark"] :is(.portal-scenario-freshness, .portal-manual-risk, .portal-publish-readiness-item)
    :is(.portal-scenario-freshness-icon, .portal-manual-risk-icon, .portal-publish-readiness-item-icon) {
    background: var(--portal-status-surface);
    color: var(--portal-status-ink);
}

@media (prefers-contrast: more) {
    :root {
        --portal-line: rgba(28, 45, 41, 0.86);
        --portal-line-strong: rgba(28, 45, 41, 1);
        --portal-focus-halo: 0 0 0 5px rgba(6, 91, 84, 0.42);
        --portal-focus-on-dark-halo: 0 0 0 5px rgba(255, 224, 186, 0.48);
        --portal-focus-primary-halo: 0 0 0 4px rgba(6, 91, 84, 0.62), 0 0 0 7px rgba(255, 241, 207, 0.96);
    }

    :root[data-theme="dark"] {
        --portal-line: rgba(231, 239, 235, 0.88);
        --portal-line-strong: rgba(231, 239, 235, 1);
        --portal-focus-halo: 0 0 0 5px rgba(140, 231, 218, 0.54);
    }

    :where(.portal-section-card, .portal-state-card, .portal-summary-card, .portal-command-card, .portal-filter-panel) {
        border-width: 2px;
    }
}

@media (forced-colors: active) {
    :root,
    :root[data-theme="dark"] {
        --portal-bg: Canvas;
        --portal-bg-soft: Canvas;
        --portal-surface: Canvas;
        --portal-surface-strong: Canvas;
        --portal-surface-deep: Canvas;
        --portal-card-surface-end: Canvas;
        --portal-card-surface-soft-end: Canvas;
        --portal-empty-state-start: Canvas;
        --portal-support-surface: Canvas;
        --portal-ink: CanvasText;
        --portal-ink-soft: CanvasText;
        --portal-line: CanvasText;
        --portal-line-strong: CanvasText;
        --portal-accent: LinkText;
        --portal-accent-strong: LinkText;
        --portal-teal: LinkText;
        --portal-teal-soft: Canvas;
        --portal-primary-surface: ButtonFace;
        --portal-primary-text: ButtonText;
        --portal-hero-surface: Canvas;
        --portal-hero-title: CanvasText;
        --portal-hero-text: CanvasText;
        --portal-hero-muted: CanvasText;
        --portal-hero-eyebrow: LinkText;
        --portal-hero-line: CanvasText;
        --portal-hero-panel-bg: Canvas;
        --portal-scheduler-shell-bg: Canvas;
        --portal-scheduler-nav-bg: Canvas;
        --portal-scheduler-header-bg: Canvas;
        --portal-scheduler-slot-bg: Canvas;
        --portal-scheduler-slot-border: CanvasText;
        --portal-scheduler-appointment-text: CanvasText;
        --portal-scheduler-appointment-default-surface: Canvas;
        --portal-scheduler-appointment-online-surface: Canvas;
        --portal-scheduler-appointment-warning-surface: Canvas;
        --portal-scheduler-appointment-danger-surface: Canvas;
        --portal-scheduler-appointment-pending-surface: Canvas;
        --portal-scheduler-appointment-adhoc-surface: Canvas;
        --portal-focus-outline: Highlight;
        --portal-focus-on-dark-outline: Highlight;
        --portal-focus-primary-outline: Highlight;
        color-scheme: light dark;
    }

    *,
    *::before,
    *::after {
        forced-color-adjust: auto;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    :where(.portal-hero, .portal-section-card, .portal-state-card, .portal-summary-card, .portal-command-card, .portal-filter-panel) {
        background: Canvas !important;
        border: 2px solid CanvasText !important;
        color: CanvasText !important;
    }

    .portal-student-scheduler [data-portal-tone] {
        background: Canvas !important;
        color: CanvasText !important;
        border-color: CanvasText !important;
    }

    .portal-student-scheduler [data-portal-tone="online"] {
        border-inline-start: 5px double LinkText !important;
    }

    .portal-student-scheduler [data-portal-tone="warning"] {
        border: 3px dashed CanvasText !important;
    }

    .portal-student-scheduler [data-portal-tone="danger"] {
        border: 4px double CanvasText !important;
    }

    .portal-student-scheduler [data-portal-tone="pending"] {
        border: 3px dashed GrayText !important;
    }

    .portal-student-scheduler [data-portal-tone="adhoc"] {
        border: 3px dotted CanvasText !important;
    }
}

/* Accessibility: honor reduced-motion preferences by collapsing non-essential
   transitions and animations across the portal shell. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
    }
}

/* Self-service agenda is the narrow-screen default before interactive rendering. */
.portal-self-schedule .portal-self-agenda { display: none; }
.portal-self-schedule[data-self-view="agenda"] .portal-self-agenda { display: block; }
.portal-self-schedule[data-self-view="agenda"] .portal-self-calendar { display: none; }
.portal-self-overview .portal-agenda-item,
.portal-self-agenda .portal-agenda-item { display: flex; flex-direction: column; align-items: flex-start; overflow-wrap: anywhere; }
.portal-self-schedule button, .portal-self-schedule input { min-height: 44px; margin: var(--portal-space-4); }
.portal-self-schedule, .portal-self-overview { min-width: 0; max-width: 100%; }
@media (width < 768px) {
    .portal-self-schedule[data-self-view="auto"] .portal-self-calendar { display: none; }
    .portal-self-schedule[data-self-view="auto"] .portal-self-agenda { display: block; }
}

/* Academic planning controls reuse the shell spacing and colours. */
[data-academic-planning] .portal-actions { align-items: flex-end; }
[data-academic-planning] .portal-planning-field {
    display: grid;
    gap: var(--portal-space-4);
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 22rem;
}
[data-academic-planning] .portal-planning-field :is(.rz-textbox, .rz-dropdown, .rz-numeric, .rz-datepicker) { width: 100%; }
[data-academic-planning] .portal-planning-field.portal-full-width { max-width: none; }
[data-academic-planning] details { overflow-wrap: anywhere; }
[data-academic-planning] [role="tab"] { color: var(--portal-ink-soft); }
[data-academic-planning] [role="tab"][aria-selected="true"] { color: var(--portal-accent-strong); }
[data-academic-planning] .rz-tabview-nav li.rz-tabview-selected { border-color: var(--portal-accent-strong); }
[data-academic-planning] [role="tab"]:is(:hover, :focus-visible) { color: var(--portal-ink); background: var(--portal-bg-soft); }

[data-academic-planning] .rz-grid-table td .rz-cell-data,
[data-academic-planning] .rz-grid-table th .rz-column-title {
    white-space: normal;
    overflow-wrap: anywhere;
}
[data-academic-planning] .rz-data-grid-data table {
    min-width: 68rem;
}
