﻿/* ============================================
   MASTERED DESIGN SYSTEM - Global Overrides
   Modern, clean styling for Radzen components
   ============================================ */

/* ===== Dialog: Parent Organization ===== */
.current-parent-display {
    padding: 0.625rem 0.875rem;
    background: var(--rz-base-100, #f8fafc);
    border: 1px solid var(--rz-base-200, var(--rz-base-300));
    border-radius: 6px;
    color: var(--rz-text-secondary-color, #64748b);
    font-size: 0.875rem;
}

.selected-org-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.selected-org-badge .clear-btn {
    background: none;
    border: none;
    padding: 0.125rem;
    cursor: pointer;
    color: var(--rz-text-tertiary-color, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.selected-org-badge .clear-btn:hover {
    background: color-mix(in srgb, var(--rz-text-color) 10%, transparent);
    color: var(--rz-text-color, #1e293b);
}

.selected-org-badge .clear-btn .material-icons {
    font-size: 1rem;
}


/* ===== Dialog: Flags Form ===== */
.flag-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rz-base-200, var(--rz-base-300));
}

.flag-toggle-row:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.flag-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.flag-toggle-label {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--rz-text-color, #1e293b);
}

.flag-toggle-hint {
    font-size: 0.8125rem;
    color: var(--rz-text-tertiary-color, #94a3b8);
}

/* ============================================
   Skeleton Loading
   ============================================ */

/* Skeleton panel - matches split pane height */

.skeleton-cards {
    padding: 1rem;
    flex: 1;
    overflow: hidden;
}

.skeleton-card {
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid var(--rz-base-300);
    border-radius: 10px;
    padding: 0.875rem;
    height: 100%;
}

/* Skeleton grid - for data grid layouts */


/* ============================================
   Dialog: Grade Levels
   Multi-select grid for grade level selection
   ============================================ */

.grade-levels-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 420px;
}

.grade-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rz-base-300);
}

.grade-action-link {
    background: none;
    border: none;
    color: var(--rz-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.grade-action-link:hover {
    text-decoration: underline;
}

.grade-count {
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color);
}

.grade-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
    max-height: 340px;
    overflow-y: auto;
}

.grade-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
    color: var(--rz-text-color);
    transition: background-color 0.15s;
}

.grade-list-item:hover {
    background-color: color-mix(in srgb, var(--rz-text-color) 4%, transparent);
}

.grade-list-item.selected {
    background-color: color-mix(in srgb, var(--rz-primary) 8%, transparent);
    color: var(--rz-primary);
    font-weight: 500;
}

.grade-text {
    flex: 1;
}

.grade-check-icon {
    color: var(--rz-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============================================
   Wizard: Form Cards
   Flat bordered card language for the New School wizard's category/step cards
   (matches the EwSectionCard ruling: no elevation shadow). In dark mode the M3
   translucent card wash renders LIGHTER than the fields inside it (inverted
   elevation) -- pin the card to the solid panel token so fields read as raised.
   ============================================ */

.rz-card.wizard-card {
    box-shadow: none;
    border: 1px solid var(--rz-base-300);
}

html[data-theme="dark"] .rz-card.wizard-card {
    background: var(--rz-base-background-color, #1b1d20);
}

/* ============================================
   Wizard: Grade Level Chips
   Compact pill selector used in the New School wizard
   ============================================ */

.wizard-grade-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wizard-grade-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--rz-base-300);
    background: color-mix(in srgb, var(--rz-text-color) 4%, transparent);
    color: var(--rz-text-color);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.wizard-grade-chip:hover {
    background-color: color-mix(in srgb, var(--rz-text-color) 8%, transparent);
    border-color: var(--rz-base-300);
}

.wizard-grade-chip.selected {
    background-color: var(--rz-primary);
    border-color: var(--rz-primary);
    color: var(--rz-on-primary, #ffffff);
}

.wizard-grade-chip.selected:hover {
    filter: brightness(0.95);
}

/* ============================================
   Dialog: Contact Form Collections
   Email and phone number collection areas
   ============================================ */

.collection-area {
    margin-top: 0.5rem;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rz-base-300, var(--rz-base-300));
}

.collection-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--rz-text-color, #1e293b);
}

.collection-empty {
    color: var(--rz-text-tertiary-color, #94a3b8);
    font-size: 0.875rem;
    font-style: italic;
    padding: 0.5rem 0;
}

.collection-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rz-base-200, var(--rz-base-300));
}

.collection-row:last-child {
    border-bottom: none;
}

.primary-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color, #64748b);
    cursor: pointer;
    white-space: nowrap;
}

.remove-btn {
    color: var(--rz-danger);
}

.remove-btn:hover {
    background: rgba(var(--rz-danger-rgb), 0.1);
}

/* ============================================
   Organization Detail Page Styles
   Extracted from Detail.razor for maintainability
   ============================================ */

/* --- Detail Page Layout --- */
.detail-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* --- Back Link --- */
.back-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--rz-primary);
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.back-link:hover {
    color: var(--rz-primary-dark);
}

.back-link:hover span {
    text-decoration: underline;
}

.back-link .rzi {
    font-size: 1rem;
}

/* --- Shared Page Styles --- */
.data-grid-container {
    position: relative;
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid var(--rz-base-300);
    border-radius: 10px;
    overflow: hidden;
    height: calc(100vh - 320px);
    min-height: 400px;
}

.data-grid-container .mastered-datagrid {
    height: 100%;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* mode-proof scrim: canvas color at 85%, not hardcoded white */
    background: color-mix(in srgb, var(--rz-base-background-color, #ffffff) 85%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.id-text {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color);
}

/* --- School Header --- */
.school-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid var(--rz-base-300);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.school-header-left {
    display: flex;
    gap: 1rem;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.school-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}


.school-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--rz-primary) 0%, var(--rz-primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.school-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.school-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rz-text-color);
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
}

.school-meta {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color);
    margin-top: 0.125rem;
}

.meta-separator {
    margin: 0 0.5rem;
    color: var(--rz-text-disabled-color);
}

.status-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.id-badge {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
    background: color-mix(in srgb, var(--rz-text-color) 6%, transparent);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
}

/* --- Tabs --- */
.school-tabs {
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid var(--rz-base-300);
    border-radius: 12px;
    overflow: hidden;
}


.tab-content {
    padding: 1.5rem;
}

.flag-yes {
    color: var(--rz-success);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.flag-yes .rzi {
    font-size: 1rem;
}

.flag-no {
    color: var(--rz-text-secondary-color);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.flag-no .rzi {
    font-size: 1rem;
}

/* --- Relationships Table --- */
.relationships-table {
    width: 100%;
}

.relationships-header {
    display: grid;
    grid-template-columns: 150px 1fr 140px 150px 120px;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--rz-text-color) 4%, transparent);
    border-bottom: 1px solid var(--rz-base-300);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--rz-text-secondary-color);
}

.relationships-row {
    display: grid;
    grid-template-columns: 150px 1fr 140px 150px 120px;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--rz-base-300);
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: background-color 0.15s ease;
    /* One size for every cell in the row. The category column used to be the only one that set a
       size, so the name and type read a step larger than it. */
    font-size: 0.875rem;
}

.relationships-row:hover {
    background: color-mix(in srgb, var(--rz-text-color) 4%, transparent);
}

.relationships-row:last-child {
    border-bottom: none;
}

.relationships-row .data-list-actions {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Reveal on hover OR keyboard focus: opacity-hidden buttons stay in the tab order, so without
   the :focus-within reveal keyboard users tab through invisible stops (WCAG 2.4.7). */
.relationships-row:hover .data-list-actions,
.relationships-row:focus-within .data-list-actions {
    opacity: 1;
}

.rel-col-type {
    font-weight: 500;
    color: var(--rz-text-color);
}

.rel-col-name {
    color: var(--rz-text-color);
}

.rel-col-id {
    color: var(--rz-text-secondary-color);
}

.rel-col-category {
    color: var(--rz-text-secondary-color);
}

.rel-col-status {
    display: flex;
    align-items: center;
}

.org-id-link {
    color: var(--rz-primary);
    text-decoration: none;
    font-weight: 500;
}

.org-id-link:hover {
    text-decoration: underline;
}

.empty-message {
    color: var(--rz-text-secondary-color);
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem;
}

/* --- Dates Grid --- */
.dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dates-column {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .dates-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* --- Flags List --- */
.flags-list {
    display: flex;
    flex-direction: column;
}

.flag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--rz-base-300);
}

.flag-row:last-child {
    border-bottom: none;
}

.flag-label {
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color);
}

.flag-value {
    font-size: 0.875rem;
    font-weight: 500;
}

.flag-value.yes {
    color: var(--rz-success);
}

.flag-value.no {
    color: var(--rz-text-secondary-color);
}

/* --- Capacity List --- */
.capacity-list {
    display: flex;
    flex-direction: column;
}

.capacity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--rz-base-300);
}

.capacity-row:last-child {
    border-bottom: none;
}

.capacity-row.highlight {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--rz-text-color) 4%, transparent);
    border-radius: 6px;
    border-bottom: none;
}

.capacity-label {
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color);
}

.capacity-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rz-text-color);
}

.capacity-row.highlight .capacity-value {
    color: var(--rz-info);
}

/* --- Detail Page Skeleton --- */
.detail-skeleton {
    animation: fadeIn 0.2s ease;
}

.skeleton-header {
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid var(--rz-base-300);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skeleton-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skeleton-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-tabs {
    margin-bottom: 1rem;
}

.skeleton-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-section-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skeleton-section-card {
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid var(--rz-base-300);
    border-radius: 10px;
}

.skeleton-section-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--rz-base-300);
}

.skeleton-section-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* --- Data List (Addresses, Phones, etc.) --- */
.data-list {
    display: flex;
    flex-direction: column;
}

.data-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-radius: 6px;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.data-list-item:not(:last-child) {
    border-bottom: 1px solid var(--rz-base-300);
}

.data-list-item:hover {
    background: color-mix(in srgb, var(--rz-text-color) 4%, transparent);
}

.data-list-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.data-list-type {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--rz-text-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.data-list-primary {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rz-text-color);
    line-height: 1.4;
}

.data-list-secondary {
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color);
    line-height: 1.3;
}

.data-list-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
    margin-top: 2px;
}

.data-list-item:hover .data-list-actions,
.data-list-item:focus-within .data-list-actions {
    opacity: 1;
}

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: var(--rz-text-secondary-color);
}

.action-btn .material-icons {
    font-size: 16px;
}

.action-btn.edit:hover {
    background: color-mix(in srgb, var(--rz-text-color) 10%, transparent);
    color: var(--rz-text-secondary-color);
}

.action-btn.delete:hover {
    background: color-mix(in srgb, var(--rz-danger) 12%, transparent);
    color: var(--rz-danger);
}

/* Keyboard focus: matches the EwIconButton treatment (ring + lit button) so revealed-on-focus
   row actions are findable, not just technically focused. */
.action-btn:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 1px;
    background: color-mix(in srgb, var(--rz-primary) 12%, transparent);
    color: var(--rz-primary);
}

/* --- Contact Avatar --- */
.contact-avatar-minimal {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--rz-text-color) 10%, transparent);
    color: var(--rz-text-secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.contact-email-link {
    font-size: 0.75rem;
    color: var(--rz-primary);
    text-decoration: none;
    transition: color 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-email-link:hover {
    color: var(--rz-primary-dark);
    text-decoration: underline;
}

.contact-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-width: 0;
}

.contact-info-type {
    color: var(--rz-text-secondary-color);
    font-size: 0.6875rem;
    font-weight: 500;
    width: 110px;
    min-width: 110px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.contact-phone-link {
    color: var(--rz-text-secondary-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

.contact-phone-link:hover {
    color: var(--rz-primary);
}

.contact-primary-badge {
    color: var(--rz-text-secondary-color);
    font-size: 0.75rem;
    line-height: 1;
    flex-shrink: 0;
}

/* --- Website Display --- */
.website-display {
    padding: 0.5rem 0;
}

.website-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--rz-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    background: color-mix(in srgb, var(--rz-primary) 6%, transparent);
}

.website-link:hover {
    background: color-mix(in srgb, var(--rz-primary) 12%, transparent);
    color: var(--rz-primary-dark);
    text-decoration: none;
}

.website-link .material-icons {
    font-size: 1rem;
}

/* --- Contacts Grid --- */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.contact-card {
    background: color-mix(in srgb, var(--rz-text-color) 4%, transparent);
    border: 1px solid var(--rz-base-300);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 0;
    overflow: hidden;
}

.contact-card:hover {
    background: color-mix(in srgb, var(--rz-text-color) 6%, transparent);
    border-color: var(--rz-base-300);
}

.contact-card:hover .data-list-actions,
.contact-card:focus-within .data-list-actions {
    opacity: 1;
}

.contact-card.deleting {
    opacity: 0.5;
    pointer-events: none;
}

.contact-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-card-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

/* --- Mapping Status Badges --- */
.mapping-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    text-transform: capitalize;
}

.mapping-status.status-mapped {
    background: color-mix(in srgb, var(--rz-success) 15%, transparent);
    color: var(--rz-success);
}

.mapping-status.status-na {
    background: color-mix(in srgb, var(--rz-text-color) 6%, transparent);
    color: var(--rz-text-secondary-color);
}

.mapping-status.status-unknown {
    background: color-mix(in srgb, var(--rz-warning) 15%, transparent);
    color: var(--rz-warning-dark, #b45309);
}

.mapping-id {
    font-family: monospace;
    font-weight: 500;
}

.mapping-clickable-id {
    color: var(--rz-primary);
    cursor: pointer;
    font-family: monospace;
}

.mapping-clickable-id:hover {
    text-decoration: underline;
}

/* --- Mappings Table --- */
.mappings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.mappings-table thead th {
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--rz-base-300);
}

.mappings-table tbody tr {
    transition: background-color 0.15s ease;
}

.mappings-table tbody tr:hover {
    background: color-mix(in srgb, var(--rz-text-color) 4%, transparent);
}

.mappings-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--rz-base-300);
    vertical-align: middle;
}

.mappings-table .system-col {
    font-weight: 500;
    color: var(--rz-text-color);
}

.mappings-table .name-col {
    color: var(--rz-text-secondary-color);
}

.mappings-table .id-col {
    font-family: monospace;
}

.mappings-table .empty-value {
    color: var(--rz-text-secondary-color);
}

.mappings-table .status-col {
    width: 100px;
}

.mappings-table .actions-col {
    width: 80px;
    text-align: right;
}

.mappings-table .row-actions {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mappings-table tbody tr:hover .row-actions,
.mappings-table tbody tr:focus-within .row-actions {
    opacity: 1;
}

/* --- Deleting State --- */
.deleting {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.deleting::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.5rem;
    width: 16px;
    height: 16px;
    border: 2px solid var(--rz-base-300);
    border-top-color: var(--rz-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.data-list-item.deleting {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Animations --- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Responsive: Detail Page --- */
@media (max-width: 1200px) {
    .contacts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .school-header {
        flex-direction: column;
        gap: 1rem;
    }

    .school-header-right {
        width: 100%;
    }

    .skeleton-section-row {
        grid-template-columns: 1fr;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }
}

/* Touch devices - always show actions */
@media (hover: none) {
    .data-list-actions {
        opacity: 1;
    }

    .mappings-table .row-actions {
        opacity: 1;
    }
}

/* ============================================
   Filter Bar â€” shared across pages
   ============================================ */


.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rz-text-tertiary-color);
    pointer-events: none;
    font-size: 1.25rem;
}

/* ============================================================================
   Top bar: slim bar with a centred inline organization search (OrgQuickSearch),
   replacing EwAppChrome's built-in modal quick search. Brand left, search centred
   over the whole bar, account right -- the Azure DevOps / M365 pattern. Theme
   tokens throughout so it holds in light and dark.
   ============================================================================ */
.ew-app-shell { --ew-topbar-height: 48px; }
.ew-app-topbar { position: relative; }
.ew-app-topbar-main .ew-user-menu { margin-left: auto; }

.ms-qs {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, 46vw);
    z-index: 20;
}
.ms-qs-box {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 6px 0 11px;
    border-radius: 9px;
    border: 1px solid color-mix(in srgb, var(--rz-text-color, #1b1d20) 14%, transparent);
    background: var(--rz-base-background-color, #ffffff);
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.ms-qs-open .ms-qs-box,
.ms-qs-box:focus-within {
    border-color: var(--rz-primary, #2563eb);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rz-primary, #2563eb) 16%, transparent);
}
.ms-qs-ic { font-size: 19px; flex: none; color: var(--rz-text-tertiary-color, #8a94a6); }
.ms-qs-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.85rem;
    color: var(--rz-text-color, #1b1d20);
}
.ms-qs-input::placeholder { color: var(--rz-text-tertiary-color, #8a94a6); }
.ms-qs-clear {
    width: 24px; height: 24px; flex: none;
    border: none; background: transparent; border-radius: 6px; cursor: pointer;
    color: var(--rz-text-tertiary-color, #8a94a6);
    display: flex; align-items: center; justify-content: center;
}
.ms-qs-clear:hover { background: color-mix(in srgb, var(--rz-text-color, #1b1d20) 8%, transparent); color: var(--rz-text-secondary-color, #5b6472); }
.ms-qs-clear .rzi { font-size: 17px; }
.ms-qs-kbd {
    flex: none; font-size: 0.64rem; color: var(--rz-text-tertiary-color, #8a94a6);
    border: 1px solid color-mix(in srgb, var(--rz-text-color, #1b1d20) 14%, transparent);
    border-radius: 5px; padding: 1px 6px;
    background: color-mix(in srgb, var(--rz-text-color, #1b1d20) 3%, transparent);
}

.ms-qs-drop {
    position: absolute;
    z-index: 41;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid color-mix(in srgb, var(--rz-text-color, #1b1d20) 12%, transparent);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.10), 0 20px 44px rgba(16, 24, 40, 0.16);
    padding: 6px;
    animation: ms-qs-pop 0.13s ease;
}
@keyframes ms-qs-pop { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.ms-qs-h {
    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--rz-text-tertiary-color, #8a94a6); padding: 9px 10px 5px;
}
.ms-qs-opt {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 7px 10px; border: none; background: transparent; border-radius: 9px;
    cursor: pointer; text-align: left;
}
.ms-qs-opt.active { background: color-mix(in srgb, var(--rz-primary, #2563eb) 10%, transparent); }
.ms-qs-opt-ic {
    width: 32px; height: 32px; flex: none; border-radius: 8px;
    background: color-mix(in srgb, var(--rz-primary, #2563eb) 8%, transparent);
    color: var(--rz-primary, #2563eb);
    display: flex; align-items: center; justify-content: center;
}
.ms-qs-opt-ic .rzi { font-size: 18px; }
.ms-qs-opt-tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ms-qs-opt-t1 { font-size: 0.84rem; font-weight: 600; color: var(--rz-text-color, #1b1d20); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-qs-opt-t2 { font-size: 0.73rem; color: var(--rz-text-tertiary-color, #8a94a6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-qs-opt-go { margin-left: auto; flex: none; font-size: 17px; color: var(--rz-primary, #2563eb); opacity: 0; }
.ms-qs-opt.active .ms-qs-opt-go { opacity: 1; }
.ms-qs-foot {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 9px 12px; margin-top: 2px; border: none; background: transparent;
    border-top: 1px solid color-mix(in srgb, var(--rz-text-color, #1b1d20) 8%, transparent);
    color: var(--rz-primary, #2563eb); font-size: 0.8rem; font-weight: 500; cursor: pointer; text-align: left;
}
.ms-qs-foot .rzi { font-size: 17px; }
.ms-qs-foot:hover { text-decoration: underline; }
.ms-qs-status {
    display: flex; align-items: center; gap: 8px;
    padding: 12px; font-size: 0.82rem; color: var(--rz-text-tertiary-color, #8a94a6);
}
.ms-qs-spin { animation: ms-qs-spin 0.9s linear infinite; font-size: 18px; }
@keyframes ms-qs-spin { to { transform: rotate(360deg); } }
.ms-qs-empty {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 22px 12px; color: var(--rz-text-tertiary-color, #8a94a6); text-align: center;
}
.ms-qs-empty .rzi { font-size: 26px; }
.ms-qs-empty-1 { font-size: 0.84rem; font-weight: 500; color: var(--rz-text-secondary-color, #5b6472); }
.ms-qs-empty-2 { font-size: 0.76rem; }

@media (max-width: 760px) {
    .ms-qs { width: min(320px, 60vw); }
}

.truncate-cell {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* "New version available" prompt (VersionWatcher). Fixed, unobtrusive, dismissible. */
.ver-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(420px, calc(100vw - 40px));
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--rz-base-background-color, #fff);
    color: var(--rz-text-color, #1b1d20);
    border: 1px solid color-mix(in srgb, var(--rz-text-color, #1b1d20) 14%, transparent);
    box-shadow: 0 6px 16px rgba(16, 24, 40, .12), 0 18px 48px rgba(16, 24, 40, .22);
    animation: ver-toast-in .35s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}

.ver-toast-ic {
    font-size: 22px;
    color: var(--rz-primary, #2f6fed);
}

.ver-toast-tx {
    flex: 1;
    min-width: 0;
}

.ver-toast-t1 {
    font-weight: 700;
    font-size: 0.9rem;
}

.ver-toast-t2 {
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color, #586173);
}

.ver-toast-reload {
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    background: var(--rz-primary, #2f6fed);
}

.ver-toast-reload:hover {
    background: color-mix(in srgb, var(--rz-primary, #2f6fed) 88%, #000);
}

.ver-toast-x {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--rz-text-tertiary-color, #8b95a6);
}

.ver-toast-x:hover {
    background: color-mix(in srgb, var(--rz-text-color, #1b1d20) 8%, transparent);
    color: var(--rz-text-color, #1b1d20);
}

@keyframes ver-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

/* Selectable-list row text (descriptor + managed-descriptor type lists): let long names wrap to two
   lines so the full value is visible without hunting for a hover tooltip, then ellipsis beyond that.
   A title tooltip stays in the markup as a fallback. The shared EwSelectableList has no truncation
   handling yet (pending SDK). */
.ms-list-item-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.date-text {
    color: var(--rz-text-secondary-color);
    font-size: 0.8125rem;
}

/* ============================================
   Extracted survivors -- single rules kept from otherwise-retired sections
   (SDK components own the rest; see .docs/specs residual policy)
   ============================================ */

/* --- Dashboard skeleton card (survivor of Dashboard Cards block) --- */
.skeleton-dashboard-card {
    flex: 1;
    min-width: 150px;
    max-width: 300px;
    padding: 1.5rem;
    border: 1px solid var(--rz-base-300);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Section Configurations page container --- */
/* ============================================
   Section Configurations page (restored from scoped CSS)
   Classes applied to RadzenCard/RadzenButton child components;
   Blazor scoping unreliable for child component roots
   ============================================ */
.sections-container {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* --- Inline validation hooks (DatesDialog/RelationshipDialog hand-rolled fields) --- */
/* ============================================
   Inline Validation
   Clean, minimal error states
   ============================================ */

/* Error state for form fields */
/* page-scoped Radzen composition under an app class -- graduation candidate */
.field-error .rz-form-field-content.rz-variant-outlined {
    border-color: var(--rz-danger);
}

.field-error .rz-form-field-content.rz-variant-outlined:focus-within {
    border-color: var(--rz-danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Error message below field */
.field-error-message {
    color: var(--rz-danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ---------------------------------------------------------------------------
   Contained grids (FillHeight) scroll internally, which makes the column header
   sticky. The theme paints header cells with a translucent wash (and the dark
   theme makes grid cells fully transparent), so a sticky header would let the
   rows bleed through it as they scroll under. Repaint the header opaque, matching
   the header band, in both light and dark. Keeping .rz-datatable in the chain
   raises specificity above the dark theme's own high-specificity grid rules so it
   wins in both modes. Global to every EwDataGrid; MASTERed-only override.
   --------------------------------------------------------------------------- */
.ew-datagrid.ew-clean .rz-datatable thead th {
    background-color: color-mix(in srgb, var(--rz-text-color, #1b1d20) 5%, var(--rz-base-lighter, #ffffff)) !important;
}

/* ---------------------------------------------------------------------------
   Filter toolbar layout. Goal: the search + Status + Category + year/view controls
   sit on ONE row when there's room, and wrap CLEANLY (never overlap) when there
   isn't -- e.g. sidebar expanded at 150% display scale, or the user zooms in.

   How it holds together:
   - The bar keeps the filters group and the year/view group side by side (nowrap),
     so the right-hand controls never drop onto a lonely half-empty second line.
     align-items:flex-start so that if the filters DO wrap, the year/view group sits
     at the top rather than floating in the vertical middle.
   - The filters group itself may wrap (flex-wrap:wrap) -- this is the safety valve:
     when the row genuinely can't fit, Status/Category drop to a new line instead of
     sliding UNDER the year control (the overlap bug).
   - The search box has a small flex-basis (160px) so all three filters fit at normal
     widths before it grows to fill the leftover; on narrow widths it shrinks to a
     140px floor (overriding its inline min-width:320px) before anything wraps.
   - The dropdowns keep their set width; only the search flexes.

   NOTE: the SDK rules live in a scoped .razor.css, so they compile to
   `.ew-dg-filterbar[b-xxxx]` (specificity 0,3,0) and outrank a plain class selector.
   These overrides need !important to win. MASTERed-only; every EwDataGrid.
   --------------------------------------------------------------------------- */
.ew-datagrid .ew-dg-filterbar {
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
}

.ew-datagrid .ew-dg-filters {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    row-gap: 0.5rem !important;
}

/* Keep the dropdowns at their set width; let only the search box absorb the squeeze. */
.ew-datagrid .ew-dg-filters .rz-dropdown,
.ew-datagrid .ew-dg-filters .rz-multiselect {
    flex-shrink: 0 !important;
}

.ew-datagrid .ew-dg-filters-end {
    flex-shrink: 0 !important;
}

/* Small basis so Status/Category fit first, then the search grows to fill the row;
   the 140px floor (overriding the inline min-width:320px) lets it shrink on narrow
   widths so the row stays intact until a genuine wrap is unavoidable. */
.ew-datagrid .ew-dg-filters .ew-search-box {
    flex: 1 1 160px !important;
    min-width: 140px !important;
}

/* ---------------------------------------------------------------------------
   Neutral buttons in light mode. EwSeverity.Neutral maps to Radzen's "light"
   button shade (.rz-light), whose outlined/text foreground is --rz-base-200 -- a
   light grey intended for dark/colored surfaces. On a white surface (a dialog's
   Cancel / Reset, the filter Clear button) that is nearly invisible. Repaint the
   neutral outlined + text buttons with the readable secondary-text color and give
   the outline a visible hairline, so they read in BOTH themes. The base rule that
   sets --rz-base-200 has no !important, so this wins. MASTERed-only override.
   --------------------------------------------------------------------------- */
.ew-button.rz-variant-outlined.rz-light,
.ew-button.rz-variant-text.rz-light {
    color: var(--rz-text-secondary-color, #454a4f) !important;
}

.ew-button.rz-variant-outlined.rz-light {
    border-color: color-mix(in srgb, var(--rz-text-color, #1b1d20) 28%, transparent) !important;
}

/* ---------------------------------------------------------------------------
   Collapsed sidebar rail polish. The SDK's collapsed rail reads cramped for our
   longer labels: a narrow column with 10px captions, an asymmetric left padding
   on the item wrapper, and a scrollbar gutter that shoves every tile off-centre.
   Widen the rail a little, hide the rail scrollbar (a handful of items never need
   it), make the wrapper a centred flex column with symmetric padding, and give
   the captions a readable size. Result: each item is a clean icon-with-caption
   tile, centred, on one line. Layout only, no color, so it holds in both themes.
   The full selector chain + !important are needed to win over the SDK's scoped
   rules, which pin the item width and push it with an auto left margin.
   --------------------------------------------------------------------------- */
.ew-sidebar-nav.ew-collapsed {
    width: 92px !important;
}

.ew-sidebar-nav.ew-collapsed .ew-sidebar-nav-items {
    padding: 8px 0 !important;
    scrollbar-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.ew-sidebar-nav.ew-collapsed .ew-sidebar-nav-items::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.ew-sidebar-nav.ew-collapsed .ew-sidebar-nav-items .ew-sidebar-item {
    width: 84px !important;
    box-sizing: border-box !important;
    margin: 2px auto !important;
    padding: 11px 4px !important;
    gap: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.ew-sidebar-nav.ew-collapsed .ew-sidebar-nav-items .ew-sidebar-item .ew-sidebar-label {
    font-size: 11px !important;
    line-height: 1.3 !important;
}

/* ---------------------------------------------------------------------------
   Organization search: full-width controls row (US 6576). The page owns its
   search + scope + view + advanced toggle ABOVE the results, so the layout reads
   as three stacked sections (controls, advanced panel, results) like the agreed
   markup. The name/ID search grows to fill; the school year, view toggle and the
   Advanced filters toggle are pushed to the right. Wraps cleanly when crowded.
   Layout only, holds in both themes.
   --------------------------------------------------------------------------- */
.org-search-controls {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.org-search-controls .osc-search {
    flex: 1 1 340px;
    min-width: 240px;
    display: flex;
}

.org-search-controls .osc-search > *,
.org-search-controls .osc-search .ew-search-box {
    flex: 1 1 auto;
    width: 100%;
}

/* This page owns its search + filters above the grid, so the grid's built-in
   filter strip is suppressed here. Every other EwDataGrid keeps its strip. */
.org-search-fill .ew-dg-filterbar {
    display: none !important;
}

/* ---------------------------------------------------------------------------
   Organization search: advanced filter panel (US 6576). Opening advanced
   reveals the chip filters inside their own bordered surface that eases in, so
   it reads as a distinct panel rather than chips floating on the page. Full
   width so it takes its own row under the controls.
   --------------------------------------------------------------------------- */
.org-adv-panel {
    /* border-box so the 100% width includes the padding + border; without it the panel
       overflows its container by the padding and the right edge gets clipped. */
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    padding: 9px 12px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--rz-text-color, #1b1d20) 3%, var(--rz-base-background-color, #ffffff));
    border: 1px solid color-mix(in srgb, var(--rz-text-color, #1b1d20) 12%, transparent);
    animation: org-adv-pop .18s ease;
}

/* Hierarchy drill-through context strip. Shown when the list is scoped to everything under one
   organization (a dashboard state card leads here). Primary-tinted so it reads as an active scope
   rather than a passive hint; the Clear pill lifts it. Theme-token mixes keep it right in dark mode. */
.org-drill-banner {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--rz-text-color, #1b1d20);
    background: color-mix(in srgb, var(--rz-primary, #2563eb) 9%, var(--rz-base-background-color, #ffffff));
    border: 1px solid color-mix(in srgb, var(--rz-primary, #2563eb) 28%, transparent);
}

.org-drill-banner > .rzi {
    color: var(--rz-primary, #2563eb);
    font-size: 19px;
}

.org-drill-banner .odb-text strong { font-weight: 600; }

.org-drill-banner .odb-clear {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px 3px 8px;
    border: 1px solid color-mix(in srgb, var(--rz-primary, #2563eb) 34%, transparent);
    border-radius: 999px;
    background: transparent;
    color: var(--rz-primary, #2563eb);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.org-drill-banner .odb-clear:hover {
    background: color-mix(in srgb, var(--rz-primary, #2563eb) 14%, transparent);
}

.org-drill-banner .odb-clear .rzi { font-size: 15px; }

/* Slim toolbar row: result summary on the left, tools + actions pushed to the right. */
.oap-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.oap-summary {
    font-size: 13px;
    color: var(--rz-text-secondary-color, #586173);
}

.oap-bar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

/* Hairline between the tools (Views/Columns/Export) and the actions (Save/Clear/Hide). */
.oap-sep {
    width: 1px;
    align-self: center;
    height: 18px;
    margin: 0 6px;
    background: color-mix(in srgb, var(--rz-text-color, #1b1d20) 16%, transparent);
}

/* Views dropdown (saved views list). */
.oap-views {
    position: relative;
    display: inline-flex;
}

.oap-views-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: transparent;
}

.oap-views-pop {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    min-width: 260px;
    max-width: 340px;
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid color-mix(in srgb, var(--rz-text-color, #1b1d20) 16%, transparent);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 24, 40, .10), 0 18px 48px rgba(16, 24, 40, .28);
    padding: 6px;
}

.ovp-h {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--rz-text-tertiary-color, #8b95a6);
    padding: 8px 10px 4px;
}

.ovp-empty {
    padding: 10px 12px;
    color: var(--rz-text-secondary-color, #586173);
    font-size: 12.5px;
    line-height: 1.45;
}

.ovp-row {
    display: flex;
    align-items: center;
    gap: 2px;
    border-radius: 8px;
}

.ovp-row:hover {
    background: color-mix(in srgb, var(--rz-text-color, #1b1d20) 6%, transparent);
}

.ovp-load {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    background: none;
    border: none;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--rz-text-color, #1b1d20);
    font-size: 13.5px;
}

.ovp-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ovp-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rz-primary, #2f6fed);
    background: color-mix(in srgb, var(--rz-primary, #2f6fed) 12%, transparent);
    border-radius: 5px;
    padding: 1px 6px;
}

/* Star / delete icon buttons in a saved-view row. */
.ovp-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    border-radius: 7px;
    cursor: pointer;
    color: var(--rz-text-tertiary-color, #8b95a6);
}

.ovp-icon:hover {
    background: color-mix(in srgb, var(--rz-text-color, #1b1d20) 10%, transparent);
    color: var(--rz-text-color, #1b1d20);
}

.ovp-icon i {
    font-size: 18px;
}

/* The default view's star reads gold so "this is my default" is unmistakable. */
.ovp-icon.is-default {
    color: #f5b301;
}

.ovp-icon.is-default:hover {
    color: #e0a200;
}

.ovp-del:hover {
    color: var(--rz-danger, #d64545);
}

/* Export dialog scope options. */
.exp-opt {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid color-mix(in srgb, var(--rz-text-color, #1b1d20) 14%, transparent);
    border-radius: 9px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--rz-text-color, #1b1d20);
}

.exp-opt + .exp-opt {
    margin-top: 0.5rem;
}

.exp-opt:hover {
    border-color: var(--rz-primary, #2f6fed);
}

.exp-opt input {
    accent-color: var(--rz-primary, #2f6fed);
    width: 16px;
    height: 16px;
}

@keyframes org-adv-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .org-adv-panel { animation: none; }
}

