﻿/* Portal UI system. Shared color, spacing and component contracts for every module. */
html:root {
    color-scheme: light;
    --portal-canvas: #f4f7fc;
    --portal-surface: #ffffff;
    --portal-soft: #eef3fa;
    --portal-surface-muted: #f8fafd;
    --portal-border: #dce4ef;
    --portal-control-border: #a9b9ce;
    --portal-ink: #162b49;
    --portal-muted: #536580;
    --portal-radius: .75rem;
    --portal-shadow-sm: 0 1px 3px rgb(20 45 80 / 4%);
    --portal-shadow-md: 0 16px 48px rgb(20 45 80 / 13%);
    --portal-control-min-height: 2.5rem;
    --portal-surface-radius: .75rem;
    --rz-primary: #205bc2;
    --rz-primary-light: #eaf1ff;
    --rz-primary-lighter: #eaf1ff;
    --rz-primary-dark: #18489c;
    --rz-primary-darker: #123b83;
    --rz-on-primary: #ffffff;
    --rz-on-primary-light: #164895;
    --rz-on-primary-lighter: #164895;
    --rz-secondary: #536580;
    --rz-on-secondary: #ffffff;
    --rz-text-color: var(--portal-ink);
    --rz-text-secondary-color: var(--portal-muted);
    --rz-body-background-color: var(--portal-canvas);
    --rz-base-background-color: var(--portal-surface);
    --rz-base-50: #f8fafd;
    --rz-base-100: #f0f4fa;
    --rz-base-200: #e8eef7;
    --rz-base-300: #dce4ef;
    --rz-base-400: #a9b9ce;
    --rz-base-500: #6b7d96;
    --rz-base-600: #536580;
    --rz-base-700: #344966;
    --rz-base-800: #233955;
    --rz-base-900: #162b49;
    --rz-link-color: #205bc2;
    --rz-link-hover-color: #123b83;
    --rz-border-radius: .5rem;
    --rz-input-background-color: var(--portal-surface);
    --rz-input-value-color: var(--portal-ink);
    --rz-input-placeholder-color: #61728b;
    --rz-input-disabled-color: #61728b;
    --rz-info: #205bc2;
    --rz-on-info: #ffffff;
    --rz-info-lighter: #edf4ff;
    --rz-on-info-lighter: #214b86;
    --rz-success: #247049;
    --rz-on-success: #ffffff;
    --rz-success-lighter: #edf7f0;
    --rz-on-success-lighter: #205b3c;
    --rz-warning: #895409;
    --rz-on-warning: #ffffff;
    --rz-warning-lighter: #fff7e5;
    --rz-on-warning-lighter: #704609;
    --rz-danger: #b52c3c;
    --rz-on-danger: #ffffff;
    --rz-danger-lighter: #fff0f1;
    --rz-on-danger-lighter: #962638;
    --rz-font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}
html[data-portal-theme="dark"] {
    color-scheme: dark;
    --portal-canvas: #101b2d;
    --portal-surface: #18263b;
    --portal-soft: #22344d;
    --portal-surface-muted: #1c2c44;
    --portal-border: #354963;
    --portal-control-border: #7185a0;
    --portal-ink: #edf3ff;
    --portal-muted: #b7c7df;
    --rz-primary: #94bbff;
    --rz-primary-dark: #b2cdff;
    --rz-primary-darker: #c9dcff;
    --rz-primary-light: #253f66;
    --rz-primary-lighter: #253f66;
    --rz-on-primary: #112649;
    --rz-on-primary-light: #d6e5ff;
    --rz-on-primary-lighter: #d6e5ff;
    --rz-link-color: #a6c7ff;
    --rz-link-hover-color: #d6e5ff;
    --rz-base-50: #1c2c44;
    --rz-base-100: #22344d;
    --rz-base-200: #2a3e59;
    --rz-base-300: #354963;
    --rz-base-400: #7185a0;
    --rz-base-500: #99acc6;
    --rz-base-600: #b7c7df;
    --rz-base-700: #d1dff3;
    --rz-base-800: #e0eaff;
    --rz-base-900: #edf3ff;
    --rz-input-placeholder-color: #b7c7df;
    --rz-input-disabled-color: #b7c7df;
    --rz-info-lighter: #213c60;
    --rz-on-info-lighter: #d5e6ff;
    --rz-success-lighter: #1d3d32;
    --rz-on-success-lighter: #b6e4ca;
    --rz-warning-lighter: #46391f;
    --rz-on-warning-lighter: #f5d99c;
    --rz-danger-lighter: #492b3b;
    --rz-on-danger-lighter: #ffd4dc;
}
body { font-family: var(--rz-font-family); font-size: .875rem; line-height: 1.5; color: var(--portal-ink); background: var(--portal-canvas); -webkit-font-smoothing: antialiased; }
a { color: var(--rz-link-color); text-underline-offset: .2em; }
a:hover { color: var(--rz-link-hover-color); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--rz-primary); outline-offset: 3px; }
:where(h1, h2, h3, h4, h5, h6) { color: var(--portal-ink); letter-spacing: -.025em; line-height: 1.25; }
:where(.rz-text-h3, .rz-text-h4, .rz-text-h5, .rz-text-h6) { color: var(--portal-ink); font-weight: 650; }
.rz-text-h3 { font-size: 1.65rem; }
.rz-text-h4 { font-size: 1.35rem; }
.rz-text-h5 { font-size: 1.1rem; }
.rz-text-h6 { font-size: 1rem; }
.rz-text-body1, .rz-text-body2 { font-size: .875rem; }
.rz-text-caption { font-size: .8rem; color: var(--portal-muted); }
/* Application frame */
.app-shell .app-header { --rz-header-color: var(--portal-ink); --rz-header-background-color: var(--portal-surface); background: var(--portal-surface); color: var(--portal-ink); border-bottom: 1px solid var(--portal-border); box-shadow: none; }
.app-shell .app-header-inner { min-height: 4rem; padding-inline: 1rem; }
.app-shell .app-body { background: var(--portal-canvas); }
.app-shell .app-sidebar { background: var(--portal-surface); border-inline-end: 1px solid var(--portal-border); box-shadow: none; width: 17rem; }
.app-shell .app-brand, .app-shell .app-nav-toggle { color: var(--portal-ink); }
.app-brand { letter-spacing: -.025em; }
.app-shell .app-brand-mark { width: 2rem; height: 2rem; background: var(--rz-primary); color: var(--rz-on-primary); border-radius: .6rem; }
.app-shell .app-content { width: min(100%, 100rem); padding: 1.5rem clamp(1rem, 2.5vw, 2.25rem) 3rem; }
.app-shell .app-breadcrumbs { font-size: .75rem; margin-bottom: 1.25rem; color: var(--portal-muted); }
.app-header-search.rz-button { min-width: 15rem; justify-content: flex-start; color: var(--portal-muted); background: var(--portal-surface-muted); border: 1px solid var(--portal-border); }
.app-header-search::after { content: 'Ctrl K'; margin-inline-start: auto; padding: .1rem .35rem; border: 1px solid var(--portal-border); border-radius: .25rem; font-size: .65rem; }
.app-header-help.rz-button { background: transparent; color: var(--portal-muted); }
.app-shell .rz-profile-menu { background: transparent; color: var(--portal-ink); }
.app-shell .rz-profile-menu .rz-navigation-item-wrapper { background: transparent; color: var(--portal-ink); border-radius: .5rem; }
.app-shell .app-user-name { color: var(--portal-ink); font-size: .85rem; }
.app-shell .app-user-role { color: var(--portal-muted); font-size: .7rem; }
.app-header .rz-profile-menu .rzi { color: var(--rz-primary); }
/* Navigation: visible destinations, searchable by the user's own task. */
.navigation-workspace { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.app-sidebar .workspace-context { margin: 0; padding: 1rem; border: 0; border-radius: 0; background: var(--portal-surface); border-bottom: 1px solid var(--portal-border); gap: .6rem; }
.workspace-context__field select { border-color: var(--portal-border); border-radius: .4rem; color: var(--portal-ink); background: var(--portal-surface-muted); }
.navigation-filter { display: flex; align-items: center; gap: .5rem; margin: .9rem .85rem .4rem; padding: .45rem .6rem; border: 1px solid var(--portal-border); border-radius: .5rem; color: var(--portal-muted); }
.navigation-filter .rzi { font-size: 1.1rem; }
.navigation-filter input { border: 0; background: transparent; color: var(--portal-ink); width: 100%; min-width: 0; font: inherit; font-size: .8rem; }
.navigation-filter input::placeholder { color: var(--portal-muted); }
.navigation-filter:focus-within { outline: 2px solid var(--rz-primary); outline-offset: 2px; }
.navigation-filter input:focus-visible { outline: 0; }
.app-navigation { overflow-y: auto; min-height: 0; padding: .4rem .6rem 1.5rem; }
.navigation-link { display: flex; align-items: center; gap: .65rem; min-height: 2.4rem; padding: .55rem .65rem; border-radius: .45rem; color: var(--portal-muted); font-size: .82rem; font-weight: 500; line-height: 1.35; text-decoration: none; }
.navigation-link .rzi { font-size: 1.15rem; color: var(--portal-muted); flex-shrink: 0; }
.navigation-link:hover { background: var(--portal-soft); color: var(--portal-ink); }
.navigation-link.active { background: var(--rz-primary-lighter); color: var(--rz-primary); font-weight: 650; }
.navigation-link.active .rzi { color: inherit; }
.navigation-group { margin-top: .35rem; }
.navigation-group > summary { display: flex; align-items: center; justify-content: space-between; padding: .65rem; cursor: pointer; list-style: none; font-size: .76rem; font-weight: 650; color: var(--portal-ink); }
.navigation-group > summary::-webkit-details-marker { display: none; }
.navigation-group > summary .rzi { font-size: 1.1rem; color: var(--portal-muted); transition: transform .15s; }
.navigation-group[open] > summary .rzi { transform: rotate(180deg); }
.navigation-group > .navigation-link { margin-inline-start: .3rem; }
.navigation-all-tools { margin-top: .75rem; border-top: 1px solid var(--portal-border); border-radius: 0; }
.navigation-no-results { padding: .75rem; color: var(--portal-muted); }
/* Headings and content surfaces */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.25rem; padding: 0; border: 0; }
.page-title { margin: 0; font-size: clamp(1.45rem, 2.2vw, 1.85rem); font-weight: 650; letter-spacing: -.035em; }
.page-description { max-width: 70ch; margin: .4rem 0 0; color: var(--portal-muted); font-size: .85rem; line-height: 1.6; }
.page-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.rz-card { border: 1px solid var(--portal-border); border-radius: var(--portal-radius); background: var(--portal-surface); box-shadow: var(--portal-shadow-sm); padding: 1.25rem; }
.rz-card .rz-card { box-shadow: none; }
.section-card-header { padding-bottom: .9rem; border-bottom: 1px solid var(--portal-border); flex-wrap: wrap; }
.section-title { margin: 0; font-size: 1rem; font-weight: 650; }
.section-description { margin: .3rem 0 0; font-size: .8rem; color: var(--portal-muted); }
.section-card-body { min-width: 0; }
.app-shell .app-content .rz-card { box-shadow: var(--portal-shadow-sm); }
.page-guidance { margin-bottom: .75rem; border-bottom: 1px solid var(--portal-border); color: var(--portal-muted); font-size: .8rem; }
.page-guidance > summary { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 0; cursor: pointer; list-style: none; color: var(--rz-primary); }
.page-guidance > summary .rzi { font-size: 1.1rem; }
.page-guidance-content { max-width: 80ch; padding: .25rem 0 .85rem; line-height: 1.6; }
.rz-fieldset { border: 1px solid var(--portal-border); border-radius: .65rem; background: var(--portal-surface); }
.rz-fieldset-legend-text { font-size: .9rem; font-weight: 650; }
/* All actions share shape, emphasis and focus, including dialogs outside app-shell. */
.rz-button { min-height: var(--portal-control-min-height); height: auto; padding: .6rem .9rem; border-radius: .45rem; text-transform: none; font-size: .82rem; font-weight: 600; letter-spacing: 0; box-shadow: none; gap: .4rem; line-height: 1.25; }
.rz-button:not(:disabled):hover { box-shadow: none; }
.rz-button.rz-size-sm, .rz-button.rz-size-xs { min-height: 2rem; padding: .35rem .6rem; font-size: .78rem; }
.rz-button.rz-light { background: var(--portal-surface); color: var(--portal-ink); border: 1px solid var(--portal-border); }
.rz-button.rz-light:hover { background: var(--portal-soft); border-color: var(--portal-control-border); }
.rz-button.rz-variant-text { box-shadow: none; }
.rz-button:disabled { cursor: not-allowed; }
.responsive-form-actions, .equipment-form-actions, .form-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--portal-border); }
.entity-toolbar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--portal-border); border-radius: .65rem; background: var(--portal-surface); }
.entity-toolbar-start, .entity-toolbar-end { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .65rem; min-width: 0; }
.entity-toolbar-start { flex: 1; }
/* Forms */
.rz-form-field { max-width: 100%; font-size: .85rem; }
:where(.rz-inputtext, .rz-textbox, .rz-textarea, .rz-dropdown, .rz-multiselect, .rz-numeric, .rz-datepicker, .rz-password, .rz-autocomplete) { border-radius: .45rem; border-color: var(--portal-control-border); font-size: .85rem; color: var(--portal-ink); background-color: var(--portal-surface); }
:where(.rz-label, .rz-form-field-label) { color: var(--portal-muted); font-size: .8rem; }
:where(input, textarea)::placeholder { color: var(--portal-muted); opacity: 1; }
.rz-form-field:focus-within { --rz-form-field-label-color: var(--rz-primary); }
.validation-message, .rz-message-error { font-size: .8rem; color: var(--rz-danger); }
/* Lists and tables retain component-managed widths, virtualization and visibility. */
.rz-data-grid { border: 1px solid var(--portal-border); border-radius: .65rem; background: var(--portal-surface); box-shadow: none; }
.rz-grid-table thead th { background: var(--portal-surface-muted); color: var(--portal-muted); border-color: var(--portal-border); font-size: .76rem; font-weight: 600; letter-spacing: 0; }
.rz-grid-table td { border-color: var(--portal-border); }
.rz-cell-data { color: var(--portal-ink); font-size: .82rem; line-height: 1.5; }
.rz-grid-table tbody tr:hover > td { background-color: var(--portal-soft); }
.rz-grid-table tbody tr.rz-state-highlight > td { background-color: var(--rz-primary-lighter); }
.rz-grid-table .rz-button { min-height: 2rem; padding: .35rem .5rem; }
.rz-grid-table .rz-button .rzi { font-size: 1.1rem; }
.portal-grid-actions { gap: .35rem; padding: .15rem; }
.rz-paginator { padding: .65rem; border-top: 1px solid var(--portal-border); background: var(--portal-surface); font-size: .8rem; }
.rz-paginator-page { border-radius: .4rem; }
.rz-datalist-content { background: var(--portal-surface); }
/* Tabs, disclosure and secondary navigation */
.rz-tabview { min-width: 0; }
.rz-tabview-nav { gap: .5rem; border-color: var(--portal-border); }
.rz-tabview-nav li { box-shadow: none; border-radius: 0; }
.rz-tabview-nav li a { padding: .8rem .6rem; font-size: .82rem; font-weight: 600; }
.rz-tabview-nav li a, .rz-tabview-nav li a span { text-transform: none; letter-spacing: 0; }
.rz-grid-table thead th .rz-column-title { white-space: normal; line-height: 1.35; }
.rz-tabview-panels { border: 0; background: transparent; padding: 1rem 0; }
.rz-accordion-header, .rz-panel-titlebar { border-color: var(--portal-border); background: var(--portal-surface-muted); font-size: .85rem; }
/* Feedback: soft surfaces reserve strong color for actions and exceptional states. */
.rz-alert { border: 1px solid transparent; border-radius: .5rem; padding: .8rem 1rem; font-size: .82rem; line-height: 1.5; box-shadow: none; }
.rz-alert.rz-info { background: var(--rz-info-lighter); color: var(--rz-on-info-lighter); border-color: color-mix(in srgb, var(--rz-on-info-lighter) 18%, transparent); }
.rz-alert.rz-success { background: var(--rz-success-lighter); color: var(--rz-on-success-lighter); }
.rz-alert.rz-warning { background: var(--rz-warning-lighter); color: var(--rz-on-warning-lighter); }
.rz-alert.rz-danger { background: var(--rz-danger-lighter); color: var(--rz-on-danger-lighter); }
.rz-alert .rz-alert-close { color: inherit; }
.rz-badge { padding: .2rem .5rem; font-size: .72rem; font-weight: 600; border-radius: .35rem; letter-spacing: 0; }
.state-card { padding: 1.5rem; border-style: dashed; box-shadow: none; background: var(--portal-surface-muted); }
.state-card-content { min-height: 5rem; text-align: center; gap: .5rem; }
.state-card-icon-wrap { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .6rem; background: var(--portal-soft); color: var(--portal-muted); }
.state-card .state-card-icon { font-size: 1.35rem; }
.state-card .rz-text-h5 { font-size: 1rem; margin: 0; }
.state-card .rz-text-body2 { max-width: 55ch; margin: 0; color: var(--portal-muted); }
.error-state { border-style: solid; border-color: var(--rz-danger); }
.error-state .state-card-icon-wrap { color: var(--rz-danger); background: var(--rz-danger-lighter); }
.loading-state { min-height: 8rem; padding: 1.5rem; color: var(--portal-muted); }
.rz-dialog { border: 1px solid var(--portal-border); border-radius: .9rem; background: var(--portal-surface); box-shadow: var(--portal-shadow-md); overflow: hidden; }
.rz-dialog-titlebar { padding: 1rem 1.25rem; background: var(--portal-surface); border-bottom: 1px solid var(--portal-border); }
.rz-dialog-title { font-size: 1.1rem; font-weight: 650; letter-spacing: -.02em; color: var(--portal-ink); }
.rz-dialog-content { padding: 1.25rem; }
.rz-dialog-wrapper { z-index: 1600; }
.rz-notification { z-index: 2100; }
.rz-dialog-confirm-buttons { padding: 1rem 1.25rem; gap: .5rem; border-top: 1px solid var(--portal-border); background: var(--portal-surface-muted); }
.rz-notification-message { border-radius: .65rem; box-shadow: var(--portal-shadow-md); font-size: .85rem; }
/* Dashboard is a working overview, not a wall of cards. */
.dashboard-workspace { gap: 1.25rem !important; }
.dashboard-widget-zone { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.dashboard-widget-zone > [data-dashboard-widget] { min-width: 0; grid-column: 1 / -1; }
.dashboard-widget-zone > [data-widget-size="small"] { grid-column: span 3; }
.dashboard-widget-zone > [data-widget-size="medium"] { grid-column: span 6; }
.dashboard-widget-zone > [data-widget-size="large"] { grid-column: span 9; }
.dashboard-widget-zone > [data-widget-size="full"] { grid-column: 1 / -1; }
.dashboard-widget-zone > [data-dashboard-widget][hidden] { display: none !important; }
.dashboard-metrics[data-widget-size="small"], .dashboard-metrics[data-widget-size="medium"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-metrics[data-widget-size="small"] .dashboard-metric:nth-child(3), .dashboard-metrics[data-widget-size="medium"] .dashboard-metric:nth-child(3) { border-inline-start: 0; }
.dashboard-metrics[data-widget-size="small"] .dashboard-metric:nth-child(n+3), .dashboard-metrics[data-widget-size="medium"] .dashboard-metric:nth-child(n+3) { border-top: 1px solid var(--portal-border); }
.dashboard-welcome { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 0 .25rem; border: 0; background: transparent; }
.dashboard-welcome h1 { margin: 0; font-size: clamp(1.6rem, 2.5vw, 2rem); font-weight: 650; letter-spacing: -.04em; }
.dashboard-welcome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.workspace-primary-link, .workspace-secondary-link { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.5rem; padding: .55rem .85rem; border: 1px solid transparent; border-radius: .45rem; font-size: .82rem; font-weight: 600; text-decoration: none; }
.workspace-primary-link { background: var(--rz-primary); color: var(--rz-on-primary); }
.workspace-primary-link:hover { background: var(--rz-primary-dark); color: var(--rz-on-primary); }
.workspace-secondary-link { background: var(--portal-surface); border-color: var(--portal-border); color: var(--portal-muted); }
.workspace-secondary-link:hover { color: var(--rz-primary); border-color: var(--rz-primary); }
.dashboard-quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .65rem; }
.dashboard-quick-actions a { display: flex; align-items: center; gap: .6rem; min-height: 3.4rem; padding: .75rem 1rem; border: 1px solid var(--portal-border); border-radius: .65rem; background: var(--portal-surface); color: var(--portal-ink); text-decoration: none; font-size: .82rem; font-weight: 600; }
.dashboard-quick-actions a:hover { border-color: var(--rz-primary); background: var(--rz-primary-lighter); }
.dashboard-quick-actions .rzi { color: var(--rz-primary); font-size: 1.2rem; }
.dashboard-quick-actions .rzi:last-child { margin-inline-start: auto; font-size: 1rem; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--portal-border); border-radius: .7rem; background: var(--portal-surface); }
.dashboard-metric { position: relative; display: grid; grid-template-columns: 1.1rem 1fr; align-content: center; gap: .3rem .65rem; padding: 1rem 1.25rem; color: var(--portal-ink); text-decoration: none; }
.dashboard-metric + .dashboard-metric { border-inline-start: 1px solid var(--portal-border); }
.dashboard-metric > .rzi:first-child { grid-row: 1 / span 2; align-self: start; margin-top: .25rem; font-size: 1.1rem; color: var(--rz-primary); }
.dashboard-metric strong { font-size: 1.6rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dashboard-metric > span:not(.rzi) { font-size: .76rem; color: var(--portal-muted); }
.dashboard-metric .metric-arrow { position: absolute; top: 1rem; right: .75rem; font-size: 1rem; color: var(--portal-muted); }
a.dashboard-metric:hover { background: var(--portal-soft); color: var(--portal-ink); }
.dashboard-empty { display: flex; align-items: center; min-height: 3rem; margin: 0; padding: .65rem 0; color: var(--portal-muted); font-size: .85rem; }
.dashboard-link-card { display: block; height: 100%; padding: 1rem; border: 1px solid var(--portal-border); border-radius: .65rem; background: var(--portal-surface); color: var(--portal-ink); text-decoration: none; }
.dashboard-link-card:hover { color: var(--portal-ink); border-color: var(--rz-primary); }
.dashboard-link-card .rzi { color: var(--rz-primary); font-size: 1.3rem; }
.dashboard-link-card .rz-text-h6 { font-size: .9rem; margin: 0; }
.dashboard-link-card .rz-text-caption { margin: 0; line-height: 1.5; }
.portal-metric { display: grid; gap: .25rem; }
.portal-metric strong { font-size: 1.6rem; font-weight: 650; color: var(--portal-ink); }
.portal-metric span { color: var(--portal-muted); font-size: .8rem; }
.dashboard-layout-editor { display: flex; flex-direction: column; gap: .65rem; }
.dashboard-editor-widget { display: grid; grid-template-columns: 1rem 1.25rem minmax(9rem, 1fr) minmax(8rem, 10rem) minmax(9rem, 11rem); gap: .75rem; padding: 1rem; background: var(--portal-surface); border: 1px solid var(--portal-border); border-radius: .55rem; }
.dashboard-editor-widget .rz-dropdown { min-width: 0 !important; width: 100%; }
.dashboard-refresh-field { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.dashboard-refresh-field .rz-numeric { width: 5rem !important; min-width: 0; }
.status-card-label { font-size: .78rem; font-weight: 600; color: var(--portal-muted); }
.record-title-link { font-weight: 600; text-decoration: none; }
.record-title-link:hover { text-decoration: underline; }
/* Directory, settings and module entry points */
.workspace-navigation-tile { display: flex; align-items: center; gap: .85rem; height: 100%; min-height: 4.75rem; padding: 1rem; border: 1px solid var(--portal-border); border-radius: .65rem; background: var(--portal-surface); color: var(--portal-ink); text-decoration: none; }
.workspace-navigation-tile:hover { border-color: var(--rz-primary); background: var(--portal-surface-muted); color: var(--portal-ink); }
.workspace-navigation-icon { flex-shrink: 0; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .55rem; background: var(--rz-primary-lighter); color: var(--rz-primary); font-size: 1.2rem; }
.workspace-navigation-copy { display: grid; gap: .25rem; min-width: 0; }
.workspace-navigation-copy strong { font-size: .85rem; font-weight: 600; }
.workspace-navigation-copy > span { font-size: .77rem; line-height: 1.5; color: var(--portal-muted); }
.workspace-navigation-arrow { margin-inline-start: auto; color: var(--portal-muted); font-size: 1rem; }
.tool-directory { display: grid; gap: 1.5rem; }
.tool-directory-search { display: grid; gap: .4rem; max-width: 40rem; }
.tool-directory-search label { font-size: .8rem; font-weight: 600; color: var(--portal-muted); }
.tool-directory-search input, .tool-search-input { width: 100%; min-height: 2.75rem; padding: .7rem .85rem; border: 1px solid var(--portal-control-border); border-radius: .5rem; background: var(--portal-surface); color: var(--portal-ink); font: inherit; }
.tool-directory-group h2 { margin: 0 0 .75rem; font-size: 1rem; font-weight: 650; }
.tool-directory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .65rem; }
.section-shortcuts { display: flex; flex-wrap: wrap; gap: .5rem; }
.section-shortcuts a { padding: .5rem .75rem; border: 1px solid var(--portal-border); border-radius: .4rem; color: var(--portal-ink); background: var(--portal-surface); text-decoration: none; }
.section-shortcuts a:hover { border-color: var(--rz-primary); }
.portal-command-palette { color: var(--portal-ink); border: 1px solid var(--portal-border); border-radius: .85rem; background: var(--portal-surface); }
.command-tool-result { background: var(--portal-surface); display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: .45rem; color: var(--portal-ink); text-decoration: none; }
.command-tool-result:hover { color: var(--portal-ink); background: var(--portal-soft); }
.command-tool-result > .rzi { color: var(--rz-primary); font-size: 1.15rem; }
.command-tool-result > span:nth-child(2) { display: grid; flex: 1; gap: .15rem; }
.command-tool-result strong { color: var(--portal-ink); font-size: .85rem; font-weight: 600; }
.command-tool-result small { font-size: .75rem; color: var(--portal-muted); }
.app-shell .portal-command-palette a.command-tool-result { color: var(--portal-ink); }
.app-shell .portal-command-palette a.command-all-tools { color: var(--rz-link-color); }
.app-shell .portal-command-palette a.command-all-tools:hover { color: var(--rz-link-hover-color); }
.command-all-tools { display: block; text-align: center; padding: .6rem; border-top: 1px solid var(--portal-border); }
.work-record-picker { display: grid; gap: .5rem; padding-block: .5rem; }
.selected-work-record { display: grid; gap: .25rem; padding: .75rem; background: var(--portal-soft); border-radius: .5rem; }
.selected-work-record span { color: var(--portal-muted); font-size: .8rem; }
.work-hub-summary__tile { background: var(--portal-surface-muted); border-color: var(--portal-border); border-radius: .5rem; }
.app-content [id] { scroll-margin-top: 1rem; }
/* Identity pages use the same product language without a marketing panel. */
.identity-shell { --identity-accent: var(--rz-primary); --identity-ink: var(--portal-ink); --identity-muted: var(--portal-muted); --identity-border: var(--portal-border); background: var(--portal-canvas); }
.identity-shell .identity-toolbar { border-bottom: 1px solid var(--portal-border); }
.identity-shell .account-card { border: 1px solid var(--portal-border); box-shadow: var(--portal-shadow-md); border-radius: .9rem; }
.identity-shell .account-heading { text-align: left; }
.identity-shell .account-heading-icon { font-size: 1.75rem; }
.identity-shell .account-heading .account-subtitle { text-align: left; font-size: .85rem; }
.identity-shell .account-title { font-size: 1.65rem; }
.identity-shell .identity-brand__mark { background: var(--rz-primary); }
[data-portal-density="compact"] { --portal-control-min-height: 2.15rem; }
@media (max-width: 1100px) {
    .app-header-search.rz-button { min-width: 10rem; }
    .app-header-search::after { display: none; }
    .dashboard-metric { padding: .85rem; }
}
@media (max-width: 768px) {
    .app-shell .app-header-inner { padding-inline: .65rem; gap: .5rem; }
    .app-shell .app-content { padding: 1rem .8rem 3rem; }
    .app-header-search.rz-button { min-width: 2.5rem; }
    .app-header .app-header-tools { gap: .3rem; }
    .dashboard-welcome { align-items: flex-start; flex-direction: column; gap: .85rem; }
    .dashboard-welcome-actions { width: 100%; }
    .dashboard-welcome-actions > a { flex: 1; }
    .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-widget-zone > [data-dashboard-widget] { grid-column: 1 / -1; }
    .dashboard-editor-widget { grid-template-columns: 1rem 1.25rem minmax(0, 1fr); gap: .65rem; }
    .dashboard-editor-widget > .rz-dropdown { grid-column: 2 / -1; }
    .dashboard-refresh-field { grid-column: 2 / -1; }
    .dashboard-metric:nth-child(3) { border-inline-start: 0; }
    .dashboard-metric:nth-child(n+3) { border-top: 1px solid var(--portal-border); }
    .dashboard-metric { min-height: 5.5rem; }
    .dashboard-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-quick-actions a { padding: .7rem; font-size: .78rem; }
    .dashboard-quick-actions .rzi:last-child { display: none; }
    .rz-card { padding: 1rem; }
    .page-header-actions { width: 100%; }
    .entity-toolbar { padding: .75rem; }
    .entity-toolbar-start, .entity-toolbar-end { width: 100%; }
    .entity-toolbar-start > :where(.rz-textbox, .rz-form-field) { width: 100% !important; }
    .rz-dialog-content { padding: 1rem; }
    .responsive-form-actions > .rz-button, .equipment-form-actions > .rz-button { flex: 1; min-height: 2.75rem; }
    .workspace-navigation-tile { min-height: 4.5rem; }
    .rz-button { min-height: 2.75rem; }
}
@media (forced-colors: active) { .navigation-link.active { outline: 2px solid Highlight; } }

/* Editors organize decisions into short sections. Optional fields do not compete with the main task. */
.editor-section { min-width: 0; margin: 0 0 1.25rem; padding: 0; border: 0; }
.editor-section > legend { float: none; width: 100%; margin: 0 0 .9rem; padding: 0 0 .6rem; border-bottom: 1px solid var(--portal-border); font-size: .9rem; font-weight: 650; color: var(--portal-ink); }
.editor-section-fields { display: grid; gap: 1rem; min-width: 0; }
.editor-section-fields > .rz-form-field { width: 100%; }
.editor-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.editor-field-grid > * { min-width: 0; }
.editor-section--optional { border: 1px solid var(--portal-border); border-radius: .55rem; background: var(--portal-surface-muted); }
.editor-section--optional > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .85rem 1rem; cursor: pointer; list-style: none; font-size: .82rem; font-weight: 600; color: var(--portal-muted); }
.editor-section--optional > summary::-webkit-details-marker { display: none; }
.editor-section--optional > summary .rzi { font-size: 1.1rem; }
.editor-section--optional[open] > summary .rzi { transform: rotate(180deg); }
.editor-section--optional .editor-section-fields { padding: .25rem 1rem 1rem; }
.editor-choice-group { display: grid; gap: .5rem; }
.editor-field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--portal-muted); margin-bottom: .35rem; }
.editor-toggle-row { display: flex; align-items: center; gap: .65rem; min-height: 2.5rem; padding-block: .25rem; font-size: .85rem; }
.editor-context { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--portal-muted); font-size: .8rem; }
.editor-context .rzi { font-size: 1.1rem; }
.editor-validation { margin-bottom: 1rem; padding: .75rem; border: 1px solid var(--rz-danger); border-radius: .5rem; color: var(--rz-on-danger-lighter); background: var(--rz-danger-lighter); font-size: .85rem; }
.editor-record-summary { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.25rem; padding: .85rem; border-radius: .5rem; background: var(--portal-soft); color: var(--portal-ink); }
.editor-record-summary .rzi { color: var(--rz-primary); }
.portal-editor-overlay { z-index: 1200; padding: 1.5rem; background: rgb(14 30 54 / 42%); backdrop-filter: blur(3px); }
.portal-editor-panel { width: min(52rem, 100%); max-height: calc(100dvh - 3rem); padding: 0; border: 1px solid var(--portal-border); border-radius: .85rem; background: var(--portal-surface); box-shadow: var(--portal-shadow-md); overflow: auto; }
.portal-editor-panel:focus { outline: none; }
.record-editor-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--portal-border); background: var(--portal-surface); }
.record-editor-header h2 { margin: 0; font-size: 1.15rem; font-weight: 650; }
.record-editor-close { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex-shrink: 0; padding: 0; border: 1px solid var(--portal-border); border-radius: .45rem; color: var(--portal-muted); background: var(--portal-surface); cursor: pointer; }
.record-editor-close:hover { color: var(--rz-primary); background: var(--portal-soft); }
.record-editor-content { padding: 1.25rem; min-width: 0; }
.record-editor-content > .editor-section:last-child { margin-bottom: 0; }
.rz-dialog-content .responsive-form-actions, .record-editor-content .responsive-form-actions { position: sticky; bottom: -1.25rem; z-index: 1; margin: 1rem -1.25rem -1.25rem; padding: 1rem 1.25rem; background: var(--portal-surface); border-top: 1px solid var(--portal-border); }
.record-editor-content .portal-workflow-actions { position: sticky; bottom: -1.25rem; margin: 1rem -1.25rem -1.25rem; border: 0; border-top: 1px solid var(--portal-border); border-radius: 0; padding: 1rem 1.25rem; background: var(--portal-surface); }
@media (max-width: 768px) {
    .editor-field-grid { grid-template-columns: minmax(0, 1fr); }
    .portal-editor-overlay { padding: .5rem; }
    .portal-editor-panel { max-height: calc(100dvh - 1rem); }
    .record-editor-content { padding: 1rem; }
    .record-editor-header { padding: .85rem 1rem; }
    .rz-dialog-content .responsive-form-actions, .record-editor-content .responsive-form-actions { bottom: -1rem; margin-inline: -1rem; margin-bottom: -1rem; padding: .85rem 1rem; }
    .record-editor-close { width: 2.75rem; height: 2.75rem; }
}
/* A record's name and value must remain readable without hovering for a tooltip. */
.rz-grid-table td .rz-cell-data { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.rz-grid-table td .rz-cell-data > a { white-space: normal; overflow-wrap: anywhere; }
.rz-grid-table th .rz-column-title { overflow: visible; text-overflow: clip; overflow-wrap: normal; }
.report-review-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(7rem,1fr)); gap: 1rem; margin: 0 0 1.25rem; }
.report-review-summary div { padding: .9rem; border: 1px solid var(--portal-border); border-radius: .5rem; }
.report-review-summary dt { font-size: .82rem; color: var(--portal-muted); }
.report-review-summary dd { margin: .25rem 0 0; font-size: 1.5rem; font-weight: 650; color: var(--portal-ink); }
.rz-grid-table th .rz-column-title-content { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: normal; min-width: 0; }
.rz-grid-table th .rz-column-title { align-items: center; }
.dashboard-editor-columns, .dashboard-editor-widget { grid-template-columns: 3.5rem 1.25rem minmax(9rem,1fr) minmax(8rem,10rem) minmax(9rem,11rem); }
.dashboard-editor-columns { display: grid; gap: .75rem; padding: 0 1rem; color: var(--portal-muted); font-size: .76rem; font-weight: 600; }
.dashboard-reorder-controls { display: flex; gap: .1rem; align-items: center; }
.dashboard-reorder-controls button { border: 0; border-radius: .25rem; background: var(--portal-soft); color: var(--rz-primary); padding: .1rem .2rem; cursor: pointer; }
.dashboard-reorder-controls button:disabled { opacity: .35; cursor: default; }
@media (max-width: 48rem) {
 .dashboard-editor-columns { display: none; }
 .dashboard-editor-widget { grid-template-columns: 3.5rem 1.25rem minmax(0,1fr); }
}

html .rz-data-grid .rz-grid-table th .rz-column-title-content { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; line-height: 1.35; }
.dashboard-control-label { display: none; }
@media (max-width: 48rem) {
 .dashboard-control-label { display: block; grid-column: 2 / -1; color: var(--portal-muted); font-size: .76rem; }
 .dashboard-refresh-field { display: grid; grid-template-columns: auto 1fr; }
 .dashboard-refresh-field > .dashboard-control-label { grid-column: 1 / -1; }
}
.report-attendance-validation { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem; margin: 1rem 0; background: var(--rz-warning-lighter); color: var(--rz-on-warning-lighter); border-radius: .5rem; flex-wrap: wrap; }
/* Boolean choices use a checkbox and a persistent label, rather than a floating text-field outline. */
html .rz-form-field:has(.rz-form-field-content > .rz-chkbox) .rz-form-field-content { display: flex; align-items: center; gap: .55rem; min-height: 2.5rem; padding: .5rem 0; border: 0; background: transparent; box-shadow: none; }
html .rz-form-field:has(.rz-form-field-content > .rz-chkbox) .rz-form-field-content::before,
html .rz-form-field:has(.rz-form-field-content > .rz-chkbox) .rz-form-field-content::after { display: none; }
html .rz-form-field:has(.rz-form-field-content > .rz-chkbox) .rz-chkbox { width: 1.25rem !important; flex: 0 0 1.25rem; }
html .rz-form-field:has(.rz-form-field-content > .rz-chkbox) .rz-form-field-label { position: static !important; transform: none !important; order: 2; margin: 0; padding: 0; font-size: .85rem; color: var(--portal-ink); background: transparent; }
:where(button, .rz-button) { overflow-wrap: normal; word-break: normal; }
.editor-record-status { display: flex; align-items: center; gap: .6rem; margin-top: .75rem; color: var(--portal-muted); font-size: .82rem; }
.record-picker-hint { font-size: .8rem; color: var(--portal-muted); }

.portal-editor-panel--wide { width: min(96rem, 100%); }

.portal-editor-panel--wide .responsive-form-actions { position: static; margin: 1rem 0 0; padding: 1rem 0 0; }
.automation-node-palette { flex-wrap: wrap; overflow-x: visible; }
.automation-node-palette__item { max-width: 100%; white-space: normal; text-align: left; }

.portal-mobile-table-switch { display: none; }
@media (max-width: 768px) {
    .portal-mobile-table-switch { display: flex; justify-content: flex-end; margin-bottom: .75rem; }
}

.work-task-title { padding: 0; border: 0; background: transparent; color: var(--rz-primary); font: inherit; text-align: start; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.work-task-title:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: .2rem; }
