/*
 * MudBlazor Global Overrides
 * Version: 1.0.0
 *
 * ╔═══════════════════════════════════════════════════════════════════════════╗
 * ║  CENTRALIZED MUDBLAZOR STYLING - DO NOT USE ::deep IN COMPONENTS         ║
 * ║                                                                           ║
 * ║  This file provides global styling for all MudBlazor components.          ║
 * ║  If you need to override a MudBlazor style, ADD IT HERE instead of        ║
 * ║  using ::deep in your component's .razor.css file.                        ║
 * ║                                                                           ║
 * ║  Benefits:                                                                ║
 * ║  - Single source of truth for MudBlazor styling                          ║
 * ║  - Consistent look across all components                                  ║
 * ║  - Easier maintenance and theme changes                                   ║
 * ║  - Reduced CSS bundle size (no duplicate rules)                          ║
 * ╚═══════════════════════════════════════════════════════════════════════════╝
 *
 * Dependencies: ayva-theme.css (must be loaded first)
 */

/* ==========================================================================
   MUDBLAZOR DIALOG OVERRIDES
   Consistent dark glassmorphism dialog styling
   ========================================================================== */

/* Dialog container */
.mud-dialog {
    background: var(--dialog-bg) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid var(--dialog-border) !important;
    border-radius: var(--dialog-radius) !important;
    box-shadow: var(--dialog-shadow) !important;
    color: var(--text-primary) !important;
    animation: dialogEnter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dialog title */
.mud-dialog-title {
    background: transparent !important;
    color: var(--text-primary) !important;
    font-weight: var(--font-semibold) !important;
    padding: var(--space-lg) var(--space-xl) var(--space-md) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.mud-dialog-title .mud-typography {
    color: var(--text-primary) !important;
    font-weight: var(--font-semibold) !important;
}

/* Dialog content */
.mud-dialog-content {
    background: transparent !important;
    color: var(--text-primary) !important;
    padding: var(--space-lg) var(--space-xl) !important;
}

.mud-dialog-content .mud-typography {
    color: var(--text-secondary) !important;
}

/* Dialog actions (footer) */
.mud-dialog-actions {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: var(--space-md) var(--space-xl) !important;
    border-radius: 0 0 var(--dialog-radius) var(--dialog-radius) !important;
    gap: var(--space-sm) !important;
}

/* Overlay backdrop — light default for menus, selects, dropdowns */
.mud-overlay {
    background: var(--menu-backdrop) !important;
    backdrop-filter: none !important;
}

/* Dialog backdrop — stronger dim + blur for modal dialogs only */
.mud-dialog-container .mud-overlay {
    background: var(--dialog-backdrop) !important;
    backdrop-filter: blur(2px) !important;
}

/* ==========================================================================
   AYVA-DIALOG VIEWPORT
   Wider viewport on desktop, full-screen on mobile.
   Lives globally because IDialogService renders dialogs through a portal
   outside the originating component's subtree — Blazor ::deep CSS in a
   component scope wouldn't reach the rendered .mud-dialog node.
   The double selector handles MudBlazor wrapping the dialog in a container.
   ========================================================================== */

.mud-dialog.ayva-dialog,
.mud-dialog-container .mud-dialog.ayva-dialog {
    width: min(1100px, 95vw) !important;
    min-height: min(80vh, 750px) !important;
}

@media (max-width: 768px) {
    .mud-dialog.ayva-dialog,
    .mud-dialog-container .mud-dialog.ayva-dialog {
        width: 100vw !important;
        min-height: 100vh !important;
        max-width: 100vw !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
}

/* ==========================================================================
   MUDBLAZOR CHIP OVERRIDES
   Consistent chip styling with proper sizing and colors
   ========================================================================== */

.mud-chip {
    font-size: var(--text-xs) !important;
    font-weight: var(--font-medium) !important;
    border-radius: var(--radius-full) !important;
    transition: all var(--transition-fast) !important;
}

.mud-chip.mud-chip-filled {
    border: none !important;
}

.mud-chip.mud-chip-outlined {
    background: transparent !important;
    border: 1px solid currentColor !important;
}

/* Chip color variants */
.mud-chip.mud-chip-color-primary {
    background: var(--accent-color-15) !important;
    color: var(--accent-light) !important;
}

.mud-chip.mud-chip-color-secondary {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #a78bfa !important;
}

.mud-chip.mud-chip-color-success {
    background: var(--success-color-15) !important;
    color: var(--success-text) !important;
}

.mud-chip.mud-chip-color-warning {
    background: var(--warning-color-15) !important;
    color: var(--warning-text) !important;
}

.mud-chip.mud-chip-color-error {
    background: var(--error-color-15) !important;
    color: var(--error-text) !important;
}

.mud-chip.mud-chip-color-info {
    background: var(--info-color-15) !important;
    color: var(--info-text) !important;
}

.mud-chip.mud-chip-color-default {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}

/* Chip hover states */
.mud-chip:hover {
    filter: brightness(1.1) !important;
}

/* Chip close button */
.mud-chip .mud-chip-close-button {
    color: inherit !important;
    opacity: 0.7 !important;
}

.mud-chip .mud-chip-close-button:hover {
    opacity: 1 !important;
}

/* ==========================================================================
   MUDBLAZOR ALERT OVERRIDES
   Modern alert styling with left accent bar and severity colors
   ========================================================================== */

.mud-alert {
    border-radius: 0 !important;
    border: none !important;
    border-left: 3px solid transparent !important;
    backdrop-filter: blur(12px) !important;
    transition: var(--transition-normal) !important;
}

/* Alert severity variants - normal */
.mud-alert-severity-normal,
.mud-alert.mud-alert-filled.mud-severity-normal {
    background: var(--bg-secondary) !important;
    border-left-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Alert severity variants - info */
.mud-alert-severity-info,
.mud-alert.mud-alert-filled.mud-severity-info {
    background: var(--info-bg) !important;
    border-left-color: var(--info-text) !important;
    color: var(--info-text) !important;
}

/* Alert severity variants - success */
.mud-alert-severity-success,
.mud-alert.mud-alert-filled.mud-severity-success {
    background: var(--success-bg) !important;
    border-left-color: var(--success-text) !important;
    color: var(--success-text) !important;
}

/* Alert severity variants - warning */
.mud-alert-severity-warning,
.mud-alert.mud-alert-filled.mud-severity-warning {
    background: var(--warning-bg) !important;
    border-left-color: var(--warning-text) !important;
    color: var(--warning-text) !important;
}

/* Alert severity variants - error */
.mud-alert-severity-error,
.mud-alert.mud-alert-filled.mud-severity-error {
    background: var(--error-bg) !important;
    border-left-color: var(--error-text) !important;
    color: var(--error-text) !important;
}

/* Alert icon */
.mud-alert .mud-alert-icon {
    color: inherit !important;
}

/* Alert text */
.mud-alert .mud-alert-message {
    color: inherit !important;
}

/* ==========================================================================
   MUDBLAZOR TABLE OVERRIDES
   Consistent table styling with proper hover states
   ========================================================================== */

.mud-table {
    background: var(--bg-card-solid) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden !important;
}

.mud-table-container {
    background: transparent !important;
    border-radius: var(--radius-lg) !important;
}

/* Table header */
.mud-table-head {
    background: var(--table-header-bg) !important;
}

.mud-table-head .mud-table-cell {
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-weight: var(--font-semibold) !important;
    font-size: var(--text-xs) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: var(--space-md) var(--space-lg) !important;
}

/* Table body */
.mud-table-body .mud-table-row {
    background: transparent !important;
    transition: background var(--transition-fast) !important;
}

.mud-table-body .mud-table-row:nth-child(even) {
    background: var(--bg-stripe) !important;
}

.mud-table-body .mud-table-row:hover {
    background: var(--table-row-hover) !important;
}

.mud-table-body .mud-table-row.mud-selected {
    background: var(--accent-color-10) !important;
}

/* Table cells */
.mud-table-cell {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: var(--space-md) var(--space-lg) !important;
    font-size: var(--text-sm) !important;
}

/* Table pagination */
.mud-table-pagination {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

.mud-table-pagination .mud-table-pagination-select {
    color: var(--text-primary) !important;
}

/* Table toolbar */
.mud-table-toolbar {
    background: transparent !important;
    padding: var(--space-md) var(--space-lg) !important;
}

/* ==========================================================================
   MUDBLAZOR INPUT OVERRIDES
   Consistent input styling with proper focus states
   ========================================================================== */

/* Outlined input */
.mud-input-outlined .mud-input-slot {
    background: var(--bg-input) !important;
}

.mud-input-outlined .mud-input-outlined-border {
    border-color: var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast) !important;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--accent-color) !important;
}

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--accent-light) !important;
    box-shadow: 0 0 0 3px var(--accent-color-10) !important;
}

.mud-input-outlined.mud-input-error .mud-input-outlined-border {
    border-color: var(--error-color) !important;
}

.mud-input-outlined.mud-input-error.mud-input-focused .mud-input-outlined-border {
    box-shadow: 0 0 0 3px var(--error-color-10) !important;
}

/* Input text */
.mud-input {
    color: var(--text-primary) !important;
    font-size: var(--text-sm) !important;
}

.mud-input::placeholder {
    color: var(--text-muted) !important;
}

/* Input label */
.mud-input-label {
    color: var(--text-secondary) !important;
    font-size: var(--text-sm) !important;
    transition: color var(--transition-fast) !important;
}

.mud-input-label.mud-input-label-inputcontrol {
    color: var(--text-secondary) !important;
}

.mud-input-focused .mud-input-label {
    color: var(--accent-light) !important;
}

.mud-input-error .mud-input-label {
    color: var(--error-color) !important;
}

/* Helper text */
.mud-input-helper-text {
    color: var(--text-muted) !important;
    font-size: var(--text-xs) !important;
}

.mud-input-error .mud-input-helper-text {
    color: var(--error-color) !important;
}

/* Adornments */
.mud-input-adornment {
    color: var(--text-secondary) !important;
}

/* ==========================================================================
   MUDBLAZOR BUTTON OVERRIDES
   Enhanced button styling with proper hover effects
   ========================================================================== */

/* Primary button */
.mud-button-filled.mud-button-filled-primary {
    background: var(--accent-gradient) !important;
    color: white !important;
    font-weight: var(--font-semibold) !important;
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-fast) !important;
}

.mud-button-filled.mud-button-filled-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-accent) !important;
    filter: brightness(1.1) !important;
}

.mud-button-filled.mud-button-filled-primary:active {
    transform: translateY(0) !important;
}

/* Secondary button */
.mud-button-filled.mud-button-filled-secondary {
    background: var(--secondary-accent) !important;
    border-radius: var(--radius-md) !important;
}

/* Success/Warning/Error buttons */
.mud-button-filled.mud-button-filled-success {
    background: var(--success-color) !important;
    border-radius: var(--radius-md) !important;
}

.mud-button-filled.mud-button-filled-warning {
    background: var(--warning-color) !important;
    color: var(--text-inverse) !important;
    border-radius: var(--radius-md) !important;
}

.mud-button-filled.mud-button-filled-error {
    background: var(--error-color) !important;
    border-radius: var(--radius-md) !important;
}

.mud-button-filled.mud-button-filled-info {
    background: var(--info-color) !important;
    border-radius: var(--radius-md) !important;
}

/* Outlined buttons */
.mud-button-outlined {
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-fast) !important;
}

.mud-button-outlined:hover {
    background: var(--bg-hover) !important;
    border-color: var(--accent-color) !important;
}

.mud-button-outlined.mud-button-outlined-primary {
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
}

.mud-button-outlined.mud-button-outlined-primary:hover {
    background: var(--accent-color-10) !important;
}

/* Text buttons */
.mud-button-text {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-md) !important;
}

.mud-button-text:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

.mud-button-text.mud-button-text-primary {
    color: var(--accent-color) !important;
}

.mud-button-text.mud-button-text-primary:hover {
    background: var(--accent-color-10) !important;
}

/* Disabled state */
.mud-button-root.mud-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* ==========================================================================
   MUDBLAZOR ICON BUTTON OVERRIDES
   Consistent icon button styling
   ========================================================================== */

.mud-icon-button {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-fast) !important;
}

.mud-icon-button:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

.mud-icon-button:active {
    background: var(--bg-active) !important;
}

.mud-icon-button.mud-icon-button-color-primary {
    color: var(--accent-color) !important;
}

.mud-icon-button.mud-icon-button-color-primary:hover {
    background: var(--accent-color-10) !important;
    color: var(--accent-light) !important;
}

.mud-icon-button.mud-disabled {
    color: var(--text-disabled) !important;
    opacity: 0.5 !important;
}

/* ==========================================================================
   MUDBLAZOR TYPOGRAPHY OVERRIDES
   Consistent typography styling
   ========================================================================== */

.mud-typography {
    color: var(--text-primary) !important;
    font-family: var(--font-primary) !important;
}

.mud-typography-h1,
.mud-typography-h2,
.mud-typography-h3,
.mud-typography-h4,
.mud-typography-h5,
.mud-typography-h6 {
    color: var(--text-primary) !important;
    font-weight: var(--font-semibold) !important;
}

.mud-typography-body1,
.mud-typography-body2 {
    color: var(--text-primary) !important;
}

.mud-typography-subtitle1,
.mud-typography-subtitle2 {
    color: var(--text-secondary) !important;
}

.mud-typography-caption {
    color: var(--text-muted) !important;
    font-size: var(--text-xs) !important;
}

.mud-typography-overline {
    color: var(--text-secondary) !important;
    font-size: var(--text-xs) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
}

/* ==========================================================================
   MUDBLAZOR TABS OVERRIDES
   Consistent tab styling
   ========================================================================== */

.mud-tabs {
    background: transparent !important;
}

.mud-tabs-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    overflow: visible !important;
}

.mud-tabs-header .mud-tabs-toolbar {
    overflow: visible !important;
}

.mud-tabs-header .mud-tabs-toolbar-content {
    overflow: visible !important;
}

.mud-tab {
    overflow: visible !important;
}

.mud-tab {
    color: var(--text-secondary) !important;
    font-weight: var(--font-medium) !important;
    transition: all var(--transition-fast) !important;
    min-width: auto !important;
    padding: var(--space-md) var(--space-lg) !important;
}

.mud-tab:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
}

.mud-tab.mud-tab-active {
    color: var(--accent-light) !important;
    background: var(--accent-color-10) !important;
}

.mud-tabs-toolbar-content .mud-tab-slider {
    background: var(--accent-gradient) !important;
    height: 3px !important;
    border-radius: 3px 3px 0 0 !important;
}

/* Vertical tabs */
.mud-tabs-vertical .mud-tabs-header {
    border-bottom: none !important;
    border-right: 1px solid var(--border-color) !important;
}

/* Tab panels container - ensure proper flex layout */
.mud-tabs-panels {
    display: block;
    position: relative;
}

/* ==========================================================================
   MUDBLAZOR MENU / SELECT OVERRIDES
   Consistent dropdown and menu styling
   ========================================================================== */

.mud-popover-paper {
    background: var(--bg-card-solid) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}

.mud-list {
    background: transparent !important;
    padding: var(--space-xs) !important;
}

.mud-list-item {
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-fast) !important;
    margin: 2px 0 !important;
}

.mud-list-item:hover {
    background: var(--bg-hover) !important;
}

.mud-list-item.mud-selected {
    background: var(--accent-color-15) !important;
    color: var(--accent-light) !important;
}

.mud-list-item.mud-selected:hover {
    background: var(--accent-color-20) !important;
}

.mud-list-item-icon {
    color: var(--text-secondary) !important;
}

.mud-list-item:hover .mud-list-item-icon {
    color: var(--text-primary) !important;
}

.mud-list-item.mud-selected .mud-list-item-icon {
    color: var(--accent-color) !important;
}

/* Select input */
.mud-select-input {
    color: var(--text-primary) !important;
}

.mud-select .mud-input-adornment-end {
    color: var(--text-secondary) !important;
}

/* ==========================================================================
   MUDBLAZOR TOOLTIP OVERRIDES
   Consistent tooltip styling
   ========================================================================== */

.mud-tooltip {
    background: var(--bg-card-solid) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    font-size: var(--text-xs) !important;
    padding: var(--space-xs) var(--space-sm) !important;
}

/* ==========================================================================
   MUDBLAZOR CARD OVERRIDES
   Consistent card styling (supplements ayva-theme.css)
   ========================================================================== */

.mud-card {
    background: var(--bg-card-solid) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    transition: all var(--transition-fast) !important;
}

.mud-card:hover {
    border-color: var(--accent-color-40) !important;
}

.mud-card-header {
    background: transparent !important;
    padding: var(--space-lg) !important;
}

.mud-card-header-content .mud-typography {
    color: var(--text-primary) !important;
}

.mud-card-content {
    padding: var(--space-lg) !important;
    color: var(--text-primary) !important;
}

.mud-card-actions {
    padding: var(--space-md) var(--space-lg) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* ==========================================================================
   MUDBLAZOR CHECKBOX / SWITCH OVERRIDES
   Consistent toggle styling
   ========================================================================== */

.mud-checkbox .mud-checkbox-input:checked + .mud-checkbox-label .mud-checkbox-icon {
    color: var(--accent-color) !important;
}

.mud-checkbox-label {
    color: var(--text-primary) !important;
}

.mud-switch .mud-switch-track {
    background: var(--bg-secondary) !important;
}

.mud-switch.mud-checked .mud-switch-track {
    background: var(--accent-color-40) !important;
}

.mud-switch.mud-checked .mud-switch-thumb {
    background: var(--accent-color) !important;
}

/* ==========================================================================
   MUDBLAZOR PROGRESS OVERRIDES
   Consistent progress indicator styling
   ========================================================================== */

.mud-progress-linear {
    background: var(--bg-secondary) !important;
    border-radius: var(--radius-full) !important;
}

.mud-progress-linear-bar {
    background: var(--accent-gradient) !important;
    border-radius: var(--radius-full) !important;
}

.mud-progress-circular svg circle:last-child {
    stroke: var(--accent-color) !important;
}

/* ==========================================================================
   MUDBLAZOR SNACKBAR / TOAST OVERRIDES
   Consistent notification styling
   ========================================================================== */

.mud-snackbar {
    background: var(--bg-card-solid) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text-primary) !important;
}

.mud-snackbar.mud-snackbar-color-normal {
    background: var(--bg-card-solid) !important;
}

.mud-snackbar.mud-snackbar-color-info {
    background: var(--info-bg) !important;
    border-color: var(--info-border) !important;
    color: var(--info-text) !important;
}

.mud-snackbar.mud-snackbar-color-success {
    background: var(--success-bg) !important;
    border-color: var(--success-border) !important;
    color: var(--success-text) !important;
}

.mud-snackbar.mud-snackbar-color-warning {
    background: var(--warning-bg) !important;
    border-color: var(--warning-border) !important;
    color: var(--warning-text) !important;
}

.mud-snackbar.mud-snackbar-color-error {
    background: var(--error-bg) !important;
    border-color: var(--error-border) !important;
    color: var(--error-text) !important;
}

/* ==========================================================================
   MUDBLAZOR AUTOCOMPLETE OVERRIDES
   Consistent autocomplete styling
   ========================================================================== */

.mud-autocomplete .mud-input-adornment-end {
    color: var(--text-secondary) !important;
}

.mud-autocomplete-list {
    background: var(--bg-card-solid) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* ==========================================================================
   MUDBLAZOR EXPANSION PANEL OVERRIDES
   Consistent expansion panel styling
   ========================================================================== */

.mud-expand-panel {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: var(--space-sm) !important;
}

.mud-expand-panel-header {
    color: var(--text-primary) !important;
    transition: background var(--transition-fast) !important;
}

.mud-expand-panel-header:hover {
    background: var(--bg-hover) !important;
}

.mud-expand-panel.mud-panel-expanded .mud-expand-panel-header {
    background: var(--accent-color-10) !important;
}

.mud-expand-panel-content {
    color: var(--text-primary) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* ==========================================================================
   MUDBLAZOR DIVIDER OVERRIDES
   ========================================================================== */

.mud-divider {
    border-color: var(--border-color) !important;
}

/* ==========================================================================
   MUDBLAZOR AVATAR OVERRIDES
   ========================================================================== */

.mud-avatar {
    background: var(--accent-gradient) !important;
    color: white !important;
    font-weight: var(--font-semibold) !important;
}

.mud-avatar-outlined {
    background: transparent !important;
    border: 2px solid var(--accent-color) !important;
    color: var(--accent-color) !important;
}

/* ==========================================================================
   MUDBLAZOR SKELETON OVERRIDES
   ========================================================================== */

.mud-skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 25%,
        var(--bg-hover) 50%,
        var(--bg-card) 75%
    ) !important;
    background-size: 200% 100% !important;
    animation: shimmer 1.5s infinite !important;
}

/* ==========================================================================
   MUDBLAZOR BREADCRUMB OVERRIDES
   ========================================================================== */

.mud-breadcrumbs li {
    color: var(--text-secondary) !important;
}

.mud-breadcrumbs li:last-child {
    color: var(--text-primary) !important;
}

.mud-breadcrumbs a {
    color: var(--accent-color) !important;
    text-decoration: none !important;
}

.mud-breadcrumbs a:hover {
    color: var(--accent-light) !important;
}

.mud-breadcrumbs .mud-breadcrumb-separator {
    color: var(--text-muted) !important;
}

/* ==========================================================================
   MUDBLAZOR BADGE OVERRIDES
   ========================================================================== */

.mud-badge-content {
    font-size: var(--text-xs) !important;
    font-weight: var(--font-semibold) !important;
}

.mud-badge-primary .mud-badge-content {
    background: var(--accent-color) !important;
}

.mud-badge-error .mud-badge-content {
    background: var(--error-color) !important;
}

.mud-badge-success .mud-badge-content {
    background: var(--success-color) !important;
}

.mud-badge-warning .mud-badge-content {
    background: var(--warning-color) !important;
    color: var(--text-inverse) !important;
}

.mud-badge-info .mud-badge-content {
    background: var(--info-color) !important;
}

/* ==========================================================================
   UTILITY CLASSES
   Common patterns to avoid ::deep overrides in components
   ========================================================================== */

/* Card Base Pattern - Use for consistent card styling */
.ayva-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
}

.ayva-card:hover {
    border-color: var(--accent-color);
}

.ayva-card.ayva-card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Card Severity Variants */
.ayva-card.ayva-card-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
}

.ayva-card.ayva-card-error {
    background: var(--error-bg);
    border-color: var(--error-border);
}

.ayva-card.ayva-card-success {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.ayva-card.ayva-card-info {
    background: var(--info-bg);
    border-color: var(--info-border);
}

/* Section Header Pattern */
.ayva-section-header {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.ayva-section-header.ayva-section-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Section Title */
.ayva-section-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

/* Alert Box Pattern */
.ayva-alert-box {
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    margin-top: var(--space-sm);
}

.ayva-alert-box.ayva-alert-warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
}

.ayva-alert-box.ayva-alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.ayva-alert-box.ayva-alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.ayva-alert-box.ayva-alert-info {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--info-text);
}

/* Status Badge Pattern - For inline status indicators */
.ayva-status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
}

.ayva-status-badge.status-online {
    background: var(--success-color-15);
    color: var(--success-text);
}

.ayva-status-badge.status-offline {
    background: var(--error-color-15);
    color: var(--error-text);
}

.ayva-status-badge.status-warning {
    background: var(--warning-color-15);
    color: var(--warning-text);
}

.ayva-status-badge.status-info {
    background: var(--info-color-15);
    color: var(--info-text);
}

/* Loading Overlay Pattern */
.ayva-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10;
    border-radius: inherit;
}

/* Clickable Chip Pattern */
.ayva-clickable-chip {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ayva-clickable-chip:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

/* Scrollable List Pattern */
.ayva-scroll-list {
    max-height: 12rem;
    overflow-y: auto;
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.ayva-scroll-list-item {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.ayva-scroll-list-item:hover {
    background: var(--bg-hover);
}

/* ==========================================================================
   MUDBLAZOR INTERACTIVE ENHANCEMENTS
   Enhanced micro-interactions for all interactive MudBlazor elements
   ========================================================================== */

/* Button click feedback - scale down on active */
.mud-button-root {
    transition: transform 0.15s ease, box-shadow var(--transition-fast), background var(--transition-fast), filter var(--transition-fast) !important;
}

.mud-button-root:active:not(.mud-disabled) {
    transform: scale(0.97) !important;
}

/* Icon button hover glow */
.mud-icon-button:hover:not(.mud-disabled) {
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2) !important;
}

/* Fab button enhancements */
.mud-fab:hover {
    transform: scale(1.05) !important;
    box-shadow: var(--shadow-accent) !important;
}

.mud-fab:active {
    transform: scale(0.97) !important;
}

/* ==========================================================================
   MUDBLAZOR DIALOG ANIMATION ENHANCEMENTS
   Spring-like entrance animation for dialogs
   ========================================================================== */

/* Enhanced dialog entrance with spring overshoot */
@keyframes dialogSpringEnter {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    60% {
        opacity: 1;
        transform: scale(1.02) translateY(-2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes dialogSpringExit {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }
}

@keyframes backdropBlurIn {
    from {
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        opacity: 0;
    }
    to {
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        opacity: 1;
    }
}

.mud-dialog {
    animation: dialogSpringEnter 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.mud-dialog-container .mud-overlay {
    animation: backdropBlurIn 0.2s ease-out !important;
}

/* ==========================================================================
   MUDBLAZOR SNACKBAR ANIMATION ENHANCEMENTS
   Slide-in from bottom-right with spring easing
   ========================================================================== */

@keyframes snackbarSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes snackbarSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%) translateY(0);
    }
}

.mud-snackbar {
    animation: snackbarSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Auto-dismiss progress bar at bottom of snackbar */
.mud-snackbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    animation: snackbarProgress var(--snackbar-duration, 5s) linear forwards;
}

@keyframes snackbarProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Severity accent bars */
.mud-snackbar.mud-snackbar-color-success {
    border-left: 3px solid var(--success-color) !important;
}

.mud-snackbar.mud-snackbar-color-error {
    border-left: 3px solid var(--error-color) !important;
}

.mud-snackbar.mud-snackbar-color-warning {
    border-left: 3px solid var(--warning-color) !important;
}

.mud-snackbar.mud-snackbar-color-info {
    border-left: 3px solid var(--info-color) !important;
}

/* Stack multiple toasts with slight offset */
.mud-snackbar-location-bottom-right .mud-snackbar + .mud-snackbar,
.mud-snackbar-location-top-right .mud-snackbar + .mud-snackbar {
    margin-top: var(--space-sm) !important;
}

/* ==========================================================================
   MUDBLAZOR DRAWER TRANSITION ENHANCEMENTS
   Smooth width transitions for mini mode
   ========================================================================== */

.mud-drawer {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mud-drawer-content {
    transition: opacity 0.2s ease !important;
}

/* ==========================================================================
   MUDBLAZOR NAV ITEM ENHANCEMENTS
   Enhanced navigation with active indicator and hover effects
   ========================================================================== */

.mud-nav-link {
    position: relative !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-left: 3px solid transparent !important;
    margin: 2px var(--space-xs) !important;
}

.mud-nav-link:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    padding-left: calc(var(--space-lg) + 2px) !important;
}

.mud-nav-link.active,
.mud-nav-link.mud-nav-link-active {
    border-left-color: var(--accent-color) !important;
    background: var(--accent-color-10) !important;
    color: var(--accent-light) !important;
}

/* Nav group headers */
.mud-nav-group .mud-nav-link.mud-ripple {
    font-size: var(--text-xs) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: var(--text-muted) !important;
    font-weight: var(--font-semibold) !important;
}

/* ==========================================================================
   MUDBLAZOR TABLE INTERACTION ENHANCEMENTS
   Sortable column headers and row hover glow
   ========================================================================== */

/* Sortable column header feedback */
.mud-table-head .mud-table-cell.mud-table-cell-head-sort {
    cursor: pointer !important;
    user-select: none !important;
    transition: background var(--transition-fast), color var(--transition-fast) !important;
}

.mud-table-head .mud-table-cell.mud-table-cell-head-sort:hover {
    background: var(--accent-color-10) !important;
    color: var(--accent-light) !important;
}

/* Sort icon animation */
.mud-table-sort-label .mud-icon-root {
    transition: transform 0.2s ease !important;
}

/* Row hover with subtle glow */
.mud-table-body .mud-table-row:hover {
    box-shadow: inset 3px 0 0 var(--accent-color) !important;
}

/* ==========================================================================
   MUDBLAZOR FORM VALIDATION ENHANCEMENTS
   Shake animation on validation error
   ========================================================================== */

.mud-input-error .mud-input-outlined-border {
    animation: shake 0.4s ease-in-out !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-3px); }
    40%, 80% { transform: translateX(3px); }
}

/* Focus glow ring for form fields */
.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    box-shadow: 0 0 0 3px var(--accent-color-10), 0 0 12px var(--accent-color-10) !important;
}

/* ==========================================================================
   MUDBLAZOR SCROLLBAR THIN VARIANT
   Custom thin scrollbar for sidebars and panels
   ========================================================================== */

.mud-drawer ::-webkit-scrollbar,
.admin-panel-container ::-webkit-scrollbar {
    width: 4px !important;
}

.mud-drawer ::-webkit-scrollbar-track,
.admin-panel-container ::-webkit-scrollbar-track {
    background: transparent !important;
}

.mud-drawer ::-webkit-scrollbar-thumb,
.admin-panel-container ::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3) !important;
    border-radius: 2px !important;
}

.mud-drawer ::-webkit-scrollbar-thumb:hover,
.admin-panel-container ::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5) !important;
}

/* ==========================================================================
   ADMIN SUB-PANEL STRUCTURE
   Standard panel layout classes for consistent admin panel appearance
   ========================================================================== */

.admin-sub-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.admin-sub-panel .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.admin-sub-panel .panel-header.glass-header {
    background: var(--glass-card-elevated, rgba(30, 41, 59, 0.6));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.admin-sub-panel .panel-title-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.admin-sub-panel .panel-title-group .mud-icon-root {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.admin-sub-panel .panel-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.admin-sub-panel .panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-lg);
}

/* Section dividers in sidebar */
.nav-section-divider {
    height: 1px;
    margin: var(--space-sm) var(--space-lg);
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* ==========================================================================
   REFRESH ANIMATION
   Spin icon + skeleton flash on data refresh
   ========================================================================== */

.refresh-spinning .mud-icon-root {
    animation: spin 0.8s linear infinite !important;
}

.refresh-shimmer {
    position: relative;
    overflow: hidden;
}

.refresh-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.05) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 1s ease-out;
    pointer-events: none;
    border-radius: inherit;
}

/* ==========================================================================
   SAVE & ACTION FEEDBACK PATTERNS (Phase 5)
   ========================================================================== */

/* Save button success state - button morphs to checkmark briefly */
.btn-save-success {
    position: relative;
    overflow: hidden;
}

.btn-save-success::after {
    content: '\2713';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-color);
    color: white;
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s var(--panel-enter-easing);
    border-radius: inherit;
}

.btn-save-success.saved::after {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   DELETE ITEM ANIMATION (Phase 5)
   ========================================================================== */

/* Item deletion - slide out and collapse */
.item-deleting {
    animation: itemSlideOut 0.3s ease-out forwards;
}

@keyframes itemSlideOut {
    0% { opacity: 1; transform: translateX(0); max-height: 100px; }
    50% { opacity: 0; transform: translateX(30px); max-height: 100px; }
    100% { opacity: 0; transform: translateX(30px); max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* ==========================================================================
   DATA REFRESH SHIMMER (Phase 5)
   ========================================================================== */

/* Refresh shimmer overlay - enhanced variant with theme-aware gradient */
.refresh-shimmer-feedback {
    position: relative;
    overflow: hidden;
}

.refresh-shimmer-feedback::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--primary-color-rgb), 0.08),
        transparent
    );
    animation: shimmerSweep 1.2s ease-in-out;
    pointer-events: none;
    opacity: 0;
}

.refresh-shimmer-feedback.refreshing::after {
    opacity: 1;
}

/* ==========================================================================
   ERROR SHAKE ANIMATION (Phase 5)
   ========================================================================== */

/* Error shake feedback */
.error-shake {
    animation: errorShake 0.4s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-4px); }
    30%, 70% { transform: translateX(4px); }
}

/* ==========================================================================
   FORM VALIDATION ENHANCEMENTS (Phase 5)
   ========================================================================== */

/* Form validation - field error state with shake */
.mud-input-error .mud-input-slot {
    animation: errorShake 0.4s ease-in-out;
}

/* Form field focus glow ring */
.mud-input-control:focus-within .mud-input-slot {
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.15) !important;
    transition: box-shadow var(--transition-fast);
}

/* Validation message slide-in */
.mud-input-helper-text.mud-input-error {
    animation: slideInFromLeft 0.2s ease-out;
}

/* ==========================================================================
   LOADING SPINNER ENHANCEMENT (Phase 5)
   ========================================================================== */

/* Enhanced loading spinner for buttons */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.btn-loading .mud-button-label {
    visibility: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   BREADCRUMB NAVIGATION ENHANCEMENT (Phase 5)
   ========================================================================== */

/* Breadcrumb slide animation */
.mud-breadcrumbs .mud-breadcrumb-item {
    animation: slideInFromLeft 0.2s var(--panel-enter-easing) both;
}

.mud-breadcrumbs .mud-breadcrumb-item:nth-child(2) {
    animation-delay: 0.05s;
}

.mud-breadcrumbs .mud-breadcrumb-item:nth-child(3) {
    animation-delay: 0.1s;
}

/* ==========================================================================
   TABLE ROW HOVER ENHANCEMENT (Phase 5)
   ========================================================================== */

/* Enhanced table row interactions */
.mud-table-row:hover {
    background: rgba(var(--primary-color-rgb), 0.04) !important;
    transition: background var(--transition-fast);
}

.mud-table-row:active {
    background: rgba(var(--primary-color-rgb), 0.08) !important;
}

/* Sortable column header feedback */
.mud-table-cell.mud-table-cell-head[style*="cursor"] {
    transition: color var(--transition-fast);
}

.mud-table-cell.mud-table-cell-head[style*="cursor"]:hover {
    color: var(--accent-color) !important;
}

/* ==========================================================================
   CHIP / BADGE ANIMATION (Phase 5)
   ========================================================================== */

/* Badge count update animation */
.mud-badge-content {
    transition: transform 0.2s var(--panel-enter-easing);
}

.mud-badge-content:not(:empty) {
    animation: numberTick 0.3s var(--panel-enter-easing);
}

/* ==========================================================================
   TOOLTIP ENHANCEMENT (Phase 5)
   ========================================================================== */

/* Enhanced tooltip entrance animation */
.mud-tooltip {
    animation: panelEnter 0.15s ease-out !important;
}

/* ==========================================================================
   NEURAL COMMAND CENTER - STATUS BAR
   Global override because .neural-statusbar is a second root element in
   NeuralCommandCenter.razor and Blazor CSS isolation may not apply the
   scope attribute to multiple root elements reliably.
   ========================================================================== */

/* --- Base: single-line statusbar at comfortable size --- */
.neural-statusbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 18px !important;
    height: auto !important;
    flex-shrink: 0 !important;
    padding: 1px var(--space-sm) !important;
    background: var(--neural-panel-bg) !important;
    border-top: 1px solid var(--neural-panel-border) !important;
    font-size: 0.625rem !important;
    color: var(--text-secondary) !important;
    overflow: hidden !important;
    min-width: 0 !important;
}

.neural-statusbar .mud-icon-root {
    font-size: 11px !important;
    width: 11px !important;
    height: 11px !important;
}

.neural-statusbar .mud-progress-circular {
    width: 10px !important;
    height: 10px !important;
}

.neural-statusbar .statusbar-left,
.neural-statusbar .statusbar-right {
    display: flex !important;
    align-items: center !important;
    gap: var(--space-xs) !important;
    min-width: 0 !important;
    white-space: nowrap !important;
}

.neural-statusbar .statusbar-center {
    flex: 1 !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
}

.neural-statusbar .status-item {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    white-space: nowrap !important;
}

.neural-statusbar .latency-indicator {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
}

.neural-statusbar .latency-dot {
    width: 5px !important;
    height: 5px !important;
}

/* --- Two-line layout: center drops to second row.
       Breakpoints scaled up by 1.25x to account for zoom: 0.8
       (e.g. 1200px physical → 1500px CSS with zoom) --- */
@media (max-width: 1800px) {
    .neural-statusbar {
        font-size: 0.5625rem !important;
    }

    .neural-statusbar .statusbar-center {
        order: 3 !important;
        flex-basis: 100% !important;
        text-align: left !important;
        padding-top: 1px !important;
    }
}

/* --- Tablet: tighter spacing (960px physical → 1200px CSS) --- */
@media (max-width: 1200px) {
    .neural-statusbar {
        font-size: 0.5rem !important;
        padding: 1px var(--space-xs) !important;
    }

    .neural-statusbar .mud-icon-root {
        font-size: 9px !important;
        width: 9px !important;
        height: 9px !important;
    }

    .neural-statusbar .statusbar-left,
    .neural-statusbar .statusbar-right {
        gap: 3px !important;
    }
}

/* --- Mobile: most compact (768px physical → 960px CSS) --- */
@media (max-width: 960px) {
    .neural-statusbar {
        font-size: 0.4375rem !important;
        padding: 1px 2px !important;
        gap: 0 !important;
    }

    .neural-statusbar .statusbar-left {
        flex: 1 !important;
    }

    .neural-statusbar .statusbar-right {
        flex: 0 0 auto !important;
    }

    .neural-statusbar .statusbar-center {
        order: 3 !important;
        flex-basis: 100% !important;
        text-align: center !important;
        font-size: 0.4375rem !important;
    }

    .neural-statusbar .mud-icon-root {
        font-size: 8px !important;
        width: 8px !important;
        height: 8px !important;
    }

    .neural-statusbar .latency-dot {
        width: 4px !important;
        height: 4px !important;
    }
}

/* ==========================================================================
   SIGNUP DIALOG — PORTAL-MOUNTED STYLING
   MudDialog renders through IDialogService into a portal outside the
   originating component's DOM subtree, so Razor CSS isolation's `b-xxxxx`
   attribute is lost. All SignupDialog rules that target dialog-internal
   content must live globally, scoped under `.ayva-dialog` to avoid leaking
   to other dialogs. The `ayva-dialog` class is set on the <MudDialog>
   itself and preserved on the portal-mounted root.
   ========================================================================== */

/* --- Google Places autocomplete ------------------------------------------ */

.ayva-dialog .signup-address-field {
    position: relative;
}

.ayva-dialog .signup-address-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    margin-left: var(--space-xs);
    font-weight: var(--font-medium);
}

.ayva-dialog .signup-address-icon {
    position: absolute;
    top: 2rem;
    left: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color) !important;
    z-index: 999;
    pointer-events: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.ayva-dialog .signup-address-input {
    width: 100%;
}

.ayva-dialog .signup-address-input gmp-place-autocomplete {
    width: 100%;
    display: block;
    --gmp-mat-color-surface: var(--bg-secondary);
    --gmp-mat-color-on-surface: var(--text-primary);
    --gmp-mat-color-primary: var(--accent-color);
}

/* "Open full coverage map" hand-off link rendered under the address
   autocomplete in the SignupDialog address step. Pairs with the
   /coverage page (Phase 7) so users can leave the inline check and
   explore tower coverage / terrain in the full-page experience. */
.ayva-dialog .coverage-link {
    display: inline-block;
    font-size: var(--text-xs);
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.ayva-dialog .coverage-link:hover,
.ayva-dialog .coverage-link:focus-visible {
    text-decoration: underline;
    color: var(--accent-color);
}

/* --- Stepper ------------------------------------------------------------- */

.ayva-dialog .signup-stepper {
    padding: var(--space-lg) 0;
}

.ayva-dialog .signup-stepper .mud-stepper-header {
    padding: var(--space-sm) var(--space-lg);
    margin-bottom: var(--space-lg);
}

/* Stepper — MudBlazor v8 actual classes:
   .mud-step (with .active when current)
   .mud-step-label-icon (with .mud-primary when active)
   .mud-step-label-content-title
   .mud-stepper-nav-connector-line (the line between step icons)
   We dim inactive steps and amplify the active one (size + accent gradient
   + glow ring) so the user can see at a glance which step they're on. */

.ayva-dialog .signup-stepper .mud-step .mud-step-label-content-title {
    color: var(--text-muted) !important;
    font-weight: var(--font-medium) !important;
    transition: color var(--transition-fast), font-weight var(--transition-fast);
}

.ayva-dialog .signup-stepper .mud-step.active .mud-step-label-content-title,
.ayva-dialog .signup-stepper .mud-step .mud-step-label-active .mud-step-label-content-title {
    color: var(--accent-color) !important;
    font-weight: var(--font-bold) !important;
    letter-spacing: 0.02em;
}

.ayva-dialog .signup-stepper .mud-step .mud-step-label-icon {
    background: var(--bg-secondary) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    box-shadow: none;
}

.ayva-dialog .signup-stepper .mud-step.active .mud-step-label-icon,
.ayva-dialog .signup-stepper .mud-step .mud-step-label-icon.mud-primary {
    background: var(--accent-gradient) !important;
    color: var(--text-white) !important;
    border-color: transparent !important;
    transform: scale(1.2);
    box-shadow: 0 0 0 4px var(--accent-color-30),
                var(--glow-accent);
}

.ayva-dialog .signup-stepper .mud-step.active .mud-step-label-icon .mud-typography,
.ayva-dialog .signup-stepper .mud-step .mud-step-label-icon.mud-primary .mud-typography {
    color: var(--text-white) !important;
    font-weight: var(--font-bold) !important;
}

/* Connector line between steps — default dim, accent for completed segments.
   MudStepper v8 doesn't tag completed connectors with a state class, so we
   detect "this connector has the active step as a following sibling" via
   :has(~ .mud-step.active). Connectors after the active step have no such
   sibling and stay dim. */
.ayva-dialog .signup-stepper .mud-stepper-nav-connector .mud-stepper-nav-connector-line {
    background: var(--border-color) !important;
    height: 2px !important;
    transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}

.ayva-dialog .signup-stepper .mud-stepper-nav-connector:has(~ .mud-step.active) .mud-stepper-nav-connector-line {
    background: var(--accent-gradient) !important;
    box-shadow: 0 0 6px var(--accent-color-30);
}

.ayva-dialog .signup-stepper .mud-stepper-content {
    padding: var(--space-md) var(--space-lg);
}

/* --- Step content fade-in ------------------------------------------------ */

.ayva-dialog .signup-step-content {
    animation: signupStepFadeIn 0.35s var(--panel-enter-easing) both;
}

@keyframes signupStepFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Text contrast ------------------------------------------------------- */

.ayva-dialog .signup-section-title {
    color: var(--text-primary) !important;
}

.ayva-dialog .signup-section-subtitle {
    color: var(--text-secondary) !important;
}

/* "Choose Your Plan" section header — title on the left, "See full
   comparison" link on the right. Wraps on narrow viewports. */
.ayva-dialog .signup-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.ayva-dialog .signup-compare-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
}

.ayva-dialog .signup-compare-link:hover {
    background: var(--accent-color-10);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--accent-color-30);
}

.ayva-dialog .signup-compare-link .mud-icon-root {
    color: inherit !important;
    font-size: 14px !important;
}

/* --- Alerts -------------------------------------------------------------- */

.ayva-dialog .signup-alert {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
}

.ayva-dialog .signup-alert.mud-alert-filled-info {
    background: var(--info-bg) !important;
    border-color: var(--info-border) !important;
}

.ayva-dialog .signup-alert.mud-alert-filled-success {
    background: var(--success-bg) !important;
    border-color: var(--success-border) !important;
}

/* --- Form inputs --------------------------------------------------------- */

.ayva-dialog .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    transition: all var(--transition-fast) !important;
}

.ayva-dialog .mud-input-outlined:focus-within .mud-input-outlined-border,
.ayva-dialog .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--border-focus) !important;
    box-shadow: var(--shadow-focus), var(--glow-accent) !important;
}

.ayva-dialog .mud-input > input,
.ayva-dialog .mud-input > textarea {
    color: var(--text-primary) !important;
}

.ayva-dialog .mud-input > input::placeholder,
.ayva-dialog .mud-input > textarea::placeholder {
    color: var(--text-muted) !important;
}

.ayva-dialog .mud-input-label {
    color: var(--text-secondary) !important;
    transition: all var(--transition-fast) !important;
}

.ayva-dialog .mud-input-label-inputcontrol.mud-input-label-animated {
    color: var(--accent-color) !important;
}

.ayva-dialog .mud-input-adornment .mud-icon-root {
    color: var(--text-muted) !important;
    transition: color var(--transition-fast) !important;
}

.ayva-dialog .mud-input-focused .mud-input-adornment .mud-icon-root {
    color: var(--accent-color) !important;
}

.ayva-dialog .mud-input-helper-text {
    color: var(--text-muted) !important;
}

/* --- Contact step glass card -------------------------------------------- */

.ayva-dialog .contact-glass-card {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--glass-card-shadow);
}

@media (max-width: 640px) {
    .ayva-dialog .contact-glass-card {
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
    }
}

/* --- Map container ------------------------------------------------------- */

.ayva-dialog .signup-map-container {
    background: var(--glass-elevated) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm) !important;
    height: 350px;
}

.ayva-dialog .signup-map {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
}

.ayva-dialog .signup-map-container .mud-overlay {
    border-radius: var(--radius-xl) !important;
}

@media (max-width: 768px) {
    .ayva-dialog .signup-map-container {
        height: 50vh;
        min-height: 280px;
    }

    .ayva-dialog .signup-address-input {
        min-height: 2.75rem;
    }
}

/* --- Serviceability chips ------------------------------------------------ */

.ayva-dialog .signup-serviceability .mud-chip {
    border-radius: var(--radius-full) !important;
    transition: all var(--transition-fast) !important;
    animation: signupStepFadeIn 0.3s var(--panel-enter-easing) both;
}

.ayva-dialog .signup-serviceability .mud-chip.mud-chip-color-success {
    box-shadow: var(--glow-success) !important;
}

.ayva-dialog .signup-serviceability .mud-chip.mud-chip-color-warning {
    box-shadow: var(--glow-warning) !important;
}

.ayva-dialog .signup-serviceability .mud-chip.mud-chip-color-info {
    box-shadow: var(--glow-info) !important;
}

/* --- Plan comparison table ---------------------------------------------- */

.ayva-dialog .signup-plan-table {
    border-radius: var(--radius-xl) !important;
    overflow: hidden !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

.ayva-dialog .signup-plan-table thead tr {
    background: var(--accent-gradient) !important;
}

.ayva-dialog .signup-plan-table thead th {
    color: var(--text-primary) !important;
    font-weight: var(--font-semibold) !important;
    border-color: var(--border-color) !important;
    transition: all var(--transition-fast) !important;
}

.ayva-dialog .signup-plan-table thead th:hover {
    background: var(--bg-hover) !important;
}

.ayva-dialog .signup-plan-table tbody tr {
    transition: background var(--transition-fast) !important;
}

.ayva-dialog .signup-plan-table tbody tr:hover {
    background: var(--bg-hover) !important;
}

.ayva-dialog .signup-plan-table td {
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.ayva-dialog .signup-plan-table .mud-button-root {
    border-radius: var(--radius-lg) !important;
    transition: all var(--transition-smooth) !important;
}

.ayva-dialog .signup-plan-table .mud-button-root:hover {
    transform: translateY(var(--hover-lift));
}

/* --- Technical details expansion panel ---------------------------------- */

.ayva-dialog .signup-tech-details .mud-expand-panel {
    background: var(--bg-secondary) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    overflow: hidden;
}

.ayva-dialog .signup-tech-details .mud-expand-panel-header {
    color: var(--text-secondary) !important;
    transition: all var(--transition-fast) !important;
}

.ayva-dialog .signup-tech-details .mud-expand-panel-header:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
}

.ayva-dialog .signup-tech-details .mud-expand-panel-content {
    border-top: 1px solid var(--border-color) !important;
}

/* --- Option cards (host election, financial assistance) ----------------- */

.ayva-dialog .signup-option-card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    height: 100%;
    transition: all var(--transition-smooth) !important;
}

.ayva-dialog .signup-option-card:hover {
    border-color: var(--border-color-medium) !important;
    background: var(--glass-panel-hover) !important;
    box-shadow: var(--shadow-sm) !important;
}

.ayva-dialog .signup-option-card--info {
    background: var(--info-bg) !important;
    border-color: var(--info-border) !important;
}

.ayva-dialog .signup-option-card--info:hover {
    background: var(--card-state-info-bg) !important;
    box-shadow: var(--glow-info) !important;
}

/* --- Confirmation summary cards ----------------------------------------- */

.ayva-dialog .signup-summary-card {
    background: var(--glass-elevated) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all var(--transition-smooth) !important;
    animation: signupStepFadeIn 0.4s var(--panel-enter-easing) both;
}

.ayva-dialog .signup-summary-card:nth-child(1) { animation-delay: 0ms; }
.ayva-dialog .signup-summary-card:nth-child(2) { animation-delay: calc(var(--stagger-delay) * 1); }
.ayva-dialog .signup-summary-card:nth-child(3) { animation-delay: calc(var(--stagger-delay) * 2); }
.ayva-dialog .signup-summary-card:nth-child(4) { animation-delay: calc(var(--stagger-delay) * 3); }

.ayva-dialog .signup-summary-card:hover {
    border-color: var(--border-accent) !important;
    box-shadow: var(--glass-card-shadow-hover) !important;
}

.ayva-dialog .signup-summary-card .mud-typography-subtitle1 {
    color: var(--accent-color) !important;
    font-weight: var(--font-semibold) !important;
}

.ayva-dialog .signup-summary-card .mud-divider {
    border-color: var(--border-color) !important;
}

.ayva-dialog .signup-summary-card .mud-typography-body1 {
    color: var(--text-primary) !important;
}

.ayva-dialog .signup-summary-card .mud-typography-caption {
    color: var(--text-secondary) !important;
}

/* --- Action buttons ----------------------------------------------------- */

.ayva-dialog .signup-actions {
    width: 100%;
}

.ayva-dialog .signup-btn-back {
    border-radius: var(--radius-lg) !important;
    transition: all var(--transition-fast) !important;
    color: var(--text-secondary) !important;
}

.ayva-dialog .signup-btn-back:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
}

.ayva-dialog .signup-btn-cancel {
    border-radius: var(--radius-lg) !important;
    transition: all var(--transition-fast) !important;
    color: var(--text-muted) !important;
}

.ayva-dialog .signup-btn-cancel:hover {
    color: var(--text-secondary) !important;
    background: var(--bg-hover) !important;
}

.ayva-dialog .signup-btn-next {
    border-radius: var(--radius-lg) !important;
    background: var(--accent-gradient) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all var(--transition-smooth) !important;
    min-width: 120px;
}

.ayva-dialog .signup-btn-next:hover {
    transform: translateY(var(--hover-lift));
    box-shadow: var(--shadow-accent) !important;
    background: var(--accent-gradient-hover) !important;
}

.ayva-dialog .signup-btn-next:active {
    transform: translateY(0) scale(var(--click-scale));
}

.ayva-dialog .signup-btn-glow {
    background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5), 0 0 24px rgba(234, 88, 12, 0.3) !important;
    animation: nextBtnGlow 2s ease-in-out infinite;
}

.ayva-dialog .signup-btn-glow:hover {
    background: linear-gradient(135deg, #fbbf24, #f97316) !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.7), 0 0 32px rgba(234, 88, 12, 0.4) !important;
}

@keyframes nextBtnGlow {
    0%, 100% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.5), 0 0 24px rgba(234, 88, 12, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.8), 0 0 40px rgba(234, 88, 12, 0.5);
    }
}

.ayva-dialog .signup-btn-submit {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--glow-success) !important;
    transition: all var(--transition-smooth) !important;
    min-width: 180px;
    font-weight: var(--font-semibold) !important;
    padding: var(--space-sm) var(--space-2xl) !important;
}

.ayva-dialog .signup-btn-submit:hover {
    transform: translateY(var(--hover-lift));
    box-shadow: var(--shadow-md), var(--glow-success) !important;
}

.ayva-dialog .signup-btn-submit:active {
    transform: translateY(0) scale(var(--click-scale));
}

.ayva-dialog .signup-btn-submit.mud-button-disabled {
    box-shadow: none !important;
    opacity: 0.6;
}

/* --- Signup-specific dialog frame tweaks -------------------------------- */

.ayva-dialog .mud-dialog-title {
    border-bottom: 1px solid var(--border-color) !important;
    padding: var(--space-lg) var(--space-2xl) !important;
}

.ayva-dialog .mud-dialog-actions {
    border-top: 1px solid var(--border-color) !important;
    padding: var(--space-md) var(--space-2xl) !important;
    background: var(--black-overlay-20) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* --- Mobile-specific signup overrides ----------------------------------- */

@media (max-width: 640px) {
    .ayva-dialog .signup-stepper .mud-stepper-content {
        padding: var(--space-sm) var(--space-md);
    }

    .ayva-dialog .signup-stepper .mud-stepper-header {
        padding: var(--space-xs) var(--space-sm);
    }

    .ayva-dialog .signup-stepper .mud-step-label-content .mud-typography {
        font-size: var(--text-xs) !important;
    }

    .ayva-dialog .signup-summary-card {
        margin-bottom: var(--space-sm);
    }

    .ayva-dialog .signup-actions {
        flex-direction: column-reverse !important;
        gap: var(--space-sm) !important;
    }

    .ayva-dialog .signup-actions > div {
        width: 100%;
    }

    .ayva-dialog .signup-btn-next,
    .ayva-dialog .signup-btn-submit,
    .ayva-dialog .signup-btn-back,
    .ayva-dialog .signup-btn-cancel {
        width: 100% !important;
    }

    .ayva-dialog .signup-plan-table {
        overflow-x: auto !important;
    }
}

/* --- Coverage analysis mode --------------------------------------------- */

.ayva-dialog .signup-analyzing {
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ayva-dialog .analysis-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
    padding: var(--space-xl);
    animation: signupStepFadeIn 0.4s var(--panel-enter-easing) both;
}

.ayva-dialog .analysis-prompt-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-2xl) var(--space-xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 32rem;
    width: 100%;
}

.ayva-dialog .analysis-layout {
    display: flex;
    gap: var(--space-lg);
    min-height: 60vh;
    animation: signupStepFadeIn 0.4s var(--panel-enter-easing) both;
}

.ayva-dialog .analysis-map-area {
    flex: 3;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 500px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.ayva-dialog .analysis-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.ayva-dialog .analysis-results-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    overflow-y: auto;
    max-height: 70vh;
    padding: var(--space-sm);
}

.ayva-dialog .analysis-header {
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-xs);
}

.ayva-dialog .scanning-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.ayva-dialog .scan-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: scan-expand 2s ease-out infinite;
    opacity: 0;
}

.ayva-dialog .scan-ring-delay {
    animation-delay: 0.7s;
}

@keyframes scan-expand {
    0% {
        transform: scale(0.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ayva-dialog .now-testing-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.03));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    flex-shrink: 0;
    animation: card-appear 0.3s ease-out;
}

.ayva-dialog .results-scroll-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-height: 0;
}

.ayva-dialog .site-result-card {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    animation: card-appear 0.3s ease-out;
}

.ayva-dialog .site-result-card:hover {
    border-color: var(--accent-color);
}

.ayva-dialog .site-result-card.card-focused {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.ayva-dialog .site-result-card.card-excellent {
    border-left: 3px solid var(--success-color);
}

.ayva-dialog .site-result-card.card-marginal {
    border-left: 3px solid var(--warning-color);
}

.ayva-dialog .site-result-card.card-blocked {
    border-left: 3px solid var(--error-color);
}

@keyframes card-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ayva-dialog .site-details {
    margin-top: var(--space-xs);
    animation: card-appear 0.2s ease-out;
}

.ayva-dialog .confidence-badge {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    white-space: nowrap;
}

.ayva-dialog .confidence-high {
    background: var(--success-color);
    color: var(--text-white);
}

.ayva-dialog .confidence-medium {
    background: var(--warning-color);
    color: var(--text-primary);
}

.ayva-dialog .confidence-low {
    background: var(--error-color);
    color: var(--text-white);
}

.ayva-dialog .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.ayva-dialog .status-analyzing {
    background: var(--accent-color);
    animation: pulse-dot 1.5s infinite;
}

.ayva-dialog .status-excellent {
    background: var(--success-color);
}

.ayva-dialog .status-marginal {
    background: var(--warning-color);
}

.ayva-dialog .status-blocked {
    background: var(--error-color);
}

.ayva-dialog .status-pending {
    background: var(--text-muted);
    opacity: 0.5;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.ayva-dialog .analysis-summary {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    animation: card-appear 0.5s ease-out;
    margin-top: auto;
}

.ayva-dialog .analysis-summary.summary-available {
    border-color: var(--success-color);
}

.ayva-dialog .analysis-summary.summary-investigate {
    border-color: var(--accent-color);
}

.ayva-dialog .elevation-canvas {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    margin-top: var(--space-xs);
}

@media (max-width: 768px) {
    .ayva-dialog .analysis-layout {
        flex-direction: column;
    }

    .ayva-dialog .analysis-map-area {
        min-height: 300px;
    }

    .ayva-dialog .analysis-results-panel {
        max-height: 40vh;
    }
}

/* --- Out-of-service-area panel ------------------------------------------ */

.ayva-dialog .out-of-area-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-2xl) var(--space-xl);
    min-height: 24rem;
}

.ayva-dialog .out-of-area-form {
    width: 100%;
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.ayva-dialog .out-of-area-submit {
    min-width: 16rem;
}

/* --- Step 2 — animated glass plan card grid (D10) ----------------------- */
/* fadeInUp keyframes are defined in ayva-theme.css (line 666) — reused. */

.ayva-dialog .signup-plan-grid {
    display: grid;
    gap: var(--space-xl);
    --stagger-delay: 80ms;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

/* Count-aware grid layouts — keep cards symmetric regardless of plan count.
   Default (count-4+) falls through to the auto-fit declaration above. */
.ayva-dialog .signup-plan-grid--count-1 {
    grid-template-columns: minmax(280px, 480px);
    justify-content: center;
}

.ayva-dialog .signup-plan-grid--count-2 {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    max-width: 720px;
    margin: 0 auto;
}

.ayva-dialog .signup-plan-grid--count-3 {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
}

@media (max-width: 768px) {
    .ayva-dialog .signup-plan-grid,
    .ayva-dialog .signup-plan-grid--count-1,
    .ayva-dialog .signup-plan-grid--count-2,
    .ayva-dialog .signup-plan-grid--count-3 {
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }
}

.ayva-dialog .signup-plan-card-wrapper {
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
    animation: fadeInUp 0.4s ease-out both;
    border-radius: var(--radius-2xl);
    /* Reset native button styles */
    appearance: none;
    background: none;
    border: 0;
    text-align: inherit;
    font: inherit;
    padding: 0;
    color: inherit;
    width: 100%;
    display: block;
}

.ayva-dialog .signup-plan-card-wrapper:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.ayva-dialog .signup-plan-card-wrapper:not(.selected):not(:disabled) {
    opacity: 0.65;
}

.ayva-dialog .signup-plan-card-wrapper:not(.selected):not(:disabled):hover {
    opacity: 1;
    transform: translateY(-4px);
}

.ayva-dialog .signup-plan-card-wrapper.selected {
    opacity: 1;
    transform: translateY(-6px) scale(1.02);
}

.ayva-dialog .signup-plan-card-wrapper.selected::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-2xl);
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 24px var(--accent-color-30);
    pointer-events: none;
}

.ayva-dialog .signup-plan-card-wrapper:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.ayva-dialog .signup-plan-selected-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--accent-gradient);
    color: var(--text-white);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    z-index: 5;
    animation: fadeInUp 0.25s ease-out both;
}

.ayva-dialog .signup-install-cost-card {
    background: var(--glass-elevated) !important;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.ayva-dialog .signup-install-cost-title {
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
}

.ayva-dialog .signup-install-cost-subtitle {
    color: var(--text-primary);
    font-size: var(--text-sm);
    line-height: 1.5;
}

/* --- D11 — Step 3 "Confirm & Join" summary + embedded static map -------- */

.ayva-dialog .confirm-step-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.ayva-dialog .confirm-banner {
    border-radius: var(--radius-lg) !important;
}

.ayva-dialog .confirm-summary-card {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--glass-card-shadow);
}

.ayva-dialog .confirm-summary-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog .confirm-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
}

.ayva-dialog .confirm-summary-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: baseline;
    gap: var(--space-md);
}

.ayva-dialog .confirm-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ayva-dialog .confirm-value {
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.ayva-dialog .confirm-value-secondary {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-left: var(--space-xs);
}

.ayva-dialog .confirm-map {
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-card-shadow);
}

@media (max-width: 640px) {
    .ayva-dialog .confirm-summary-row {
        grid-template-columns: 1fr;
        gap: 2px; /* micro-gap — tightens label-over-value pair on narrow viewports */
    }

    .ayva-dialog .confirm-map {
        height: 160px;
    }
}

/* --- Reduced motion override — disable all SignupDialog animations ------ */
/* The global rule in ayva-theme.css handles transitions but does not       */
/* override explicit animation declarations / keyframes (signupStepFadeIn,  */
/* nextBtnGlow, scan-expand, card-appear, pulse-dot, fadeInUp).             */

@media (prefers-reduced-motion: reduce) {
    .ayva-dialog .signup-step-content,
    .ayva-dialog .signup-serviceability .mud-chip,
    .ayva-dialog .signup-btn-glow,
    .ayva-dialog .analysis-prompt,
    .ayva-dialog .analysis-layout,
    .ayva-dialog .scan-ring,
    .ayva-dialog .scan-ring-delay,
    .ayva-dialog .now-testing-banner,
    .ayva-dialog .site-result-card,
    .ayva-dialog .site-details,
    .ayva-dialog .status-analyzing,
    .ayva-dialog .status-dot,
    .ayva-dialog .analysis-summary,
    .ayva-dialog .signup-plan-card-wrapper,
    .ayva-dialog .signup-plan-selected-badge {
        animation: none !important;
        animation-duration: 0s !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
    }

    .ayva-dialog .signup-plan-card-wrapper:not(.selected):not(:disabled):hover,
    .ayva-dialog .signup-plan-card-wrapper.selected {
        transform: none !important;
    }
}

/* ==========================================================================
   ISSUE 1 — Hide gmp-place-autocomplete's built-in search icon
   ==========================================================================
   The Google web component ships with a magnifying-glass icon in its shadow
   DOM. We render our own home icon in `.signup-address-field` so we want
   only one. The `::part()` selector is preferred but Google may not expose
   the part publicly — wide-net fallbacks below cover the alternative
   shadow-DOM rendering paths and any background-image variant. */
.ayva-dialog gmp-place-autocomplete::part(search-icon),
.ayva-dialog gmp-place-autocomplete::part(input-icon),
.ayva-dialog gmp-place-autocomplete::part(prefix-icon),
.ayva-dialog gmp-place-autocomplete .search-icon,
.ayva-dialog gmp-place-autocomplete [class*="search-icon" i],
.ayva-dialog gmp-place-autocomplete [class*="searchIcon" i],
.ayva-dialog #signup-address-container svg[aria-label*="search" i],
.ayva-dialog #signup-address-container [role="img"][aria-label*="search" i] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Reserve enough padding on the input to fit our home-icon overlay (which
   sits inside .signup-address-field at left: 0.5rem, width: 2rem). Strip any
   default background-image Google paints inside the input. */
.ayva-dialog gmp-place-autocomplete::part(input),
.ayva-dialog gmp-place-autocomplete input,
.ayva-dialog #signup-address-container input {
    background-image: none !important;
    padding-left: 2.75rem !important;
}

/* ==========================================================================
   ISSUE 2 — Mobile-responsive stepper + per-step mobile titles
   ==========================================================================
   At ≤768px the MudStepper's labels + connectors overflow. Collapse to
   number-only avatars; the active step's text moves to a `signup-step-mobile-title`
   inside the step body so users still know where they are. */
.ayva-dialog .signup-step-mobile-title {
    display: none;
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin: 0 0 var(--space-md) 0;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .ayva-dialog .signup-step-mobile-title {
        display: block;
    }

    .ayva-dialog .signup-stepper {
        margin: 0 calc(var(--space-md) * -1);
    }

    /* Hide step labels + connector text — keep only numbered avatars. */
    .ayva-dialog .signup-stepper .mud-stepper-nav-step-label-text,
    .ayva-dialog .signup-stepper .mud-step-label-text,
    .ayva-dialog .signup-stepper .mud-step-label-content {
        display: none !important;
    }

    .ayva-dialog .signup-stepper .mud-stepper-nav-connector {
        margin: 0 var(--space-xs) !important;
        min-width: 12px;
    }

    .ayva-dialog .signup-stepper .mud-stepper-nav {
        padding: var(--space-sm) 0 !important;
        gap: var(--space-xs);
    }

    .ayva-dialog .signup-stepper .mud-stepper-nav-step .mud-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: var(--text-sm) !important;
    }

    .ayva-dialog .signup-stepper .mud-stepper-header {
        padding: var(--space-xs) var(--space-sm);
        margin-bottom: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .ayva-dialog .signup-stepper .mud-stepper-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

/* ==========================================================================
   ISSUE 3 — Residential / Business segmented toggle + empty business card
   ========================================================================== */
.ayva-dialog .signup-service-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    background: var(--glass-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.ayva-dialog .service-type-option {
    appearance: none;
    background: transparent;
    border: 0;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--text-secondary);
    font: inherit;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.ayva-dialog .service-type-option:hover:not(.active) {
    color: var(--text-primary);
    background: var(--glass-medium);
}

.ayva-dialog .service-type-option.active {
    background: var(--accent-gradient);
    color: var(--text-white);
    box-shadow: var(--cta-glow-md), var(--inset-highlight-subtle);
}

.ayva-dialog .service-type-option .mud-icon-root {
    color: inherit !important;
}

.ayva-dialog .service-type-option .service-type-label {
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
}

.ayva-dialog .service-type-option .service-type-sublabel {
    font-size: var(--text-xs);
    opacity: 0.85;
}

.ayva-dialog .signup-empty-business-card {
    background: var(--glass-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
}

@media (max-width: 480px) {
    .ayva-dialog .service-type-option {
        padding: var(--space-sm) var(--space-md);
    }

    .ayva-dialog .service-type-option .service-type-sublabel {
        display: none;
    }
}

/* ==========================================================================
   ISSUE 5 — SignupExtrasDialog modern glassmorphism overhaul
   ========================================================================== */

.ayva-dialog.signup-extras-dialog .extras-dialog-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.ayva-dialog.signup-extras-dialog .extras-dialog-header > .mud-icon-root {
    color: var(--accent-color);
    font-size: var(--text-2xl);
}

.ayva-dialog.signup-extras-dialog .extras-dialog-subtitle {
    color: var(--text-secondary);
    font-weight: var(--font-normal);
}

.ayva-dialog.signup-extras-dialog .extras-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.ayva-dialog.signup-extras-dialog .extras-welcome {
    border-radius: var(--radius-lg) !important;
}

.ayva-dialog.signup-extras-dialog .extras-section {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--glass-card-shadow);
}

.ayva-dialog.signup-extras-dialog .extras-section-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.signup-extras-dialog .extras-section-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: var(--glass-elevated);
    color: var(--accent-color);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.ayva-dialog.signup-extras-dialog .extras-section-icon .mud-icon-root {
    color: var(--accent-color) !important;
}

.ayva-dialog.signup-extras-dialog .extras-section-text h3 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

.ayva-dialog.signup-extras-dialog .extras-section-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* --- Payment options --- */
.ayva-dialog.signup-extras-dialog .extras-payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.ayva-dialog.signup-extras-dialog .extras-payment-option {
    position: relative;
    appearance: none;
    background: var(--glass-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    font: inherit;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.ayva-dialog.signup-extras-dialog .extras-payment-option:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.ayva-dialog.signup-extras-dialog .extras-payment-option.selected {
    border-color: var(--accent-color);
    background: var(--glass-panel);
    box-shadow: var(--cta-glow-md);
}

.ayva-dialog.signup-extras-dialog .payment-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs);
}

.ayva-dialog.signup-extras-dialog .payment-option-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    color: var(--text-primary);
}

.ayva-dialog.signup-extras-dialog .payment-option-badge {
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    background: var(--glass-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    white-space: nowrap;
}

.ayva-dialog.signup-extras-dialog .payment-option-badge--save {
    background: var(--accent-gradient);
    color: var(--text-white);
    border-color: transparent;
}

.ayva-dialog.signup-extras-dialog .payment-option-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    line-height: 1.4;
}

.ayva-dialog.signup-extras-dialog .payment-option-price {
    margin-top: auto;
    color: var(--accent-color);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
}

.ayva-dialog.signup-extras-dialog .payment-option-check {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    color: var(--accent-color) !important;
    font-size: var(--text-base) !important;
}

.ayva-dialog.signup-extras-dialog .extras-fineprint {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin: 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.ayva-dialog.signup-extras-dialog .extras-fineprint .mud-icon-root {
    font-size: var(--text-sm) !important;
}

/* --- Add-on cards --- */
.ayva-dialog.signup-extras-dialog .extras-addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.ayva-dialog.signup-extras-dialog .extras-addon-card {
    position: relative;
    appearance: none;
    background: var(--glass-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    font: inherit;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ayva-dialog.signup-extras-dialog .extras-addon-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.ayva-dialog.signup-extras-dialog .extras-addon-card.selected {
    border-color: var(--accent-color);
    background: var(--glass-panel);
    box-shadow: var(--cta-glow-md);
}

.ayva-dialog.signup-extras-dialog .addon-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.ayva-dialog.signup-extras-dialog .addon-header > .mud-icon-root {
    color: var(--accent-color);
}

.ayva-dialog.signup-extras-dialog .addon-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    color: var(--text-primary);
    flex: 1;
}

.ayva-dialog.signup-extras-dialog .addon-status-badge {
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    background: var(--success-color-bg, rgba(34, 197, 94, 0.15));
    color: var(--success-color, #22c55e);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    white-space: nowrap;
}

.ayva-dialog.signup-extras-dialog .addon-status-badge--coming {
    background: var(--info-color-bg, rgba(59, 130, 246, 0.15));
    color: var(--info-color, #3b82f6);
}

.ayva-dialog.signup-extras-dialog .addon-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.ayva-dialog.signup-extras-dialog .addon-features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.ayva-dialog.signup-extras-dialog .addon-features li {
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    background: var(--glass-medium);
    color: var(--text-primary);
    font-size: var(--text-xs);
    border: 1px solid var(--border-color);
}

.ayva-dialog.signup-extras-dialog .addon-check {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    color: var(--accent-color) !important;
    font-size: var(--text-lg) !important;
}

/* --- Summary card --- */
.ayva-dialog.signup-extras-dialog .extras-summary {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--accent-color-30);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
}

.ayva-dialog.signup-extras-dialog .extras-summary-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.signup-extras-dialog .extras-summary-header > .mud-icon-root {
    color: var(--accent-color);
}

.ayva-dialog.signup-extras-dialog .extras-summary-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

.ayva-dialog.signup-extras-dialog .extras-summary-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ayva-dialog.signup-extras-dialog .extras-summary-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.ayva-dialog.signup-extras-dialog .extras-summary-list li > .mud-icon-root {
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .ayva-dialog.signup-extras-dialog .extras-section,
    .ayva-dialog.signup-extras-dialog .extras-summary {
        padding: var(--space-md);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ayva-dialog.signup-extras-dialog .extras-payment-option,
    .ayva-dialog.signup-extras-dialog .extras-addon-card {
        transition: none !important;
        transform: none !important;
    }
}

/* ===========================================================================
   PlansShowcaseDialog — fullscreen comparison takeover.

   Portal-mounted MudDialog content can't use Razor CSS isolation, so all
   showcase styles live here scoped under .plans-showcase-dialog. Same
   pattern as .ayva-dialog.signup-extras-dialog and .signup-dialog above.
   =========================================================================== */

.ayva-dialog.plans-showcase-dialog {
    width: 95vw;
    max-width: 1400px;
    height: 95vh;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg,
        var(--bg-primary) 0%,
        var(--bg-secondary) 100%);
}

.ayva-dialog.plans-showcase-dialog .mud-dialog-title {
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--glass-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.ayva-dialog.plans-showcase-dialog .mud-dialog-content {
    flex: 1;
    padding: 0;
    overflow: hidden;
    background: transparent;
}

/* --- Title bar --- */

.ayva-dialog.plans-showcase-dialog .psd-title-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    position: relative;
}

.ayva-dialog.plans-showcase-dialog .psd-title-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--accent-color-30);
    flex-shrink: 0;
    animation: pshTitleIconPulse 3s ease-in-out infinite;
}

@keyframes pshTitleIconPulse {
    0%, 100% { box-shadow: 0 0 20px var(--accent-color-30); }
    50%      { box-shadow: 0 0 32px var(--accent-color-50); }
}

.ayva-dialog.plans-showcase-dialog .psd-title-icon .mud-icon-root {
    color: var(--text-white) !important;
    font-size: 24px !important;
}

.ayva-dialog.plans-showcase-dialog .psd-title-text {
    flex: 1;
    min-width: 0;
}

.ayva-dialog.plans-showcase-dialog .psd-title-text h2 {
    margin: 0;
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: 1.2;
}

.ayva-dialog.plans-showcase-dialog .psd-title-text p {
    margin: 2px 0 0 0;
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.ayva-dialog.plans-showcase-dialog .psd-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.ayva-dialog.plans-showcase-dialog .psd-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.ayva-dialog.plans-showcase-dialog .psd-close .mud-icon-root {
    color: inherit !important;
    font-size: 20px !important;
}

/* --- Scroll container --- */

.ayva-dialog.plans-showcase-dialog .psd-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    scroll-behavior: smooth;
}

/* ============================================================
   PlansShowcaseHero
   ============================================================ */

.ayva-dialog.plans-showcase-dialog .psh-hero {
    position: relative;
    padding: var(--space-3xl) var(--space-2xl);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.plans-showcase-dialog .psh-hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 400px at 30% 50%, var(--accent-color-15), transparent 70%),
        radial-gradient(ellipse 600px 300px at 70% 50%, var(--secondary-accent-20, rgba(6,182,212,0.2)), transparent 70%);
    pointer-events: none;
    animation: pshHeroBreath 8s ease-in-out infinite;
}

@keyframes pshHeroBreath {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.05); }
}

.ayva-dialog.plans-showcase-dialog .psh-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
    max-width: 1100px;
    margin: 0 auto;
}

.ayva-dialog.plans-showcase-dialog .psh-hero-icon {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-2xl);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px var(--accent-color-40), inset 0 -8px 20px rgba(0,0,0,0.2);
    flex-shrink: 0;
    animation: pshHeroIconFloat 6s ease-in-out infinite;
}

@keyframes pshHeroIconFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.ayva-dialog.plans-showcase-dialog .psh-hero-icon .mud-icon-root {
    color: var(--text-white) !important;
    font-size: 48px !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.ayva-dialog.plans-showcase-dialog .psh-hero-stat {
    flex: 1;
    min-width: 0;
}

.ayva-dialog.plans-showcase-dialog .psh-hero-eyebrow {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-color);
    margin-bottom: var(--space-xs);
    animation: pshFadeInUp 0.6s ease-out 0.2s both;
}

.ayva-dialog.plans-showcase-dialog .psh-hero-counter {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    animation: pshFadeInUp 0.7s ease-out 0.3s both;
}

.ayva-dialog.plans-showcase-dialog .psh-hero-number {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg,
        var(--accent-color) 0%,
        var(--secondary-accent, var(--accent-light)) 50%,
        var(--accent-color) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pshShimmer 4s linear infinite;
    letter-spacing: -0.04em;
}

@keyframes pshShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.ayva-dialog.plans-showcase-dialog .psh-hero-unit {
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.ayva-dialog.plans-showcase-dialog .psh-hero-tagline {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin: 0;
    max-width: 50ch;
    animation: pshFadeInUp 0.8s ease-out 0.4s both;
}

@keyframes pshFadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PlansShowcaseSpeedStage
   ============================================================ */

.ayva-dialog.plans-showcase-dialog .psh-stage {
    padding: var(--space-2xl);
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.plans-showcase-dialog .psh-stage-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.plans-showcase-dialog .psh-stage-title-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
}

.ayva-dialog.plans-showcase-dialog .psh-stage-icon,
.ayva-dialog.plans-showcase-dialog .psh-matrix-icon {
    color: var(--accent-color) !important;
    font-size: 28px !important;
}

.ayva-dialog.plans-showcase-dialog .psh-stage-title,
.ayva-dialog.plans-showcase-dialog .psh-matrix-title {
    margin: 0;
    font-family: var(--font-primary);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.ayva-dialog.plans-showcase-dialog .psh-stage-sub,
.ayva-dialog.plans-showcase-dialog .psh-matrix-sub {
    flex-basis: 100%;
    margin: 0;
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.ayva-dialog.plans-showcase-dialog .psh-tab-toggle {
    display: inline-flex;
    background: var(--glass-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 4px;
    gap: 2px;
}

.ayva-dialog.plans-showcase-dialog .psh-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
}

.ayva-dialog.plans-showcase-dialog .psh-tab:hover {
    color: var(--text-primary);
}

.ayva-dialog.plans-showcase-dialog .psh-tab.active {
    color: var(--text-white);
    background: var(--accent-gradient);
    box-shadow: 0 4px 12px var(--accent-color-30);
}

.ayva-dialog.plans-showcase-dialog .psh-tab .mud-icon-root {
    color: inherit !important;
    font-size: 18px !important;
}

/* Chart + impact-card layout */

.ayva-dialog.plans-showcase-dialog .psh-chart-and-impact {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-xl);
    align-items: start;
}

.ayva-dialog.plans-showcase-dialog .psh-chart {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Bar rows */

.ayva-dialog.plans-showcase-dialog .psh-bar-row {
    display: grid;
    grid-template-columns: minmax(11rem, 14rem) 1fr;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    animation: pshFadeInUp 0.5s ease-out both;
    animation-delay: calc(60ms * var(--row-index, 0));
}

.ayva-dialog.plans-showcase-dialog .psh-bar-row:hover {
    background: var(--bg-hover);
}

.ayva-dialog.plans-showcase-dialog .psh-bar-row.is-ours {
    background: linear-gradient(90deg, var(--accent-color-10) 0%, transparent 100%);
    border: 1px solid var(--accent-color-15);
}

.ayva-dialog.plans-showcase-dialog .psh-bar-row.is-ours:hover {
    background: linear-gradient(90deg, var(--accent-color-15) 0%, transparent 100%);
    transform: translateX(4px);
}

.ayva-dialog.plans-showcase-dialog .psh-bar-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.ayva-dialog.plans-showcase-dialog .psh-bar-icon {
    color: var(--text-muted) !important;
    flex-shrink: 0;
    font-size: 18px !important;
}

.ayva-dialog.plans-showcase-dialog .psh-bar-row.is-ours .psh-bar-icon {
    color: var(--accent-color) !important;
}

.ayva-dialog.plans-showcase-dialog .psh-bar-name-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.ayva-dialog.plans-showcase-dialog .psh-bar-name {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ayva-dialog.plans-showcase-dialog .psh-bar-row.is-ours .psh-bar-name {
    color: var(--text-primary);
}

.ayva-dialog.plans-showcase-dialog .psh-bar-sub {
    font-family: var(--font-primary);
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 1px;
}

.ayva-dialog.plans-showcase-dialog .psh-bar-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: var(--text-white);
    font-size: 0.625rem;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    margin-left: auto;
    flex-shrink: 0;
    box-shadow: 0 2px 6px var(--accent-color-30);
}

/* Bar track + bar */

.ayva-dialog.plans-showcase-dialog .psh-bar-track {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    /* Drastically reduced corner radius — full-pill rounding clipped narrow
       (Dialup-class) bars into blobs that didn't visually match wider bars.
       3px reads as "subtle softening" at every width. */
    border-radius: 3px;
    overflow: visible;
}

/* Speed tab — two stacked tracks per row (download + upload). */
.ayva-dialog.plans-showcase-dialog .psh-bar-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ayva-dialog.plans-showcase-dialog .psh-bar-stack .psh-bar-track {
    height: 18px;
}

.ayva-dialog.plans-showcase-dialog .psh-bar-track--up {
    background: var(--bg-secondary);
    opacity: 0.92;
}

/* Upload bars get a slightly desaturated tint so the visual hierarchy
   reads "primary download / secondary upload" without losing the row colour. */
.ayva-dialog.plans-showcase-dialog .psh-bar--up {
    opacity: 0.85;
}

/* Off-the-chart "axis-break" tail — bar visually ends at 80% (set inline by
   SpeedPct's overflow path) and CSS clip-path carves a zigzag at the bar's
   own right edge so the indicator lines up with the 80% gridline.
   Pure CSS, theme-token driven, prefers-reduced-motion safe. */
.ayva-dialog.plans-showcase-dialog .psh-bar.overflow {
    -webkit-clip-path: polygon(
        0 0,
        calc(100% - 8px) 0,
        calc(100% - 2px) 20%,
        calc(100% - 8px) 40%,
        calc(100% - 2px) 60%,
        calc(100% - 8px) 80%,
        calc(100% - 2px) 100%,
        0 100%);
    clip-path: polygon(
        0 0,
        calc(100% - 8px) 0,
        calc(100% - 2px) 20%,
        calc(100% - 8px) 40%,
        calc(100% - 2px) 60%,
        calc(100% - 8px) 80%,
        calc(100% - 2px) 100%,
        0 100%);
}

/* Off-the-chart continuation tail — small bar segment that picks up after
   the zigzag, providing a visual "broken-then-continues" axis break. Its
   own LEFT edge mirrors the bar's right zigzag so the two interlock as a
   matched pair. Sits between ~84%–95% of the track. */
.ayva-dialog.plans-showcase-dialog .psh-bar-tail {
    position: absolute;
    top: 0;
    height: 100%;
    /* Tight axis break: ~4px gap after the bar ends (the "few pixels"
       of break), tail extends to within 4px of the track's right edge
       so the value-label sits over it. */
    left: calc(80% + 4px);
    right: 4px;
    background: linear-gradient(90deg,
        var(--row-color, var(--text-muted)) 0%,
        color-mix(in srgb, var(--row-color, var(--text-muted)) 70%, white) 100%);
    box-shadow: 0 0 12px color-mix(in srgb, var(--row-color, var(--text-muted)) 30%, transparent);
    border-radius: 3px;
    -webkit-clip-path: polygon(
        8px 0,
        2px 20%,
        8px 40%,
        2px 60%,
        8px 80%,
        2px 100%,
        100% 100%,
        100% 0);
    clip-path: polygon(
        8px 0,
        2px 20%,
        8px 40%,
        2px 60%,
        8px 80%,
        2px 100%,
        100% 100%,
        100% 0);
    opacity: 0;
    animation: pshFadeInUp 0.4s ease-out 0.7s both;
    pointer-events: none;
}

/* Our-plan continuation tails get the accent gradient + glow to match the bar */
.ayva-dialog.plans-showcase-dialog .psh-bar-row.is-ours .psh-bar-tail {
    background: var(--accent-gradient);
    box-shadow: 0 0 14px var(--accent-color-40);
}

.ayva-dialog.plans-showcase-dialog .psh-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg,
        var(--row-color, var(--text-muted)) 0%,
        color-mix(in srgb, var(--row-color, var(--text-muted)) 70%, white) 100%);
    box-shadow: 0 0 12px color-mix(in srgb, var(--row-color, var(--text-muted)) 30%, transparent);
    width: 0;
    animation: pshBarFill 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transform-origin: left center;
}

@keyframes pshBarFill {
    from { width: 0; }
    to   { /* width set inline */ }
}

/* Our-plan bars: accent gradient + extra glow */
.ayva-dialog.plans-showcase-dialog .psh-bar-row.is-ours .psh-bar {
    background: var(--accent-gradient);
    box-shadow: 0 0 18px var(--accent-color-40),
                inset 0 1px 0 rgba(255,255,255,0.2);
}

.ayva-dialog.plans-showcase-dialog .psh-bar-track.hovered .psh-bar {
    filter: brightness(1.15);
}

/* Latency-bucket coloring overrides the per-row color when on Latency tab */
.ayva-dialog.plans-showcase-dialog .psh-bar-row.bucket-excellent .psh-bar {
    background: linear-gradient(90deg, var(--success-color, #10b981), color-mix(in srgb, var(--success-color, #10b981) 70%, white));
    box-shadow: 0 0 14px var(--success-color-50, rgba(16,185,129,0.5));
}
.ayva-dialog.plans-showcase-dialog .psh-bar-row.bucket-good .psh-bar {
    background: linear-gradient(90deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 70%, white));
    box-shadow: 0 0 14px var(--accent-color-40);
}
.ayva-dialog.plans-showcase-dialog .psh-bar-row.bucket-fair .psh-bar {
    background: linear-gradient(90deg, var(--warning-color, #f59e0b), color-mix(in srgb, var(--warning-color, #f59e0b) 70%, white));
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}
.ayva-dialog.plans-showcase-dialog .psh-bar-row.bucket-poor .psh-bar {
    background: linear-gradient(90deg, var(--error-color, #ef4444), color-mix(in srgb, var(--error-color, #ef4444) 70%, white));
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

/* Value labels are siblings of .psh-bar (not children) so the overflow
   zigzag clip-path can't chop them off. Centered using flex on a
   full-height absolute box (top/bottom: 0) — that beats top:50% +
   translateY(-50%) for glyphs with non-standard metrics like ↓/↑
   arrows whose bounding-box descenders nudged the visual center. */
.ayva-dialog.plans-showcase-dialog .psh-bar-value {
    position: absolute;
    /* Pulled in from the track edge so the 2.5G overflow tail (which now
       extends to within 4px of the right edge) sits behind the value text
       — visual consistency: every overflow row's value reads "inside the
       continuing bar" rather than floating in empty space past it. */
    right: 14px;
    top: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    animation: pshFadeInUp 0.4s ease-out 0.6s both;
    white-space: nowrap;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Speed-tab scale note (info banner under the chart). */
.ayva-dialog.plans-showcase-dialog .psh-scale-note {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-md);
    background: var(--glass-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-style: italic;
}

.ayva-dialog.plans-showcase-dialog .psh-scale-note .mud-icon-root {
    color: var(--accent-color) !important;
    font-size: 16px !important;
}

/* Latency legend */

.ayva-dialog.plans-showcase-dialog .psh-latency-legend {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
    background: var(--glass-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.ayva-dialog.plans-showcase-dialog .psh-bucket {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: var(--font-medium);
}

.ayva-dialog.plans-showcase-dialog .psh-bucket-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.ayva-dialog.plans-showcase-dialog .psh-bucket.excellent .psh-bucket-dot { background: var(--success-color, #10b981); box-shadow: 0 0 8px var(--success-color, #10b981); }
.ayva-dialog.plans-showcase-dialog .psh-bucket.good .psh-bucket-dot      { background: var(--accent-color);       box-shadow: 0 0 8px var(--accent-color); }
.ayva-dialog.plans-showcase-dialog .psh-bucket.fair .psh-bucket-dot      { background: var(--warning-color, #f59e0b); box-shadow: 0 0 8px var(--warning-color, #f59e0b); }
.ayva-dialog.plans-showcase-dialog .psh-bucket.poor .psh-bucket-dot      { background: var(--error-color, #ef4444); box-shadow: 0 0 8px var(--error-color, #ef4444); }

/* Impact side card */

.ayva-dialog.plans-showcase-dialog .psh-impact {
    grid-row: 1 / 3;
    grid-column: 2;
    position: sticky;
    top: 0;
    background: var(--glass-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.ayva-dialog.plans-showcase-dialog .psh-impact.visible {
    border-color: var(--border-accent);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 24px var(--accent-color-15);
    animation: pshImpactPop 0.3s ease-out;
}

@keyframes pshImpactPop {
    from { opacity: 0.6; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1;   transform: translateY(0)   scale(1); }
}

.ayva-dialog.plans-showcase-dialog .psh-impact-hint {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
    margin: auto 0;
    font-style: italic;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-md);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-icon {
    color: var(--accent-color) !important;
    font-size: 28px !important;
    flex-shrink: 0;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-header h4 {
    margin: 0;
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-sub {
    margin: 2px 0 0 0;
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-stat {
    background: var(--bg-secondary);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    text-align: center;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-stat-label {
    display: block;
    font-family: var(--font-primary);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-stat-value {
    display: block;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-text {
    margin: 0 0 var(--space-md) 0;
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-cta {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--accent-color);
}

/* Computed-examples list */

.ayva-dialog.plans-showcase-dialog .psh-impact-examples {
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-examples-header {
    font-family: var(--font-primary);
    font-size: 0.625rem;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-example-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-example-list li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-example-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-md);
    background: var(--accent-color-10);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-example-icon .mud-icon-root {
    color: var(--accent-color) !important;
    font-size: 14px !important;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-example-label {
    color: var(--text-secondary);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-example-value {
    color: var(--text-primary);
    font-weight: var(--font-bold);
    text-align: right;
    white-space: nowrap;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-family {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px dashed var(--border-color);
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-family-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-md);
    background: var(--accent-color-10);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-family-icon .mud-icon-root {
    color: var(--accent-color) !important;
    font-size: 14px !important;
}

.ayva-dialog.plans-showcase-dialog .psh-impact-family-label {
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

.ayva-dialog.plans-showcase-dialog .psh-impact-family-value {
    font-weight: var(--font-bold);
    text-align: right;
}

.ayva-dialog.plans-showcase-dialog .verdict-excellent { color: var(--success-color, #10b981); }
.ayva-dialog.plans-showcase-dialog .verdict-good      { color: var(--accent-color); }
.ayva-dialog.plans-showcase-dialog .verdict-ok        { color: var(--text-primary); }
.ayva-dialog.plans-showcase-dialog .verdict-tight     { color: var(--warning-color, #f59e0b); }
.ayva-dialog.plans-showcase-dialog .verdict-poor      { color: var(--error-color, #ef4444); }

/* ============================================================
   PlansShowcaseMatrix
   ============================================================ */

.ayva-dialog.plans-showcase-dialog .psh-matrix-section {
    padding: var(--space-2xl);
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.plans-showcase-dialog .psh-matrix-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.plans-showcase-dialog .psh-matrix-scroll {
    overflow-x: auto;
}

.ayva-dialog.plans-showcase-dialog .psh-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--font-primary);
    color: var(--text-primary);
    min-width: 720px;
}

.ayva-dialog.plans-showcase-dialog .psh-matrix th,
.ayva-dialog.plans-showcase-dialog .psh-matrix td {
    padding: var(--space-md) var(--space-md);
    text-align: center;
    vertical-align: middle;
    transition: background var(--transition-fast);
}

.ayva-dialog.plans-showcase-dialog .psh-matrix-feature-col {
    width: 28%;
    min-width: 12rem;
}

.ayva-dialog.plans-showcase-dialog .psh-row-label {
    text-align: left;
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.ayva-dialog.plans-showcase-dialog .psh-row-label .mud-icon-root {
    color: var(--accent-color) !important;
    font-size: 18px !important;
}

/* Plan column headers */

.ayva-dialog.plans-showcase-dialog .psh-matrix-plan-col {
    padding: var(--space-md);
    background: var(--glass-elevated);
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.plans-showcase-dialog .psh-matrix-plan-col.is-recommended {
    background: linear-gradient(180deg, var(--accent-color-15) 0%, var(--accent-color-5) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ayva-dialog.plans-showcase-dialog .psh-plan-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ayva-dialog.plans-showcase-dialog .psh-plan-head-name {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.ayva-dialog.plans-showcase-dialog .psh-plan-head-price {
    font-size: var(--text-2xl);
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.ayva-dialog.plans-showcase-dialog .psh-plan-head-per {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    background: none;
}

.ayva-dialog.plans-showcase-dialog .psh-plan-head-note {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.ayva-dialog.plans-showcase-dialog .psh-plan-head-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--highlight-orange-gradient);
    color: var(--text-white);
    font-size: 0.625rem;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-xs);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

.ayva-dialog.plans-showcase-dialog .psh-plan-head-badge .mud-icon-root {
    font-size: 12px !important;
    color: var(--text-white) !important;
}

/* Section-header rows */

.ayva-dialog.plans-showcase-dialog .psh-section-header td {
    background: var(--bg-secondary);
    color: var(--accent-color);
    text-align: left;
    padding: var(--space-md) var(--space-md);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-top: 2px solid var(--border-accent);
}

.ayva-dialog.plans-showcase-dialog .psh-section-header td .mud-icon-root {
    color: var(--accent-color) !important;
    margin-right: var(--space-xs);
    vertical-align: middle;
}

/* Body rows */

.ayva-dialog.plans-showcase-dialog .psh-row {
    border-bottom: 1px solid var(--border-color);
}

.ayva-dialog.plans-showcase-dialog .psh-row:hover .psh-cell:not(.is-recommended),
.ayva-dialog.plans-showcase-dialog .psh-row:hover .psh-row-label {
    background: var(--bg-hover);
}

.ayva-dialog.plans-showcase-dialog .psh-cell {
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.ayva-dialog.plans-showcase-dialog .psh-cell.is-recommended {
    background: var(--accent-color-5);
    border-left: 1px solid var(--accent-color-15);
    border-right: 1px solid var(--accent-color-15);
}

.ayva-dialog.plans-showcase-dialog .psh-cell-check {
    color: var(--success-color, #10b981) !important;
    font-size: 22px !important;
    filter: drop-shadow(0 0 6px var(--success-color-50, rgba(16,185,129,0.5)));
}

.ayva-dialog.plans-showcase-dialog .psh-cell-cross {
    color: var(--text-muted) !important;
    opacity: 0.4;
    font-size: 22px !important;
}

/* ============================================================
   PlansShowcaseCtaBar
   ============================================================ */

.ayva-dialog.plans-showcase-dialog .psh-cta-bar {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-2xl);
    background: var(--glass-elevated);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border-top: 1px solid var(--border-accent);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    z-index: 10;
}

.ayva-dialog.plans-showcase-dialog .psh-cta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ayva-dialog.plans-showcase-dialog .psh-cta-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    background: var(--bg-hover);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3), 0 0 16px var(--accent-color-30);
}

.ayva-dialog.plans-showcase-dialog .psh-cta-card.is-recommended {
    background: linear-gradient(135deg, var(--accent-color-15) 0%, var(--bg-secondary) 100%);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color-30);
}

.ayva-dialog.plans-showcase-dialog .psh-cta-card.is-recommended:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.3), 0 0 30px var(--accent-color-40);
}

.ayva-dialog.plans-showcase-dialog .psh-cta-name {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.ayva-dialog.plans-showcase-dialog .psh-cta-price {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.ayva-dialog.plans-showcase-dialog .psh-cta-per {
    font-size: var(--text-sm);
    color: var(--text-muted);
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    background: none;
}

.ayva-dialog.plans-showcase-dialog .psh-cta-note {
    font-family: var(--font-primary);
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ayva-dialog.plans-showcase-dialog .psh-cta-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--accent-gradient);
    color: var(--text-white);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px var(--accent-color-30);
}

.ayva-dialog.plans-showcase-dialog .psh-cta-action .mud-icon-root {
    color: var(--text-white) !important;
    font-size: 14px !important;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
    .ayva-dialog.plans-showcase-dialog .psh-chart-and-impact {
        grid-template-columns: 1fr;
    }
    .ayva-dialog.plans-showcase-dialog .psh-impact {
        position: static;
        grid-row: auto;
        grid-column: auto;
        min-height: 0;
    }
    .ayva-dialog.plans-showcase-dialog .psh-hero-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .ayva-dialog.plans-showcase-dialog {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    .ayva-dialog.plans-showcase-dialog .psh-stage,
    .ayva-dialog.plans-showcase-dialog .psh-matrix-section {
        padding: var(--space-lg) var(--space-md);
    }
    .ayva-dialog.plans-showcase-dialog .psh-hero {
        padding: var(--space-xl) var(--space-md);
    }
    .ayva-dialog.plans-showcase-dialog .psh-bar-row {
        grid-template-columns: minmax(8rem, 10rem) 1fr;
        padding: var(--space-xs) var(--space-sm);
    }
    .ayva-dialog.plans-showcase-dialog .psh-bar-name { font-size: var(--text-xs); }
    .ayva-dialog.plans-showcase-dialog .psh-bar-track { height: 22px; }
    .ayva-dialog.plans-showcase-dialog .psh-cta-bar { padding: var(--space-md); }
    .ayva-dialog.plans-showcase-dialog .psh-stage-header {
        flex-direction: column;
        align-items: stretch;
    }
    .ayva-dialog.plans-showcase-dialog .psh-tab-toggle { justify-content: space-around; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ayva-dialog.plans-showcase-dialog .psh-bar,
    .ayva-dialog.plans-showcase-dialog .psh-bar-row,
    .ayva-dialog.plans-showcase-dialog .psh-hero-glow,
    .ayva-dialog.plans-showcase-dialog .psh-hero-icon,
    .ayva-dialog.plans-showcase-dialog .psh-hero-number,
    .ayva-dialog.plans-showcase-dialog .psd-title-icon,
    .ayva-dialog.plans-showcase-dialog .psh-bar-value,
    .ayva-dialog.plans-showcase-dialog .psh-impact {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    .ayva-dialog.plans-showcase-dialog .psh-bar-value,
    .ayva-dialog.plans-showcase-dialog .psh-hero-eyebrow,
    .ayva-dialog.plans-showcase-dialog .psh-hero-counter,
    .ayva-dialog.plans-showcase-dialog .psh-hero-tagline {
        opacity: 1 !important;
        transform: none !important;
    }
}

