/* RSV UI system 1.18.94. Local PHP portal components; shared UI kits untouched. */
/* 1.18.93 – module system. Components share geometry, states and typography. */
#app .portal-redesign .rsv-course-search {display:flex;align-items:end;justify-content:space-between;gap:16px;padding:16px;background:var(--rsv-surface-soft);border:1px solid var(--line);border-radius:12px;margin:18px 0}
#app .portal-redesign .rsv-course-search label {width:min(100%,360px)}
#app .portal-redesign .rsv-course-search>span {font-size:12px;color:var(--muted)}
#app .portal-redesign .admin-courses [hidden] {display:none!important}
@media(max-width:650px){#app .portal-redesign .rsv-course-search{align-items:start;flex-direction:column}}
#app .portal-redesign .mobile-menu span {display:none!important}
#app .portal-redesign .message-thread:empty {display:none}
#app .portal-redesign .portal-content button[type=submit].secondary {background:#fff;color:var(--rsv-ink);border:1px solid var(--line);box-shadow:none}
@media(max-width:650px){#app .portal-redesign .editor-save-bar {display:grid!important;grid-template-columns:minmax(0,1fr)}#app .portal-redesign .editor-save-bar button {width:100%;margin:0}}
#app .portal-redesign .rsv-save-feedback,body.portal-active #modal .rsv-save-feedback {padding:12px 14px;background:#edf5fb;border:1px solid #d2e3ef;border-radius:10px;color:#254f6a;font-size:13px;line-height:1.6}
#app .portal-redesign .rsv-save-feedback.is-error,body.portal-active #modal .rsv-save-feedback.is-error {background:#fff1f1;border-color:#e6b2b9;color:#9d2935}
#app .portal-redesign .portal-content .person-name {background:transparent;color:var(--rsv-ink);border:0;padding:4px 0;text-align:left;min-height:44px;white-space:normal;font-weight:700}
#app .portal-redesign .course-editor-heading {background:transparent;border:0;padding:0;box-shadow:none;gap:16px;flex-wrap:wrap}
#app .portal-redesign .course-editor-heading>div:first-child {flex:1 1 220px;min-width:0}
#app .portal-redesign .editor-page .course-editor-heading h1 {overflow-wrap:break-word;word-break:normal}
#app .portal-redesign .portal-content .editor-save-bar button {white-space:normal!important;text-overflow:clip;overflow:visible;min-width:0;line-height:1.45;height:auto;padding:12px}
@media(max-width:650px){#app .portal-redesign .course-editor-heading {flex-direction:column;align-items:start}#app .portal-redesign .course-editor-heading>div:first-child {flex:auto;width:100%}#app .portal-redesign .editor-page .editor-tabs {flex-wrap:wrap;overflow:visible}#app .portal-redesign .editor-page .editor-tabs button {flex:1 1 110px;white-space:normal;overflow:visible}#app .portal-redesign .course-editor-section>.course-editor-section-content {padding:12px 0}}
#app .portal-redesign .rsv-personal-analysis {margin-top:20px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px}
#app .portal-redesign .rsv-personal-analysis>summary {cursor:pointer;min-height:44px;font-size:16px;font-weight:650;color:var(--rsv-ink)}
#app .portal-redesign .rsv-personal-analysis>summary span {display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:5px}
/* Brand roles come from existing Appearance settings; never override them in the shell. */
body.portal-active:has(.portal-redesign) {
 --rsv-ink:#232323; --rsv-ink-soft:#595959; --rsv-surface:#fff;
 --rsv-surface-soft:#f7f7f6; --rsv-page:#f5f5f3; --rsv-line:#e1e1dd;
 --rsv-brand:var(--primary,#171717);
 --rsv-brand-dark:color-mix(in srgb,var(--primary,#171717) 40%,#171717);
 --rsv-brand-soft:color-mix(in srgb,var(--primary,#171717) 4%,white);
 --rsv-focus:var(--rsv-brand-dark); --rsv-radius:18px;
 --rsv-warning:#aa6700; --rsv-shadow:0 12px 30px #1717170a;
}
#app .portal-shell.portal-redesign {--line:var(--rsv-line);--muted:var(--rsv-ink-soft)}
#app .portal-redesign :is(.work-dashboard,.courses-layout,.message-board,.profile-layout,.finance-workspace,.finance-main,.editor-page,.editor-panel,.instructor-directory) {min-width:0}
#app .portal-redesign .portal-content :is(.card,.overview-panel,.session-panel,.finance-detail,.announcement-list,.admin-message-composer,.calendar-settings,.person-file-section) {border:1px solid var(--line);background:#fff;border-radius:18px;box-shadow:0 7px 18px #17171706}
#app .portal-redesign .portal-content :is(.page-header,.dashboard-header,.message-board-head) {padding:0;border:0;background:transparent;box-shadow:none;margin-bottom:26px}
#app .portal-redesign .portal-content .page-header p {font-size:14px;color:var(--muted);margin:6px 0 0}
#app .portal-redesign :is(.scroll,.course-matrix-scroll) {position:relative;max-width:100%;min-width:0;overscroll-behavior-x:contain}
#app .portal-redesign .portal-content button {transition:background-color .14s ease,border-color .14s ease,color .14s ease;line-height:1.4;font-weight:600}
#app .portal-redesign .portal-content button:disabled {cursor:not-allowed;opacity:.55}
#app .portal-redesign .portal-content :is(.empty-state,.dashboard-empty,.payments-empty) {padding:24px;border:1px dashed var(--rsv-line);background:var(--rsv-surface-soft);border-radius:12px;font-size:14px;line-height:1.6;color:var(--muted);text-align:center}
#app .portal-redesign .portal-content :is(.calendar-notice,.dashboard-load-error,.billing-load-error) {border:1px solid #e9cf99;background:#fffbef;border-radius:12px;padding:16px;color:#775213}
#app .portal-redesign .portal-content .dashboard-load-error h2 {color:#775213}
#app .portal-redesign .portal-content input[type=search] {padding-left:14px}
#app .portal-redesign :is(.editor-tabs,.course-view-switch,.duty-switch,.billing-view-switch,.admin-course-switch,.message-tabs) {gap:6px}
#app .portal-redesign .editor-tabs {display:flex;overflow-x:auto;flex-wrap:nowrap;padding:0 0 12px;border-bottom:1px solid var(--line);margin:22px 0;scrollbar-width:thin}
#app .portal-redesign .editor-tabs button {flex:0 0 auto;min-height:44px;border-radius:10px}
#app .portal-redesign .editor-tabs button[aria-selected=true] {background:var(--rsv-brand)!important;color:var(--primary-text)!important;border-color:var(--rsv-brand)!important}
#app .portal-redesign :is(.course-editor-section,.course-assignment-section,.form-section,.session-responsibles) {border:1px solid var(--line);border-radius:14px;background:var(--rsv-surface-soft);margin-top:18px;padding:18px}
#app .portal-redesign :is(.course-editor-section,.course-assignment-section)>summary {font-size:15px;font-weight:700;cursor:pointer}
#app .portal-redesign :is(.course-editor-section,.course-assignment-section)>summary span {font-size:12px;color:var(--muted)}
#app .portal-redesign .editor-page {padding:26px;max-width:1180px}
#app .portal-redesign .editor-page h1 {font-size:clamp(25px,2.6vw,34px);overflow-wrap:anywhere}
#app .portal-redesign .editor-page :is(input,select,textarea) {max-width:100%;min-width:0}
#app .portal-redesign .editor-page textarea {min-height:120px;line-height:1.6}
#app .portal-redesign .editor-page .grid {gap:18px}
#app .portal-redesign :is(.field-error,.form-error) {color:#9d2935;font-size:12px;line-height:1.5}
#app .portal-redesign [aria-invalid=true] {border-color:#b43e43!important;background:#fffafa!important}
#app .portal-redesign .editor-save-bar {background:#fff;border:1px solid var(--line);border-radius:12px;margin:24px 0 0;padding:14px;box-shadow:0 6px 18px #1717170a;gap:10px}
#app .portal-redesign .editor-breadcrumb {margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--line)}
#app .portal-redesign .editor-breadcrumb button {min-height:44px;background:transparent;color:var(--rsv-brand-dark)}
#app .portal-redesign .rsv-form-guide {display:flex;gap:12px;flex-wrap:wrap;margin:22px 0}
#app .portal-redesign .rsv-form-guide span {font-size:12px;background:var(--rsv-brand-soft);color:var(--rsv-brand-dark);border-radius:8px;padding:8px 12px;font-weight:650}
#app .portal-redesign .rsv-form-help {background:#edf5fb;border:1px solid #d2e3ef;border-radius:12px;padding:18px;margin-top:18px}
#app .portal-redesign .rsv-form-help h3 {font-size:15px}
#app .portal-redesign .rsv-form-help p {font-size:13px;line-height:1.6;margin:6px 0}
#app .portal-redesign .entry-number-fields {padding:20px;border:1px solid var(--line);background:var(--rsv-surface-soft);border-radius:14px}
#app .portal-redesign .entry-number-fields label {font-size:13px}
#app .portal-redesign .entry-intro {max-width:700px}
#app .portal-redesign .rsv-proof-summary {margin:22px 0}
#app .portal-redesign .rsv-proof-title {padding:22px;background:var(--rsv-brand-soft);border:1px solid var(--line);border-radius:14px}
#app .portal-redesign .rsv-proof-title h3 {margin:12px 0 6px;font-size:21px}
#app .portal-redesign .rsv-proof-title p {margin:0;max-width:760px}
#app .portal-redesign .rsv-proof-facts {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 0;border:1px solid var(--line);border-radius:12px;overflow:hidden}
#app .portal-redesign .rsv-proof-facts>div {padding:18px;border-right:1px solid var(--line)}
#app .portal-redesign .rsv-proof-facts>div:last-child {border:0}
#app .portal-redesign .rsv-proof-facts dt {font-size:11px;color:var(--muted);margin-bottom:6px}
#app .portal-redesign .rsv-proof-facts dd {font-size:16px;font-weight:650;margin:0;overflow-wrap:anywhere}
#app .portal-redesign :is(.rsv-proof-note,.rsv-correction) {padding:20px;border:1px solid var(--line);border-radius:12px;margin:16px 0}
#app .portal-redesign :is(.rsv-proof-note,.rsv-correction) p {white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 0}
#app .portal-redesign .rsv-correction {background:#fff8e9;border-color:#edd5a4}
#app .portal-redesign .rsv-analytics {margin:24px 0}
#app .portal-redesign .rsv-analytics-title {display:flex;justify-content:space-between;align-items:end;gap:18px;margin-bottom:18px}
#app .portal-redesign .rsv-analytics-title h2 {margin:0}
#app .portal-redesign .rsv-analytics-title>span {font-size:12px;color:var(--muted)}
#app .portal-redesign .rsv-chart-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
#app .portal-redesign .rsv-chart-grid>.rsv-chart:last-child {grid-column:1/-1}
#app .portal-redesign .rsv-chart {min-width:0;padding:24px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 7px 18px #17171706}
#app .portal-redesign .rsv-chart-head {margin-bottom:22px}
#app .portal-redesign .rsv-chart-head h2 {font-size:18px;margin:0 0 6px}
#app .portal-redesign .rsv-chart-head p {margin:0;font-size:12px;line-height:1.6;color:var(--muted);max-width:650px}
#app .portal-redesign .rsv-bar-chart {list-style:none;padding:0;margin:0;display:grid;gap:16px}
#app .portal-redesign .rsv-bar-chart li {display:grid;grid-template-columns:100px minmax(40px,1fr) max-content;gap:3px 12px;align-items:center}
#app .portal-redesign .rsv-chart-label {font-size:12px;color:var(--rsv-ink)}
#app .portal-redesign .rsv-bar-chart strong {font-size:12px;font-weight:650;text-align:right}
#app .portal-redesign .rsv-bar-chart small {grid-column:2/-1;font-size:11px;line-height:1.5;color:var(--muted)}
#app .portal-redesign meter {appearance:none;width:100%;height:12px;border:0;border-radius:8px;background:var(--rsv-line)}
#app .portal-redesign meter::-webkit-meter-bar {background:var(--rsv-line);border:0;border-radius:8px}
#app .portal-redesign meter::-webkit-meter-optimum-value {background:var(--accent);border-radius:8px}
#app .portal-redesign meter::-moz-meter-bar {background:var(--accent);border-radius:8px}
#app .portal-redesign meter.rsv-missing {opacity:.35}
#app .portal-redesign .rsv-chart-values {margin-top:22px;border-top:1px solid var(--line);padding-top:12px}
#app .portal-redesign .rsv-chart-values summary {font-size:12px;color:var(--rsv-brand-dark);cursor:pointer;padding:8px 0}
#app .portal-redesign .rsv-budget-comparison {width:100%;padding:16px;background:var(--rsv-surface-soft);border:1px solid var(--line);border-radius:12px;margin:18px 0}
#app .portal-redesign .rsv-budget-comparison h3 {font-size:15px;margin:0 0 6px}
#app .portal-redesign .rsv-budget-comparison p {font-size:12px;line-height:1.5;margin:0 0 14px}
#app .portal-redesign .rsv-budget-comparison>div {display:grid;grid-template-columns:110px minmax(35px,1fr) auto;gap:10px;align-items:center;font-size:12px;margin:12px 0}
#app .portal-redesign .rsv-budget-comparison>div:not(:has(meter)) {grid-template-columns:1fr auto}
#app .portal-redesign .dashboard-budget-head {min-height:78px}
#app .portal-redesign .dashboard-budget-figure {display:flex;align-items:baseline;justify-content:space-between;gap:16px}
#app .portal-redesign .dashboard-budget-card {min-width:0}
#app .portal-redesign .dashboard-budget-balance {display:flex;align-items:baseline;justify-content:space-between;gap:16px;min-width:0;flex:1}
#app .portal-redesign .dashboard-budget-balance>strong {margin-left:auto;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
#app .portal-redesign .rsv-budget-comparison>div>strong {min-width:5.5em;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
#app .portal-redesign .finance-detail {padding:24px}
#app .portal-redesign .finance-detail-head {display:flex;flex-wrap:wrap;gap:18px;align-items:start}
#app .portal-redesign .finance-primary-metrics {gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden}
#app .portal-redesign .finance-primary-metrics>div {background:#fff;padding:18px;border:0;border-radius:0}
#app .portal-redesign .finance-budget-picker {padding:18px;border:1px solid var(--line);border-radius:14px;background:#fff;gap:12px}
#app .portal-redesign .finance-booking-cards .session-card {padding:18px;border-radius:14px}
#app .portal-redesign :is(.weekly-calendar,.personnel-calendar) {background:transparent;padding:0}
#app .portal-redesign .weekly-grid {gap:10px}
#app .portal-redesign .weekly-day {background:var(--rsv-surface-soft);border:1px solid var(--line);border-radius:14px;padding:12px;min-width:0}
#app .portal-redesign .weekly-course {background:#fff;border:1px solid var(--line);border-left:3px solid var(--course-color);padding:12px;border-radius:10px}
#app .portal-redesign .weekly-course>strong {display:block;font-size:13px;line-height:1.5;overflow-wrap:anywhere;-webkit-line-clamp:unset;overflow:visible}
#app .portal-redesign .weekly-course-head {flex-wrap:wrap;gap:6px}
#app .portal-redesign .weekly-course-actions {opacity:1!important;pointer-events:auto!important;transform:none!important}
#app .portal-redesign .weekly-course .course-person-link {background:var(--rsv-brand-soft);color:var(--rsv-brand-dark);font-size:11px;border-color:var(--rsv-line)}
#app .portal-redesign .weekly-day>header {padding-bottom:12px;border-bottom:1px solid var(--line);font-size:12px}
#app .portal-redesign :is(.admin-course-list-card,.duty-card,.person-quick-card,.simple-card) {background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:none;padding:18px}
#app .portal-redesign :is(.duty-filterbar,.person-quick-filters) {padding:18px;background:var(--rsv-surface-soft);border:1px solid var(--line);border-radius:14px}
#app .portal-redesign .duty-card-date {color:var(--rsv-brand);background:var(--rsv-brand-soft);border-radius:10px}
#app .portal-redesign .duty-card-name {font-size:15px;font-weight:700}
#app .portal-redesign .duty-card .duty-card-meta {line-height:1.6}
#app .portal-redesign .session-panel {padding:24px}
#app .portal-redesign .session-cards {gap:12px}
#app .portal-redesign .session-panel .session-card {padding:18px;border:1px solid var(--line);border-radius:14px;background:#fff}
#app .portal-redesign .session-card-date {background:var(--rsv-brand-soft);color:var(--rsv-brand-dark);border:0;border-radius:10px;padding:12px}
#app .portal-redesign .session-card-heading strong {font-size:16px;line-height:1.5;overflow-wrap:anywhere}
#app .portal-redesign .session-history {margin-top:22px;border-top:1px solid var(--line);padding-top:18px}
#app .portal-redesign .session-history summary {cursor:pointer;color:var(--muted);min-height:44px}
#app .portal-redesign .message-board {gap:20px}
#app .portal-redesign .substitution-section {margin-top:0}
#app .portal-redesign .message-card {border:1px solid var(--line);border-left:4px solid var(--rsv-brand);border-radius:14px;padding:22px;box-shadow:none}
#app .portal-redesign .message-card.claimed {border-left-color:#b67a19}
#app .portal-redesign .message-card.cancelled {border-left-color:#b43e43}
#app .portal-redesign .message-card h2 {font-size:20px}
#app .portal-redesign .message-date {font-size:12px;color:var(--muted)}
#app .portal-redesign .message-thread {background:var(--rsv-surface-soft);border-radius:10px;padding:12px 16px;border-left:2px solid var(--rsv-line)}
#app .portal-redesign .message-thread p {white-space:pre-wrap;overflow-wrap:anywhere}
#app .portal-redesign :is(.announcement-list,.admin-message-composer) {margin:0;padding:24px}
#app .portal-redesign .announcement-card {background:var(--rsv-surface-soft);border:1px solid var(--line);border-left:3px solid var(--rsv-brand);border-radius:12px}
#app .portal-redesign .notification-list {background:#fff8e9;border-color:#ecd4a4}
#app .portal-redesign .profile-layout {gap:20px;grid-template-columns:repeat(2,minmax(0,1fr))}
#app .portal-redesign .profile-layout>.card {padding:24px}
#app .portal-redesign .profile-layout .profile-card {grid-column:1}
#app .portal-redesign .profile-licenses .document-list {border-top:1px solid var(--line);padding-top:20px;margin-top:20px}
#app .portal-redesign .document-row {padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--rsv-surface-soft);margin-top:10px}
#app .portal-redesign .document-row strong {font-size:13px;overflow-wrap:anywhere}
#app .portal-redesign .license-state {background:#e4f5ee;color:#09634d}
#app .portal-redesign .license-state.expiring {background:#fff2d9;color:#925600}
#app .portal-redesign .license-state.expired {background:#fff0f0;color:#a33040}
#app .portal-redesign .person-quick-table {border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}
#app .portal-redesign .person-name {color:var(--rsv-ink)}
#app .portal-redesign .person-badge {border-radius:99px;padding:5px 9px;font-size:11px}
#app .portal-redesign .person-badge.positive {background:#e4f5ee;color:#09634d}
#app .portal-redesign .person-badge.attention {background:#fff2d9;color:#925600}
#app .portal-redesign .person-file-section {padding:22px;margin:16px 0}
#app .portal-redesign .person-file-records {list-style:none;padding:0}
#app .portal-redesign .person-file-records li {border-bottom:1px solid var(--line);padding:14px 0}
#app .portal-redesign .person-file-records small {display:block;color:var(--muted);font-size:12px}
#app .portal-redesign .person-file .editor-tabs {margin-inline:0}
#app .portal-redesign .person-filters :is(input,select) {background:#fff}
#app .portal-redesign .calendar-closure-record {border:1px solid var(--line);border-radius:12px;background:var(--rsv-surface-soft);margin-top:10px}
#app .portal-redesign .appearance-presets {gap:12px}
#app .portal-redesign .appearance-preset {border-radius:12px;background:var(--rsv-surface-soft);color:var(--rsv-ink);border:1px solid var(--line)}
body.portal-active #modal {border:1px solid var(--rsv-line);border-radius:20px;padding:28px;box-shadow:0 25px 80px #17171730;color:var(--rsv-ink);max-width:900px}
body.portal-active #modal :is(input,select,textarea) {border:1px solid var(--rsv-line);border-radius:10px;min-height:44px}
body.portal-active #modal button {min-height:44px;border-radius:10px}
body.portal-active #modal button[type=submit] {background:var(--accent);color:var(--accent-text)}
body.portal-active #modal .modal-dismiss {background:var(--rsv-page);color:var(--rsv-ink-soft);border:1px solid var(--rsv-line)}
body.portal-active #modal::backdrop {background:var(--primary)66;backdrop-filter:blur(3px)}
body.portal-active :is(#modal,#discard-modal) :focus-visible,#app .portal-redesign :focus-visible {outline:3px solid var(--rsv-focus);outline-offset:3px;box-shadow:0 0 0 3px #fff}
@media(max-width:1200px){
 #app .portal-redesign .weekly-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
 #app .portal-redesign .dashboard-budget-cards {grid-template-columns:1fr}
}
@media(max-width:900px){
 #app .portal-redesign .rsv-chart-grid {grid-template-columns:1fr}
 #app .portal-redesign .rsv-chart-grid>.rsv-chart:last-child {grid-column:auto}
 #app .portal-redesign .rsv-proof-facts {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .portal-redesign .rsv-proof-facts>div {border-bottom:1px solid var(--line)}
 #app .portal-redesign .profile-layout {grid-template-columns:1fr}
 #app .portal-redesign .profile-layout>.card {grid-column:1!important}
 #app .portal-redesign .rsv-analytics-title {align-items:start;flex-direction:column;gap:10px}
 #app .portal-redesign .editor-save-bar {bottom:105px}
}
@media(max-width:650px){
 #app .portal-redesign .rsv-chart {padding:18px}
 #app .portal-redesign .rsv-bar-chart li {grid-template-columns:75px minmax(25px,1fr) auto;gap:4px 8px}
 #app .portal-redesign .rsv-bar-chart strong {font-size:11px;max-width:110px}
 #app .portal-redesign .rsv-chart-label {font-size:11px}
 #app .portal-redesign .rsv-budget-comparison>div {grid-template-columns:85px minmax(25px,1fr) auto;gap:8px;font-size:11px}
 #app .portal-redesign .weekly-grid {grid-template-columns:1fr}
 #app .portal-redesign :is(.session-panel,.finance-detail,.announcement-list,.admin-message-composer,.profile-layout>.card,.person-file-section) {padding:16px}
 #app .portal-redesign .session-panel .session-card {grid-template-columns:48px minmax(0,1fr);padding:14px}
 #app .portal-redesign .session-card .actions {grid-column:1/-1;justify-content:flex-start;gap:8px}
 #app .portal-redesign .session-card-heading {flex-wrap:wrap}
 #app .portal-redesign .message-card-top {display:block}
 #app .portal-redesign .message-status {display:inline-flex;margin-top:12px}
 #app .portal-redesign .rsv-form-guide {gap:6px}
 #app .portal-redesign .rsv-form-guide span {font-size:10px;padding:7px 8px}
 #app .portal-redesign .entry-number-fields,#app .portal-redesign .entry-number-fields.time-mode {padding:14px;grid-template-columns:minmax(0,1fr);gap:16px}
 #app .portal-redesign .entry-number-fields label {overflow-wrap:normal;word-break:normal}
 #app .portal-redesign .editor-page {padding:16px}
 #app .portal-redesign .editor-save-bar {margin-inline:0;flex-wrap:wrap;position:static}
 body.portal-active #modal {padding:20px;width:calc(100% - 20px);max-height:calc(100dvh - 24px)}
 #app .portal-redesign .person-filter-fields {grid-template-columns:1fr}
 #app .portal-redesign .rsv-proof-note p {font-size:14px}
}
@media(prefers-reduced-motion:reduce){#app .portal-redesign *,body.portal-active #modal * {transition:none!important;animation:none!important;scroll-behavior:auto!important}}
body.portal-active .portal-shell.portal-redesign {
  color: var(--rsv-ink);
}
body.portal-active:has(.portal-shell.portal-redesign) {
  background: var(--rsv-page);
}
body.portal-active .portal-shell.portal-redesign .portal-main {
  background: radial-gradient(circle at 73% -15%, rgb(7 134 111 / 12%), transparent 31rem), var(--rsv-page);
}
body.portal-active .portal-shell.portal-redesign .app-sidebar {
  background: var(--rsv-ink);
  border-right: 0;
  box-shadow: 10px 0 30px rgb(23 23 23 / 8%);
}
body.portal-active .portal-shell.portal-redesign .sidebar-brand {
  padding: 5px 8px 23px;
  border-bottom: 1px solid rgb(255 255 255 / 16%);
}
body.portal-active .portal-shell.portal-redesign .sidebar-brand strong,
body.portal-active .portal-shell.portal-redesign .sidebar-brand span,
body.portal-active .portal-shell.portal-redesign .sidebar-label { color: var(--primary-text); }
body.portal-active .portal-shell.portal-redesign .sidebar-brand span { opacity: .7; }
body.portal-active .portal-shell.portal-redesign .sidebar-label { opacity: .56; letter-spacing: .14em; font-size: 10px; font-weight: 800; }
body.portal-active .portal-shell.portal-redesign .sidebar-nav { gap: 4px; }
body.portal-active .portal-shell.portal-redesign .sidebar-item { border-radius: 11px; min-height: 44px; padding-inline: 12px; color: color-mix(in srgb,var(--primary-text) 78%,transparent); }
body.portal-active .portal-shell.portal-redesign .sidebar-item:hover { background: rgb(255 255 255 / 10%); color: var(--primary-text); }
body.portal-active .portal-shell.portal-redesign .sidebar-item.is-active { background: rgb(255 255 255 / 16%); color: var(--primary-text); box-shadow: inset 3px 0 0 var(--accent); }
body.portal-active .portal-shell.portal-redesign .sidebar-item svg { opacity: .95; }
body.portal-active .portal-shell.portal-redesign .sidebar-account-footer { border-top-color: rgb(255 255 255 / 16%); }
body.portal-active .portal-shell.portal-redesign .logout-action { color: color-mix(in srgb,var(--primary-text) 78%,transparent); }
body.portal-active .portal-shell.portal-redesign .portal-main .portal-header {
  height: 76px;
  background: rgb(255 255 255 / 88%);
  border-bottom: 1px solid var(--rsv-line);
  backdrop-filter: blur(16px);
}
body.portal-active .portal-shell.portal-redesign .portal-content { max-width: 1440px; padding-top: 30px; }
body.portal-active .portal-shell.portal-redesign .portal-content > :is(.card, .admin-overview, .message-board, .courses-layout, .profile-layout) { min-width: 0; }
body.portal-active .portal-shell.portal-redesign .portal-content > .card,
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-panel,
body.portal-active .portal-shell.portal-redesign .portal-content .catalog-panel,
body.portal-active .portal-shell.portal-redesign .portal-content .entries-panel,
body.portal-active .portal-shell.portal-redesign .portal-content .admin-entries,
body.portal-active .portal-shell.portal-redesign .portal-content .admin-courses,
body.portal-active .portal-shell.portal-redesign .portal-content .message-card,
body.portal-active .portal-shell.portal-redesign .portal-content .profile-card {
  border-color: var(--rsv-line);
  border-radius: var(--rsv-radius);
  box-shadow: var(--rsv-shadow);
}
body.portal-active .portal-shell.portal-redesign .portal-content :is(h1, h2, h3) { color: var(--rsv-ink); }
body.portal-active .portal-shell.portal-redesign .portal-content h1 { font-size: clamp(26px, 2.4vw, 34px); }
body.portal-active .portal-shell.portal-redesign .portal-content h2 { font-size: clamp(19px, 1.65vw, 24px); }
body.portal-active .portal-shell.portal-redesign .portal-content p { color: var(--rsv-ink-soft); }
body.portal-active .portal-shell.portal-redesign .portal-content .page-header,
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-hero,
body.portal-active .portal-shell.portal-redesign .portal-content .message-board-head {
  background: var(--rsv-surface);
  border-color: var(--rsv-line);
  box-shadow: var(--rsv-shadow);
}
body.portal-active .portal-shell.portal-redesign button:not(.sidebar-item):not(.mobile-action-nav button) { border-radius: 10px; }
body.portal-active .portal-shell.portal-redesign .portal-content button.secondary,
body.portal-active .portal-shell.portal-redesign .portal-content .nav button:not(.active) { background: var(--rsv-surface); border: 1px solid var(--rsv-line); color: var(--rsv-ink); }
body.portal-active .portal-shell.portal-redesign .portal-content .nav button.active { background: var(--rsv-ink); color: #fff; }
body.portal-active .portal-shell.portal-redesign :is(button, input, select, textarea):focus-visible { outline: 3px solid color-mix(in srgb, var(--rsv-focus) 48%, transparent); outline-offset: 2px; }
body.portal-active .portal-shell.portal-redesign .portal-content input:not([type=checkbox]):not([type=radio]),
body.portal-active .portal-shell.portal-redesign .portal-content select,
body.portal-active .portal-shell.portal-redesign .portal-content textarea { background: #fff; border-color: var(--rsv-line); border-radius: 10px; min-height: 44px; }
body.portal-active .portal-shell.portal-redesign .portal-content textarea { min-height: 104px; }
body.portal-active .portal-shell.portal-redesign .portal-content label { color: var(--rsv-ink); }
body.portal-active .portal-shell.portal-redesign .portal-content .filters { padding: 16px; background: var(--rsv-surface-soft); border: 1px solid var(--rsv-line); border-radius: 14px; max-width: none; }
body.portal-active .portal-shell.portal-redesign .portal-content .stat { background: var(--rsv-surface); border-color: var(--rsv-line); border-radius: 14px; }
body.portal-active .portal-shell.portal-redesign .portal-content .stat strong { color: var(--rsv-ink); }
body.portal-active .portal-shell.portal-redesign .portal-content table thead th { background: var(--rsv-surface-soft); color: var(--rsv-ink-soft); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
body.portal-active .portal-shell.portal-redesign .portal-content table th:first-child { border-radius: 10px 0 0 10px; }
body.portal-active .portal-shell.portal-redesign .portal-content table th:last-child { border-radius: 0 10px 10px 0; }
body.portal-active .portal-shell.portal-redesign .portal-content table tbody tr { transition: background-color .16s ease; }
body.portal-active .portal-shell.portal-redesign .portal-content table tbody tr:hover { background: var(--rsv-surface-soft); }
body.portal-active .portal-shell.portal-redesign .portal-content .badge { font-weight: 750; }
/* Existing dashboard variants may supply a dark primary background. Keep the
   content readable and use the same neutral surface as the rest of the app. */
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric,
body.portal-active .portal-shell.portal-redesign .portal-content .work-dashboard .dashboard-metric,
body.portal-active .portal-shell.portal-redesign .portal-content .instructor-overview .dashboard-metric {
  background: var(--rsv-surface);
  border: 1px solid var(--rsv-line);
  color: var(--rsv-ink);
  box-shadow: var(--rsv-shadow);
}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric:hover,
body.portal-active .portal-shell.portal-redesign .portal-content .work-dashboard .dashboard-metric:hover {
  background: var(--rsv-surface-soft);
  border-color: color-mix(in srgb, var(--rsv-brand) 45%, var(--rsv-line));
  color: var(--rsv-ink);
}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric :is(span, strong, small) { color: var(--rsv-ink); }
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric small { color: var(--rsv-ink-soft); }
/* The legacy dashboard sheet deliberately uses deeply nested selectors. These
   rules match that scope so the redesign has one predictable visual outcome. */
body.portal-active .portal-shell.portal-redesign .portal-content .work-dashboard .dashboard-metric,
body.portal-active .portal-shell.portal-redesign .portal-content .instructor-overview .dashboard-metric {
  background: var(--rsv-surface) !important;
  border-color: var(--rsv-line) !important;
  color: var(--rsv-ink) !important;
  box-shadow: var(--rsv-shadow) !important;
}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric :is(span, strong, small) { color: var(--rsv-ink) !important; }
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric small { color: var(--rsv-ink-soft) !important; }
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-calendar-toolbar button[aria-pressed="true"] {
  background: var(--rsv-brand) !important;
  border-color: var(--rsv-brand) !important;
  color: var(--primary-text) !important;
}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-calendar-toolbar button[aria-pressed="false"] {
  background: var(--rsv-surface) !important;
  border-color: var(--rsv-line) !important;
  color: var(--rsv-ink) !important;
}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-event,
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-event:hover {
  color: #fff !important;
}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-event :is(time, span, small, strong) {
  color: #fff !important;
}
/* Shared segmented controls: billing, messages, course views and settings. */
body.portal-active .portal-shell.portal-redesign .portal-content :is(.section-subnav, .admin-course-switch, .message-tabs, .billing-view-switch, .billing-subnav, .duty-switch, .course-view-switch, .editor-tabs) {
  background: transparent !important;
}
body.portal-active .portal-shell.portal-redesign .portal-content :is(.section-subnav, .admin-course-switch, .message-tabs, .billing-view-switch, .billing-subnav, .duty-switch, .course-view-switch, .editor-tabs) button {
  background: var(--rsv-surface) !important;
  border-color: var(--rsv-line) !important;
  color: var(--rsv-ink) !important;
}
body.portal-active .portal-shell.portal-redesign .portal-content :is(.section-subnav, .admin-course-switch, .message-tabs, .billing-view-switch, .billing-subnav, .duty-switch, .course-view-switch, .editor-tabs) button.active,
body.portal-active .portal-shell.portal-redesign .portal-content :is(.section-subnav, .admin-course-switch, .message-tabs, .billing-view-switch, .billing-subnav, .duty-switch, .course-view-switch, .editor-tabs) button[aria-current="page"],
body.portal-active .portal-shell.portal-redesign .portal-content .duty-switch button[aria-pressed="true"] {
  background: var(--rsv-brand) !important;
  border-color: var(--rsv-brand) !important;
  color: var(--primary-text) !important;
  box-shadow: none !important;
}
body.portal-active .portal-shell.portal-redesign .portal-content .message-board { display: grid; gap: 18px; }
body.portal-active .portal-shell.portal-redesign .portal-content .message-board-head {
  width: 100%;
  min-width: 0;
  color: var(--rsv-ink);
  background: var(--rsv-surface);
}
body.portal-active .portal-shell.portal-redesign .portal-content .message-board-head :is(h1, p, small) { color: var(--rsv-ink); }
body.portal-active .portal-shell.portal-redesign .portal-content .message-board-head p { color: var(--rsv-ink-soft); }
body.portal-active .portal-shell.portal-redesign .portal-content .message-count { flex: 0 0 auto; background: var(--rsv-brand); color:var(--primary-text); }
body.portal-active .portal-shell.portal-redesign .portal-content .message-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  width: min(100%, 760px);
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}
body.portal-active .portal-shell.portal-redesign .portal-content .message-tabs button,
body.portal-active .portal-shell.portal-redesign .portal-content .message-tabs button.active {
  justify-content: flex-start;
  min-height: 46px;
  color: var(--rsv-ink);
  background: var(--rsv-surface);
  border: 1px solid var(--rsv-line);
  border-radius: 10px;
  box-shadow: none;
}
body.portal-active .portal-shell.portal-redesign .portal-content .message-tabs button.active {
  border-color: var(--rsv-brand);
  background: var(--rsv-brand-soft);
  color: var(--rsv-brand-dark);
  box-shadow: inset 3px 0 var(--rsv-brand);
}
body.portal-active .portal-shell.portal-redesign .portal-content .substitution-section {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--rsv-line);
  border-radius: var(--rsv-radius);
  background: var(--rsv-surface);
  box-shadow: var(--rsv-shadow);
}
body.portal-active .portal-shell.portal-redesign .portal-content .substitution-section > .empty-state {
  display: grid;
  min-height: 106px;
  place-items: center;
  margin: 14px 0 0;
  padding: 20px;
  border: 1px dashed var(--rsv-line);
  border-radius: 12px;
  background: var(--rsv-surface-soft);
  color: var(--rsv-ink-soft);
}
.mobile-action-nav { display: none; }
@media (max-width: 900px) {
  .portal-shell.portal-redesign .app-sidebar { background:var(--primary); }
  .portal-shell.portal-redesign .portal-main .portal-header { height: 68px; }
  .portal-shell.portal-redesign .portal-content { padding-top: 22px; padding-bottom: 98px; }
  .portal-shell.portal-redesign .portal-content > .card { border-radius: 16px; }
  .mobile-action-nav {
    position: fixed;
    z-index: 26;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    min-height: 76px;
    padding: 7px max(10px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: rgb(255 255 255 / 96%);
    border-top: 1px solid var(--rsv-line);
    box-shadow: 0 -8px 24px rgb(23 23 23 / 8%);
    backdrop-filter: blur(12px);
  }
  .mobile-action-nav button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 52px;
    padding: 3px 2px;
    color: var(--rsv-ink-soft);
    background: transparent;
    border: 0;
    box-shadow: none;
    font: inherit;
  }
  .mobile-action-nav button[aria-current="page"] { color: var(--rsv-brand-dark); font-weight: 800; }
  .mobile-action-nav span { font-size: 21px; line-height: 1; }
  .mobile-action-nav small { overflow: visible; font-size: 10px; line-height: 1.1; white-space: nowrap; }
  .mobile-action-nav .mobile-action-nav-primary {
    width: 74px;
    height: 64px;
    min-height: 64px;
    margin: -30px auto 0;
    color: var(--accent-text);
    background: var(--accent);
    border: 3px solid var(--rsv-page);
    border-radius: 20px;
    box-shadow: 0 10px 22px rgb(23 23 23 / 24%);
  }
  .mobile-action-nav .mobile-action-nav-primary b { font-size: 25px; line-height: .8; }
  .mobile-action-nav .mobile-action-nav-primary small { color: var(--accent-text); font-weight: 800; }
}
@media (max-width: 650px) {
  .portal-shell.portal-redesign .portal-content .message-board-head { display: grid; gap: 12px; }
  .portal-shell.portal-redesign .portal-content .message-count { justify-self: start; }
  .portal-shell.portal-redesign .portal-content .message-tabs { grid-template-columns: 1fr 1fr; width: 100%; }
  .portal-shell.portal-redesign .portal-content .substitution-section { padding: 16px; min-height: 150px; }
}
@media (max-width: 420px) {
  .portal-shell.portal-redesign .portal-content { padding-inline: 12px; }
  .portal-shell.portal-redesign .portal-content .filters { padding: 12px; }
  .mobile-action-nav { padding-inline: 6px; }
  .mobile-action-nav small { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-shell.portal-redesign *, .portal-shell.portal-redesign *::before, .portal-shell.portal-redesign *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* Demo parity: shell, hierarchy and work areas, shared by every route. */
/* Final geometry and primary action checks after desktop/mobile rendering. */
body.portal-active .portal-shell.portal-redesign .app-sidebar {width:100%}
body.portal-active .portal-shell.portal-redesign .portal-header-title .mobile-menu::after,
body.portal-active .portal-shell.portal-redesign .portal-header-title .mobile-menu::before {content:none!important;display:none!important}
body.portal-active .portal-shell.portal-redesign .mobile-menu svg {width:22px;height:22px;flex:none}
body.portal-active .portal-shell.portal-redesign .mobile-menu .sidebar-menu-icon {display:none}
body.portal-active .portal-shell.portal-redesign.sidebar-collapsed .sidebar-panel-direction {transform:translateX(29px) scaleX(-1)}
body.portal-active .portal-shell.portal-redesign .dashboard-title h1 {border:0;padding:0}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority .actions>button:first-child {
 background:var(--accent)!important;color:var(--accent-text)!important;border:1px solid var(--accent);box-shadow:none;
}
body.portal-active .portal-shell.portal-redesign .dashboard-event small {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;min-width:0}
@media(max-width:900px){
 body.portal-active .portal-shell.portal-redesign .app-sidebar{width:min(292px,85vw)}
 body.portal-active .portal-shell.portal-redesign .mobile-menu .sidebar-panel-icon {display:none}
 body.portal-active .portal-shell.portal-redesign .mobile-menu .sidebar-menu-icon {display:block}
 body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority .actions{display:grid;grid-template-columns:1fr;width:100%;gap:8px}
 body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority .actions button{width:100%;max-width:100%;white-space:normal;text-overflow:clip;overflow:visible}
}
body.portal-active .portal-shell.portal-redesign .portal-content .admin-entries-table {position:relative;min-width:0;max-width:100%}
body.portal-active .portal-shell.portal-redesign .portal-content :is(button.primary,button[type=submit]):not(.danger),
body.portal-active .portal-shell.portal-redesign .dashboard-header .rsv-heading-actions>button {background:var(--accent);color:var(--accent-text);border-color:var(--accent);box-shadow:0 7px 14px #17171718;border-radius:10px}
body.portal-active .portal-shell.portal-redesign {
 --line:var(--rsv-line); --muted:var(--rsv-ink-soft);
 font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
 font-size:14px; line-height:1.5; grid-template-columns:244px minmax(0,1fr);
 background:var(--rsv-page);
}
body.portal-active .portal-shell.portal-redesign .app-sidebar {
 background:var(--primary); color:#c3d1d1; padding:22px 14px 16px;
 min-height:0; height:100dvh; border:0; box-shadow:none;
}
body.portal-active .portal-shell.portal-redesign .sidebar-brand {padding:0 8px 24px;border:0;gap:10px}
body.portal-active .portal-shell.portal-redesign .sidebar-brand img {width:38px;height:38px;border-radius:11px}
body.portal-active .portal-shell.portal-redesign .sidebar-brand strong {font-size:16px;color:var(--primary-text)}
body.portal-active .portal-shell.portal-redesign .sidebar-brand span {font-size:8px;letter-spacing:.08em;color:color-mix(in srgb,var(--primary-text) 78%,transparent)}
body.portal-active .portal-shell.portal-redesign .sidebar-label {display:block;margin:12px 10px 9px;font-size:10px;letter-spacing:.13em;color:color-mix(in srgb,var(--primary-text) 78%,transparent);opacity:1}
body.portal-active .portal-shell.portal-redesign .sidebar-nav {margin:0;gap:4px;overflow-x:hidden;overflow-y:auto}
body.portal-active .portal-shell.portal-redesign .sidebar-item {padding:10px;min-height:44px;font-size:14px;font-weight:500;color:color-mix(in srgb,var(--primary-text) 78%,transparent);background:transparent;gap:11px;border-radius:10px}
body.portal-active .portal-shell.portal-redesign .sidebar-item.is-active,
body.portal-active .portal-shell.portal-redesign .sidebar-item:hover {background:color-mix(in srgb,var(--primary-text) 14%,var(--primary));color:var(--primary-text);box-shadow:none}
body.portal-active .portal-shell.portal-redesign .sidebar-item.is-active {box-shadow:inset 3px 0 var(--accent)}
body.portal-active .portal-shell.portal-redesign .sidebar-item.is-active:before {display:none}
body.portal-active .portal-shell.portal-redesign .sidebar-bottom {margin-top:auto;padding-top:20px}
body.portal-active .portal-shell.portal-redesign .sidebar-identity {margin:0;padding:12px 8px;border:0;border-top:1px solid #ffffff20}
body.portal-active .portal-shell.portal-redesign .sidebar-footer-person {gap:8px}
body.portal-active .portal-shell.portal-redesign .sidebar-footer-person strong {font-size:12px;color:var(--primary-text);overflow-wrap:anywhere}
body.portal-active .portal-shell.portal-redesign .avatar {background:var(--accent);color:var(--accent-text);width:32px;height:32px;font-size:11px}
body.portal-active .portal-shell.portal-redesign .sidebar-account-footer {padding:6px 8px 0;border:0}
body.portal-active .portal-shell.portal-redesign .sidebar-footer-actions {gap:6px}
body.portal-active .portal-shell.portal-redesign .sidebar-footer-actions button {min-height:36px;border:0;background:transparent;color:color-mix(in srgb,var(--primary-text) 78%,transparent);font-size:11px;padding:6px;text-align:left}
body.portal-active .portal-shell.portal-redesign .portal-main {background:var(--rsv-page)}
body.portal-active .portal-shell.portal-redesign .portal-main .portal-header {
 position:sticky;top:0;height:74px;min-height:74px;padding:0 clamp(20px,4vw,58px);
 display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;
 border-bottom:1px solid var(--line);background:#f5f5f3f5;box-shadow:none;gap:16px;
}
body.portal-active .portal-shell.portal-redesign .portal-header-title {position:static;display:flex;gap:14px;align-items:center;width:auto;height:auto;flex:1;min-width:0}
body.portal-active .portal-shell.portal-redesign .mobile-header-label {display:block;color:var(--rsv-ink-soft);font-size:13px;font-weight:400;letter-spacing:0;text-transform:none}
body.portal-active .portal-shell.portal-redesign .mobile-header-label span {padding:0 8px;color:#9aadb1}
body.portal-active .portal-shell.portal-redesign .mobile-header-label b {color:var(--rsv-ink);font-weight:600}
body.portal-active .portal-shell.portal-redesign .portal-header-title .mobile-menu {position:static;display:grid;place-items:center;padding:0;width:44px;height:44px;min-height:44px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--rsv-ink-soft);box-shadow:none}
body.portal-active .portal-shell.portal-redesign .portal-main .portal-header>.notification-bell {position:relative;inset:auto;margin:0;width:40px;height:40px;min-height:40px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--rsv-ink-soft)}
body.portal-active .portal-shell.portal-redesign .portal-main .portal-content {
 max-width:1420px;padding:38px clamp(20px,4vw,58px) 60px;min-height:calc(100dvh - 74px);margin:auto;
}
body.portal-active .portal-shell.portal-redesign .portal-content :is(.page-header,.dashboard-header) {
 display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 26px;
 padding:0;border:0;background:transparent;box-shadow:none;border-radius:0;
}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-title {display:block;min-width:0}
body.portal-active .portal-shell.portal-redesign .portal-content h1 {font-size:clamp(28px,3vw,40px);line-height:1.12;letter-spacing:-.045em;font-weight:750;margin:0 0 10px;color:var(--rsv-ink)}
body.portal-active .portal-shell.portal-redesign .portal-content h2 {font-size:18px;letter-spacing:-.025em;font-weight:700}
body.portal-active .portal-shell.portal-redesign .portal-content .rsv-eyebrow {font-size:10px;font-weight:800;letter-spacing:.13em;color:var(--rsv-brand-dark);margin:0 0 8px}
body.portal-active .portal-shell.portal-redesign .portal-content .rsv-page-description {font-size:14px;line-height:1.5;color:var(--muted);margin:0}
body.portal-active .portal-shell.portal-redesign .rsv-heading-actions {display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
body.portal-active .portal-shell.portal-redesign .rsv-heading-actions label {font-size:11px;color:var(--muted);gap:5px}
body.portal-active .portal-shell.portal-redesign .rsv-heading-actions input {width:170px;background:#fff}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metrics {gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden;margin:0 0 24px}
body.portal-active .portal-shell.portal-redesign .portal-content .work-dashboard .dashboard-metric {border:0!important;border-radius:0;padding:18px 20px;box-shadow:none!important;gap:5px}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric span {font-size:11px;font-weight:650}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric strong {font-size:27px;letter-spacing:-.035em}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric small {font-size:11px;font-weight:400}
body.portal-active .portal-shell.portal-redesign .rsv-admin-workspace {display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:20px;align-items:start}
body.portal-active .portal-shell.portal-redesign .rsv-admin-workspace .dashboard-task-list {grid-template-columns:1fr;gap:0}
body.portal-active .portal-shell.portal-redesign .rsv-admin-workspace .dashboard-task-row {background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:16px 0}
body.portal-active .portal-shell.portal-redesign .rsv-admin-workspace .dashboard-tasks-secondary {padding:22px;background:#fff}
body.portal-active .portal-shell.portal-redesign .dashboard-calendar {padding:0;border-radius:18px;overflow:hidden}
body.portal-active .portal-shell.portal-redesign .dashboard-calendar-header {padding:20px;gap:12px;flex-wrap:wrap}
body.portal-active .portal-shell.portal-redesign .dashboard-calendar-heading {gap:12px}
body.portal-active .portal-shell.portal-redesign .dashboard-calendar-heading strong {font-size:12px;font-weight:500;color:var(--muted)}
body.portal-active .portal-shell.portal-redesign .dashboard-calendar-controls {gap:10px;flex-wrap:wrap}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-calendar-nav button {background:#fff;color:var(--rsv-ink);border:1px solid var(--line)}
body.portal-active .portal-shell.portal-redesign .dashboard-calendar-day {min-height:110px;padding:8px;background:#fff}
body.portal-active .portal-shell.portal-redesign .dashboard-calendar-day>time {font-size:11px;color:var(--muted)}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-event,
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-event:hover {background:color-mix(in srgb,var(--course-color,var(--rsv-brand)) 9%,white)!important;color:var(--rsv-ink)!important;border:1px solid var(--line);border-left:3px solid var(--course-color,var(--rsv-brand));box-shadow:none;border-radius:9px;padding:8px;gap:3px}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-event :is(time,span,small,strong) {color:var(--rsv-ink)!important;font-size:11px;line-height:1.4;font-weight:500}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-event time {color:var(--rsv-brand-dark)!important;font-weight:750}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority {display:flex;background:var(--primary);color:var(--primary-text);padding:28px;border:0;border-radius:18px;gap:24px}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority h2 {font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--primary-text)}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority strong {font-size:24px;color:var(--primary-text)}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority p {color:var(--primary-text)}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority button {background:var(--rsv-brand-soft);color:var(--rsv-ink)}
body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority button.secondary {background:transparent;border:1px solid color-mix(in srgb,var(--primary-text) 40%,transparent);color:var(--primary-text)}
body.portal-active .portal-shell.portal-redesign .portal-content .badge {font-size:11px;font-weight:650;padding:5px 9px}
body.portal-active .portal-shell.portal-redesign .portal-content .badge.submitted {background:#e9f3ff;color:#2b6498}
body.portal-active .portal-shell.portal-redesign .portal-content .badge.billed {background:#f1edfb;color:#7050a7}
body.portal-active .portal-shell.portal-redesign .portal-content .badge.paid {background:#e4f5ee;color:#0b6f55}
body.portal-active .portal-shell.portal-redesign .portal-content .badge.correction_requested {background:#fff2d9;color:#925600}
body.portal-active .portal-shell.portal-redesign .portal-content :is(.entries-panel,.admin-courses,.catalog-panel,.backup-panel,.update-panel,.profile-card,.editor-page) {padding:24px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 7px 18px #17171709}
body.portal-active .portal-shell.portal-redesign .portal-content table td {padding:15px 12px;border-color:var(--rsv-line);font-size:13px}
body.portal-active .portal-shell.portal-redesign .portal-content :is(.section-subnav,.message-tabs,.billing-view-switch,.admin-course-switch) button {font-size:12px;min-height:44px;padding:10px 14px;border-radius:10px}
body.portal-active .portal-shell.portal-redesign .portal-content .entry-history {border-radius:12px;border:1px solid var(--line);padding:15px}
body.portal-active .portal-shell.portal-redesign .portal-content .editor-page {max-width:1100px;margin:auto}
body.portal-active .portal-shell.portal-redesign .portal-content .editor-page input,
body.portal-active .portal-shell.portal-redesign .portal-content .editor-page textarea,
body.portal-active .portal-shell.portal-redesign .portal-content .editor-page select {font-size:14px}
@media(min-width:901px){
 body.portal-active .portal-shell.portal-redesign.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
}
@media(max-width:1200px){
 body.portal-active .portal-shell.portal-redesign .rsv-admin-workspace{grid-template-columns:1fr}
}
@media(max-width:900px){
 body.portal-active .portal-shell.portal-redesign{grid-template-columns:1fr}
 body.portal-active .portal-shell.portal-redesign .portal-main .portal-content{padding:24px 20px 120px}
 body.portal-active .portal-shell.portal-redesign .portal-main .portal-header{padding:0 20px;height:64px;min-height:64px}
 body.portal-active .portal-shell.portal-redesign .sidebar-close{margin-left:auto}
 body.portal-active .portal-shell.portal-redesign .portal-header-title .mobile-menu{width:44px;height:44px}
 body.portal-active .portal-shell.portal-redesign .portal-content :is(.page-header,.dashboard-header){align-items:flex-start;flex-direction:column;gap:16px;margin-bottom:22px}
 body.portal-active .portal-shell.portal-redesign .rsv-heading-actions{width:100%}
 body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority{padding:22px;align-items:flex-start;flex-direction:column}
 body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-priority strong{font-size:22px}
 body.portal-active .portal-shell.portal-redesign .portal-content :is(.entries-panel,.admin-courses,.catalog-panel,.backup-panel,.update-panel,.profile-card,.editor-page){padding:16px}
}
@media(max-width:420px){
 body.portal-active .portal-shell.portal-redesign .portal-main .portal-content{padding-inline:16px}
 body.portal-active .portal-shell.portal-redesign .portal-content .dashboard-metric{padding:14px}
 body.portal-active .portal-shell.portal-redesign .mobile-header-label{font-size:11px}
 body.portal-active .portal-shell.portal-redesign .portal-content h1{font-size:30px}
}

/* Filled actions use the saved accent exactly, always with the shared white action label. */
:is(#app,#modal,#discard-modal) button.primary,
:is(#app,#modal,#discard-modal) button[type=submit]:not(.secondary):not(.danger),
#app .appearance-example {
 background:var(--accent)!important;color:#fff!important;
 border:0!important;font-weight:600!important;
}
#app .portal-redesign .avatar,
#app .portal-redesign .mobile-action-nav-primary {
 background:var(--accent)!important;color:#fff!important;border:0!important;font-weight:600!important;
}
#app .portal-redesign .mobile-action-nav-primary :is(b,small) {color:#fff!important;font-weight:600!important}
/* Orange fills never receive a dark label, including counters and compact actions. */
#app .portal-redesign :is(.avatar,.message-count,.sidebar-unread,.notification-bell.has-unread,.mobile-action-nav-primary) {color:#fff!important}
#app .portal-redesign :is(.avatar,.message-count,.sidebar-unread,.notification-bell.has-unread,.mobile-action-nav-primary) :is(span,strong,small,b,svg) {color:#fff!important}
body.portal-active #modal button {font-weight:600}

/* Team & Honorare is an independent workspace: keep its heading, help text and actions off the card edge. */
#app .portal-redesign .editor-page.course-editor-dialog [data-editor-panel=related] > .course-honoraria {
 margin:0;
 padding:0;
 border:1px solid var(--line);
 border-radius:14px;
 background:#fff;
 overflow:hidden;
}
#app .portal-redesign .editor-page.course-editor-dialog [data-editor-panel=related] > .course-honoraria > summary {
 display:flex;
 align-items:center;
 gap:12px;
 min-height:0;
 margin:0;
 padding:18px 20px 14px;
 border-bottom:1px solid var(--line);
}
#app .portal-redesign .editor-page.course-editor-dialog [data-editor-panel=related] > .course-honoraria > .course-editor-section-content {
 margin:0;
 padding:16px 20px 20px;
}
#app .portal-redesign .editor-page.course-editor-dialog [data-editor-panel=related] > .course-honoraria > .course-editor-section-content > p:first-child {margin-top:0}
@media(max-width:560px){
 #app .portal-redesign .editor-page.course-editor-dialog [data-editor-panel=related] > .course-honoraria > summary {padding:16px}
 #app .portal-redesign .editor-page.course-editor-dialog [data-editor-panel=related] > .course-honoraria > .course-editor-section-content {padding:14px 16px 16px}
}

/* Page heading sits above the grid; related forms share the first row. */
#app .portal-redesign .profile-layout {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:20px}
#app .portal-redesign .profile-layout > :is(.profile-card,.profile-password) {min-width:0;margin:0;align-self:stretch;grid-row:1}
#app .portal-redesign .profile-layout > .profile-card {grid-column:1}
#app .portal-redesign .profile-layout > .profile-password {grid-column:2}
#app .portal-redesign .profile-layout > :is(.profile-licenses,.profile-devices) {grid-column:1/-1;min-width:0}
#app .portal-redesign .profile-layout input {font-weight:400}
#app .portal-redesign .profile-layout :is(.password-pair,.password-change-grid) {min-width:0}
#app .portal-redesign .profile-layout .password-pair {align-items:end}
@media(max-width:1100px){
 #app .portal-redesign .profile-layout {grid-template-columns:minmax(0,1fr)}
 #app .portal-redesign .profile-layout > .card {grid-column:1!important;grid-row:auto}
}

/* A persistent administrative tool, not a popover protruding from the sidebar. */
#app .portal-redesign .sidebar-view-tools {margin:4px 0 12px;display:grid;gap:7px;min-width:0}
#app .portal-redesign .sidebar-tools-label {font-size:10px;letter-spacing:.06em;color:color-mix(in srgb,var(--primary-text) 65%,transparent)}
#app .portal-redesign .sidebar-proxy-action {
 display:flex;align-items:center;gap:9px;width:100%;min-height:48px;padding:10px;
 border:1px solid color-mix(in srgb,var(--primary-text) 24%,transparent);
 background:color-mix(in srgb,var(--primary-text) 6%,var(--primary));color:var(--primary-text);
 font-size:12px;font-weight:600;text-align:left;white-space:normal;line-height:1.45;
}
#app .portal-redesign .sidebar-proxy-action span {min-width:0;overflow-wrap:break-word}
#app .portal-redesign .sidebar-proxy-action svg {width:20px;height:20px;flex:none}
#app .portal-redesign .sidebar-proxy-action:hover {background:color-mix(in srgb,var(--primary-text) 13%,var(--primary));filter:none}

/* Kurseditor: Tabs remain a compact, self-contained row. The former
   full-width scroll strip made the last tab appear to escape its surface. */
#app .portal-redesign .editor-page.course-editor-dialog .editor-tabs {
 display:inline-flex;
 width:max-content;
 max-width:100%;
 min-width:0;
 overflow-x:auto;
 overflow-y:hidden;
 margin:18px 0 22px;
 padding:0;
 border:0;
 border-radius:11px;
 background:#f3f4f2!important;
 vertical-align:top;
 scrollbar-width:thin;
}
#app .portal-redesign .editor-page.course-editor-dialog .editor-tabs button {
 flex:0 0 auto;
 min-width:max-content;
 margin:0;
 border:1px solid transparent!important;
 border-radius:9px;
 white-space:nowrap;
}
#app .portal-redesign .editor-page.course-editor-dialog .editor-tabs button.active,
#app .portal-redesign .editor-page.course-editor-dialog .editor-tabs button[aria-selected=true] {
 background:var(--accent)!important;
 border-color:var(--accent)!important;
 color:#fff!important;
}

/* Accent fills never inherit a contrast colour from the appearance preview.
   White is the required label colour for every orange primary action. */
body.portal-active .portal-shell.portal-redesign .portal-content :is(button.primary,button[type=submit]):not(.secondary,.danger),
#app .portal-redesign .editor-page.course-editor-dialog .course-editor-save button:not(.secondary) {
 background:var(--accent)!important;
 border-color:var(--accent)!important;
 color:#fff!important;
}
body.portal-active .portal-shell.portal-redesign .portal-content :is(button.primary,button[type=submit]):not(.secondary,.danger) :is(span,strong,small),
#app .portal-redesign .editor-page.course-editor-dialog .course-editor-save button:not(.secondary) :is(span,strong,small) {color:#fff!important}
@media(max-width:650px){
 #app .portal-redesign .editor-page.course-editor-dialog .editor-tabs {display:flex;width:100%;max-width:none;overflow:visible;flex-wrap:wrap}
 #app .portal-redesign .editor-page.course-editor-dialog .editor-tabs button {flex:1 1 110px;min-width:0;white-space:normal}
}
@media(max-width:900px){
 #app .portal-redesign .app-sidebar {display:flex;flex-direction:column;overflow:hidden}
 #app .portal-redesign .sidebar-brand,
 #app .portal-redesign .sidebar-label,
 #app .portal-redesign .sidebar-bottom {flex-shrink:0}
 #app .portal-redesign .sidebar-nav {flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
 #app .portal-redesign .sidebar-bottom {margin-top:12px;padding-top:0}
}

/* 1.18.97: persistent account bar, independent of the navigation drawer. */
.backup-summary {display:flex;align-items:center;justify-content:space-between;gap:20px;margin:24px 0}
.backup-summary h2 {margin:4px 0 8px}
.backup-facts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;margin:20px 0}
.backup-facts>div {padding:18px;min-width:0}
.backup-facts dt {font-size:12px;color:var(--muted);margin-bottom:6px}
.backup-facts dd {margin:0;font-weight:600;overflow-wrap:anywhere}
.backup-history {list-style:none;padding:0;display:grid;gap:12px}
.backup-history li {display:grid;gap:5px;padding:16px;border:1px solid var(--line);border-radius:10px}
.backup-history code {font-size:11px;overflow-wrap:anywhere;color:var(--muted)}
@media(max-width:600px){.backup-summary{align-items:flex-start;flex-direction:column}.backup-facts{grid-template-columns:1fr}}
body.portal-active #app .portal-redesign .app-footer {
 position:fixed;inset:auto 0 0 244px;z-index:80;min-height:64px;
 display:flex;align-items:center;justify-content:space-between;gap:16px;
 padding:8px clamp(20px,4vw,58px);border-top:1px solid var(--line);
 background:#fff;color:var(--rsv-ink);box-shadow:0 -4px 18px #17171705;
}
body.portal-active #app .portal-redesign.sidebar-collapsed .app-footer {left:0}
body.portal-active #app .portal-redesign .app-footer :is(.sidebar-identity,.sidebar-account-footer,.sidebar-view-tools) {margin:0;padding:0;border:0}
body.portal-active #app .portal-redesign .app-footer .sidebar-footer-person {display:flex;align-items:center;gap:9px;min-width:0}
body.portal-active #app .portal-redesign .app-footer .sidebar-footer-person strong {color:var(--rsv-ink);font-size:13px;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.portal-active #app .portal-redesign .app-footer :is(.app-footer-tools,.sidebar-account-footer,.sidebar-footer-actions) {display:flex;align-items:center;gap:12px}
body.portal-active #app .portal-redesign .app-footer :is(.sidebar-proxy-action,.logout-action,.onboarding-launch) {width:auto;min-height:40px;margin:0;padding:8px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--rsv-ink);font-size:12px;font-weight:600;white-space:nowrap}
body.portal-active #app .portal-redesign .app-footer .sidebar-proxy-action {gap:7px}
body.portal-active #app .portal-redesign .app-footer :is(.logout-action,.onboarding-launch) {border-color:transparent}
body.portal-active #app .portal-redesign .app-footer .account-menu {position:relative;margin:0}
body.portal-active #app .portal-redesign .app-footer .account-trigger {display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border:1px solid var(--line);border-radius:9px;color:var(--rsv-ink);background:#fff}
body.portal-active #app .portal-redesign .app-footer .account-popover {position:absolute;inset:auto auto calc(100% + 12px) 0;width:252px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 160px);overflow:auto;background:#fff;border:1px solid var(--line);box-shadow:0 12px 40px #17171720;color:var(--rsv-ink)}
body.portal-active #app .portal-redesign .app-footer .account-popover button {color:var(--rsv-ink);background:#fff;text-align:left;white-space:normal;width:100%;min-height:44px}
#app .portal-redesign .footer-compact-actions {display:none}
body.portal-active #app .portal-redesign .portal-content {padding-bottom:110px}
body.portal-active #app .portal-redesign .sidebar-edge-toggle {position:fixed;top:50%;left:222px;transform:translateY(-50%);z-index:100;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--rsv-ink);box-shadow:0 3px 14px #17171716}
body.portal-active #app .portal-redesign .sidebar-edge-toggle svg {width:22px;height:22px}
body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-edge-toggle {left:8px}
body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-edge-toggle svg {transform:rotate(180deg)}
/* Desktop: folding the navigation keeps a compact, usable icon rail. */
@media (min-width:901px) {
 body.portal-active #app .portal-redesign.sidebar-collapsed {grid-template-columns:72px minmax(0,1fr)}
 body.portal-active #app .portal-redesign.sidebar-collapsed .app-sidebar {
  transform:none;opacity:1;pointer-events:auto;padding:16px 10px;overflow-x:hidden;overflow-y:auto;
 }
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-brand {justify-content:center;padding:0 0 16px}
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-brand img {width:40px;height:40px}
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-brand > div,
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-label {display:none}
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-nav {margin:0;gap:8px}
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-item {
  justify-content:center;width:48px;min-height:48px;margin:0 auto;padding:0;gap:0;border-radius:12px;
 }
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-item span {display:none}
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-unread {position:absolute;top:-4px;right:-4px;margin:0}
 body.portal-active #app .portal-redesign.sidebar-collapsed .sidebar-edge-toggle {left:50px}
}
/* Mask only the default round badge, never crop an administrator's own logo. */
body.portal-active #app .portal-redesign .sidebar-brand img[src*="mauli-logo.png"] {clip-path:ellipse(47% 48% at 50% 50%);border-radius:0;transform:scale(1.07);background:transparent}
@media(min-width:901px){
 body.portal-active #app .portal-redesign .portal-header-title .mobile-menu {display:none}
 body.portal-active #app .portal-redesign.sidebar-collapsed .portal-header-title {padding-left:16px}
 body.portal-active #app .portal-redesign .app-footer .account-menu:not(:has([data-action="switch-role"])) {display:none}
}
@media(max-width:1100px) and (min-width:901px){
 body.portal-active #app .portal-redesign .app-footer {padding-inline:20px}
 body.portal-active #app .portal-redesign .app-footer .onboarding-launch {display:none}
 body.portal-active #app .portal-redesign .app-footer .sidebar-footer-person strong {max-width:140px}
}
@media(max-width:900px){
 body.portal-active #app .portal-redesign .sidebar-edge-toggle {display:none}
 body.portal-active #app .portal-redesign .app-sidebar {z-index:120}
 body.portal-active #app .portal-redesign .sidebar-scrim {z-index:110}
 body.portal-active #app .portal-redesign .app-footer {left:0;min-height:56px;padding:6px 16px;gap:8px;padding-bottom:max(6px,env(safe-area-inset-bottom))}
 body.portal-active #app .portal-redesign:has(.mobile-action-nav) .app-footer {bottom:calc(72px + env(safe-area-inset-bottom));padding-bottom:6px}
 body.portal-active #app .portal-redesign .app-footer .app-footer-tools {display:none}
 body.portal-active #app .portal-redesign .app-footer .sidebar-identity {width:100%}
 body.portal-active #app .portal-redesign .app-footer .sidebar-footer-person strong {max-width:none;flex:1}
 body.portal-active #app .portal-redesign .app-footer .account-popover {left:auto;right:0}
 body.portal-active #app .portal-redesign .app-footer .account-trigger {width:44px;height:44px;min-height:44px;font-size:20px}
 #app .portal-redesign .footer-compact-actions {display:grid;gap:6px}
 body.portal-active #app .portal-redesign .portal-content {padding-bottom:100px}
 body.portal-active #app .portal-redesign:has(.mobile-action-nav) .portal-content {padding-bottom:180px}
}

/* Organization names use the existing club settings, including long names. */
.brand>div{min-width:0}
.brand span,.brand small,body>footer,body.portal-active .portal-shell.portal-redesign .sidebar-brand span{overflow-wrap:anywhere}


/* Fixed profile swatches remain visible under style-src 'self'. */
.appearance-preset-classic i:first-child{background:#171717}
.appearance-preset-classic i:last-child{background:#ee6420}
.appearance-preset-ocean i:first-child{background:#155e9b}
.appearance-preset-ocean i:last-child{background:#087e8b}
.appearance-preset-forest i:first-child{background:#1f5e45}
.appearance-preset-forest i:last-child{background:#b87915}


@media(max-width:750px){
 body.portal-active #app .portal-redesign .appearance-panel>form>.actions{display:grid;grid-template-columns:minmax(0,1fr)}
 body.portal-active #app .portal-redesign .appearance-panel>form>.actions>button{width:100%;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
}


.profile-contact-readonly{display:grid;gap:6px;margin:0}
.profile-contact-readonly dt{font-weight:650}
.profile-contact-readonly dd{margin:0 0 10px;overflow-wrap:anywhere}


/* One clear caption for the financial audit trail in each disclosure state. */
.entry-history:not([open]) .entry-history-close,.entry-history[open] .entry-history-open{display:none}
.entry-history-count{margin-left:.5em;font-size:12px;color:var(--muted)}
/* Kursablauf: klare Hauptaktion, ruhige Flächen und verlässliche Innenabstände. */
#app .portal-redesign .portal-content .duty-panel{padding:28px;border:1px solid var(--line);background:var(--rsv-surface);box-shadow:none}
#app .portal-redesign .duty-panel>.page-header{margin:0 0 16px}
#app .portal-redesign .duty-panel h1{font-size:26px;line-height:1.25;margin:0}
#app .portal-redesign .duty-history-entry{display:flex;justify-content:flex-end;margin:0 0 16px}
#app .portal-redesign .duty-controls.duty-filterbar{padding:16px 18px;background:var(--rsv-surface-soft);box-shadow:none}
#app .portal-redesign .duty-filter-form{display:flex;flex-wrap:wrap;gap:16px;align-items:end}
#app .portal-redesign .duty-filter-form>.duty-period{flex:1 1 220px;max-width:300px}
#app .portal-redesign .duty-advanced-filters{margin-left:auto;min-width:0;flex:0 1 auto}
#app .portal-redesign .duty-advanced-filters>summary{cursor:pointer;padding:12px 4px;font-size:13px;font-weight:600;color:var(--rsv-ink-soft);min-height:44px;box-sizing:border-box}
#app .portal-redesign .duty-advanced-filters[open]{flex-basis:100%;margin:0}
#app .portal-redesign .duty-advanced-fields{display:flex;flex-wrap:wrap;align-items:end;gap:16px;padding:16px 0 2px;border-top:1px solid var(--line)}
#app .portal-redesign .duty-advanced-fields>.duty-filter-dates{flex:1 1 280px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#app .portal-redesign .duty-advanced-fields>.duty-filter-refine{flex:1 1 200px}
#app .portal-redesign .duty-result-summary{margin:20px 0 12px;font-size:12px;color:var(--muted)}
#app .portal-redesign .duty-table table{min-width:780px}
#app .portal-redesign .duty-table :is(th,td){padding:18px 16px;vertical-align:middle}
#app .portal-redesign .duty-table th{background:var(--rsv-surface-soft);font-size:11px;letter-spacing:.04em}
#app .portal-redesign .duty-table tbody tr:nth-child(odd){background:#fff}
#app .portal-redesign .duty-table tbody tr:hover{background:var(--rsv-surface-soft)}
#app .portal-redesign .duty-course-link{font-weight:600;line-height:1.5;white-space:normal;text-align:left}
#app .portal-redesign .duty-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#app .portal-redesign .duty-more-actions{margin:0}
#app .portal-redesign :is(.duty-actions,.duty-primary-action) button.primary{background:var(--rsv-brand-soft);color:var(--rsv-ink);border:1px solid var(--line);box-shadow:none;padding:10px 14px}
#app .portal-redesign .duty-more-actions>button{background:transparent;border-color:transparent;color:var(--rsv-ink-soft);font-size:12px;box-shadow:none}
#app .portal-redesign .duty-more-actions>button:hover{background:var(--rsv-surface-soft);border-color:var(--line)}
#app .portal-redesign .duty-status{font-size:11px;font-weight:500}
#app .portal-redesign .duty-cancellation-reason{display:block;max-width:380px;margin-top:8px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted);line-height:1.5}
#app .portal-redesign .duty-card{padding:20px}
#app .portal-redesign .duty-card-head{gap:16px}
#app .portal-redesign .duty-primary-action{margin-top:16px}
#app .portal-redesign .portal-content :is(.session-panel,.profile-card,.catalog-panel,.entry-list){padding:24px}
#app .portal-redesign .portal-content :is(.page-header,.dashboard-header,.message-board-head) h1{font-size:clamp(24px,2.2vw,30px);line-height:1.25}
#app .portal-redesign .portal-header:has(.proxy-banner){height:auto;min-height:72px;flex-wrap:wrap;gap:12px;padding-block:12px}
body.portal-active #modal{padding:28px;max-width:760px}
body.portal-active #modal :is(h2,h3){line-height:1.4}
body.portal-active #modal h2{font-size:21px;margin:0 42px 12px 0}
body.portal-active #modal .schedule-course-facts{margin-top:24px}
body.portal-active #modal .schedule-course-facts>div{padding:14px 0}
body.portal-active #modal .schedule-course-facts dd{font-weight:500;line-height:1.6}
body.portal-active #modal .course-document-action button{background:transparent;color:var(--rsv-ink-soft,#595959);border:1px solid var(--line,#ddd);box-shadow:none}
body.portal-active .unavailable-options{padding:0;border:0;margin:24px 0}
body.portal-active .unavailable-options legend{font-size:14px;font-weight:600;margin-bottom:12px}
body.portal-active .unavailable-options label{display:flex;align-items:flex-start;gap:12px;padding:16px;border:1px solid var(--line,#ddd);border-radius:12px;margin:10px 0;cursor:pointer}
body.portal-active .unavailable-options label:has(input:checked){border-color:var(--primary,#333);background:#f7f7f6}
body.portal-active .unavailable-options input{width:18px;min-height:18px;margin:2px 0 0;flex:0 0 18px}
body.portal-active .unavailable-options small{display:block;font-weight:400;color:var(--muted,#595959);line-height:1.5;margin-top:5px}
body.portal-active .unavailable-note{display:grid;gap:8px}
body.portal-active .unavailable-note textarea{min-height:100px}
.entry-submit-hint{font-size:12px;color:var(--muted);margin:16px 0 0;line-height:1.5}
#app .portal-redesign .duty-more-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
#app .portal-redesign .duty-card-head:has([data-resolution="replacement"]){flex-wrap:wrap}
#app .portal-redesign .duty-card-head:has([data-resolution="replacement"])>h3{flex-basis:100%}
#app .portal-redesign .duty-card-head:has([data-resolution="replacement"]) .duty-more-actions{margin-left:0}
/* Status und Nebenaktion erhalten auf dem Handy getrennte Zeilen. */
#app .portal-redesign .mobile-action-nav .mobile-action-nav-primary :is(b,small){color:#343a36!important}
#app .portal-redesign .duty-day-list>.duty-card{padding:20px;border:0;box-shadow:none;border-radius:0}
#app .portal-redesign .duty-card .duty-card-meta{padding-right:0}
#app .portal-redesign .duty-card .duty-status{position:static;max-width:none;margin-left:auto;text-align:left}
@media(max-width:900px){#app .portal-redesign .duty-agenda{display:grid;gap:20px}}
/* Globale Editor- und Navigationsruhe nach der Modulprüfung. */
#app .portal-redesign .editor-page #editor-body{padding:0;border:0;background:transparent;box-shadow:none}
#app .portal-redesign .editor-tabs button[aria-selected=true]{background:#eceeeb!important;color:#232923!important;border-color:#d8ddd7!important;box-shadow:none}
#app .portal-redesign .mobile-action-nav .mobile-action-nav-primary{transform:none!important;box-shadow:none!important;border-radius:10px!important;background:transparent!important;color:var(--rsv-ink)!important}
#app .portal-redesign .mobile-action-nav .mobile-action-nav-primary b{font-size:23px}
@media(max-width:650px){
 #app .portal-redesign .portal-main:has(.entry-dialog) .mobile-action-nav{display:none!important}
 body.portal-active:has(.editor-page) .app-footer{position:static!important}
}
/* Die Routineaktion bleibt sichtbar, erhält aber keine zweite Akzentfläche. */
#app .portal-redesign .duty-panel :is(.duty-actions,.duty-primary-action) button.primary{background:#f3f4f3!important;color:#28332f!important;border:1px solid #d9dfda!important;box-shadow:none!important}
#app .portal-redesign .duty-panel>.page-header{display:flex;justify-content:space-between;align-items:center;gap:16px}
#app .portal-redesign .duty-panel>.page-header .duty-history-entry{margin:0}
#app .portal-redesign .entry-dialog #editor-body{padding:0;border:0;box-shadow:none;background:transparent}
#app .portal-redesign .entry-dialog .entry-intro{display:block;font-size:13px;line-height:1.6;margin:10px 0 20px}
@media(max-width:650px){
 #app .portal-redesign .duty-panel>.page-header{flex-wrap:wrap}
 #app .portal-redesign .duty-panel>.page-header .duty-history-entry button{min-height:40px;width:auto;padding:8px 12px;font-size:12px}
 #app .portal-redesign .portal-main:has(.entry-dialog) .mobile-nav{display:none}
 body.portal-active:has(.entry-dialog) .app-footer{position:static}
}
@media(max-width:900px){
 #app .portal-redesign .portal-content .duty-panel{padding:20px}
 #app .portal-redesign .duty-table{display:none}
 #app .portal-redesign .duty-agenda{display:grid;gap:20px}
 #app .portal-redesign .duty-advanced-fields{display:grid;grid-template-columns:minmax(0,1fr)}
 #app .portal-redesign .duty-filter-form>.duty-period{max-width:none}
 #app .portal-redesign .duty-card-head{flex-wrap:wrap}
}
@media(max-width:650px){
 #app .portal-redesign .portal-content .duty-panel{padding:18px 16px}
 #app .portal-redesign .duty-panel h1{font-size:24px}
 #app .portal-redesign .duty-controls.duty-filterbar{padding:14px}
 #app .portal-redesign .duty-filter-form{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
 #app .portal-redesign .duty-advanced-filters{margin:0}
 #app .portal-redesign .duty-card{padding:18px}
 #app .portal-redesign .portal-content :is(.session-panel,.profile-card,.catalog-panel,.entry-list){padding:18px}
 body.portal-active #modal{padding:22px 18px;width:calc(100% - 24px);box-sizing:border-box}
}


/* Settings: bounded content, readable status and progressive technical details. */
body.portal-active .portal-shell.portal-redesign .settings-subnav{gap:8px;margin-bottom:24px}
body.portal-active .portal-shell.portal-redesign .update-panel{min-width:0}
body.portal-active .portal-shell.portal-redesign .update-summary{align-items:flex-start;padding:24px;gap:24px;background:var(--rsv-surface-soft,#f8fafc)}
.update-status-copy{min-width:0;flex:1}
.update-status-copy>p:last-child{margin:0;max-width:65ch;color:var(--muted);line-height:1.65}
.update-status-copy .rsv-eyebrow{margin:0 0 8px;font-size:11px;letter-spacing:.08em;font-weight:700;text-transform:uppercase}
.update-actions{display:flex;flex-wrap:wrap;gap:8px;flex:none;align-items:center}
.update-facts:has(>div:only-child){grid-template-columns:minmax(0,1fr);max-width:360px}
.update-panel :is(h2,h3,dd,code,li){overflow-wrap:anywhere}
.update-panel .update-warning p{margin:8px 0}.update-warning ul{margin:8px 0 0;padding-left:20px}
.update-release-notes p{white-space:pre-line}.update-release-notes h3{margin:0}
.update-technical{border-top:1px solid var(--line);margin-top:24px;padding-top:12px;color:var(--muted)}
.update-technical summary{min-height:44px;display:list-item;align-content:center;cursor:pointer;color:var(--rsv-ink);font-weight:600;padding:10px 4px}
.update-technical summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.update-technical dl{margin:12px 0;display:grid;gap:12px}.update-technical dt{font-size:12px}.update-technical dd{margin:4px 0 0}
.update-technical p{line-height:1.65;max-width:85ch}.update-loading{padding:24px;border:1px solid var(--line);border-radius:12px}
body.portal-active .portal-shell.portal-redesign .backup-history code{overflow-wrap:anywhere;min-width:0}
@media(max-width:900px){.update-summary{flex-direction:column}.update-actions{width:100%}.update-actions>button{flex:1}}
@media(max-width:650px){body.portal-active .portal-shell.portal-redesign .update-summary{padding:16px;gap:16px}.update-actions{flex-direction:column;align-items:stretch}.update-facts:has(>div:only-child){max-width:none}.update-technical summary{font-size:14px}}

/* Every settings view uses the same card inset, including address/calendar/usage. */
body.portal-active .portal-shell.portal-redesign .portal-content>.card:has(.settings-subnav){padding:24px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 7px 18px #17171709;min-width:0}
body.portal-active .portal-shell.portal-redesign .update-release-notes{display:block;padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--rsv-surface-soft,#f8fafc)}
body.portal-active .portal-shell.portal-redesign .update-release-notes p{margin:8px 0 0}
body.portal-active .portal-shell.portal-redesign .club-settings .grid{gap:18px}
@media(max-width:900px){body.portal-active .portal-shell.portal-redesign .portal-content>.card:has(.settings-subnav){padding:16px}}
@media(max-width:650px){
 body.portal-active .portal-shell.portal-redesign .settings-subnav{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:3px 2px 10px;margin-bottom:20px;scrollbar-width:thin;overscroll-behavior-x:contain}
 body.portal-active .portal-shell.portal-redesign .settings-subnav>button{flex:0 0 auto;min-height:44px;white-space:nowrap}
}

/* Laptop: seven narrow columns made course names and actions unreadable. */
@media(min-width:901px) and (max-width:1500px){#app .portal-redesign .weekly-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
#app .portal-redesign .weekly-calendar>p:first-child{margin:0 0 14px;line-height:1.6}
#app .portal-redesign .weekly-calendar{padding:16px}

body.portal-active .portal-shell.portal-redesign .entry-range-actions{flex:0 0 auto;flex-wrap:wrap;max-width:100%;gap:8px}
body.portal-active .portal-shell.portal-redesign .entry-range-actions button{width:auto;max-width:none;min-width:max-content;min-height:44px;flex:0 0 auto;white-space:nowrap;text-overflow:clip;overflow:visible}

/* Team workspace: clear scope and visible, read-only actions. */
.notification-bell .notification-lottie{filter:brightness(0)}
.team-overview-intro{display:grid;gap:8px;padding:18px 20px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:12px;background:#fff;overflow-wrap:anywhere}
.team-overview-intro span{color:var(--muted);font-size:14px}
.team-member-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px}
.team-member-card{padding:18px;border:1px solid var(--line);border-radius:12px;min-width:0;background:#fff}
.team-member-card h3{margin:0 0 8px}.team-member-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.team-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.team-summary article{display:grid;gap:6px;padding:18px;background:#fff;border:1px solid var(--line);border-radius:12px}.team-summary strong{font-size:24px}.team-summary span{color:var(--muted)}
body.portal-active .portal-shell.portal-redesign .team-course-actions button{min-height:44px;white-space:nowrap;padding:8px 12px}
@media(max-width:650px){.team-summary{grid-template-columns:1fr}.team-member-actions>button{flex:1}.team-overview .dashboard-title{width:100%}}

/* Keep course search alongside its view picker; wrap on narrow screens. */
.admin-courses{display:flex;flex-wrap:wrap;align-items:flex-start;gap:16px}
.admin-courses>.page-header,.admin-courses>.weekly-calendar,.admin-courses>.personnel-calendar,.admin-courses>.admin-course-list-table,.admin-courses>.admin-course-list-cards{flex:0 0 100%;min-width:0}
.admin-courses>.admin-course-view-picker{flex:0 0 auto;margin:0}
.admin-courses>.rsv-course-search{flex:1 1 280px;margin:0;padding:0;border:0;background:transparent}
#team-course-overview{margin-top:24px;min-width:0}

body.portal-active #app .portal-redesign .admin-courses>.rsv-course-search{margin:0;padding:0;border:0;background:transparent;align-self:center}
body.portal-active #app .portal-redesign .admin-courses>.admin-course-view-picker{margin:0;align-self:center}
body.portal-active #app .portal-redesign .portal-header:has(.proxy-banner)>.notification-bell{order:1}
body.portal-active #app .portal-redesign .portal-header>.proxy-banner{order:2;flex:0 0 100%;min-width:0}

/* Unread count: white type on orange without a dark outline. */
body.portal-active #app .portal-redesign .notification-bell b{background:#e86b2c;color:#fff;border:0;box-shadow:none;text-shadow:none;outline:0}

/* Shared course controls and keyboard-operable course cards. */
body.portal-active #app .portal-redesign .admin-courses .course-outlined-field{display:block;position:relative;margin:0;min-width:0}
body.portal-active #app .portal-redesign .admin-courses .course-outlined-field>span{position:absolute;top:-8px;left:12px;z-index:1;padding:0 5px;background:#fff;font-size:12px;line-height:16px;font-weight:500}
body.portal-active #app .portal-redesign .admin-courses .course-outlined-field>input,
body.portal-active #app .portal-redesign .admin-courses .course-outlined-field>select{width:100%;height:46px;min-height:46px;margin:0;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:#fff}
body.portal-active #app .portal-redesign .admin-courses>.admin-course-view-picker{padding:8px 0 0;flex:0 0 220px;align-self:flex-start}
body.portal-active #app .portal-redesign .admin-courses>.rsv-course-search{padding:8px 0 0;align-self:flex-start;align-items:center}
body.portal-active #app .portal-redesign .rsv-course-search>.course-outlined-field{flex:1;max-width:400px}
body.portal-active #app .portal-redesign .weekly-course{position:relative}
body.portal-active #app .portal-redesign .weekly-course-open{display:block;width:100%;min-height:0;padding:0;margin:8px 0 0;border:0;border-radius:0;background:transparent;color:inherit;box-shadow:none;text-align:left;font:inherit;font-weight:700;line-height:1.45;white-space:normal}
body.portal-active #app .portal-redesign .weekly-course-open::after{content:'';position:absolute;inset:0;border-radius:12px;cursor:pointer}
body.portal-active #app .portal-redesign .weekly-course-open:focus-visible{outline:none}
body.portal-active #app .portal-redesign .weekly-course-open:focus-visible::after{outline:3px solid var(--accent);outline-offset:2px}
body.portal-active #app .portal-redesign .weekly-course:has(.weekly-course-open:hover){border-color:var(--accent)}
body.portal-active #app .portal-redesign .weekly-course .course-people-links{position:relative;z-index:1}
@media(max-width:650px){body.portal-active #app .portal-redesign .admin-courses>.admin-course-view-picker{flex-basis:100%}}

body.portal-active #app .portal-redesign .weekly-course-open,body.portal-active #app .portal-redesign .weekly-course-open:hover,body.portal-active #app .portal-redesign .weekly-course-open:active{position:static;transform:none!important;filter:none;background:transparent;box-shadow:none}
