/* Admin Panel Custom Styles */

/* ========================================
   BRAND COLORS & CSS VARIABLES
   ======================================== */

:root {
    /* Primary Brand Colors — classic admin blue */
    --brand-primary: #3b82f6;
    --brand-primary-dark: #2563eb;
    --brand-primary-darker: #1d4ed8;
    --brand-secondary: #113D5A;
    --brand-orange: #F59113;
    --brand-orange-dark: #d47810;
    --brand-orange-darker: #b96609;
    
    /* Status Colors */
    --color-success: #10b981;
    --color-success-dark: #059669;
    --color-success-light: #dcfce7;
    --color-success-text: #166534;
    
    --color-danger: #dc2626;
    --color-danger-dark: #b91c1c;
    --color-danger-light: #fee2e2;
    --color-danger-bright: #ef4444;
    
    --color-warning: #f59e0b;
    --color-warning-dark: #d97706;
    --color-warning-light: #fef3c7;
    --color-warning-text: #d97706;
    
    --color-info: #3b82f6;
    --color-info-dark: #2563eb;
    --color-info-darker: #1d4ed8;
    
    /* Gray Scale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* UI Colors */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #fafafa;
    
    --border-light: #f3f4f6;
    --border-default: #e5e7eb;
    --border-dark: #d1d5db;
    
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Button Gradients — classic brand blue */
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-blue-hover: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    
    --gradient-green: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --gradient-green-hover: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --gradient-orange: linear-gradient(135deg, #f6a43a 0%, #F59113 100%);
    --gradient-orange-hover: linear-gradient(135deg, #F59113 0%, #d47810 100%);
    
    --gradient-red: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    --gradient-red-hover: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    --gradient-gray: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    --gradient-gray-hover: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    
    /* Former purple chrome maps to brand blue — keep token name for compatibility */
    --gradient-purple: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-purple-hover: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    
    --gradient-yellow: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-yellow-hover: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    /* Soft chrome for semantic pastel card headers (info/success/warning/danger/neutral) */
    --admin-soft-header-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --admin-soft-header-border: #e5e7eb;
    --admin-soft-header-accent: var(--brand-primary);
    --admin-soft-header-text: #111827;
    --admin-soft-header-muted: #6b7280;
}

/* Universal hover/active indicator for custom tab renderers. */
.dcm-tab-swipe-group {
    position: relative;
}

.dcm-tab-swipe-indicator {
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0;
    width: 0;
    border-radius: var(--radius-lg, 0.75rem);
    background: var(--gradient-blue, var(--brand-primary, #2563eb));
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms ease, width 180ms ease, opacity 140ms ease;
    will-change: transform, width;
    z-index: 0;
}

.dcm-tab-swipe-group--underline .dcm-tab-swipe-indicator {
    top: auto;
    bottom: 0;
    height: 2px;
    border-radius: 999px 999px 0 0;
    background: var(--brand-primary, #2563eb);
    box-shadow: none;
}

.dcm-tab-swipe-group > :not(.dcm-tab-swipe-indicator) {
    position: relative;
    z-index: 1;
}

.dcm-tab-swipe-group .is-dcm-tab-highlighted,
.dcm-tab-swipe-group .is-dcm-tab-resting,
.dcm-tab-swipe-group .is-dcm-tab-highlighted:hover,
.dcm-tab-swipe-group .is-dcm-tab-highlighted:focus-visible {
    background: transparent;
}

.dcm-tab-swipe-group--pill .is-dcm-tab-highlighted,
.dcm-tab-swipe-group--pill .is-dcm-tab-highlighted:hover,
.dcm-tab-swipe-group--pill .is-dcm-tab-highlighted:focus-visible {
    border-color: transparent;
    box-shadow: none;
    color: white;
}

.dcm-tab-swipe-group--underline .is-dcm-tab-highlighted,
.dcm-tab-swipe-group--underline .is-dcm-tab-highlighted:hover,
.dcm-tab-swipe-group--underline .is-dcm-tab-highlighted:focus-visible {
    border-bottom-color: transparent;
    color: var(--brand-primary, #2563eb);
}

@media (prefers-reduced-motion: reduce) {
    .dcm-tab-swipe-indicator {
        transition-duration: 0ms;
    }
}

/* ========================================
   ADMIN THEME TOKENS
   ======================================== */

body.admin-shell {
    --admin-bg: #f3f4f6;
    --admin-surface: #ffffff;
    --admin-surface-2: #f9fafb;
    --admin-surface-3: #f3f4f6;
    --admin-surface-4: #e5e7eb;
    --admin-surface-elevated: var(--admin-surface);
    --admin-card-surface-bg: var(--admin-surface);
    --admin-card-surface-border: var(--admin-border);
    --admin-card-surface-shadow: var(--shadow-sm);
    --admin-border: #e5e7eb;
    --admin-border-strong: #d1d5db;
    --admin-text: #111827;
    --admin-text-muted: #6b7280;
    --admin-text-soft: #9ca3af;
    --admin-link: #2563eb;
    --admin-link-hover: #1d4ed8;
    --admin-button-secondary-bg: #ffffff;
    --admin-button-secondary-hover-bg: #eff6ff;
    --admin-button-secondary-text: #1d4ed8;
    --admin-button-secondary-hover-text: #1d4ed8;
    --admin-button-secondary-border: #bfdbfe;
    --admin-button-secondary-hover-border: #93c5fd;
    --admin-input-bg: #ffffff;
    --admin-input-border: #d1d5db;
    --admin-input-text: #111827;
    --admin-input-placeholder: #9ca3af;
    --admin-dialog-surface: var(--admin-surface-elevated);
    --admin-dialog-border: var(--admin-border);
    --admin-dialog-backdrop: rgba(17, 24, 39, 0.65);
    --admin-dialog-close-hover: var(--admin-surface-2);
    --admin-dialog-error-bg: #fef2f2;
    --admin-dialog-error-text: #b91c1c;
    --admin-dialog-button-secondary-bg: var(--admin-surface-2);
    --admin-dialog-button-secondary-text: var(--admin-text-muted);
    --admin-shadow-panel: 0 10px 25px rgba(15, 23, 42, 0.08);
    --admin-shadow-floating: 0 20px 35px rgba(15, 23, 42, 0.12);
    --bg-white: var(--admin-surface);
    --bg-light: var(--admin-surface-2);
    --bg-gray: var(--admin-surface-3);
    --border-light: var(--admin-border);
    --border-default: var(--admin-border);
    --border-dark: var(--admin-border-strong);
    --text-primary: var(--admin-text);
    --text-secondary: var(--admin-text);
    --text-muted: var(--admin-text-muted);
    --text-light: var(--admin-text-soft);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 18px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 30px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 40px rgba(15, 23, 42, 0.14);
    --admin-floating-surface-bubble-border: rgba(255, 255, 255, 0.42);
    --admin-floating-surface-bubble-bg: rgba(255, 255, 255, 0.78);
    --admin-floating-surface-bubble-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
    --admin-impersonation-bar-top: 4.75rem;
    --admin-scroll-to-top-bottom: 30px;
    --admin-scroll-to-top-right: 24px;
    --admin-scroll-to-top-size: 50px;
    --admin-bottom-dock-reserved-height: 0px;
    --admin-impersonation-tab-bottom: 0;
    --admin-impersonation-tab-right: var(--admin-scroll-to-top-right);
    --impersonation-bar-bg: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    --impersonation-bar-border: #f59e0b;
    --impersonation-bar-text: #78350f;
    --impersonation-bar-muted: #92400e;
    --impersonation-bar-shadow: 0 16px 30px rgba(217, 119, 6, 0.16);
    --admin-soft-header-bg: linear-gradient(180deg, var(--admin-surface) 0%, var(--admin-surface-2) 100%);
    --admin-soft-header-border: var(--admin-border);
    --admin-soft-header-accent: var(--brand-primary);
    --admin-soft-header-text: var(--admin-text);
    --admin-soft-header-muted: var(--admin-text-muted);
    /* Overlay stack: page chrome < system banner < dialog < nested pickers */
    --admin-z-sticky: 2000;
    --admin-z-floating: 1005;
    --admin-z-banner: 10900;
    --admin-z-dialog: 11000;
    --admin-z-nested-picker: 11200;
    --admin-z-phone-picker: 11250;
    --admin-z-toast: 11300;
    color-scheme: light;
    background: var(--admin-bg);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark,
body.admin-shell.admin-theme-system {
    --admin-bg: #0b1120;
    --admin-surface: #111827;
    --admin-surface-2: #0f172a;
    --admin-surface-3: #1f2937;
    --admin-surface-4: #334155;
    --admin-surface-elevated: var(--admin-surface);
    --admin-card-surface-bg: var(--admin-surface-elevated);
    --admin-card-surface-border: var(--admin-border);
    --admin-card-surface-shadow: var(--admin-shadow-panel);
    --admin-border: #243244;
    --admin-border-strong: #334155;
    --admin-text: #e5e7eb;
    --admin-text-muted: #cbd5e1;
    --admin-text-soft: #94a3b8;
    --admin-link: #93c5fd;
    --admin-link-hover: #bfdbfe;
    --admin-button-secondary-bg: #1f2937;
    --admin-button-secondary-hover-bg: #1e3a5f;
    --admin-button-secondary-text: #bfdbfe;
    --admin-button-secondary-hover-text: #dbeafe;
    --admin-button-secondary-border: #416384;
    --admin-button-secondary-hover-border: #60a5fa;
    --admin-input-bg: #0f172a;
    --admin-input-border: #334155;
    --admin-input-text: #e5e7eb;
    --admin-input-placeholder: #94a3b8;
    --admin-kpi-value: var(--admin-text);
    --admin-dialog-surface: var(--admin-surface-elevated);
    --admin-dialog-border: var(--admin-border);
    --admin-dialog-backdrop: rgba(2, 6, 23, 0.78);
    --admin-dialog-close-hover: var(--admin-surface-3);
    --admin-dialog-error-bg: rgba(127, 29, 29, 0.28);
    --admin-dialog-error-text: #fecaca;
    --admin-dialog-button-secondary-bg: var(--admin-surface-2);
    --admin-dialog-button-secondary-text: var(--admin-text-muted);
    --admin-shadow-panel: 0 12px 28px rgba(0, 0, 0, 0.35);
    --admin-shadow-floating: 0 20px 35px rgba(0, 0, 0, 0.45);
    --admin-soft-header-bg: linear-gradient(180deg, var(--admin-surface-elevated) 0%, var(--admin-surface-2) 100%);
    --admin-soft-header-border: var(--admin-border);
    --admin-soft-header-accent: #60a5fa;
    --admin-soft-header-text: var(--admin-text);
    --admin-soft-header-muted: var(--admin-text-muted);
    --bg-white: var(--admin-surface);
    --bg-light: var(--admin-surface-2);
    --bg-gray: var(--admin-surface-3);
    --border-light: var(--admin-border);
    --border-default: var(--admin-border);
    --border-dark: var(--admin-border-strong);
    --text-primary: var(--admin-text);
    --text-secondary: var(--admin-text);
    --text-muted: var(--admin-text-muted);
    --text-light: var(--admin-text-soft);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 8px 18px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 30px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 24px 40px rgba(0, 0, 0, 0.4);
    --admin-floating-surface-bubble-border: rgba(255, 255, 255, 0.14);
    --admin-floating-surface-bubble-bg: rgba(17, 24, 39, 0.82);
    --admin-floating-surface-bubble-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
    --impersonation-bar-bg: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    --impersonation-bar-border: #f59e0b;
    --impersonation-bar-text: #fef3c7;
    --impersonation-bar-muted: #fde68a;
    --impersonation-bar-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    body.admin-shell.admin-theme-system {
        --admin-bg: #0b1120;
        --admin-surface: #111827;
        --admin-surface-2: #0f172a;
        --admin-surface-3: #1f2937;
        --admin-surface-4: #334155;
        --admin-surface-elevated: var(--admin-surface);
        --admin-card-surface-bg: var(--admin-surface-elevated);
        --admin-card-surface-border: var(--admin-border);
        --admin-card-surface-shadow: var(--admin-shadow-panel);
        --admin-border: #243244;
        --admin-border-strong: #334155;
        --admin-text: #e5e7eb;
        --admin-text-muted: #cbd5e1;
        --admin-text-soft: #94a3b8;
        --admin-link: #93c5fd;
        --admin-link-hover: #bfdbfe;
        --admin-input-bg: #0f172a;
        --admin-input-border: #334155;
        --admin-input-text: #e5e7eb;
        --admin-input-placeholder: #94a3b8;
        --admin-floating-surface-bubble-border: rgba(255, 255, 255, 0.14);
        --admin-floating-surface-bubble-bg: rgba(17, 24, 39, 0.82);
        --admin-floating-surface-bubble-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
        --admin-dialog-surface: var(--admin-surface-elevated);
        --admin-dialog-border: var(--admin-border);
        --admin-dialog-backdrop: rgba(2, 6, 23, 0.78);
        --admin-dialog-close-hover: var(--admin-surface-3);
        --admin-dialog-error-bg: rgba(127, 29, 29, 0.28);
        --admin-dialog-error-text: #fecaca;
        --admin-dialog-button-secondary-bg: var(--admin-surface-2);
        --admin-dialog-button-secondary-text: var(--admin-text-muted);
        --admin-shadow-panel: 0 12px 28px rgba(0, 0, 0, 0.35);
        --admin-shadow-floating: 0 20px 35px rgba(0, 0, 0, 0.45);
        --bg-white: var(--admin-surface);
        --bg-light: var(--admin-surface-2);
        --bg-gray: var(--admin-surface-3);
        --border-light: var(--admin-border);
        --border-default: var(--admin-border);
        --border-dark: var(--admin-border-strong);
        --text-primary: var(--admin-text);
        --text-secondary: var(--admin-text);
        --text-muted: var(--admin-text-muted);
        --text-light: var(--admin-text-soft);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 8px 18px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 30px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 24px 40px rgba(0, 0, 0, 0.4);
    --impersonation-bar-bg: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    --impersonation-bar-border: #f59e0b;
    --impersonation-bar-text: #fef3c7;
    --impersonation-bar-muted: #fde68a;
    --impersonation-bar-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
}

    body.admin-shell.admin-theme-system .profile-card,
    body.admin-shell.admin-theme-system .admin-card,
    body.admin-shell.admin-theme-system .admin-table,
    body.admin-shell.admin-theme-system .sticky-save-bar-container,
    body.admin-shell.admin-theme-system .admin-shell-footer__inner,
    body.admin-shell.admin-theme-system .admin-global-search-panel,
    body.admin-shell.admin-theme-system .admin-version-modal__dialog,
    body.admin-shell.admin-theme-system .admin-language-debug {
        background: var(--admin-surface-elevated);
        border-color: var(--admin-border);
        box-shadow: var(--admin-shadow-xl);
    }

    body.admin-shell.admin-theme-system .profile-card-header,
    body.admin-shell.admin-theme-system .admin-card-header,
    body.admin-shell.admin-theme-system .admin-card-header.collapsible,
    body.admin-shell.admin-theme-system .admin-global-search-header,
    body.admin-shell.admin-theme-system .admin-version-modal__header {
        border-color: var(--admin-border);
    }

    body.admin-shell.admin-theme-system .profile-card-title,
    body.admin-shell.admin-theme-system .admin-card-title,
    body.admin-shell.admin-theme-system .admin-version-modal__title,
    body.admin-shell.admin-theme-system .admin-global-search-input,
    body.admin-shell.admin-theme-system .admin-language-debug__value,
    body.admin-shell.admin-theme-system .admin-language-debug__sample-key {
        color: var(--text-primary);
    }

    body.admin-shell.admin-theme-system .admin-card-subtitle,
    body.admin-shell.admin-theme-system .info-label,
    body.admin-shell.admin-theme-system .info-value,
    body.admin-shell.admin-theme-system .preference-toggle-text p,
    body.admin-shell.admin-theme-system .admin-global-search-close,
    body.admin-shell.admin-theme-system .admin-version-modal__eyebrow,
    body.admin-shell.admin-theme-system .admin-version-modal__subtitle,
    body.admin-shell.admin-theme-system .admin-language-debug__summary,
    body.admin-shell.admin-theme-system .admin-language-debug__summary-text,
    body.admin-shell.admin-theme-system .admin-language-debug__sample-meta,
    body.admin-shell.admin-theme-system .admin-shell-footer__copyright,
    body.admin-shell.admin-theme-system .admin-shell-footer__credit,
    body.admin-shell.admin-theme-system .admin-shell-footer__metric,
    body.admin-shell.admin-theme-system .admin-shell-footer__session-reference,
    body.admin-shell.admin-theme-system .sticky-save-bar-info {
        color: var(--text-secondary);
    }

    body.admin-shell.admin-theme-system .profile-card,
    body.admin-shell.admin-theme-system .info-item,
    body.admin-shell.admin-theme-system .preference-toggle,
    body.admin-shell.admin-theme-system .preference-toggle-icon,
    body.admin-shell.admin-theme-system .admin-card,
    body.admin-shell.admin-theme-system .admin-table,
    body.admin-shell.admin-theme-system .admin-global-search-input-wrapper,
    body.admin-shell.admin-theme-system .admin-version-modal__close,
    body.admin-shell.admin-theme-system .admin-shell-footer__metric,
    body.admin-shell.admin-theme-system .admin-language-debug__item,
    body.admin-shell.admin-theme-system .admin-language-debug__sample-item {
        background: var(--admin-surface);
        border-color: var(--admin-border);
    }

    body.admin-shell.admin-theme-system .profile-card-icon,
    body.admin-shell.admin-theme-system .admin-page-header-icon {
        background: rgba(96, 165, 250, 0.16);
        color: #93c5fd;
        border: 1px solid rgba(96, 165, 250, 0.28);
        box-shadow: none;
    }

    body.admin-shell.admin-theme-system .admin-page-header-card__banner .admin-page-header-icon {
        background: rgba(255, 255, 255, 0.16);
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.28);
    }

    body.admin-shell.admin-theme-system .preference-toggle {
        box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
    }

    body.admin-shell.admin-theme-system .preference-toggle-icon {
        color: #bfdbfe;
    }

    body.admin-shell.admin-theme-system .admin-card-header.collapsible:hover {
        background-color: rgba(30, 41, 59, 0.72);
    }

    body.admin-shell.admin-theme-system .admin-card-header.collapsible .collapse-icon {
        color: var(--text-secondary);
    }

    body.admin-shell.admin-theme-system .admin-card-header.collapsible:hover .collapse-icon {
        color: var(--text-primary);
    }

    body.admin-shell.admin-theme-system .admin-card-subtitle {
        color: #cbd5e1;
    }

    body.admin-shell.admin-theme-system .admin-info-card {
        --admin-info-card-bg: rgba(15, 23, 42, 0.76);
        --admin-info-card-border: rgba(148, 163, 184, 0.24);
        --admin-info-card-title: #f8fafc;
        --admin-info-card-body: #cbd5e1;
        --admin-info-card-icon-bg: rgba(59, 130, 246, 0.16);
        --admin-info-card-icon-color: #bfdbfe;
        --admin-info-card-pattern-opacity: 0.08;
    }

    body.admin-shell.admin-theme-system .admin-info-card--info {
        --admin-info-card-bg: rgba(15, 23, 42, 0.8);
        --admin-info-card-border: rgba(96, 165, 250, 0.24);
        --admin-info-card-title: #dbeafe;
        --admin-info-card-body: #bfdbfe;
        --admin-info-card-icon-bg: rgba(37, 99, 235, 0.18);
        --admin-info-card-icon-color: #93c5fd;
    }

    body.admin-shell.admin-theme-system .admin-info-card--success {
        --admin-info-card-bg: rgba(6, 78, 59, 0.22);
        --admin-info-card-border: rgba(52, 211, 153, 0.22);
        --admin-info-card-title: #d1fae5;
        --admin-info-card-body: #a7f3d0;
        --admin-info-card-icon-bg: rgba(16, 185, 129, 0.18);
        --admin-info-card-icon-color: #6ee7b7;
    }

    body.admin-shell.admin-theme-system .admin-info-card--warning {
        --admin-info-card-bg: rgba(120, 53, 15, 0.22);
        --admin-info-card-border: rgba(251, 191, 36, 0.22);
        --admin-info-card-title: #fde68a;
        --admin-info-card-body: #fcd34d;
        --admin-info-card-icon-bg: rgba(245, 158, 11, 0.18);
        --admin-info-card-icon-color: #fbbf24;
    }

    body.admin-shell.admin-theme-system .admin-info-card--danger {
        --admin-info-card-bg: rgba(127, 29, 29, 0.24);
        --admin-info-card-border: rgba(248, 113, 113, 0.22);
        --admin-info-card-title: #fecaca;
        --admin-info-card-body: #fca5a5;
        --admin-info-card-icon-bg: rgba(239, 68, 68, 0.18);
        --admin-info-card-icon-color: #f87171;
    }

    body.admin-shell.admin-theme-system .admin-info-card--neutral {
        --admin-info-card-bg: rgba(30, 41, 59, 0.72);
        --admin-info-card-border: rgba(71, 85, 105, 0.9);
        --admin-info-card-title: #f8fafc;
        --admin-info-card-body: #cbd5e1;
        --admin-info-card-icon-bg: rgba(148, 163, 184, 0.16);
        --admin-info-card-icon-color: #e2e8f0;
    }

    body.admin-shell.admin-theme-system .admin-info-card--blue {
        --admin-info-card-bg: rgba(15, 23, 42, 0.8);
        --admin-info-card-border: rgba(96, 165, 250, 0.24);
        --admin-info-card-title: #dbeafe;
        --admin-info-card-body: #bfdbfe;
        --admin-info-card-icon-bg: rgba(37, 99, 235, 0.18);
        --admin-info-card-icon-color: #93c5fd;
    }

    body.admin-shell.admin-theme-system .admin-info-card--purple {
        --admin-info-card-bg: rgba(76, 29, 149, 0.22);
        --admin-info-card-border: rgba(167, 139, 250, 0.22);
        --admin-info-card-title: #ede9fe;
        --admin-info-card-body: #ddd6fe;
        --admin-info-card-icon-bg: rgba(37, 99, 235, 0.18);
        --admin-info-card-icon-color: #c4b5fd;
    }

    body.admin-shell.admin-theme-system .admin-info-card--cyan {
        --admin-info-card-bg: rgba(14, 116, 144, 0.2);
        --admin-info-card-border: rgba(34, 211, 238, 0.22);
        --admin-info-card-title: #cffafe;
        --admin-info-card-body: #a5f3fc;
        --admin-info-card-icon-bg: rgba(8, 145, 178, 0.18);
        --admin-info-card-icon-color: #67e8f9;
    }

    body.admin-shell.admin-theme-system .admin-info-card--emerald {
        --admin-info-card-bg: rgba(6, 78, 59, 0.24);
        --admin-info-card-border: rgba(52, 211, 153, 0.24);
        --admin-info-card-title: #d1fae5;
        --admin-info-card-body: #a7f3d0;
        --admin-info-card-icon-bg: rgba(16, 185, 129, 0.2);
        --admin-info-card-icon-color: #6ee7b7;
    }

    body.admin-shell.admin-theme-system .admin-tabs {
        background: var(--admin-surface-elevated);
        border-color: var(--admin-border);
        box-shadow: var(--admin-shadow-sm);
    }

    body.admin-shell.admin-theme-system .admin-tabs-stack--unified {
        background: var(--admin-surface-elevated);
        border-color: var(--admin-border);
        box-shadow: var(--admin-shadow-sm);
    }

    body.admin-shell.admin-theme-system .admin-tabs-stack--unified .admin-tabs-stack__row--primary {
        --admin-tabs-scroll-fade: var(--admin-surface-elevated);
    }

    body.admin-shell.admin-theme-system .admin-tabs-stack--unified .admin-tabs-stack__row--secondary {
        background: rgba(15, 23, 42, 0.35);
        --admin-tabs-scroll-fade: rgba(15, 23, 42, 0.72);
    }

    body.admin-shell.admin-theme-system .admin-tabs-stack--unified .admin-tabs-stack__row:not(:last-child) .admin-tabs__inner,
    body.admin-shell.admin-theme-system .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__inner {
        border-bottom-color: var(--admin-border);
    }

    body.admin-shell.admin-theme-system .admin-tabs__inner,
    body.admin-shell.admin-theme-system .admin-tabs__inner--compact,
    body.admin-shell.admin-theme-system .admin-tabs__separator {
        border-color: var(--admin-border);
        background: transparent;
    }

    body.admin-shell.admin-theme-system .admin-tabs__tab.is-active.is-swipe-resting {
        color: var(--text-primary);
    }

    body.admin-shell.admin-theme-system .admin-tabs__badge {
        background: rgba(59, 130, 246, 0.18);
        color: #dbeafe;
    }

    body.admin-shell.admin-theme-system .sticky-save-bar-container {
        box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
    }

    body.admin-shell.admin-theme-system .admin-shell-footer__inner {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.92) 100%);
    }

    body.admin-shell.admin-theme-system .admin-shell-footer__credit a,
    body.admin-shell.admin-theme-system .admin-shell-footer__version-link {
        color: #93c5fd;
    }

    body.admin-shell.admin-theme-system .admin-shell-footer__credit a:hover,
    body.admin-shell.admin-theme-system .admin-shell-footer__version-link:hover,
    body.admin-shell.admin-theme-system .admin-shell-footer__version-link:focus-visible {
        color: #bfdbfe;
    }

    body.admin-shell.admin-theme-system .admin-shell-footer__separator {
        color: #64748b;
    }

    body.admin-shell.admin-theme-system .admin-shell-footer__session {
        background: rgba(30, 64, 175, 0.22);
        color: #bfdbfe;
    }

    body.admin-shell.admin-theme-system .admin-shell-footer__session.is-warning {
        background: rgba(146, 64, 14, 0.24);
        color: #fde68a;
    }

    body.admin-shell.admin-theme-system .admin-shell-footer__session.is-danger {
        background: rgba(153, 27, 27, 0.24);
        color: #fecaca;
    }

    body.admin-shell.admin-theme-system .admin-global-search-header {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.92) 100%);
    }

    body.admin-shell.admin-theme-system .admin-global-search-input-wrapper {
        box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08), 0 8px 18px rgba(2, 6, 23, 0.22);
    }

    body.admin-shell.admin-theme-system .admin-global-search-input-wrapper,
    body.admin-shell.admin-theme-system .admin-version-modal__close,
    body.admin-shell.admin-theme-system .admin-global-search-close {
        border-color: var(--admin-border);
    }

    body.admin-shell.admin-theme-system .admin-global-search-close {
        background: rgba(51, 65, 85, 0.9);
    }

    body.admin-shell.admin-theme-system .admin-global-search-close:hover {
        background: rgba(127, 29, 29, 0.4);
        color: #fecaca;
    }

    body.admin-shell.admin-theme-system .admin-global-search-close-label kbd {
        background: rgba(51, 65, 85, 0.95);
        color: #cbd5e1;
    }

    body.admin-shell.admin-theme-system .admin-version-modal__overlay {
        background: rgba(2, 6, 23, 0.78);
    }

    body.admin-shell.admin-theme-system .admin-version-modal__header {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.9) 100%);
    }

    body.admin-shell.admin-theme-system .admin-version-modal__subtitle-separator {
        color: #475569;
    }

    body.admin-shell.admin-theme-system .admin-version-modal__load-more {
        background: rgba(30, 64, 175, 0.22);
        border-color: rgba(96, 165, 250, 0.22);
        color: #bfdbfe;
    }

    body.admin-shell.admin-theme-system .admin-version-modal__load-more:hover,
    body.admin-shell.admin-theme-system .admin-version-modal__load-more:focus-visible {
        background: rgba(37, 99, 235, 0.3);
        border-color: rgba(147, 197, 253, 0.32);
        color: #eff6ff;
    }

    body.admin-shell.admin-theme-system .admin-language-debug {
        border-color: rgba(96, 165, 250, 0.18);
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.92) 100%);
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.32);
    }

    body.admin-shell.admin-theme-system .admin-language-debug__summary {
        color: #dbeafe;
    }

    body.admin-shell.admin-theme-system .admin-language-debug__badge {
        background: rgba(37, 99, 235, 0.34);
        color: #eff6ff;
    }

    body.admin-shell.admin-theme-system .admin-language-debug__sample-item {
        background: rgba(30, 41, 59, 0.88);
        border-color: rgba(71, 85, 105, 0.85);
    }

    body.admin-shell.admin-theme-system .admin-dropdown-menu {
        filter: drop-shadow(0 18px 34px rgba(2, 6, 23, 0.35));
    }
}

body.admin-shell {
    background: var(--admin-bg);
    color: var(--admin-text);
}

/* Mild global density: slightly smaller rem base → calmer admin chrome */
html:has(body.admin-shell) {
    font-size: 15.5px;
}

body.admin-shell .admin-shell-content.p-6 {
    padding: 1.25rem !important;
}

body.admin-shell #sidebar.min-w-\[20rem\] {
    min-width: 18rem;
}

body.admin-shell #sidebar > .p-4 {
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
    padding-left: 0.95rem !important;
    padding-right: 0.95rem !important;
}

body.admin-shell .bg-white,
body.admin-shell .bg-gray-50,
body.admin-shell .bg-gray-100 {
    background-color: var(--admin-surface) !important;
}

body.admin-shell .bg-gray-200 {
    background-color: var(--admin-surface-4) !important;
}

body.admin-shell.admin-theme-dark .bg-slate-50,
body.admin-shell.admin-theme-dark .bg-slate-100,
body.admin-shell.admin-theme-system .bg-slate-50,
body.admin-shell.admin-theme-system .bg-slate-100 {
    background-color: var(--admin-surface-2) !important;
}

body.admin-shell.admin-theme-dark .bg-slate-200,
body.admin-shell.admin-theme-system .bg-slate-200 {
    background-color: var(--admin-surface-3) !important;
}

body.admin-shell.admin-theme-dark .bg-slate-300,
body.admin-shell.admin-theme-system .bg-slate-300 {
    background-color: var(--admin-surface-4) !important;
}

body.admin-shell .bg-blue-50 {
    background-color: rgba(59, 130, 246, 0.12) !important;
}

body.admin-shell .bg-green-50 {
    background-color: rgba(16, 185, 129, 0.12) !important;
}

body.admin-shell .bg-yellow-50 {
    background-color: rgba(245, 158, 11, 0.12) !important;
}

body.admin-shell .bg-red-50 {
    background-color: rgba(220, 38, 38, 0.12) !important;
}

body.admin-shell.admin-theme-dark .bg-blue-50,
body.admin-shell.admin-theme-dark .bg-green-50,
body.admin-shell.admin-theme-dark .bg-yellow-50,
body.admin-shell.admin-theme-dark .bg-red-50,
body.admin-shell.admin-theme-system .bg-blue-50,
body.admin-shell.admin-theme-system .bg-green-50,
body.admin-shell.admin-theme-system .bg-yellow-50,
body.admin-shell.admin-theme-system .bg-red-50 {
    background-color: var(--admin-surface-2) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
}

body.admin-shell.admin-theme-dark .bg-blue-50 *,
body.admin-shell.admin-theme-dark .bg-green-50 *,
body.admin-shell.admin-theme-dark .bg-yellow-50 *,
body.admin-shell.admin-theme-dark .bg-red-50 *,
body.admin-shell.admin-theme-system .bg-blue-50 *,
body.admin-shell.admin-theme-system .bg-green-50 *,
body.admin-shell.admin-theme-system .bg-yellow-50 *,
body.admin-shell.admin-theme-system .bg-red-50 * {
    color: inherit !important;
}

body.admin-shell.admin-theme-dark .dashboard-management-card,
body.admin-shell.admin-theme-system .dashboard-management-card {
    background: linear-gradient(180deg, var(--admin-surface-elevated) 0%, var(--admin-surface-2) 100%) !important;
    border: 1px solid var(--admin-border) !important;
    box-shadow: var(--admin-shadow-panel);
    color: var(--admin-text) !important;
}

body.admin-shell.admin-theme-dark .dashboard-management-card:hover,
body.admin-shell.admin-theme-system .dashboard-management-card:hover {
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .dashboard-management-card__icon,
body.admin-shell.admin-theme-system .dashboard-management-card__icon {
    background-color: var(--admin-surface-3) !important;
    border: 1px solid var(--admin-border) !important;
}

body.admin-shell.admin-theme-dark .dashboard-management-card .text-gray-800,
body.admin-shell.admin-theme-dark .dashboard-management-card .text-gray-600,
body.admin-shell.admin-theme-system .dashboard-management-card .text-gray-800,
body.admin-shell.admin-theme-system .dashboard-management-card .text-gray-600 {
    color: var(--admin-text) !important;
}

body.admin-shell.admin-theme-dark .system-update-console,
body.admin-shell.admin-theme-system .system-update-console {
    border-color: var(--admin-border);
    background: linear-gradient(180deg, var(--admin-surface-elevated) 0%, var(--admin-surface-2) 100%);
    color: var(--admin-text);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .system-update-console__summary-card,
body.admin-shell.admin-theme-dark .system-update-console__status-card,
body.admin-shell.admin-theme-dark .system-update-console__diagnostics,
body.admin-shell.admin-theme-dark .system-update-console__progress-block,
body.admin-shell.admin-theme-system .system-update-console__summary-card,
body.admin-shell.admin-theme-system .system-update-console__status-card,
body.admin-shell.admin-theme-system .system-update-console__diagnostics,
body.admin-shell.admin-theme-system .system-update-console__progress-block {
    border-color: var(--admin-border);
    background: var(--admin-surface);
    box-shadow: none;
}

body.admin-shell.admin-theme-dark .system-update-console__summary-card span,
body.admin-shell.admin-theme-dark .system-update-console__status-card span,
body.admin-shell.admin-theme-dark .system-update-console__diagnostics-summary,
body.admin-shell.admin-theme-dark .system-update-console__progress-label,
body.admin-shell.admin-theme-system .system-update-console__summary-card span,
body.admin-shell.admin-theme-system .system-update-console__status-card span,
body.admin-shell.admin-theme-system .system-update-console__diagnostics-summary,
body.admin-shell.admin-theme-system .system-update-console__progress-label {
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .system-update-console__summary-card strong,
body.admin-shell.admin-theme-dark .system-update-console__status-card strong,
body.admin-shell.admin-theme-dark .system-update-console__progress-label strong,
body.admin-shell.admin-theme-system .system-update-console__summary-card strong,
body.admin-shell.admin-theme-system .system-update-console__status-card strong,
body.admin-shell.admin-theme-system .system-update-console__progress-label strong {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .content-management-form .form-help,
body.admin-shell.admin-theme-system .content-management-form .form-help,
body.admin-shell.admin-theme-dark .settings-form .form-help,
body.admin-shell.admin-theme-system .settings-form .form-help {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .content-management-form .form-help a,
body.admin-shell.admin-theme-system .content-management-form .form-help a,
body.admin-shell.admin-theme-dark .settings-form .form-help a,
body.admin-shell.admin-theme-system .settings-form .form-help a {
    color: white;
}

body.admin-shell.admin-theme-dark .content-management-form .form-help.form-help--permalink-status-success,
body.admin-shell.admin-theme-system .content-management-form .form-help.form-help--permalink-status-success,
body.admin-shell.admin-theme-dark .settings-form .form-help.form-help--permalink-status-success,
body.admin-shell.admin-theme-system .settings-form .form-help.form-help--permalink-status-success {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

body.admin-shell .border-gray-100,
body.admin-shell .border-gray-200,
body.admin-shell .border-gray-300 {
    border-color: var(--admin-border) !important;
}

body.admin-shell .border-blue-100,
body.admin-shell .border-blue-200 {
    border-color: rgba(96, 165, 250, 0.25) !important;
}

body.admin-shell .border-green-100,
body.admin-shell .border-green-200 {
    border-color: rgba(52, 211, 153, 0.25) !important;
}

body.admin-shell .border-yellow-100,
body.admin-shell .border-yellow-200 {
    border-color: rgba(251, 191, 36, 0.25) !important;
}

body.admin-shell .border-red-100,
body.admin-shell .border-red-200 {
    border-color: rgba(248, 113, 113, 0.25) !important;
}

body.admin-shell.admin-theme-dark .border-slate-100,
body.admin-shell.admin-theme-dark .border-slate-200,
body.admin-shell.admin-theme-dark .border-slate-300,
body.admin-shell.admin-theme-system .border-slate-100,
body.admin-shell.admin-theme-system .border-slate-200,
body.admin-shell.admin-theme-system .border-slate-300 {
    border-color: var(--admin-border) !important;
}

body.admin-shell .text-gray-900,
body.admin-shell .text-gray-800,
body.admin-shell .text-gray-700 {
    color: var(--admin-text) !important;
}

body.admin-shell .text-gray-600,
body.admin-shell .text-gray-500,
body.admin-shell .text-gray-400 {
    color: var(--admin-text-muted) !important;
}

body.admin-shell.admin-theme-dark .text-slate-900,
body.admin-shell.admin-theme-dark .text-slate-800,
body.admin-shell.admin-theme-dark .text-slate-700,
body.admin-shell.admin-theme-dark .text-slate-600,
body.admin-shell.admin-theme-dark .text-slate-500,
body.admin-shell.admin-theme-dark .text-slate-400,
body.admin-shell.admin-theme-dark .text-slate-300,
body.admin-shell.admin-theme-dark .text-slate-200,
body.admin-shell.admin-theme-dark .text-slate-100,
body.admin-shell.admin-theme-dark .text-slate-50,
body.admin-shell.admin-theme-dark .text-neutral-900,
body.admin-shell.admin-theme-dark .text-neutral-800,
body.admin-shell.admin-theme-dark .text-neutral-700,
body.admin-shell.admin-theme-dark .text-neutral-600,
body.admin-shell.admin-theme-dark .text-neutral-500,
body.admin-shell.admin-theme-dark .text-neutral-400,
body.admin-shell.admin-theme-dark .text-neutral-300,
body.admin-shell.admin-theme-dark .text-neutral-200,
body.admin-shell.admin-theme-dark .text-neutral-100,
body.admin-shell.admin-theme-dark .text-neutral-50,
body.admin-shell.admin-theme-dark .text-black,
body.admin-shell.admin-theme-system .text-slate-900,
body.admin-shell.admin-theme-system .text-slate-800,
body.admin-shell.admin-theme-system .text-slate-700,
body.admin-shell.admin-theme-system .text-slate-600,
body.admin-shell.admin-theme-system .text-slate-500,
body.admin-shell.admin-theme-system .text-slate-400,
body.admin-shell.admin-theme-system .text-slate-300,
body.admin-shell.admin-theme-system .text-slate-200,
body.admin-shell.admin-theme-system .text-slate-100,
body.admin-shell.admin-theme-system .text-slate-50,
body.admin-shell.admin-theme-system .text-neutral-900,
body.admin-shell.admin-theme-system .text-neutral-800,
body.admin-shell.admin-theme-system .text-neutral-700,
body.admin-shell.admin-theme-system .text-neutral-600,
body.admin-shell.admin-theme-system .text-neutral-500,
body.admin-shell.admin-theme-system .text-neutral-400,
body.admin-shell.admin-theme-system .text-neutral-300,
body.admin-shell.admin-theme-system .text-neutral-200,
body.admin-shell.admin-theme-system .text-neutral-100,
body.admin-shell.admin-theme-system .text-neutral-50,
body.admin-shell.admin-theme-system .text-black {
    color: var(--admin-text) !important;
}

body.admin-shell.admin-theme-dark .text-slate-200,
body.admin-shell.admin-theme-dark .text-slate-300,
body.admin-shell.admin-theme-dark .text-slate-400,
body.admin-shell.admin-theme-dark .text-neutral-200,
body.admin-shell.admin-theme-dark .text-neutral-300,
body.admin-shell.admin-theme-dark .text-neutral-400,
body.admin-shell.admin-theme-dark .text-gray-400,
body.admin-shell.admin-theme-dark .text-gray-500,
body.admin-shell.admin-theme-dark .text-gray-600,
body.admin-shell.admin-theme-system .text-slate-200,
body.admin-shell.admin-theme-system .text-slate-300,
body.admin-shell.admin-theme-system .text-slate-400,
body.admin-shell.admin-theme-system .text-neutral-200,
body.admin-shell.admin-theme-system .text-neutral-300,
body.admin-shell.admin-theme-system .text-neutral-400,
body.admin-shell.admin-theme-system .text-gray-400,
body.admin-shell.admin-theme-system .text-gray-500,
body.admin-shell.admin-theme-system .text-gray-600 {
    color: var(--admin-text-muted) !important;
}

body.admin-shell .text-blue-600,
body.admin-shell .text-blue-700,
body.admin-shell .text-blue-800,
body.admin-shell .text-blue-900 {
    color: var(--admin-link) !important;
}

body.admin-shell .admin-header-logo {
    transition: filter 0.2s ease;
}

body.admin-shell.admin-theme-dark .admin-header-logo {
    filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
    body.admin-shell.admin-theme-system .admin-header-logo {
        filter: brightness(0) invert(1);
    }
}

body.admin-shell .hover\:text-blue-600:hover,
body.admin-shell .hover\:text-blue-700:hover,
body.admin-shell .hover\:text-blue-800:hover {
    color: var(--admin-link-hover) !important;
}

body.admin-shell .hover\:bg-gray-50:hover,
body.admin-shell .hover\:bg-gray-100:hover,
body.admin-shell .hover\:bg-blue-50:hover {
    background-color: var(--admin-surface-3) !important;
}

body.admin-shell.admin-theme-dark .hover\:bg-slate-50:hover,
body.admin-shell.admin-theme-dark .hover\:bg-slate-100:hover,
body.admin-shell.admin-theme-system .hover\:bg-slate-50:hover,
body.admin-shell.admin-theme-system .hover\:bg-slate-100:hover {
    background-color: var(--admin-surface-3) !important;
}

body.admin-shell.admin-theme-dark .hover\:bg-slate-200:hover,
body.admin-shell.admin-theme-system .hover\:bg-slate-200:hover {
    background-color: var(--admin-surface-4) !important;
}

body.admin-shell input,
body.admin-shell select,
body.admin-shell textarea {
    background-color: var(--admin-input-bg);
    border-color: var(--admin-input-border);
    color: var(--admin-input-text);
}

body.admin-shell input::placeholder,
body.admin-shell textarea::placeholder {
    color: var(--admin-input-placeholder);
}

body.admin-shell .shadow-sm,
body.admin-shell .shadow,
body.admin-shell .shadow-md,
body.admin-shell .shadow-lg,
body.admin-shell .shadow-xl,
body.admin-shell .shadow-2xl {
    box-shadow: var(--admin-shadow-panel) !important;
}

/* ========================================
   GLOBAL ADMIN STYLES
   ======================================== */

/* Form Checkbox Styles - Global checkbox styling */
input[type="checkbox"],
.form-checkbox {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    cursor: pointer;
    flex-shrink: 0 !important;
    accent-color: #3b82f6;
    margin: 0 !important;
    margin-right: 15px !important;
}

/* Override form-label display when inside flex containers with checkboxes */
label.flex .form-label,
label.flex > div .form-label,
label.flex input[type="checkbox"] + div .form-label,
label.flex input[type="checkbox"] ~ div .form-label,
label.flex input.form-checkbox + div .form-label,
label.flex input.form-checkbox ~ div .form-label {
    display: inline-block !important;
    margin-bottom: 0;
    margin-top: 0;
    font-weight: 600;
    color: #374151;
}

/* Specific styling for form-label when next to checkbox - direct sibling */
label.flex input[type="checkbox"] + .form-label,
label.flex input[type="checkbox"] ~ .form-label,
label.flex input.form-checkbox + .form-label,
label.flex input.form-checkbox ~ .form-label {
    display: inline-block !important;
    margin: 0;
}

/* Ensure proper alignment for checkbox containers with items-center class */
label.flex.items-center,
label.flex.items-center.p-4 {
    align-items: center !important;
}

/* Ensure checkbox stays centered and doesn't stretch */
label.flex input[type="checkbox"],
label.flex .form-checkbox,
label.flex input.form-checkbox {
    align-self: center;
    margin-top: 0;
    margin-right: 15px;
}

/* Ensure the div.flex-1 container aligns properly */
label.flex > div.flex-1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Special handling for checkboxes with explicit size classes */
label.flex input[type="checkbox"].h-5,
label.flex .form-checkbox.h-5,
input[type="checkbox"].h-5,
.form-checkbox.h-5,
input[type="checkbox"].w-5,
.form-checkbox.w-5 {
    width: 1.25rem !important;
    height: 1.25rem !important;
    min-width: 1.25rem;
    min-height: 1.25rem;
    margin-top: 0;
    margin-right: 15px !important;
}

/* Ensure the text content paragraph doesn't affect alignment */
label.flex input[type="checkbox"] + div p,
label.flex input.form-checkbox + div p {
    margin-top: 0.25rem;
    line-height: 1.5;
}

/* Shared flag sizing
   Use on SVG, emoji, or image-based language flags to keep them visually consistent. */
.language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    line-height: 1;
    overflow: hidden;
    border-radius: 0.25rem;
    width: var(--flag-width, 1.25rem);
    height: var(--flag-height, 0.9375rem);
    font-size: var(--flag-font-size, 1rem);
}

.language-flag img,
.language-flag svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.language-flag--xs {
    --flag-width: 1rem;
    --flag-height: 0.75rem;
    --flag-font-size: 0.875rem;
}

.language-flag--sm {
    --flag-width: 1.25rem;
    --flag-height: 0.9375rem;
    --flag-font-size: 1rem;
}

.language-flag--md {
    --flag-width: 1.5rem;
    --flag-height: 1.125rem;
    --flag-font-size: 1.125rem;
}

.language-flag--lg {
    --flag-width: 1.75rem;
    --flag-height: 1.3125rem;
    --flag-font-size: 1.375rem;
}

.language-flag--xl {
    --flag-width: 2rem;
    --flag-height: 1.5rem;
    --flag-font-size: 1.5rem;
}

.field-description {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.375rem;
    line-height: 1.4;
}

/* Shared Info Card Component */
.admin-info-card {
    --admin-info-card-bg: var(--bg-white);
    --admin-info-card-border: var(--border-default);
    --admin-info-card-border-style: solid;
    --admin-info-card-title: var(--gray-800);
    --admin-info-card-body: var(--gray-700);
    --admin-info-card-icon-bg: var(--gray-100);
    --admin-info-card-icon-color: var(--color-info);
    --admin-info-card-pattern-opacity: 0.05;

    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px var(--admin-info-card-border-style) var(--admin-info-card-border);
    border-radius: var(--radius-md);
    background: var(--admin-info-card-bg);
    box-shadow: var(--shadow-sm);
}

.admin-info-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3e%3cdefs%3e%3cpattern id='p' width='16' height='16' patternUnits='userSpaceOnUse'%3e%3cg transform='translate(8 8) scale(0.48) translate(-14 -14)' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='14' cy='14' r='11.5' stroke-width='2.25'/%3e%3cpath d='M14 10.5v1.5M14 15.25v6.25' stroke-width='2.75'/%3e%3c/g%3e%3c/pattern%3e%3c/defs%3e%3crect width='64' height='64' fill='url(%23p)'/%3e%3c/svg%3e");
    background-repeat: repeat;
    background-size: 7rem 7rem;
    background-position: 0 0;
    opacity: var(--admin-info-card-pattern-opacity);
    pointer-events: none;
}

.admin-info-card__inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.admin-info-card__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--admin-info-card-icon-bg);
    color: var(--admin-info-card-icon-color);
}

.admin-info-card__icon {
    font-size: 1.125rem;
    line-height: 1;
}

.admin-info-card__content {
    min-width: 0;
    flex: 1 1 auto;
}

.admin-info-card__title {
    margin: 0 0 0.25rem;
    color: var(--admin-info-card-title);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.admin-info-card__body {
    margin: 0;
    color: var(--admin-info-card-body);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.6;
}

.admin-info-card__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.admin-info-card--info {
    --admin-info-card-bg: #eff6ff;
    --admin-info-card-border: #93c5fd;
    --admin-info-card-border-style: dashed;
    --admin-info-card-title: #1e3a8a;
    --admin-info-card-body: #1d4ed8;
    --admin-info-card-icon-bg: #dbeafe;
    --admin-info-card-icon-color: #2563eb;
    --admin-info-card-pattern-opacity: 0.07;
}

.admin-info-card--success {
    --admin-info-card-bg: #ecfdf5;
    --admin-info-card-border: #bbf7d0;
    --admin-info-card-title: #065f46;
    --admin-info-card-body: #047857;
    --admin-info-card-icon-bg: #d1fae5;
    --admin-info-card-icon-color: var(--color-success);
}

.admin-info-card--warning {
    --admin-info-card-bg: #fffbeb;
    --admin-info-card-border: #fde68a;
    --admin-info-card-title: #92400e;
    --admin-info-card-body: #b45309;
    --admin-info-card-icon-bg: #fef3c7;
    --admin-info-card-icon-color: var(--color-warning);
}

.admin-info-card--danger {
    --admin-info-card-bg: #fef2f2;
    --admin-info-card-border: #fecaca;
    --admin-info-card-title: #991b1b;
    --admin-info-card-body: #b91c1c;
    --admin-info-card-icon-bg: #fee2e2;
    --admin-info-card-icon-color: var(--color-danger);
}

.admin-info-card--neutral {
    --admin-info-card-bg: var(--gray-50);
    --admin-info-card-border: var(--gray-200);
    --admin-info-card-title: var(--gray-800);
    --admin-info-card-body: var(--gray-700);
    --admin-info-card-icon-bg: var(--gray-100);
    --admin-info-card-icon-color: var(--gray-500);
}

.admin-info-card--blue {
    --admin-info-card-bg: #eff6ff;
    --admin-info-card-border: #bfdbfe;
    --admin-info-card-border-style: solid;
    --admin-info-card-title: #1e3a8a;
    --admin-info-card-body: #1d4ed8;
    --admin-info-card-icon-bg: #dbeafe;
    --admin-info-card-icon-color: #2563eb;
    --admin-info-card-pattern-opacity: 0.06;
}

.admin-info-card--purple {
    --admin-info-card-bg: #f8f7ff;
    --admin-info-card-border: #e9e5ff;
    --admin-info-card-title: #4c1d95;
    --admin-info-card-body: #5b21b6;
    --admin-info-card-icon-bg: #f3f0ff;
    --admin-info-card-icon-color: #2563eb;
}

.admin-info-card--cyan {
    --admin-info-card-bg: #ecfeff;
    --admin-info-card-border: #a5f3fc;
    --admin-info-card-title: #155e75;
    --admin-info-card-body: #0e7490;
    --admin-info-card-icon-bg: #cffafe;
    --admin-info-card-icon-color: #0891b2;
}

.admin-info-card--emerald {
    --admin-info-card-bg: #ecfdf5;
    --admin-info-card-border: #6ee7b7;
    --admin-info-card-title: #064e3b;
    --admin-info-card-body: #047857;
    --admin-info-card-icon-bg: #d1fae5;
    --admin-info-card-icon-color: #059669;
    --admin-info-card-pattern-opacity: 0.06;
}

@media (max-width: 640px) {
    .admin-info-card {
        padding: 0.875rem 1rem;
    }

    .admin-info-card__inner {
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-info-card__actions {
        margin-left: 0;
        flex-wrap: wrap;
        width: 100%;
    }
}

/* Shared Tabs Component */
.admin-tabs-stack {
    margin-bottom: 1.5rem;
}

.admin-tabs-stack__row {
    margin-bottom: 0.75rem;
}

.admin-tabs-stack__row:last-child {
    margin-bottom: 0;
}

.admin-tabs-stack .admin-tabs {
    margin-bottom: 0;
}

.admin-tabs-stack--unified {
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-tabs-stack--unified .admin-tabs-stack__row {
    margin-bottom: 0;
}

.admin-tabs-stack--unified .admin-tabs {
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.admin-tabs-stack--unified .admin-tabs-stack__row:not(:last-child) .admin-tabs__inner {
    border-bottom: 1px solid var(--border-default);
}

.admin-tabs-stack--unified .admin-tabs-stack__row--primary {
    --admin-tabs-scroll-fade: var(--bg-white);
    background: var(--bg-white);
}

.admin-tabs-stack--unified .admin-tabs-stack__row--primary .admin-tabs__inner {
    border-bottom-color: var(--gray-200);
}

.admin-tabs-stack--unified .admin-tabs-stack__row--secondary {
    --admin-tabs-scroll-fade: #f9fafb;
    background: var(--gray-50, #f9fafb);
}

.admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__inner {
    border-bottom: 0;
}

.admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav {
    padding: 0 1rem;
    gap: 0.5rem;
}

.admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__tab {
    padding: 0.75rem 1rem;
    min-height: 2.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__icon {
    font-size: 0.8125rem;
}

.admin-tabs__inner--scroll-fade {
    position: relative;
}

.admin-tabs__inner--scroll-fade::before,
.admin-tabs__inner--scroll-fade::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1.25rem;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.admin-tabs__inner--scroll-fade::before {
    left: 0;
    background: linear-gradient(to right, var(--admin-tabs-scroll-fade, #f9fafb) 15%, transparent);
}

.admin-tabs__inner--scroll-fade::after {
    right: 0;
    background: linear-gradient(to left, var(--admin-tabs-scroll-fade, #f9fafb) 15%, transparent);
}

.admin-tabs__inner--scroll-fade.is-scrollable-left::before,
.admin-tabs__inner--scroll-fade.is-scrollable-right::after {
    opacity: 1;
}

.admin-tabs__nav--subnav {
    padding: 0 0.5rem;
    gap: 0.125rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.admin-tabs__nav--subnav .admin-tabs__indicator {
    top: 0.30rem;
    bottom: 0.30rem;
    height: auto;
    border-radius: var(--radius-lg);
    background: var(--gradient-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.24);
}

.admin-tabs__nav--subnav .admin-tabs__tab {
    gap: 0.375rem;
    min-height: 2.5rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.admin-tabs__nav--subnav .admin-tabs__tab.is-tab-highlighted,
.admin-tabs__nav--subnav .admin-tabs__tab.is-active:not(.is-swipe-resting) {
    color: var(--brand-primary, #2563eb);
}

.admin-tabs__nav--subnav .admin-tabs__tab.is-active.is-swipe-resting {
    color: var(--text-primary);
}


.admin-tabs__nav--subnav .admin-tabs__tab span {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav--subnav {
        justify-content: flex-start;
    }

    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav--subnav .admin-tabs__tab {
        flex: 0 0 auto;
        justify-content: center;
        min-width: 0;
        max-width: none;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 767px) {
    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav--subnav {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        gap: 0.375rem;
    }

    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav--subnav .admin-tabs__tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 0.6875rem 0.875rem;
        min-height: 2.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 479px) {
    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav--subnav .admin-tabs__tab span:not(.admin-tabs__badge) {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav--subnav .admin-tabs__tab {
        justify-content: center;
        min-width: 2.75rem;
        padding: 0.625rem 0.75rem;
    }

    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav--subnav .admin-tabs__icon {
        font-size: 0.9375rem;
    }
}

.admin-tabs {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-tabs--compact {
    margin-bottom: 0;
    border-radius: var(--radius-md);
}

.admin-tabs__inner {
    border-bottom: 1px solid var(--border-default);
}

.admin-tabs__inner--compact {
    border-bottom-color: var(--gray-200);
}

.admin-tabs__nav {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.admin-tabs__nav--with-separators {
    gap: 0;
}

.admin-tabs__indicator {
    position: absolute;
    top: 0.30rem;
    bottom: 0.30rem;
    left: 0;
    width: 0;
    border-radius: var(--radius-lg);
    background: var(--gradient-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: transform 240ms ease, width 240ms ease, opacity 180ms ease, background-color 240ms ease, box-shadow 240ms ease;
    will-change: transform, width;
    z-index: 0;
}

.admin-tabs__nav.has-tab-swipe-indicator .admin-tabs__indicator {
    opacity: 1;
}

.admin-tabs__nav::-webkit-scrollbar {
    height: 6px;
}

.admin-tabs__nav::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.admin-tabs__nav--compact {
    padding: 0 0.75rem;
}

.admin-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    padding: 1rem 1.25rem;
    border: 0;
    border-bottom: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.admin-tabs__tab--compact {
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
}

.admin-tabs__tab:hover,
.admin-tabs__tab:focus {
    outline: none;
}

.admin-tabs__nav:not(.has-tab-swipe-indicator) .admin-tabs__tab:hover,
.admin-tabs__nav:not(.has-tab-swipe-indicator) .admin-tabs__tab:focus {
    color: white;
}

.admin-tabs__nav.has-tab-swipe-indicator .admin-tabs__tab.is-tab-highlighted {
    color: white;
}

.admin-tabs__nav.has-tab-swipe-indicator .admin-tabs__tab:hover,
.admin-tabs__nav.has-tab-swipe-indicator .admin-tabs__tab:focus {
    background: transparent;
    box-shadow: none;
    transform: none;
    z-index: 1;
}

.admin-tabs__tab.is-active {
    border-bottom: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    text-shadow: none;
    z-index: 1;
}

.admin-tabs__tab.is-active:not(.is-swipe-resting) {
    color: white;
}

.admin-tabs__tab.is-active:hover:not(.is-swipe-resting),
.admin-tabs__tab.is-active:focus:not(.is-swipe-resting) {
    color: white;
    border-bottom: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    z-index: 1;
}

.admin-tabs__nav.has-tab-swipe-indicator .admin-tabs__tab.is-active.is-swipe-resting {
    color: var(--text-primary);
}

/* Subnav rows use the same moving pill language as primary tab rows. */
.admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-tab-highlighted,
.admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:not(.is-swipe-resting),
.admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:hover:not(.is-swipe-resting),
.admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:focus:not(.is-swipe-resting),
.admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active.is-tab-highlighted {
    color: white;
    font-weight: 600;
}

.admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active.is-swipe-resting {
    color: var(--text-primary);
    font-weight: 600;
}

.admin-tabs__tab[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

.admin-tabs__separator {
    flex: 0 0 auto;
    width: 1px;
    margin: 0.75rem 0.5rem;
    background: var(--border-dark);
}

.admin-tabs__icon {
    font-size: 1rem;
    line-height: 1;
}

.admin-tabs__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    padding: 0 0.375rem;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25rem;
}

.admin-tabs__tab:hover .admin-tabs__badge,
.admin-tabs__tab:focus .admin-tabs__badge,
.admin-tabs__tab.is-tab-highlighted .admin-tabs__badge,
.admin-tabs__tab.is-active .admin-tabs__badge,
.admin-tabs__tab.is-active:hover .admin-tabs__badge,
.admin-tabs__tab.is-active:focus .admin-tabs__badge,
.admin-tabs__tab.is-active.is-swipe-resting.is-tab-highlighted .admin-tabs__badge,
.admin-tabs__tab.is-active.is-swipe-resting:hover .admin-tabs__badge,
.admin-tabs__tab.is-active.is-swipe-resting:focus .admin-tabs__badge {
    background: var(--bg-white);
    color: var(--brand-primary-dark);
}

.admin-tab-section {
    scroll-margin-top: 7rem;
}

@media (max-width: 640px) {
    .admin-tabs__nav {
        padding: 0 0.5rem;
    }

    .admin-tabs__tab {
        padding: 0.875rem 1rem;
    }

    .admin-tabs__tab--compact {
        padding: 0.75rem 0.875rem;
    }
}

/* JS workspace tab panels and server-side tab content shells */
.tab-content,
.backup-tab-content {
    display: none;
}

.backup-tab-content {
    margin-top: 1.5rem;
}

.tab-content.active,
.backup-tab-content.active {
    display: block;
}

.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
}

.slider-type-option.selected,
.content-type-card.selected {
    border-color: var(--admin-link);
    background-color: var(--admin-surface-2);
}

.preview-device-btn.active {
    background-color: var(--admin-link);
    color: white;
    border-color: var(--admin-link);
}

.input-group {
    display: flex;
}

.input-group-addon {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--admin-surface-3);
    color: var(--admin-text-muted);
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem 0 0 0.5rem;
}

.input-group .form-control {
    border-radius: 0 0.5rem 0.5rem 0;
    border-left: none;
}

.input-group-addon + .form-control {
    border-radius: 0 0.5rem 0.5rem 0;
}

.form-control + .input-group-addon {
    border-radius: 0 0.5rem 0.5rem 0;
    border-left: none;
}

.tour-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.tour-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.tour-checkbox-item input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

.tour-checkbox-item span {
    line-height: 1.1;
}

.test-weather-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text);
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 96px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.test-weather-btn:hover {
    transform: translateY(-1px);
    border-color: var(--brand-primary);
    background: var(--admin-surface-2);
    box-shadow: var(--shadow-md);
}

.test-weather-btn:active {
    transform: translateY(0);
}

.test-weather-btn:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.test-weather-btn__icon {
    margin-bottom: 0;
}

.test-weather-btn__label {
    line-height: 1.25rem;
}

.toggle-track {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.toggle-input:checked + .toggle-thumb {
    transform: translateX(20px);
}

.toggle-input:checked ~ .toggle-track {
    background: #22c55e;
}

.toggle-track .toggle-input:checked + .toggle-thumb,
.toggle-track .toggle-input:checked ~ .toggle-track {
    background: #22c55e;
}

/* Shared SEO utility styles */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

kbd {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.tool-card {
    display: block;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tool-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.tool-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.tool-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.tool-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tool-tag {
    padding: 0.125rem 0.5rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.watermark-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.watermark-filter-pill {
    display: inline-flex;
}

.watermark-filter-pill__control {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.watermark-filter-pill__control:hover {
    background: #f9fafb;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.watermark-filter-pill__input:focus-visible + .watermark-filter-pill__control {
    outline: 2px solid #bfdbfe;
    outline-offset: 2px;
}

.watermark-filter-pill__input:checked + .watermark-filter-pill__control {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.watermark-filter-pill__icon {
    font-size: 0.875rem;
    line-height: 1;
}

/* Shared pill radio groups (see DEVELOPER-ADMIN-PILL-RADIO-SELECTOR-GUIDE.md) */
.admin-pill-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-pill-radio {
    display: inline-flex;
}

.admin-pill-radio__control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.admin-pill-radio__control:hover {
    background: #f9fafb;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.admin-pill-radio__input:focus-visible + .admin-pill-radio__control {
    outline: 2px solid #bfdbfe;
    outline-offset: 2px;
}

.admin-pill-radio__input:checked + .admin-pill-radio__control {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.watermark-allowlist-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .watermark-allowlist-grid--sizes,
    .watermark-allowlist-grid--mime {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .watermark-allowlist-grid--sizes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .watermark-allowlist-grid--mime {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.watermark-allowlist-pill {
    display: block;
}

.watermark-allowlist-pill__button {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.875rem 1rem;
    border-radius: 0.875rem;
    border: 1px solid var(--border-default);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.watermark-allowlist-pill__button:hover {
    background: var(--bg-light);
    border-color: #93c5fd;
    color: var(--brand-primary-dark);
    transform: translateY(-1px);
}

.watermark-allowlist-pill__button:focus-visible {
    outline: 2px solid #bfdbfe;
    outline-offset: 2px;
}

.watermark-allowlist-pill.is-selected .watermark-allowlist-pill__button,
.watermark-allowlist-pill__button.is-selected {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--brand-primary-dark);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.watermark-allowlist-pill__title {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25rem;
}

.watermark-allowlist-pill__meta {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.doc-link {
    display: block;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.doc-link:hover {
    background: #f9fafb;
    border-color: #3b82f6;
}

.tip-box {
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 2px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    z-index: 40;
}

@media (min-width: 768px) {
    .sticky-bottom-bar {
        left: 0;
    }
}

/* ========================================
   DASHBOARD & STATS STYLES
   ======================================== */
.breadcrumb-preview-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    position: sticky;
    top: 20px;
}

.preview-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.preview-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #113D5A;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.preview-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8125rem;
    background: white;
    cursor: pointer;
}

.preview-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Device Toggle */
.device-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    flex-shrink: 0;
}

.device-toggle-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.device-toggle-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.device-toggle-btn.active {
    background: #F59113;
    color: white;
    border-color: #F59113;
}

/* Preview Container */
.preview-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f9fafb;
    position: relative;
}

.preview-container.preview-desktop {
    max-width: 100%;
}

.preview-container.preview-tablet {
    max-width: 768px;
    margin: 0 auto;
}

.preview-container.preview-mobile {
    max-width: 375px;
    margin: 0 auto;
}

.preview-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
}

.preview-content.preview-loading {
    opacity: 0.5;
}

.preview-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    z-index: 10;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #9ca3af;
    min-height: 200px;
}

.preview-placeholder i {
    margin-bottom: 1rem;
}

.preview-error {
    padding: 2rem;
    text-align: center;
    color: #dc2626;
}

.preview-error i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.preview-error .error-message {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.preview-disabled {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.preview-empty {
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
}

.breadcrumb-section-preview {
    display: block;
}

.breadcrumb-nav-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item-preview,
.breadcrumb-link-preview {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item-preview {
    font-weight: 500;
}

.breadcrumb-link-preview {
    text-decoration: none;
}

.breadcrumb-item-preview__icon,
.breadcrumb-link-preview__icon {
    margin-right: 0.375rem;
}

.admin-kbd {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.backup-progress-modal__bar,
.wizard-progress-bar,
.system-health-progress__bar {
    width: 0%;
}

.system-health-progress__steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.system-health-progress-step {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text-secondary, #6b7280);
}

.system-health-progress-step__icon {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.system-health-progress-step__label {
    flex: 1;
    min-width: 0;
}

.system-health-progress-step__meta {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
}

.system-health-progress-step--running {
    color: var(--text-primary, #111827);
    font-weight: 600;
}

.system-health-progress-step--running .system-health-progress-step__icon {
    color: var(--brand-primary, #2563eb);
}

.system-health-progress-step--done .system-health-progress-step__icon {
    color: var(--status-success, #059669);
}

.system-health-progress-step--error .system-health-progress-step__icon {
    color: var(--status-danger, #dc2626);
}

.system-health-severity--critical {
    background-color: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.system-health-severity--warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.system-health-severity--info {
    background-color: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-top: 2px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
    margin-top: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .breadcrumb-split-layout {
        grid-template-columns: 1fr;
    }
    
    .breadcrumb-preview-panel {
        position: relative;
        top: auto;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .breadcrumb-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .breadcrumb-tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .color-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .preview-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Scrollbar Styling */
.breadcrumb-tab-content-wrapper::-webkit-scrollbar,
.preview-container::-webkit-scrollbar {
    width: 8px;
}

.breadcrumb-tab-content-wrapper::-webkit-scrollbar-track,
.preview-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.breadcrumb-tab-content-wrapper::-webkit-scrollbar-thumb,
.preview-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.breadcrumb-tab-content-wrapper::-webkit-scrollbar-thumb:hover,
.preview-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Sidebar Styles */
#sidebar {
    transition: transform 0.3s ease-in-out;
}

#sidebar-overlay {
    transition: opacity 0.3s ease-in-out;
}

/* Navigation Section Toggle Styles */
.nav-section-toggle {
    user-select: none;
}

/* Shared sidebar row geometry — equal L/R, one vertical column */
#sidebar {
    --admin-sidebar-row-pad-x: 1rem;
    --admin-sidebar-row-pad-y: 0.65rem;
    --admin-sidebar-row-radius: 8px;
    --admin-sidebar-icon-slot: 1.125rem;
}

#sidebar [data-admin-sidebar-nav] {
    width: 100%;
    box-sizing: border-box;
}

#sidebar .nav-section-stack {
    margin-top: 0.4rem;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

#sidebar .nav-section-stack:first-of-type {
    margin-top: 0;
}

#sidebar .nav-section-stack > .nav-section-toggle,
#sidebar .nav-section-stack > .admin-sidebar-home-link {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Filled section headers — brand blue, symmetric L/R icon slots */
#sidebar .nav-section-toggle.stat-card,
#sidebar .nav-section-toggle.stat-card.stat-blue,
#sidebar .nav-section-toggle.stat-card.nav-collapsed,
#sidebar .nav-section-toggle.stat-card.stat-blue.nav-collapsed,
.nav-section-toggle.stat-card,
.nav-section-toggle.stat-card.stat-blue,
.nav-section-toggle.stat-card.nav-collapsed,
.nav-section-toggle.stat-card.stat-blue.nav-collapsed {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem;
    background: var(--gradient-blue) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(17, 61, 90, 0.12) !important;
    padding-top: var(--admin-sidebar-row-pad-y) !important;
    padding-bottom: var(--admin-sidebar-row-pad-y) !important;
    padding-left: var(--admin-sidebar-row-pad-x) !important;
    padding-right: var(--admin-sidebar-row-pad-x) !important;
    min-height: 0;
    font-size: 0.8125rem !important;
    letter-spacing: 0.03em;
    line-height: 1.3;
    border-radius: var(--admin-sidebar-row-radius) !important;
    text-align: left !important;
    transform: none !important;
}

#sidebar .nav-section-toggle.stat-card:hover,
#sidebar .nav-section-toggle.stat-card.stat-blue:hover,
#sidebar .nav-section-toggle.stat-card.nav-collapsed:hover,
#sidebar .nav-section-toggle.stat-card.stat-blue.nav-collapsed:hover,
.nav-section-toggle.stat-card:hover,
.nav-section-toggle.stat-card.stat-blue:hover,
.nav-section-toggle.stat-card.nav-collapsed:hover,
.nav-section-toggle.stat-card.stat-blue.nav-collapsed:hover {
    background: var(--gradient-blue-hover) !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: 0 2px 5px rgba(17, 61, 90, 0.14) !important;
}

#sidebar .admin-sidebar-section-main {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
}

#sidebar .admin-sidebar-section-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#sidebar .admin-sidebar-section-icon,
#sidebar .admin-sidebar-section-chevron {
    width: var(--admin-sidebar-icon-slot) !important;
    height: var(--admin-sidebar-icon-slot) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
    line-height: 1 !important;
}

#sidebar .nav-section-toggle.stat-card i,
#sidebar .nav-section-toggle.stat-card.stat-blue i,
.nav-section-toggle.stat-card i,
.nav-section-toggle.stat-card.stat-blue i {
    color: #ffffff !important;
    opacity: 0.95;
    font-size: 0.875rem;
}

#sidebar .admin-sidebar-section-chevron {
    opacity: 0.9;
    font-size: 0.75rem !important;
}

#sidebar .admin-sidebar-home-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: var(--admin-sidebar-row-pad-y) var(--admin-sidebar-row-pad-x);
    border-radius: var(--admin-sidebar-row-radius);
    border: 1px solid transparent;
    color: var(--admin-text, #111827);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transform: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#sidebar .admin-sidebar-home-link i,
#sidebar .admin-sidebar-home-link span {
    color: inherit;
    transition: transform 0.15s ease, color 0.15s ease;
}

#sidebar .admin-sidebar-home-link i {
    width: var(--admin-sidebar-icon-slot);
    text-align: center;
    flex-shrink: 0;
    color: var(--admin-text-muted, #6b7280);
}

#sidebar .admin-sidebar-home-link:visited {
    color: var(--admin-text, #111827);
}

#sidebar .admin-sidebar-home-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-primary-dark, #2563eb) !important;
    transform: none;
}

#sidebar .admin-sidebar-home-link:hover i,
#sidebar .admin-sidebar-home-link:hover span {
    transform: translateX(0.35rem);
}

#sidebar .admin-sidebar-home-link:hover i {
    color: var(--brand-primary-dark, #2563eb) !important;
}

#sidebar .admin-sidebar-home-link.is-active,
#sidebar .admin-sidebar-home-link.is-active:visited,
#sidebar .admin-sidebar-home-link.is-active:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: transparent;
    color: var(--brand-primary-dark, #2563eb) !important;
    transform: none;
    box-shadow: none;
}

/* Absolute edge bars — do not shift content */
#sidebar .admin-sidebar-home-link.is-active::before,
#sidebar .admin-sidebar-home-link.is-active::after {
    content: '';
    position: absolute;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 3px;
    border-radius: 999px;
    background: var(--brand-primary);
    pointer-events: none;
}

#sidebar .admin-sidebar-home-link.is-active::before {
    left: 0;
}

#sidebar .admin-sidebar-home-link.is-active::after {
    right: 0;
}

#sidebar .admin-sidebar-home-link.is-active:hover i,
#sidebar .admin-sidebar-home-link.is-active:hover span {
    transform: translateX(0.35rem);
}

#sidebar .admin-sidebar-home-link.is-active i,
#sidebar .admin-sidebar-home-link.is-active:hover i,
#sidebar .admin-sidebar-home-link.is-active span,
#sidebar .admin-sidebar-home-link.is-active:hover span {
    color: var(--brand-primary-dark, #2563eb) !important;
}

#sidebar .nav-section-items:not(.nav-collapsed) {
    margin: 0.35rem 0 0.55rem;
    padding: 0.3rem;
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 8px;
    background: var(--admin-surface-2, #f9fafb);
}

#sidebar .nav-section-items.ml-6:not(.nav-collapsed) {
    margin-left: 0.75rem;
    margin-right: 0;
    border-left: 2px solid #d7e3f0;
    background: transparent;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    padding: 0.3rem 0.3rem 0.3rem 0.5rem;
}

#sidebar .admin-sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    color: var(--admin-text, #374151);
    font-size: 0.875rem;
    text-decoration: none;
    transform: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#sidebar .admin-sidebar-link i,
#sidebar .admin-sidebar-link span {
    color: inherit;
    transition: transform 0.15s ease, color 0.15s ease;
}

#sidebar .admin-sidebar-link i {
    width: var(--admin-sidebar-icon-slot);
    text-align: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: var(--admin-text-muted, #6b7280);
}

#sidebar .admin-sidebar-link:visited {
    color: var(--admin-text, #374151);
}

#sidebar .admin-sidebar-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-primary-dark, #2563eb) !important;
    transform: none;
}

#sidebar .admin-sidebar-link:hover i,
#sidebar .admin-sidebar-link:hover span {
    transform: translateX(0.35rem);
}

#sidebar .admin-sidebar-link:hover i {
    color: var(--brand-primary-dark, #2563eb) !important;
}

#sidebar .admin-sidebar-link.is-active,
#sidebar .admin-sidebar-link.is-active:visited,
#sidebar .admin-sidebar-link.is-active:hover {
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-primary-dark, #2563eb) !important;
    font-weight: 600;
    transform: none;
    box-shadow: none;
}

#sidebar .admin-sidebar-link.is-active::before,
#sidebar .admin-sidebar-link.is-active::after {
    content: '';
    position: absolute;
    top: 0.3rem;
    bottom: 0.3rem;
    width: 3px;
    border-radius: 999px;
    background: var(--brand-primary);
    pointer-events: none;
}

#sidebar .admin-sidebar-link.is-active::before {
    left: 0;
}

#sidebar .admin-sidebar-link.is-active::after {
    right: 0;
}

#sidebar .admin-sidebar-link.is-active:hover i,
#sidebar .admin-sidebar-link.is-active:hover span {
    transform: translateX(0.35rem);
}

#sidebar .admin-sidebar-link.is-active i,
#sidebar .admin-sidebar-link.is-active:hover i {
    color: var(--brand-primary-dark, #2563eb) !important;
}

#sidebar .admin-sidebar-link.is-active span,
#sidebar .admin-sidebar-link.is-active:hover span {
    color: var(--brand-primary-dark, #2563eb) !important;
}

body.admin-shell.admin-theme-dark #sidebar .nav-section-items:not(.nav-collapsed),
body.admin-shell.admin-theme-system #sidebar .nav-section-items:not(.nav-collapsed) {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-link.is-active,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-link.is-active:visited,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-link.is-active:hover,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-link.is-active,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-link.is-active:visited,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-link.is-active:hover {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd !important;
}

body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-link.is-active i,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-link.is-active span,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-link.is-active:hover i,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-link.is-active:hover span,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-link.is-active i,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-link.is-active span,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-link.is-active:hover i,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-link.is-active:hover span {
    color: #93c5fd !important;
}

body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-home-link.is-active,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-home-link.is-active:visited,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-home-link.is-active:hover,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-home-link.is-active,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-home-link.is-active:visited,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-home-link.is-active:hover {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd !important;
}

body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-home-link.is-active i,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-home-link.is-active span,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-home-link.is-active:hover i,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-home-link.is-active:hover span,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-home-link.is-active i,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-home-link.is-active span,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-home-link.is-active:hover i,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-home-link.is-active:hover span {
    color: #93c5fd !important;
}

#sidebar .admin-sidebar-search-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.7rem;
    padding: var(--admin-sidebar-row-pad-y, 0.6rem) var(--admin-sidebar-row-pad-x, 0.9rem);
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: var(--admin-sidebar-row-radius, 8px);
    background: var(--admin-surface-2, #f9fafb);
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

#sidebar .admin-sidebar-search-hint:hover,
#sidebar .admin-sidebar-search-hint:focus-visible {
    border-color: var(--brand-primary);
    background: #ffffff;
    color: var(--admin-text, #111827);
    outline: none;
}

#sidebar .admin-sidebar-search-hint kbd {
    margin-left: auto;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--admin-border, #e5e7eb);
    background: #ffffff;
    font-size: 0.6875rem;
    color: var(--admin-text-muted, #6b7280);
}

body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-search-hint,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-search-hint {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-search-hint:hover,
body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-search-hint:focus-visible,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-search-hint:hover,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-search-hint:focus-visible {
    background: var(--admin-surface);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark #sidebar .admin-sidebar-search-hint kbd,
body.admin-shell.admin-theme-system #sidebar .admin-sidebar-search-hint kbd {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

.nav-section-toggle.nav-collapsed {
    margin-bottom: 0;
}

body.admin-shell.admin-theme-dark #sidebar .nav-section-toggle.stat-card,
body.admin-shell.admin-theme-dark #sidebar .nav-section-toggle.stat-card.stat-blue,
body.admin-shell.admin-theme-dark #sidebar .nav-section-toggle.stat-card.nav-collapsed,
body.admin-shell.admin-theme-dark #sidebar .nav-section-toggle.stat-card.stat-blue.nav-collapsed,
body.admin-shell.admin-theme-system #sidebar .nav-section-toggle.stat-card,
body.admin-shell.admin-theme-system #sidebar .nav-section-toggle.stat-card.stat-blue,
body.admin-shell.admin-theme-system #sidebar .nav-section-toggle.stat-card.nav-collapsed,
body.admin-shell.admin-theme-system #sidebar .nav-section-toggle.stat-card.stat-blue.nav-collapsed {
    background: var(--gradient-blue) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

body.admin-shell.admin-theme-dark #sidebar .nav-section-toggle.stat-card:hover,
body.admin-shell.admin-theme-dark #sidebar .nav-section-toggle.stat-card.stat-blue:hover,
body.admin-shell.admin-theme-dark #sidebar .nav-section-toggle.stat-card.nav-collapsed:hover,
body.admin-shell.admin-theme-dark #sidebar .nav-section-toggle.stat-card.stat-blue.nav-collapsed:hover,
body.admin-shell.admin-theme-system #sidebar .nav-section-toggle.stat-card:hover,
body.admin-shell.admin-theme-system #sidebar .nav-section-toggle.stat-card.stat-blue:hover,
body.admin-shell.admin-theme-system #sidebar .nav-section-toggle.stat-card.nav-collapsed:hover,
body.admin-shell.admin-theme-system #sidebar .nav-section-toggle.stat-card.stat-blue.nav-collapsed:hover {
    background: var(--gradient-blue-hover) !important;
    color: #ffffff !important;
}

/* Navigation Section Items Container */
.nav-section-items {
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s ease-in-out;
    max-height: 1000px;
    opacity: 1;
    margin-bottom: 0;
}

.nav-section-items.nav-collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

/* Chevron icon transition */
.nav-section-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #sidebar-overlay {
        z-index: 60;
    }

    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        z-index: 70;
    }
    
    main {
        margin-left: 0;
    }
}

/* Maintenance Mode Badge */
.maintenance-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #dc2626; /* Red-600 */
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-badge 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    white-space: nowrap;
}

.maintenance-badge--mobile {
    display: none;
}

.maintenance-badge:hover {
    background: #b91c1c; /* Red-700 */
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
    color: white;
    text-decoration: none;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Responsive - Show maintenance as a banner on mobile */
@media (max-width: 768px) {
    .maintenance-badge--desktop {
        display: none;
    }
    
    .maintenance-badge--mobile {
        display: flex;
        width: 100%;
        justify-content: center;
        margin-top: 0.75rem;
        padding: 0.75rem 1rem;
        border-radius: 0.875rem;
        white-space: normal;
    }

    .maintenance-badge--mobile span {
        display: inline;
    }
}

/* Admin Card Styles */
.database-manager-table-list {
    box-sizing: border-box;
    max-height: 24rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.75rem 1rem 1rem;
    scrollbar-gutter: stable;
}

.database-manager-detail-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.database-manager-detail-stack > .admin-card-surface {
    margin-bottom: 0;
}

.database-manager-data-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--admin-border);
}

@media (min-width: 640px) {
    .database-manager-table-list {
        max-height: 30rem;
        padding: 1rem;
    }
}

@media (min-width: 1280px) {
    .database-manager-table-list {
        max-height: 36rem;
    }
}

.admin-card-grid {
    --admin-card-grid-gap: var(--dcm-space-4, 1rem);
    column-gap: var(--admin-card-grid-gap);
    row-gap: var(--admin-card-grid-gap);
}

.admin-card-grid > * {
    margin-bottom: 0;
}

.admin-card-stack {
    display: flex;
    flex-direction: column;
    gap: var(--dcm-space-6, 1.5rem);
}

.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.admin-card--flush {
    padding: 0;
    overflow: hidden;
}

.admin-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.admin-card-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.admin-card-header--gradient,
.admin-card-header--table,
.admin-card-header--tab-shell,
.admin-card-header--info,
.admin-card-header--success,
.admin-card-header--warning,
.admin-card-header--danger,
.admin-card-header--neutral {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid transparent;
}

/* Branded gradient family — page/card contract (white text + glow actions) */
.admin-card-header--gradient,
.admin-card-header--table,
.admin-card-header--tab-shell {
    background: var(--gradient-blue);
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.admin-card-header--info {
    background: linear-gradient(180deg, #f0f7ff 0%, #eff6ff 100%);
    color: #1e3a8a;
    border-bottom-color: #bfdbfe;
    box-shadow: inset 3px 0 0 0 #3b82f6;
}

.admin-card-header--success {
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #166534;
    border-bottom-color: #bbf7d0;
    box-shadow: inset 3px 0 0 0 #10b981;
}

.admin-card-header--warning {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border-bottom-color: #fde68a;
    box-shadow: inset 3px 0 0 0 #f59e0b;
}

.admin-card-header--danger {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-bottom-color: #fecaca;
    box-shadow: inset 3px 0 0 0 #ef4444;
}

.admin-card-header--neutral {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    color: #374151;
    border-bottom-color: #e5e7eb;
    box-shadow: inset 3px 0 0 0 #6b7280;
}

body.admin-shell.admin-theme-dark .admin-card-header--info,
body.admin-shell.admin-theme-system .admin-card-header--info {
    background: linear-gradient(180deg, rgba(30, 58, 138, 0.28) 0%, rgba(30, 64, 175, 0.18) 100%);
    color: #bfdbfe;
    border-bottom-color: rgba(96, 165, 250, 0.28);
    box-shadow: inset 3px 0 0 0 #60a5fa;
}

body.admin-shell.admin-theme-dark .admin-card-header--success,
body.admin-shell.admin-theme-system .admin-card-header--success {
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.35) 0%, rgba(4, 120, 87, 0.2) 100%);
    color: #a7f3d0;
    border-bottom-color: rgba(52, 211, 153, 0.28);
    box-shadow: inset 3px 0 0 0 #34d399;
}

body.admin-shell.admin-theme-dark .admin-card-header--warning,
body.admin-shell.admin-theme-system .admin-card-header--warning {
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.35) 0%, rgba(146, 64, 14, 0.2) 100%);
    color: #fde68a;
    border-bottom-color: rgba(251, 191, 36, 0.28);
    box-shadow: inset 3px 0 0 0 #fbbf24;
}

body.admin-shell.admin-theme-dark .admin-card-header--danger,
body.admin-shell.admin-theme-system .admin-card-header--danger {
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.4) 0%, rgba(153, 27, 27, 0.22) 100%);
    color: #fecaca;
    border-bottom-color: rgba(248, 113, 113, 0.28);
    box-shadow: inset 3px 0 0 0 #f87171;
}

body.admin-shell.admin-theme-dark .admin-card-header--neutral,
body.admin-shell.admin-theme-system .admin-card-header--neutral {
    background: var(--admin-soft-header-bg);
    color: var(--admin-soft-header-text);
    border-bottom-color: var(--admin-soft-header-border);
    box-shadow: inset 3px 0 0 0 #94a3b8;
}

.admin-card-header--with-actions {
    align-items: flex-start;
}

.admin-card-header__main {
    flex: 1 1 16rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-page-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.admin-page-header__actions--card {
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .admin-page-header__actions--card {
        margin-top: 0;
    }
}

.admin-card-header__actions,
.admin-gradient-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.admin-card-header__actions {
    flex: 0 1 auto;
    margin-left: auto;
}

.admin-card-header__actions .btn,
.admin-gradient-header__actions .btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.2;
    min-height: 2.25rem;
    border: 1px solid var(--admin-border-strong, #d1d5db);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-card-header__actions .btn i,
.admin-gradient-header__actions .btn i {
    font-size: 0.875rem;
}

.admin-card-header__actions .btn:hover,
.admin-card-header__actions .btn:focus-visible {
    border-color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

/* White border/glow on branded gradient headers (page + card/table/tab-shell) */
.admin-page-header__actions--card .btn,
.admin-card-header--gradient .admin-card-header__actions .btn,
.admin-card-header--table .admin-card-header__actions .btn,
.admin-card-header--tab-shell .admin-card-header__actions .btn {
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 2px 10px rgba(15, 23, 42, 0.16);
}

.admin-page-header__actions--card .btn:hover,
.admin-page-header__actions--card .btn:focus-visible,
.admin-card-header--gradient .admin-card-header__actions .btn:hover,
.admin-card-header--gradient .admin-card-header__actions .btn:focus-visible,
.admin-card-header--table .admin-card-header__actions .btn:hover,
.admin-card-header--table .admin-card-header__actions .btn:focus-visible,
.admin-card-header--tab-shell .admin-card-header__actions .btn:hover,
.admin-card-header--tab-shell .admin-card-header__actions .btn:focus-visible {
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 4px 14px rgba(15, 23, 42, 0.2);
}

/* Keep secondary actions legible on branded gradient headers. */
.admin-card-header--gradient .admin-card-header__actions .btn.btn-outline,
.admin-card-header--gradient .admin-card-header__actions .btn.btn-secondary,
.admin-card-header--table .admin-card-header__actions .btn.btn-outline,
.admin-card-header--table .admin-card-header__actions .btn.btn-secondary,
.admin-card-header--tab-shell .admin-card-header__actions .btn.btn-outline,
.admin-card-header--tab-shell .admin-card-header__actions .btn.btn-secondary {
    background: var(--admin-surface-elevated);
    color: var(--admin-link);
    border-color: var(--admin-border-strong);
}

.admin-card-header--gradient .admin-card-header__actions .btn.btn-outline:hover,
.admin-card-header--gradient .admin-card-header__actions .btn.btn-outline:focus-visible,
.admin-card-header--gradient .admin-card-header__actions .btn.btn-secondary:hover,
.admin-card-header--gradient .admin-card-header__actions .btn.btn-secondary:focus-visible,
.admin-card-header--table .admin-card-header__actions .btn.btn-outline:hover,
.admin-card-header--table .admin-card-header__actions .btn.btn-outline:focus-visible,
.admin-card-header--table .admin-card-header__actions .btn.btn-secondary:hover,
.admin-card-header--table .admin-card-header__actions .btn.btn-secondary:focus-visible,
.admin-card-header--tab-shell .admin-card-header__actions .btn.btn-outline:hover,
.admin-card-header--tab-shell .admin-card-header__actions .btn.btn-outline:focus-visible,
.admin-card-header--tab-shell .admin-card-header__actions .btn.btn-secondary:hover,
.admin-card-header--tab-shell .admin-card-header__actions .btn.btn-secondary:focus-visible {
    background: var(--admin-surface-3);
    color: var(--admin-link-hover);
    border-color: var(--admin-border-strong);
}

.admin-card-header--gradient .admin-card-title,
.admin-card-header--gradient .admin-card-subtitle,
.admin-card-header--gradient .admin-card-header__title-text,
.admin-card-header--gradient .admin-card-header__suffix,
.admin-card-header--table .admin-card-title,
.admin-card-header--table .admin-card-subtitle,
.admin-card-header--table .admin-card-header__title-text,
.admin-card-header--table .admin-card-header__suffix,
.admin-card-header--tab-shell .admin-card-title,
.admin-card-header--tab-shell .admin-card-subtitle,
.admin-card-header--tab-shell .admin-card-header__title-text,
.admin-card-header--tab-shell .admin-card-header__suffix,
.admin-card-header--info .admin-card-title,
.admin-card-header--info .admin-card-subtitle,
.admin-card-header--info .admin-card-header__title-text,
.admin-card-header--info .admin-card-header__suffix,
.admin-card-header--success .admin-card-title,
.admin-card-header--success .admin-card-subtitle,
.admin-card-header--success .admin-card-header__title-text,
.admin-card-header--success .admin-card-header__suffix,
.admin-card-header--warning .admin-card-title,
.admin-card-header--warning .admin-card-subtitle,
.admin-card-header--warning .admin-card-header__title-text,
.admin-card-header--warning .admin-card-header__suffix,
.admin-card-header--danger .admin-card-title,
.admin-card-header--danger .admin-card-subtitle,
.admin-card-header--danger .admin-card-header__title-text,
.admin-card-header--danger .admin-card-header__suffix,
.admin-card-header--neutral .admin-card-title,
.admin-card-header--neutral .admin-card-subtitle,
.admin-card-header--neutral .admin-card-header__title-text,
.admin-card-header--neutral .admin-card-header__suffix {
    color: inherit;
}

.admin-card-header--gradient .admin-card-title,
.admin-card-header--table .admin-card-title,
.admin-card-header--tab-shell .admin-card-title,
.admin-card-header--info .admin-card-title,
.admin-card-header--success .admin-card-title,
.admin-card-header--warning .admin-card-title,
.admin-card-header--danger .admin-card-title,
.admin-card-header--neutral .admin-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-card-header--gradient .admin-card-subtitle,
.admin-card-header--table .admin-card-subtitle,
.admin-card-header--tab-shell .admin-card-subtitle,
.admin-card-header--info .admin-card-subtitle,
.admin-card-header--success .admin-card-subtitle,
.admin-card-header--warning .admin-card-subtitle,
.admin-card-header--danger .admin-card-subtitle,
.admin-card-header--neutral .admin-card-subtitle {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    max-width: 52rem;
}

.admin-card-header--gradient .admin-card-subtitle,
.admin-card-header--table .admin-card-subtitle,
.admin-card-header--tab-shell .admin-card-subtitle {
    color: rgba(255, 255, 255, 0.88);
}

.admin-card-header--info .admin-card-subtitle,
.admin-card-header--success .admin-card-subtitle,
.admin-card-header--warning .admin-card-subtitle,
.admin-card-header--danger .admin-card-subtitle,
.admin-card-header--neutral .admin-card-subtitle {
    color: var(--admin-soft-header-muted, var(--admin-text-muted));
}

.admin-card-header--gradient .admin-card-header__title-icon,
.admin-card-header--table .admin-card-header__title-icon,
.admin-card-header--tab-shell .admin-card-header__title-icon,
.admin-card-header--info .admin-card-header__title-icon,
.admin-card-header--success .admin-card-header__title-icon,
.admin-card-header--warning .admin-card-header__title-icon,
.admin-card-header--danger .admin-card-header__title-icon,
.admin-card-header--neutral .admin-card-header__title-icon {
    flex: 0 0 auto;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
}

.admin-card-header--gradient .admin-card-header__title-text,
.admin-card-header--table .admin-card-header__title-text,
.admin-card-header--tab-shell .admin-card-header__title-text,
.admin-card-header--info .admin-card-header__title-text,
.admin-card-header--success .admin-card-header__title-text,
.admin-card-header--warning .admin-card-header__title-text,
.admin-card-header--danger .admin-card-header__title-text,
.admin-card-header--neutral .admin-card-header__title-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-card-header--gradient .admin-card-header__suffix,
.admin-card-header--table .admin-card-header__suffix,
.admin-card-header--tab-shell .admin-card-header__suffix,
.admin-card-header--info .admin-card-header__suffix,
.admin-card-header--success .admin-card-header__suffix,
.admin-card-header--warning .admin-card-header__suffix,
.admin-card-header--danger .admin-card-header__suffix,
.admin-card-header--neutral .admin-card-header__suffix {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.92;
}

.admin-card-header--table {
    align-items: center;
}

/* Collapsible Card Header */
.admin-card-header.collapsible {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
    padding: 1rem;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
}

.admin-card-header.collapsible:hover {
    background-color: #f9fafb;
}

.admin-card-header.collapsible .collapse-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: #6b7280;
    transition: transform 0.3s ease, color 0.2s ease;
}

.admin-card-header.collapsible:hover .collapse-icon {
    color: #374151;
}

.admin-card-header.collapsible.collapsed .collapse-icon {
    transform: translateY(-50%) rotate(-90deg);
}

.admin-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    padding-right: 2.5rem;
}

.admin-card-subtitle {
    font-size: 0.875rem;
    color: #000000;
    font-weight: 500;
    margin-top: 0.25rem;
    padding-right: 2.5rem;
}

/* Admin Page Header Card — branded gradient banner (card variant) */
.admin-page-header-card {
    width: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgba(37, 99, 235, 0.28);
    background: var(--admin-surface, #ffffff);
    box-shadow: var(--shadow-sm);
}

.admin-page-header-card__banner {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    color: #ffffff;
    background: var(--gradient-blue);
    box-shadow: none;
}

@media (min-width: 768px) {
    .admin-page-header-card__banner {
        flex-direction: row;
        align-items: center;
    }
}

.admin-page-header-card__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    color: inherit;
}

@media (min-width: 768px) {
    .admin-page-header-card__title {
        font-size: 1.5rem;
    }
}

.admin-page-header-card__description {
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}

@media (min-width: 768px) {
    .admin-page-header-card__description {
        font-size: 0.9rem;
    }
}

.admin-page-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 0.7rem;
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-primary);
    box-shadow: none;
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.admin-page-header-card__banner .admin-page-header-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
}

.admin-page-header-icon__glyph {
    font-size: 1.3rem;
    line-height: 1;
    color: inherit;
}

.admin-user-avatar {
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.admin-shell.admin-theme-dark .admin-user-avatar,
body.admin-shell.admin-theme-system .admin-user-avatar {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.28);
}

.admin-debug-banner {
    background: var(--brand-primary-dark);
    border-bottom: 1px solid var(--brand-primary-darker);
}

.admin-debug-banner__action {
    color: #ffffff;
}

.admin-debug-banner__action:hover {
    color: #e8f1fb;
}

/* Collapsible Card Body */
.admin-card-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 5000px;
    opacity: 1;
}

.admin-card-body--static {
    overflow: visible;
    transition: none;
    max-height: none;
    opacity: 1;
}

.admin-card-body--flush {
    padding: 0;
}

.admin-card-body--padded {
    padding: 1.5rem;
}

.admin-card-body--table {
    overflow: visible;
}

.admin-card-body.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

.admin-card-surface {
    margin-bottom: 1.5rem;
    border: 1px solid var(--admin-card-surface-border);
    border-radius: 12px;
    background: var(--admin-card-surface-bg);
    box-shadow: var(--admin-card-surface-shadow);
    overflow: hidden;
}

.admin-card-surface--table,
.admin-card-surface--info,
.admin-card-surface--success,
.admin-card-surface--warning,
.admin-card-surface--danger,
.admin-card-surface--neutral {
    border-color: #e5e7eb;
}

.admin-card-surface__header .admin-card-header--gradient,
.admin-card-surface__header .admin-card-header--table,
.admin-card-surface__header .admin-card-header--tab-shell,
.admin-card-surface__header .admin-card-header--info,
.admin-card-surface__header .admin-card-header--success,
.admin-card-surface__header .admin-card-header--warning,
.admin-card-surface__header .admin-card-header--danger,
.admin-card-surface__header .admin-card-header--neutral {
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.admin-card-surface__body {
    background: var(--admin-card-surface-bg);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    padding: 1.5rem;
}

.admin-card-surface--table > .admin-card-surface__body {
    padding: 0;
    border-top: 1px solid var(--admin-border);
}

.admin-card-surface__body.admin-card-body--flush {
    padding: 0;
}

.admin-card-surface__body > :first-child {
    margin-top: 0;
}

.admin-card-surface__body > :last-child {
    margin-bottom: 0;
}

/* Delete page shell standardization */
.delete-page {
    width: 100%;
}

.delete-page-modal {
    position: fixed;
    inset: 0;
    z-index: var(--admin-z-dialog, 11000);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
}

/* Soften the page chrome behind the standalone delete dialog only (keep listing visible when in-place) */
body:has(.delete-page-modal-host) .admin-main-content > .admin-page-header-card,
body:has(.delete-page-modal-host) .admin-main-content > nav,
body:has(.delete-page-modal-host) .admin-main-content > .admin-breadcrumbs {
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.delete-page-modal-host {
    min-height: 0;
}

.delete-page-modal__backdrop {
    position: absolute;
    inset: 0;
    /* Light same-tab scrim — not a heavy full-app blur */
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

body.admin-shell.admin-theme-dark .delete-page-modal__backdrop,
body.admin-shell.admin-theme-system .delete-page-modal__backdrop {
    background: rgba(2, 6, 23, 0.36);
}

.delete-page-modal__panel {
    position: relative;
    z-index: 1;
    width: min(30rem, 100%);
    max-height: calc(100vh - 2.5rem);
    max-height: calc(100dvh - 2.5rem);
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 12px;
    box-shadow: var(--admin-shadow-floating, 0 20px 35px rgba(15, 23, 42, 0.12));
}

.delete-page-modal__panel .delete-page,
.delete-page-modal__panel .admin-card-surface {
    margin: 0;
    box-shadow: none;
}

.delete-page-modal__panel .admin-card-header,
.delete-page-modal__panel .admin-card-surface__header {
    padding: 0.85rem 1rem;
}

.delete-page-modal__panel .admin-card-header h3,
.delete-page-modal__panel .admin-card-surface__header h3 {
    font-size: 1.05rem;
}

.delete-page-modal__panel .admin-card-header p,
.delete-page-modal__panel .admin-card-surface__header .admin-card-header__subtitle {
    display: none;
}

.delete-page--compact,
.delete-page-modal__panel .delete-page__body {
    gap: 0.75rem;
}

.delete-page-modal__panel .delete-page__warning,
.delete-page-modal__panel .delete-page__summary,
.delete-page-modal__panel .delete-page__section,
.delete-page-modal__panel .delete-page__confirm {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
}

.delete-page-modal__panel .delete-page__callout .flex {
    gap: 0.65rem;
}

.delete-page-modal__panel .delete-page__callout-icon {
    margin-top: 0.15rem;
    font-size: 1rem;
}

.delete-page-modal__panel .delete-page__grid {
    gap: 0.65rem 0.85rem;
}

.delete-page-modal__panel .delete-page__label {
    margin-bottom: 0.15rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.delete-page-modal__panel .delete-page__label-icon {
    font-size: 0.75rem;
}

.delete-page-modal__panel .delete-page__value {
    font-size: 0.875rem;
    line-height: 1.35;
}

.delete-page-modal__panel .delete-page__section-title {
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    gap: 0.4rem;
}

.delete-page-modal__panel .delete-page__section-icon {
    font-size: 0.8rem;
}

.delete-page-modal__panel .delete-page__actions {
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.delete-page-modal__panel .delete-page__actions .btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.8125rem;
}

/* Compact two-column grid inside the narrow modal */
.delete-page-modal__panel .delete-page__grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delete-page__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.delete-page__warning,
.delete-page__summary,
.delete-page__confirm {
    border-radius: 12px;
}

.delete-page__warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 1rem;
}

.delete-page__callout-icon {
    margin-top: 0.25rem;
    color: #dc2626;
    font-size: 1.125rem;
    line-height: 1.25rem;
}

.delete-page__callout-title {
    margin: 0;
    color: #991b1b;
    font-weight: 600;
}

.delete-page__summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 1rem;
}

.delete-page__section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
}

.delete-page__section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-weight: 600;
    color: var(--admin-text, #1f2937);
}

.delete-page__section-icon,
.delete-page__label-icon {
    color: var(--brand-primary, #3b82f6);
    font-size: 0.875rem;
    line-height: 1;
    flex: 0 0 auto;
}

.delete-page__section-body {
    min-width: 0;
}

@media (max-width: 640px) {
    .delete-page-modal {
        align-items: flex-end;
        padding: 0.5rem;
    }

    .delete-page-modal__panel {
        width: 100%;
        max-height: calc(100dvh - 1rem);
        border-radius: 16px 16px 12px 12px;
    }
}

.delete-page__item-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    padding: 0.875rem;
}

.delete-page__grid {
    display: grid;
    gap: 1rem;
}

.delete-page__grid--1 {
    grid-template-columns: minmax(0, 1fr);
}

.delete-page__grid--2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.delete-page__grid--3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .delete-page__grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .delete-page__grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.delete-page__field {
    min-width: 0;
}

.delete-page__field--span-2 {
    grid-column: span 2 / span 2;
}

.delete-page__field--span-3 {
    grid-column: span 3 / span 3;
}

.delete-page__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--admin-text-muted);
}

.delete-page__value {
    color: var(--admin-text);
    word-break: break-word;
}

.delete-page__confirm {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    padding: 1rem;
}

.delete-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.delete-page__actions--split {
    justify-content: space-between;
}

.delete-page__actions-left,
.delete-page__actions-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* Keep shared searchable dropdowns visible inside the shared content-management shell */
.content-management-shell .admin-card-body,
.content-management-shell [data-tab-content] {
    overflow: visible;
}

.content-management-shell > .admin-card-surface {
    width: 100%;
    scroll-margin-top: 5.5rem;
}

.content-management-shell .admin-card-surface__body {
    overflow: visible;
}

form[data-admin-cm-meta-rail="1"],
form[data-admin-add-checklist="1"] {
    /* stretch so the meta-rail column is as tall as the FormStack — sticky
       needs a tall containing block or collapsed (short) rails scroll away */
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

form[data-admin-cm-meta-rail="1"] > .admin-tabs,
form[data-admin-cm-meta-rail="1"] > .admin-alert,
form[data-admin-cm-meta-rail="1"] > .bg-red-50,
form[data-admin-cm-meta-rail="1"] > .admin-card,
form[data-admin-cm-meta-rail="1"] > .admin-card-surface,
form[data-admin-cm-meta-rail="1"] > .content-management-form-stack,
form[data-admin-cm-meta-rail="1"] > .content-management-meta-rail,
form[data-admin-add-checklist="1"] > .admin-tabs,
form[data-admin-add-checklist="1"] > .admin-alert,
form[data-admin-add-checklist="1"] > .bg-red-50,
form[data-admin-add-checklist="1"] > .admin-card,
form[data-admin-add-checklist="1"] > .admin-card-surface,
form[data-admin-add-checklist="1"] > .content-management-form-stack,
form[data-admin-add-checklist="1"] > .content-management-add-checklist,
form[data-admin-add-checklist="1"] > .content-management-meta-rail {
    min-width: 0;
}

form[data-admin-cm-meta-rail="1"] > .admin-tabs,
form[data-admin-cm-meta-rail="1"] > .admin-alert,
form[data-admin-cm-meta-rail="1"] > .bg-red-50,
form[data-admin-add-checklist="1"] > .admin-tabs,
form[data-admin-add-checklist="1"] > .admin-alert,
form[data-admin-add-checklist="1"] > .bg-red-50 {
    flex: 1 0 100%;
}

form[data-admin-cm-meta-rail="1"] > .admin-card,
form[data-admin-cm-meta-rail="1"] > .admin-card-surface,
form[data-admin-cm-meta-rail="1"] > .content-management-form-stack,
form[data-admin-add-checklist="1"] > .admin-card,
form[data-admin-add-checklist="1"] > .admin-card-surface,
form[data-admin-add-checklist="1"] > .content-management-form-stack {
    flex: 1 1 0;
    width: auto;
}

.content-management-form-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.content-management-form-stack > .content-management-form-section,
.content-management-form-stack > .admin-card-surface {
    margin-bottom: 0;
    width: 100%;
}

.content-management-form-section__body {
    min-width: 0;
}

.category-form-translations {
    background: var(--admin-soft-surface, rgba(248, 250, 252, 0.9));
    border-color: var(--admin-border, #e5e7eb);
}

.category-form-translations > summary {
    list-style: none;
}

.category-form-translations > summary::-webkit-details-marker {
    display: none;
}

body.admin-shell.admin-theme-dark .category-form-translations {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148, 163, 184, 0.28);
}

body.admin-shell.admin-theme-dark .category-form-translations > summary {
    color: var(--admin-text, #e2e8f0);
}

form[data-admin-cm-meta-rail="1"] > .content-management-meta-rail,
form[data-admin-add-checklist="1"] > .content-management-add-checklist,
form[data-admin-add-checklist="1"] > .content-management-meta-rail {
    flex: 0 0 22rem;
    width: min(22rem, 100%);
}

form[data-admin-cm-meta-rail="1"] > .content-management-add-checklist__content,
form[data-admin-add-checklist="1"] > .content-management-add-checklist__content {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

form[data-admin-cm-meta-rail="1"] > .content-management-meta-rail .admin-card-surface,
form[data-admin-add-checklist="1"] > .content-management-add-checklist .admin-card-surface,
form[data-admin-add-checklist="1"] > .content-management-meta-rail .admin-card-surface {
    margin-bottom: 0;
}

@media (max-width: 1023px) {
    form[data-admin-cm-meta-rail="1"],
    form[data-admin-add-checklist="1"] {
        display: block;
    }

    form[data-admin-cm-meta-rail="1"] > .content-management-meta-rail,
    form[data-admin-add-checklist="1"] > .content-management-add-checklist,
    form[data-admin-add-checklist="1"] > .content-management-meta-rail {
        width: 100%;
        margin-top: 1.5rem;
    }
}

/* Aside stretches with the form; the inner stack is what sticks.
   No max-height / overflow-y on the stack — that captured wheel scroll and
   made open panels look "closed" while scrolling the page. */
.content-management-meta-rail.admin-shell-split__panel--sticky,
.content-management-meta-rail {
    position: relative;
    top: auto;
    align-self: stretch;
}

.content-management-meta-rail__stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 5.5rem;
    overflow: visible;
}

@media (max-width: 1023px) {
    .content-management-meta-rail__stack {
        position: static;
    }
}

/* CM meta-rail / Completeness sidebar boxes — scoped collapse (Option A) */
.content-management-meta-box--collapsible > .admin-card-surface__header .content-management-meta-box__header {
    cursor: pointer;
    user-select: none;
    /* Narrow 22rem rail: never wrap actions under the title */
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.75rem;
}

.content-management-meta-box--collapsible > .admin-card-surface__header .content-management-meta-box__header:focus-visible {
    outline: 2px solid var(--admin-focus-ring, #2563eb);
    outline-offset: 2px;
}

.content-management-meta-box--collapsible > .admin-card-surface__header .content-management-meta-box__header .admin-card-header__main {
    flex: 1 1 0;
    min-width: 0;
}

.content-management-meta-box--collapsible > .admin-card-surface__header .content-management-meta-box__header .admin-card-header__actions {
    align-items: center;
    align-self: flex-start;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
    margin-top: 0.1rem; /* optically top-align with title row */
}

/* Always-visible collapse control (pill) — top-right on blue gradient headers */
.content-management-meta-box__collapse-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    color: #ffffff;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.75rem;
    height: 1.875rem;
    justify-content: center;
    line-height: 1;
    margin-left: 0;
    opacity: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    width: 1.875rem;
}

.content-management-meta-box__collapse-icon i {
    display: block;
    line-height: 1;
    transform: translateY(0.5px);
}

.content-management-meta-box--collapsible > .admin-card-surface__header .content-management-meta-box__header:hover .content-management-meta-box__collapse-icon,
.content-management-meta-box--collapsible > .admin-card-surface__header .content-management-meta-box__header:focus-visible .content-management-meta-box__collapse-icon {
    background: rgba(255, 255, 255, 0.34);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(15, 23, 42, 0.18);
    color: #ffffff;
    opacity: 1;
}

/* Expanded: chevron-down (content open below). Collapsed: rotate to point up. */
.content-management-meta-box--collapsible.is-collapsed .content-management-meta-box__collapse-icon {
    transform: rotate(180deg);
}

.content-management-meta-box--collapsible.is-collapsed > .admin-card-surface__body[data-admin-cm-meta-box-body="1"] {
    display: none;
}

/* Dark mode: keep the control crisp on gradient headers */
body.admin-shell.admin-theme-dark .content-management-meta-box__collapse-icon {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.42);
    color: #ffffff;
}

.content-management-features-box__fields {
    min-width: 0;
}

.content-management-features-box__fields .feature-selector .form-label {
    font-size: 0.875rem;
}

.content-management-attributes-box__fields {
    min-width: 0;
}

.content-management-attributes-box__fields .form-label {
    font-size: 0.875rem;
}

.content-management-classification-box__languages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.content-management-classification-box__language-option {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    padding: 0.375rem 0;
}

/* Meta-rail sticky column must not clip Choices when Features (or Classification) dropdowns open */
.content-management-meta-rail:has(.choices.is-open),
.content-management-meta-rail:has(.feature-selector--open),
.content-management-meta-rail:has(.admin-dropdown-host--open),
.content-management-meta-rail__stack:has(.choices.is-open),
.content-management-meta-rail__stack:has(.feature-selector--open),
.content-management-meta-rail__stack:has(.admin-dropdown-host--open) {
    overflow: visible;
    z-index: var(--admin-z-dropdown-host);
}

.content-management-publish-box__fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.content-management-add-checklist {
    position: sticky;
    top: 1.5rem;
}

.content-management-add-checklist--nested {
    position: static;
    top: auto;
}

.content-management-publish-box__fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.content-management-publish-box__reservation {
    margin-top: 0.5rem;
}

.content-management-classification-box__fields .form-group {
    margin-bottom: 0;
}

.content-management-cover-box__fields .form-group {
    margin-bottom: 0;
}

.content-management-cover-box__fields .featured-image-section__card {
    padding: 0.75rem;
}

.content-management-cover-box__fields .featured-image-section__empty,
.content-management-cover-box__fields .image-upload-area {
    min-height: 8rem;
    height: auto;
}

.content-management-cover-box__fields .image-preview {
    max-height: 8rem;
}

.content-management-add-checklist__summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.content-management-add-checklist__summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.content-management-add-checklist__summary-count {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}

body.admin-shell.admin-theme-dark .content-management-add-checklist__summary-count,
body.admin-shell.admin-theme-system .content-management-add-checklist__summary-count {
    color: #f8fafc;
}

.content-management-add-checklist__progress {
    width: 100%;
    height: 0.5rem;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.22);
}

.content-management-add-checklist__progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6 0%, #22c55e 100%);
    transition: width 0.2s ease;
}

.content-management-add-checklist__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-management-add-checklist__item-row {
    margin: 0;
}

.content-management-add-checklist__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.content-management-add-checklist__item:hover,
.content-management-add-checklist__item:focus-visible {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.content-management-add-checklist__item-icon {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    font-size: 1rem;
}

.content-management-add-checklist__item[aria-pressed='true'] .content-management-add-checklist__item-icon {
    color: #16a34a;
}

.content-management-add-checklist__item[aria-pressed='false'] .content-management-add-checklist__item-icon {
    color: #dc2626;
}

.content-management-add-checklist__item-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.content-management-add-checklist__item-label {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}

.content-management-add-checklist__item-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 9999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.content-management-add-checklist__empty {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
}

body.admin-shell.admin-theme-dark .content-management-add-checklist__item,
body.admin-shell.admin-theme-system .content-management-add-checklist__item {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

body.admin-shell.admin-theme-dark .content-management-add-checklist__item-badge,
body.admin-shell.admin-theme-system .content-management-add-checklist__item-badge {
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
}

/* Choices.js dropdowns must escape card overflow clipping and stack above the sticky save bar */
.admin-card-surface.admin-dropdown-host--open,
.admin-card.admin-dropdown-host--open,
.admin-card-surface:has(.choices.is-open),
.admin-card:has(.choices.is-open),
.admin-dropdown-host--open,
.tour-itinerary-row:has(.lh-ss-open, .choices.is-open, .feature-selector--open, .admin-searchable-select--open),
.tour-itinerary-step-section:has(.lh-ss-open, .choices.is-open, .feature-selector--open, .admin-searchable-select--open),
.content-translation-section:has(.lh-ss-open, .choices.is-open, .feature-selector--open, .admin-searchable-select--open),
.content-translation-language-panel:has(.lh-ss-open, .choices.is-open, .feature-selector--open, .admin-searchable-select--open),
.admin-card-surface:has([data-admin-reservation-item-picker="1"] .lh-ss-open),
.admin-card-surface:has([data-admin-reservation-item-picker="1"] .admin-searchable-select--open),
.admin-card-surface__body:has([data-admin-reservation-item-picker="1"] .lh-ss-open),
.admin-card-surface__body:has([data-admin-reservation-item-picker="1"] .admin-searchable-select--open) {
    overflow: visible;
    position: relative;
    z-index: var(--admin-z-dropdown-host);
}

.tour-itinerary-row,
.tour-itinerary-step-section,
.tour-itinerary-step-section__body,
.content-translation-section,
.content-translation-language-panel,
.content-translation-section__body,
.content-translation-language-panel__body {
    overflow: visible;
}

[data-admin-searchable-select],
.lh-searchable-select {
    position: relative;
    z-index: 1;
}

[data-admin-searchable-select].admin-searchable-select--open,
[data-admin-searchable-select]:has(.lh-ss-open),
.lh-searchable-select:has(.lh-ss-open) {
    z-index: 10000;
}

.admin-card.collapsed {
    padding-bottom: 0;
}

/* Accommodation pricing workspace â€” peer card surfaces inside the tab shell / standalone page */
.accommodation-pricing-workspace .accommodation-pricing-workspace__surface.admin-card-surface {
    margin-bottom: 0;
}

.content-management-shell .accommodation-pricing-workspace .accommodation-pricing-workspace__surface.admin-card-surface {
    width: 100%;
}

.content-management-shell .accommodation-form__pricing-panel {
    margin-top: 0;
}

.content-management-shell .accommodation-form__tab-shell-surface.hidden + .accommodation-form__pricing-panel {
    margin-top: 0;
}

form[data-admin-cm-meta-rail="1"] > .accommodation-form__pricing-panel,
form[data-admin-cm-meta-rail="1"] > .vehicle-form__pricing-panel,
form[data-admin-add-checklist="1"] > .accommodation-form__pricing-panel,
form[data-admin-add-checklist="1"] > .vehicle-form__pricing-panel {
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
}

.accommodation-pricing-workspace__split.admin-shell-split {
    width: 100%;
}

/* Shared admin shell split layouts */
.admin-shell-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.admin-shell-split__panel {
    min-width: 0;
}

.admin-shell-split__panel--sticky {
    align-self: start;
}

@media (min-width: 1024px) {
    .admin-shell-split--balanced {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-shell-split--sidebar-left {
        grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    }

    .admin-shell-split--sidebar-right {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }

    .admin-shell-split--stacked {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .admin-shell-split__panel--sticky {
        position: sticky;
        top: 5.5rem;
    }
}

.email-template-variable-assistant [data-email-template-variable-root-view],
.email-template-variable-assistant [data-email-template-variable-group-view] {
    min-width: 0;
}

.email-template-variable-assistant [data-email-template-variable-root-view],
.email-template-variable-assistant [data-variable-group-panel] {
    max-height: 22rem;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.email-template-variable-assistant [data-variable-group-open] {
    min-width: 0;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.email-template-variable-assistant [data-variable-group-open]:hover {
    border-color: var(--admin-border);
}

.email-template-variable-assistant [data-email-template-variable-back] {
    white-space: nowrap;
}

.email-template-variable-token {
    max-width: 100%;
}

.email-template-variable-token code {
    line-height: 1.1;
}

.email-template-preview-frame {
    width: 100%;
    min-height: 30rem;
    height: clamp(30rem, 72vh, 48rem);
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    background: var(--admin-surface);
}

body.admin-shell.admin-theme-dark .email-template-preview-frame,
body.admin-shell.admin-theme-system .email-template-preview-frame {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

.email-template-preview-stage {
    position: relative;
    min-height: 30rem;
}

/* Accommodation Pricing Calendar
   Keep the day cards aligned with the global rounded admin styling and avoid blue default borders. */
.accommodation-pricing-workspace [data-pricing-day] {
    border-radius: var(--radius-lg) !important;
    border-color: rgba(110, 231, 183, 0.9) !important;
    box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.85);
    background-clip: padding-box;
    appearance: none;
}

.accommodation-pricing-workspace [data-pricing-day]:focus,
.accommodation-pricing-workspace [data-pricing-day]:focus-visible {
    outline: none;
    border-color: rgba(16, 185, 129, 0.95) !important;
    box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.9);
}

.accommodation-pricing-workspace [data-pricing-day][data-is-today="1"] {
    border-color: rgba(52, 211, 153, 1) !important;
}

.accommodation-pricing-workspace [data-pricing-day].bg-blue-600 {
    border-color: transparent !important;
    box-shadow: none !important;
}

.accommodation-pricing-workspace .accommodation-pricing-day--selected {
    color: #ffffff;
    border-color: transparent !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.accommodation-pricing-workspace .accommodation-pricing-day--available {
    color: var(--admin-text);
}

/* Shared Calendar Workspace */
.calendar-workspace .calendar-workspace__surface.admin-card-surface {
    margin-bottom: 0;
}

.calendar-workspace__split.admin-shell-split {
    align-items: stretch;
}

.calendar-workspace__calendar-body,
.calendar-workspace__actions-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calendar-workspace__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-lg);
    background: var(--admin-surface-muted);
}

.calendar-workspace__toolbar-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.calendar-workspace__nav-btn,
.calendar-workspace__today-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
    cursor: pointer;
}

.calendar-workspace__nav-btn {
    width: 2.25rem;
    padding: 0;
}

.calendar-workspace__nav-btn:hover,
.calendar-workspace__today-btn:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.calendar-workspace__nav-btn:focus-visible,
.calendar-workspace__today-btn:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}

.calendar-workspace__month-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 7.5rem;
    padding: 0.25rem 0.75rem;
    text-align: center;
}

.calendar-workspace__month-name {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--admin-text);
}

.calendar-workspace__month-year {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--admin-text-muted);
}

.calendar-workspace__hint {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--admin-text-muted);
}

.calendar-workspace__legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.875rem;
}

.calendar-workspace__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--admin-text-muted);
}

.calendar-workspace__legend-item::before {
    content: "";
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.calendar-workspace__legend-item--open::before {
    background: #86efac;
}

.calendar-workspace__legend-item--closed::before {
    background: #fca5a5;
}

.calendar-workspace__legend-item--booked::before {
    background: #fcd34d;
}

.calendar-workspace__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.calendar-workspace__weekday {
    padding: 0.375rem 0.25rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--admin-text-muted);
}

.calendar-workspace__day {
    position: relative;
    display: flex;
    min-height: 6.75rem;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.625rem 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    background: var(--admin-surface);
    text-align: left;
    appearance: none;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.calendar-workspace__day--pad {
    min-height: 6.75rem;
    border: 1px dashed var(--admin-border);
    border-radius: var(--radius-lg);
    background: transparent;
    opacity: 0.35;
    pointer-events: none;
}

.calendar-workspace__day--open {
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.95) 0%, rgba(220, 252, 231, 0.88) 100%);
    border-color: rgba(134, 239, 172, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.calendar-workspace__day--closed {
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.95) 0%, rgba(254, 226, 226, 0.88) 100%);
    border-color: rgba(252, 165, 165, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.calendar-workspace__day--booked {
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.96) 0%, rgba(254, 243, 199, 0.9) 100%);
    border-color: rgba(252, 211, 77, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.calendar-workspace__day--today:not(.calendar-workspace__day--selected):not(.calendar-workspace__day--in-range) {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.calendar-workspace__day:hover:not(.calendar-workspace__day--pad) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.calendar-workspace__day:focus,
.calendar-workspace__day:focus-visible {
    outline: none;
}

.calendar-workspace__day--selected,
.calendar-workspace__day--in-range {
    color: #ffffff;
    border-color: transparent !important;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.calendar-workspace__day--range-start,
.calendar-workspace__day--range-end {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

.calendar-workspace__day-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.375rem;
}

.calendar-workspace__day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.625rem;
    height: 1.625rem;
    padding: 0 0.375rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    color: var(--admin-text);
    background: rgba(255, 255, 255, 0.72);
}

.calendar-workspace__day--selected .calendar-workspace__day-number,
.calendar-workspace__day--in-range .calendar-workspace__day-number {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.calendar-workspace__day-markers {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    line-height: 1;
}

.calendar-workspace__day-markers[hidden] {
    display: none !important;
}

.calendar-workspace__range-tag {
    display: none;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.375rem;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    color: #ffffff;
}

.calendar-workspace__range-tag--start {
    background: #059669;
}

.calendar-workspace__range-tag--single,
.calendar-workspace__range-tag--end {
    background: #dc2626;
}

.calendar-workspace__day--range-start .calendar-workspace__range-tag--start,
.calendar-workspace__day--range-end .calendar-workspace__range-tag--end,
.calendar-workspace__day--selected:not(.calendar-workspace__day--in-range):not(.calendar-workspace__day--range-start):not(.calendar-workspace__day--range-end) .calendar-workspace__range-tag--single {
    display: inline-flex;
}

.calendar-workspace__day-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.4375rem;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.calendar-workspace__day--open .calendar-workspace__day-badge {
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
}

.calendar-workspace__day--closed .calendar-workspace__day-badge {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.calendar-workspace__day--booked .calendar-workspace__day-badge {
    background: rgba(217, 119, 6, 0.14);
    color: #92400e;
}

.calendar-workspace__day--selected .calendar-workspace__day-badge,
.calendar-workspace__day--in-range .calendar-workspace__day-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.calendar-workspace__day-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    padding-right: 1.5rem;
}

.calendar-workspace__day-price {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    color: var(--admin-text);
}

.calendar-workspace__day--selected .calendar-workspace__day-price,
.calendar-workspace__day--in-range .calendar-workspace__day-price {
    color: rgba(255, 255, 255, 0.95);
}

.calendar-workspace__day-season {
    overflow: hidden;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--admin-text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-workspace__day--selected .calendar-workspace__day-season,
.calendar-workspace__day--in-range .calendar-workspace__day-season {
    color: rgba(255, 255, 255, 0.82);
}

.calendar-workspace__reservation-link {
    position: absolute;
    top: auto;
    bottom: 0.375rem;
    right: 0.375rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    border: 1px solid rgba(217, 119, 6, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #b45309;
    font-size: 0.625rem;
    line-height: 1;
    text-decoration: none;
    opacity: 0.72;
    transition: opacity 150ms ease, transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
}

.calendar-workspace__day:hover .calendar-workspace__reservation-link,
.calendar-workspace__reservation-link:focus-visible {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(180, 83, 9, 0.18);
}

.calendar-workspace__reservation-link:hover {
    background: #fffbeb;
    color: #92400e;
}

.calendar-workspace__reservation-link:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}

.calendar-workspace__day--selected .calendar-workspace__reservation-link,
.calendar-workspace__day--in-range .calendar-workspace__reservation-link {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    opacity: 0.95;
}

.calendar-workspace__day--selected .calendar-workspace__reservation-link:hover,
.calendar-workspace__day--in-range .calendar-workspace__reservation-link:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.calendar-workspace__day-note {
    position: absolute;
    top: auto;
    bottom: 0.375rem;
    right: 0.375rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    border: 1px solid rgba(220, 38, 38, 0.24);
    background: rgba(255, 255, 255, 0.92);
    color: #b91c1c;
    font-size: 0.625rem;
    line-height: 1;
    cursor: help;
    opacity: 0.72;
    transition: opacity 150ms ease, transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
}

.calendar-workspace__day:hover .calendar-workspace__day-note,
.calendar-workspace__day-note:focus-visible {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.16);
}

.calendar-workspace__day--selected .calendar-workspace__day-note,
.calendar-workspace__day--in-range .calendar-workspace__day-note {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    opacity: 0.95;
}

body.admin-shell.admin-theme-dark .calendar-workspace__day-note,
body.admin-shell.admin-theme-system .calendar-workspace__day-note {
    border-color: rgba(248, 113, 113, 0.32);
    background: rgba(15, 23, 42, 0.55);
    color: #fecaca;
}

.calendar-workspace__range-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calendar-workspace__range-summary {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border: 1px dashed var(--admin-border);
    border-radius: var(--radius-lg);
    background: var(--admin-surface-muted);
}

.calendar-workspace__range-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--admin-primary);
    flex-shrink: 0;
}

.calendar-workspace__range-summary-text {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--admin-text);
}

.calendar-workspace__range-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

body.admin-shell.admin-theme-dark .calendar-workspace__toolbar,
body.admin-shell.admin-theme-system .calendar-workspace__toolbar {
    background: rgba(15, 23, 42, 0.45);
}

body.admin-shell.admin-theme-dark .calendar-workspace__day--open,
body.admin-shell.admin-theme-system .calendar-workspace__day--open {
    background: linear-gradient(180deg, rgba(20, 83, 45, 0.42) 0%, rgba(22, 101, 52, 0.28) 100%);
    border-color: rgba(74, 222, 128, 0.28);
}

body.admin-shell.admin-theme-dark .calendar-workspace__day--closed,
body.admin-shell.admin-theme-system .calendar-workspace__day--closed {
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.42) 0%, rgba(153, 27, 27, 0.28) 100%);
    border-color: rgba(248, 113, 113, 0.28);
}

body.admin-shell.admin-theme-dark .calendar-workspace__day--booked,
body.admin-shell.admin-theme-system .calendar-workspace__day--booked {
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.42) 0%, rgba(146, 64, 14, 0.28) 100%);
    border-color: rgba(251, 191, 36, 0.28);
}

body.admin-shell.admin-theme-dark .calendar-workspace__day-number,
body.admin-shell.admin-theme-system .calendar-workspace__day-number {
    background: rgba(15, 23, 42, 0.35);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .calendar-workspace__day--open .calendar-workspace__day-badge,
body.admin-shell.admin-theme-system .calendar-workspace__day--open .calendar-workspace__day-badge {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

body.admin-shell.admin-theme-dark .calendar-workspace__day--closed .calendar-workspace__day-badge,
body.admin-shell.admin-theme-system .calendar-workspace__day--closed .calendar-workspace__day-badge {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

body.admin-shell.admin-theme-dark .calendar-workspace__day--booked .calendar-workspace__day-badge,
body.admin-shell.admin-theme-system .calendar-workspace__day--booked .calendar-workspace__day-badge {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
}

body.admin-shell.admin-theme-dark .calendar-workspace__reservation-link,
body.admin-shell.admin-theme-system .calendar-workspace__reservation-link {
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: #fde68a;
}

body.admin-shell.admin-theme-dark .calendar-workspace__reservation-link:hover,
body.admin-shell.admin-theme-system .calendar-workspace__reservation-link:hover {
    background: rgba(120, 53, 15, 0.55);
    color: #fef3c7;
}

@media (max-width: 767px) {
    .calendar-workspace__day {
        min-height: 5.5rem;
        padding: 0.5rem;
    }

    .calendar-workspace__day--pad {
        min-height: 5.5rem;
    }

    .calendar-workspace__day-badge {
        display: none;
    }

    .calendar-workspace__day-price {
        font-size: 0.6875rem;
    }
}

.accommodation-pricing-workspace .accommodation-pricing-day--unavailable {
    color: var(--admin-text-muted);
}

.accommodation-pricing-workspace .accommodation-pricing-day__number--selected,
.accommodation-pricing-workspace .accommodation-pricing-day__details--selected,
.accommodation-pricing-workspace .accommodation-pricing-day__season--selected {
    color: #ffffff;
}

.accommodation-pricing-workspace .accommodation-pricing-day__number--available,
.accommodation-pricing-workspace .accommodation-pricing-day__details--available {
    color: var(--admin-text);
}

.accommodation-pricing-workspace .accommodation-pricing-day__number--unavailable,
.accommodation-pricing-workspace .accommodation-pricing-day__details--unavailable {
    color: var(--admin-text-muted);
}

.accommodation-pricing-workspace .accommodation-pricing-day__season--available {
    color: var(--admin-text-soft);
}

.accommodation-pricing-workspace .accommodation-pricing-day__season--unavailable {
    color: var(--admin-text-muted);
}

.accommodation-pricing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border-radius: 9999px;
    padding: 0.1875rem 0.4375rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.accommodation-pricing-badge--selected {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.accommodation-pricing-badge--available {
    background: rgba(220, 252, 231, 0.92);
    color: #166534;
}

.accommodation-pricing-badge--unavailable {
    background: rgba(254, 226, 226, 0.92);
    color: #991b1b;
}

body.admin-shell.admin-theme-dark .accommodation-pricing-badge--selected,
body.admin-shell.admin-theme-system .accommodation-pricing-badge--selected {
    background: rgba(59, 130, 246, 0.22);
    color: #eff6ff;
    border-color: rgba(147, 197, 253, 0.34);
}

body.admin-shell.admin-theme-dark .accommodation-pricing-badge--available,
body.admin-shell.admin-theme-system .accommodation-pricing-badge--available {
    background: rgba(22, 101, 52, 0.32);
    color: #bbf7d0;
}

body.admin-shell.admin-theme-dark .accommodation-pricing-badge--unavailable,
body.admin-shell.admin-theme-system .accommodation-pricing-badge--unavailable {
    background: rgba(127, 29, 29, 0.32);
    color: #fecaca;
}

.accommodation-pricing-workspace [data-pricing-day-badge] {
    font-size: 0.625rem !important;
    line-height: 1 !important;
}

.accommodation-pricing-workspace [data-pricing-range-start-label] {
    background-color: #059669 !important;
    font-size: 0.625rem !important;
    line-height: 1 !important;
    padding: 0.1875rem 0.4375rem !important;
}

.accommodation-pricing-workspace [data-pricing-range-single-label] {
    background-color: #dc2626 !important;
    font-size: 0.625rem !important;
    line-height: 1 !important;
    padding: 0.1875rem 0.4375rem !important;
}

.accommodation-pricing-workspace [data-pricing-range-end-label] {
    background-color: #dc2626 !important;
    font-size: 0.625rem !important;
    line-height: 1 !important;
    padding: 0.1875rem 0.4375rem !important;
}

.accommodation-pricing-workspace [data-pricing-range-marker] {
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
}

/* Ensure content management forms always use the full available shell width */
.admin-shell-content .admin-form,
.admin-shell-content .content-management-form,
.admin-shell-content .admin-card.no-collapse,
.admin-shell-content .admin-card-surface {
    width: 100%;
}

/* Shared admin shell stacking contract
   Keep the persistent topbar above all in-flow content surfaces and normalize
   the main content stacking context so sticky/floating cards cannot paint over it. */
body.admin-shell > header[data-admin-shell-header] {
    position: sticky;
    top: 0;
    z-index: 2000;
}

body.admin-shell .admin-shell-layout {
    position: relative;
    z-index: 0;
}

body.admin-shell .admin-shell-content {
    position: relative;
    z-index: 1;
}

/* Statistics Cards — soft brand blue (purple-indigo removed) */
.stat-card {
    background: var(--gradient-blue);
    color: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(17, 61, 90, 0.08);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.stat-card-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-card-label {
    font-size: 0.75rem;
    opacity: 0.95;
    font-weight: 500;
}

/* Stat card color variations */
.stat-card.stat-blue {
    background: var(--gradient-blue);
}

.stat-card.stat-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card.stat-yellow {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card.stat-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.stat-card.stat-indigo {
    background: var(--gradient-blue);
}

.stat-card.stat-purple {
    background: var(--gradient-blue);
}

.stat-card.stat-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-card.stat-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.stat-card.stat-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.stat-card.stat-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.stat-card.stat-gray {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.stat-card.stat-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Metric Cards */
.metric-card {
    --metric-card-bg: var(--bg-white);
    --metric-card-border: var(--border-default);
    --metric-card-title: var(--gray-800);
    --metric-card-value: var(--gray-900);
    --metric-card-subtitle: var(--gray-700);
    --metric-card-note: var(--gray-600);
    --metric-card-icon-bg: var(--gray-100);
    --metric-card-icon-color: var(--color-info);

    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--metric-card-border);
    border-radius: var(--radius-md);
    background: var(--metric-card-bg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-card--compact {
    gap: 0.75rem;
    padding: 0.8rem 0.95rem;
}

.metric-card--compact .metric-card__icon {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.9rem;
}

.metric-card--compact .metric-card__label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
}

.metric-card--compact .metric-card__value {
    margin-top: 0.2rem;
    font-size: 1.5rem;
}

.metric-card--compact .metric-card__subtitle {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    line-height: 1.35;
}

.metric-card--compact .metric-card__note {
    margin-top: 0.25rem;
    font-size: 0.7rem;
    line-height: 1.35;
}

/* Dashboard compact content summary pills — fixed 2×2 chip grid */
.metric-card--dashboard-pill {
    align-items: flex-start;
    min-height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.admin-metric-grid--dashboard {
    align-items: stretch;
}

.admin-metric-grid--dashboard > .metric-card-link,
.admin-metric-grid--dashboard > .metric-card {
    display: flex;
    height: 100%;
}

.admin-metric-grid--dashboard > .metric-card-link .metric-card {
    width: 100%;
    height: 100%;
}

.dashboard-kpi-bands {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dashboard-kpi-band--summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dashboard-kpi-band__title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--admin-text-muted, var(--gray-600));
}

body.admin-shell.admin-theme-dark .dashboard-kpi-band__title,
body.admin-shell.admin-theme-system .dashboard-kpi-band__title {
    color: var(--admin-text-muted);
}

.metric-card--dashboard-pill .metric-card__content {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.metric-card--dashboard-pill .metric-card__label {
    margin: 0;
    color: var(--admin-text, var(--gray-800));
    text-transform: none;
    letter-spacing: 0.01em;
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-card--dashboard-pill .metric-card__value {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--admin-text-muted, var(--gray-600));
    width: 100%;
}

.metric-card--dashboard-summary .metric-card__value {
    margin-top: 0.65rem;
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    color: var(--admin-text, var(--gray-900));
}

.metric-card--dashboard-summary .metric-card__subtitle {
    margin-top: 0.2rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--admin-text-muted, var(--gray-600));
}

body.admin-shell.admin-theme-dark .metric-card--dashboard-summary .metric-card__value,
body.admin-shell.admin-theme-system .metric-card--dashboard-summary .metric-card__value {
    color: var(--admin-text);
}

.metric-card__icon--brand {
    background: color-mix(in srgb, var(--brand-primary) 12%, transparent);
    color: var(--brand-primary-dark, var(--brand-primary));
    flex-shrink: 0;
}

.dashboard-kpi-chips {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    width: auto;
    max-width: 100%;
}

.dashboard-kpi-chips__row {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 0.3rem;
    width: auto;
    justify-content: start;
}

.dashboard-kpi-chip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.28rem;
    min-width: 0;
    width: auto;
    box-sizing: border-box;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dashboard-kpi-chip__icon {
    width: 0.8rem;
    flex-shrink: 0;
    font-size: 0.68rem;
    text-align: center;
    opacity: 0.9;
}

.dashboard-kpi-chip__count {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 0;
}

.dashboard-kpi-chip__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-kpi-chip--total {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-700);
}

.dashboard-kpi-chip--active {
    background: var(--color-success-light);
    border-color: color-mix(in srgb, var(--color-success) 28%, transparent);
    color: var(--color-success-text);
}

.dashboard-kpi-chip--inactive {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-600);
}

.dashboard-kpi-chip--featured {
    background: var(--color-warning-light);
    border-color: color-mix(in srgb, var(--color-warning) 35%, transparent);
    color: var(--color-warning-text);
}

a.dashboard-kpi-chip:hover {
    filter: brightness(0.97);
    text-decoration: none;
}

a.dashboard-kpi-chip:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

body.admin-shell.admin-theme-dark .metric-card--dashboard-pill .metric-card__label,
body.admin-shell.admin-theme-system .metric-card--dashboard-pill .metric-card__label {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .dashboard-kpi-chip--total,
body.admin-shell.admin-theme-system .dashboard-kpi-chip--total,
body.admin-shell.admin-theme-dark .dashboard-kpi-chip--inactive,
body.admin-shell.admin-theme-system .dashboard-kpi-chip--inactive {
    background: var(--admin-surface-3);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .metric-card__icon--brand,
body.admin-shell.admin-theme-system .metric-card__icon--brand {
    background: color-mix(in srgb, var(--brand-primary) 22%, transparent);
    color: #93c5fd;
}

.metric-card--usage .metric-card__value {
    margin-top: 0.35rem;
    font-size: inherit;
    font-weight: 400;
    line-height: 1.4;
}

.metric-card__usage {
    display: block;
    width: 100%;
}

.metric-card__usage-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.metric-card__usage-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--metric-card-value);
    line-height: 1.1;
}

.metric-card__usage-limit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--metric-card-subtitle);
}

.metric-card__progress {
    display: block;
    margin-top: 0.65rem;
}

.metric-card__progress--sm {
    margin-top: 0.5rem;
}

.metric-card__progress-track {
    display: block;
    width: 100%;
    height: 0.5rem;
    border-radius: 9999px;
    background: var(--metric-card-progress-track, var(--gray-200));
    overflow: hidden;
}

.metric-card--usage .metric-card__progress-track {
    height: 0.65rem;
}

.metric-card__progress-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 9999px;
    transition: width 0.35s ease;
}

.metric-card__progress-fill--info {
    background: var(--color-info, #2563eb);
}

.metric-card__progress-fill--success {
    background: var(--color-success, #16a34a);
}

.metric-card__progress-fill--orange {
    background: linear-gradient(90deg, #f59e0b 0%, #ea580c 100%);
}

.metric-card__progress-fill--warning {
    background: var(--color-warning, #d97706);
}

.metric-card__progress-fill--critical {
    background: var(--color-danger, #dc2626);
}

.metric-card__progress-fill--purple {
    background: #2563eb;
}

.metric-card__usage-caption {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--metric-card-note);
}

.metric-card__usage-stats {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.65rem;
    font-size: 0.8rem;
}

.metric-card__usage-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--metric-card-subtitle);
}

.metric-card__usage-stat-value {
    font-weight: 600;
    color: var(--metric-card-value);
}

.metric-card__usage-stat-value--danger {
    color: #dc2626;
}

.metric-card__usage-stat-value--warning {
    color: #ea580c;
}

.metric-card-progress-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.metric-card-progress-row__label {
    font-size: 0.875rem;
    color: var(--metric-card-subtitle);
}

.metric-card-progress-row__value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--metric-card-value);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 16px 30px rgba(15, 23, 42, 0.08));
}

.metric-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.metric-card-link:hover .metric-card,
.metric-card-link:focus-visible .metric-card {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 16px 30px rgba(15, 23, 42, 0.08));
}

.metric-card-link:focus-visible {
    outline: none;
}

.metric-card-link:focus-visible .metric-card {
    outline: 2px solid var(--admin-accent, #2563eb);
    outline-offset: 2px;
}

.metric-card__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-full);
    background: var(--metric-card-icon-bg);
    color: var(--metric-card-icon-color);
    font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.metric-card__content {
    min-width: 0;
    flex: 1;
}

.metric-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--metric-card-title);
}

.metric-card__value {
    margin-top: 0.3rem;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
    color: var(--metric-card-value);
}

.metric-card__value-suffix {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    color: var(--metric-card-value);
}

.metric-card--compact .metric-card__value-suffix {
    font-size: 1.125rem;
}

.metric-card__subtitle {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    color: var(--metric-card-subtitle);
}

.metric-card__note {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: var(--metric-card-note);
}

.metric-card--critical {
    --metric-card-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(220, 38, 38, 0.06) 100%);
    --metric-card-border: rgba(220, 38, 38, 0.18);
    --metric-card-title: #991b1b;
    --metric-card-value: #7f1d1d;
    --metric-card-subtitle: #b91c1c;
    --metric-card-note: #dc2626;
    --metric-card-icon-bg: rgba(239, 68, 68, 0.16);
    --metric-card-icon-color: #dc2626;
}

.metric-card--critical .metric-card__icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.metric-card--high {
    --metric-card-bg: linear-gradient(135deg, rgba(249, 115, 22, 0.14) 0%, rgba(234, 88, 12, 0.06) 100%);
    --metric-card-border: rgba(234, 88, 12, 0.18);
    --metric-card-title: #9a3412;
    --metric-card-value: #7c2d12;
    --metric-card-subtitle: #c2410c;
    --metric-card-note: #ea580c;
    --metric-card-icon-bg: rgba(249, 115, 22, 0.16);
    --metric-card-icon-color: #ea580c;
}

.metric-card--high .metric-card__icon {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
}

.metric-card--medium {
    --metric-card-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(217, 119, 6, 0.06) 100%);
    --metric-card-border: rgba(217, 119, 6, 0.18);
    --metric-card-title: #92400e;
    --metric-card-value: #78350f;
    --metric-card-subtitle: #b45309;
    --metric-card-note: #d97706;
    --metric-card-icon-bg: rgba(245, 158, 11, 0.16);
    --metric-card-icon-color: #d97706;
}

.metric-card--medium .metric-card__icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.metric-card--low {
    --metric-card-bg: linear-gradient(135deg, rgba(107, 114, 128, 0.12) 0%, rgba(75, 85, 99, 0.06) 100%);
    --metric-card-border: rgba(107, 114, 128, 0.18);
    --metric-card-title: #374151;
    --metric-card-value: #1f2937;
    --metric-card-subtitle: #4b5563;
    --metric-card-note: #6b7280;
    --metric-card-icon-bg: rgba(107, 114, 128, 0.16);
    --metric-card-icon-color: #4b5563;
}

.metric-card--low .metric-card__icon {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #ffffff;
}

.metric-card--info {
    --metric-card-bg: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --metric-card-border: #1d4ed8;
    --metric-card-title: #ffffff;
    --metric-card-value: #ffffff;
    --metric-card-subtitle: rgba(255, 255, 255, 0.92);
    --metric-card-note: rgba(255, 255, 255, 0.82);
    --metric-card-icon-bg: rgba(255, 255, 255, 0.14);
    --metric-card-icon-color: #ffffff;
}

.metric-card--info .metric-card__icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.metric-card--success {
    --metric-card-bg: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.06) 100%);
    --metric-card-border: rgba(5, 150, 105, 0.18);
    --metric-card-title: #065f46;
    --metric-card-value: #064e3b;
    --metric-card-subtitle: #047857;
    --metric-card-note: #059669;
    --metric-card-icon-bg: rgba(16, 185, 129, 0.16);
    --metric-card-icon-color: #059669;
}

.metric-card--success .metric-card__icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.metric-card--warning {
    --metric-card-bg: linear-gradient(135deg, rgba(250, 204, 21, 0.16) 0%, rgba(202, 138, 4, 0.08) 100%);
    --metric-card-border: rgba(202, 138, 4, 0.22);
    --metric-card-title: #92400e;
    --metric-card-value: #78350f;
    --metric-card-subtitle: #b45309;
    --metric-card-note: #ca8a04;
    --metric-card-icon-bg: rgba(250, 204, 21, 0.18);
    --metric-card-icon-color: #ca8a04;
}

.metric-card--warning .metric-card__icon {
    background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
    color: #ffffff;
}

.metric-card--neutral {
    --metric-card-bg: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(71, 85, 105, 0.06) 100%);
    --metric-card-border: rgba(100, 116, 139, 0.18);
    --metric-card-title: #334155;
    --metric-card-value: #1e293b;
    --metric-card-subtitle: #475569;
    --metric-card-note: #64748b;
    --metric-card-icon-bg: rgba(100, 116, 139, 0.16);
    --metric-card-icon-color: #475569;
}

.metric-card--neutral .metric-card__icon {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #ffffff;
}

.metric-card--purple {
    --metric-card-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(37, 99, 235, 0.06) 100%);
    --metric-card-border: rgba(37, 99, 235, 0.18);
    --metric-card-title: #6b21a8;
    --metric-card-value: #581c87;
    --metric-card-subtitle: #2563eb;
    --metric-card-note: #3b82f6;
    --metric-card-icon-bg: rgba(59, 130, 246, 0.16);
    --metric-card-icon-color: #2563eb;
}

.metric-card--purple .metric-card__icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.metric-card--cyan {
    --metric-card-bg: linear-gradient(135deg, rgba(6, 182, 212, 0.14) 0%, rgba(8, 145, 178, 0.06) 100%);
    --metric-card-border: rgba(8, 145, 178, 0.18);
    --metric-card-title: #155e75;
    --metric-card-value: #164e63;
    --metric-card-subtitle: #0891b2;
    --metric-card-note: #0e7490;
    --metric-card-icon-bg: rgba(6, 182, 212, 0.16);
    --metric-card-icon-color: #0891b2;
}

.metric-card--cyan .metric-card__icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #ffffff;
}

.metric-card--orange {
    --metric-card-bg: linear-gradient(135deg, rgba(249, 115, 22, 0.14) 0%, rgba(234, 88, 12, 0.06) 100%);
    --metric-card-border: rgba(234, 88, 12, 0.18);
    --metric-card-title: #9a3412;
    --metric-card-value: #7c2d12;
    --metric-card-subtitle: #c2410c;
    --metric-card-note: #ea580c;
    --metric-card-icon-bg: rgba(249, 115, 22, 0.16);
    --metric-card-icon-color: #ea580c;
}

.metric-card--orange .metric-card__icon {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
}

.metric-card--emerald {
    --metric-card-bg: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.06) 100%);
    --metric-card-border: rgba(5, 150, 105, 0.18);
    --metric-card-title: #065f46;
    --metric-card-value: #064e3b;
    --metric-card-subtitle: #047857;
    --metric-card-note: #059669;
    --metric-card-icon-bg: rgba(16, 185, 129, 0.16);
    --metric-card-icon-color: #059669;
}

.metric-card--emerald .metric-card__icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

/* System Update Terminal */
.system-update-terminal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.system-update-action {
    min-height: 2.875rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.system-update-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.95rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.52);
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
}

.system-update-chip strong {
    color: inherit;
}

.system-update-chip--neutral {
    background: rgba(30, 41, 59, 0.72);
}

.system-update-chip--success {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.32);
    color: #d1fae5;
}

.system-update-chip--warning {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fef3c7;
}

.system-update-chip--danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.34);
    color: #fee2e2;
}

.system-update-chip--info {
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.34);
    color: #dbeafe;
}

.system-update-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.system-update-panel__header {
    margin-bottom: 1rem;
}

.system-update-panel__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.system-update-panel__subtitle {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.system-update-definition-list {
    display: grid;
    gap: 0.4rem;
}

.system-update-definition-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #eef2f7;
}

.system-update-definition-row:last-child {
    border-bottom: none;
}

.system-update-definition-row dt {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
}

.system-update-definition-row dd {
    margin: 0;
    max-width: 70%;
    text-align: right;
    font-size: 0.92rem;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.system-update-step-list {
    display: flex;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.system-update-step-list--horizontal {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
}

.system-update-step-list--full {
    width: 100%;
}

.system-update-step {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1 1 0;
    min-width: 0;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    scroll-snap-align: start;
}

.system-update-step:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.06);
}

.system-update-step--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.system-update-step--info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.system-update-step--warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.system-update-step--danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.system-update-step--neutral {
    background: #f8fafc;
}

.system-update-step__rail {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.25rem;
}

.system-update-step__number {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: #e5e7eb;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.system-update-step__connector {
    height: 2px;
    border-radius: 9999px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.75), rgba(148, 163, 184, 0.15));
}

.system-update-step:last-child .system-update-step__connector {
    display: none;
}

.system-update-step--success .system-update-step__number {
    background: #d1fae5;
    color: #065f46;
}

.system-update-step--info .system-update-step__number {
    background: #dbeafe;
    color: #1d4ed8;
}

.system-update-step--warning .system-update-step__number {
    background: #fef3c7;
    color: #92400e;
}

.system-update-step--danger .system-update-step__number {
    background: #fee2e2;
    color: #991b1b;
}

.system-update-step--success .system-update-step__connector {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.85), rgba(16, 185, 129, 0.2));
}

.system-update-step--info .system-update-step__connector {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.85), rgba(59, 130, 246, 0.2));
}

.system-update-step--warning .system-update-step__connector {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.85), rgba(245, 158, 11, 0.2));
}

.system-update-step--danger .system-update-step__connector {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.85), rgba(239, 68, 68, 0.2));
}

.system-update-step__content {
    flex: 1;
    min-width: 0;
}

.system-update-step__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.system-update-step__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.system-update-step__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.system-update-step__badge--success {
    background: #d1fae5;
    color: #065f46;
}

.system-update-step__badge--info {
    background: #dbeafe;
    color: #1d4ed8;
}

.system-update-step__badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.system-update-step__badge--danger {
    background: #fee2e2;
    color: #991b1b;
}

.system-update-step__badge--neutral {
    background: #e5e7eb;
    color: #4b5563;
}

.system-update-step__detail {
    margin: 0.45rem 0 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #64748b;
}

.system-update-empty {
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 18px;
    border: 1px dashed #dbe4f0;
    background: #f8fafc;
    color: #475569;
}

.system-update-empty i {
    margin-bottom: 0.75rem;
    font-size: 2rem;
    color: #38bdf8;
}

.system-update-console {
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
    color: #e2e8f0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.system-update-console__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.system-update-console__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #94a3b8;
}

.system-update-console__title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
}

.system-update-console__status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.55);
    font-weight: 700;
    white-space: nowrap;
}

.system-update-console__status--success {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.3);
    color: #d1fae5;
}

.system-update-console__status--info {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(14, 165, 233, 0.3);
    color: #dbeafe;
}

.system-update-console__status--warning {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fef3c7;
}

.system-update-console__status--danger {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fee2e2;
}

.system-update-console__status--neutral {
    background: rgba(30, 41, 59, 0.72);
    color: #e2e8f0;
}

.system-update-console__progress {
    margin-bottom: 1rem;
}

.system-update-console__progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #cbd5e1;
}

.system-update-console__progress-label strong {
    color: #ffffff;
}

.system-update-console__progress-bar {
    height: 0.85rem;
    overflow: hidden;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(30, 41, 59, 0.9);
}

.system-update-console__progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #10b981 0%, #22c55e 50%, #06b6d4 100%);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
    transition: width 0.35s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.system-update-console__progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.18) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.18) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1.25rem 1.25rem;
    opacity: 0;
    pointer-events: none;
}

.system-update-console__progress-fill--running {
    animation: systemUpdateProgressGlow 1.2s linear infinite;
}

.system-update-console__progress-fill--running::after {
    opacity: 0.28;
    animation: systemUpdateProgressStripes 1.15s linear infinite;
}

.system-update-console__progress-fill--success {
    background: linear-gradient(90deg, #10b981 0%, #22c55e 50%, #06b6d4 100%);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
}

.system-update-console__progress-fill--danger {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #f97316 100%);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.45);
}

.system-update-console__progress-fill--danger::after {
    opacity: 0.16;
}

.system-update-console__progress-fill--neutral {
    background: linear-gradient(90deg, #475569 0%, #64748b 100%);
    box-shadow: 0 0 18px rgba(100, 116, 139, 0.22);
}

@keyframes systemUpdateProgressGlow {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.12);
    }

    100% {
        filter: brightness(1);
    }
}

@keyframes systemUpdateProgressStripes {
    0% {
        transform: translateX(-1.25rem);
    }

    100% {
        transform: translateX(1.25rem);
    }
}

.system-update-console__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.system-update-console__meta {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.75);
}

.system-update-console__meta span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #94a3b8;
}

.system-update-console__meta strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    word-break: break-word;
}

.system-update-console__body {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.72);
}

.system-update-console__log {
    margin: 0;
    min-height: 22rem;
    max-height: 28rem;
    overflow: auto;
    padding: 1rem 1.1rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.8rem;
    line-height: 1.75;
    color: #dbeafe;
}

/* Terminal execution log refresh */
.system-update-console {
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #111827;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.system-update-console__summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.system-update-console__summary-card,
.system-update-console__status-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.system-update-console__summary-card span,
.system-update-console__status-card span {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
}

.system-update-console__summary-card strong,
.system-update-console__status-card strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.system-update-console__diagnostics {
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    overflow: hidden;
}

.system-update-console__diagnostics[open] {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.system-update-console__diagnostics-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #475569;
    cursor: pointer;
    list-style: none;
}

.system-update-console__diagnostics-summary::-webkit-details-marker {
    display: none;
}

.system-update-console__diagnostics-summary i {
    font-size: 0.95rem;
    color: #64748b;
    transition: transform 150ms ease;
}

.system-update-console__diagnostics[open] .system-update-console__diagnostics-summary i {
    transform: rotate(180deg);
}

.system-update-console__diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

.system-update-console__progress-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.system-update-console__progress-block {
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.system-update-console__progress-label {
    color: #475569;
}

.system-update-console__progress-label strong {
    color: #0f172a;
}

.system-update-console__progress-bar {
    background: rgba(226, 232, 240, 0.95);
    border-color: rgba(148, 163, 184, 0.18);
}

.system-update-console__progress-fill {
    background: linear-gradient(90deg, #0f766e 0%, #22c55e 50%, #38bdf8 100%);
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.18);
}

.system-update-console__progress-fill--success {
    background: linear-gradient(90deg, #0f766e 0%, #22c55e 50%, #38bdf8 100%);
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.18);
}

.system-update-console__progress-fill--neutral {
    background: linear-gradient(90deg, #475569 0%, #64748b 100%);
    box-shadow: 0 0 14px rgba(100, 116, 139, 0.18);
}

.system-update-console__body {
    background: #ffffff;
}

.system-update-console__log {
    color: #0f172a;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-top: 1px solid #eef2f7;
}

@media (max-width: 1024px) {
    .system-update-console__grid {
        grid-template-columns: 1fr;
    }

    .system-update-console__summary-strip,
    .system-update-console__progress-stack {
        grid-template-columns: 1fr;
    }

    .system-update-console__diagnostics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .system-update-action {
        width: 100%;
        justify-content: center;
    }

    .system-update-definition-row,
    .system-update-step__header,
    .system-update-console__progress-label {
        flex-direction: column;
        align-items: flex-start;
    }

    .system-update-definition-row dd {
        max-width: 100%;
        text-align: left;
    }

    .system-update-console {
        padding: 1rem;
    }

    .system-update-console__log {
        min-height: 18rem;
    }

    .system-update-console__diagnostics-summary {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }
}

/* Quick Actions */
.quick-action-card {
    color: #1f2937;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-card:hover {
    transform: translateY(-1px);
}

.quick-action-icon {
    flex-shrink: 0;
}

.quick-action-blue {
    background: #eff6ff;
}

.quick-action-card.quick-action-blue:hover {
    background: #dbeafe;
}

.quick-action-icon.quick-action-blue {
    background: #dbeafe;
    color: #2563eb;
}

.quick-action-green {
    background: #ecfdf5;
}

.quick-action-card.quick-action-green:hover {
    background: #d1fae5;
}

.quick-action-icon.quick-action-green {
    background: #d1fae5;
    color: #059669;
}

.quick-action-yellow {
    background: #fefce8;
}

.quick-action-card.quick-action-yellow:hover {
    background: #fef3c7;
}

.quick-action-icon.quick-action-yellow {
    background: #fef3c7;
    color: #d97706;
}

.quick-action-pink {
    background: #fdf2f8;
}

.quick-action-card.quick-action-pink:hover {
    background: #fce7f3;
}

.quick-action-icon.quick-action-pink {
    background: #fce7f3;
    color: #db2777;
}

.quick-action-indigo {
    background: #eef2ff;
}

.quick-action-card.quick-action-indigo:hover {
    background: #e0e7ff;
}

.quick-action-icon.quick-action-indigo {
    background: #e0e7ff;
    color: #2563eb;
}

.quick-action-teal {
    background: #f0fdfa;
}

.quick-action-card.quick-action-teal:hover {
    background: #ccfbf1;
}

.quick-action-icon.quick-action-teal {
    background: #ccfbf1;
    color: #0d9488;
}

.quick-action-purple {
    background: #f5f3ff;
}

.quick-action-card.quick-action-purple:hover {
    background: #ede9fe;
}

.quick-action-icon.quick-action-purple {
    background: #ede9fe;
    color: #2563eb;
}

/* Admin error debug (superadmin topbar dropdown) */
.admin-error-debug-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    min-height: 2.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    color: #374151;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-error-debug-trigger:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.08);
}

.admin-error-debug-trigger--active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.admin-error-debug-trigger__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1;
}

.admin-error-debug-trigger__label {
    font-size: 0.875rem;
    font-weight: 500;
}

body.admin-shell.admin-theme-dark .admin-error-debug-trigger,
body.admin-shell.admin-theme-system .admin-error-debug-trigger {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    color: var(--admin-text);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .admin-error-debug-trigger:hover,
body.admin-shell.admin-theme-system .admin-error-debug-trigger:hover {
    background: var(--admin-surface-2);
    border-color: var(--admin-border-strong);
    color: var(--admin-text);
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .admin-error-debug-trigger--active,
body.admin-shell.admin-theme-system .admin-error-debug-trigger--active {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(96, 165, 250, 0.55);
    color: #93c5fd;
}

.admin-error-debug-badge {
    display: none;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.admin-error-debug-badge--visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-error-debug-dropdown .admin-dropdown-menu {
    min-width: 18rem;
}

.admin-error-debug-toggle__switch {
    flex-shrink: 0;
    margin: 0;
}

/* Runtime error terminal (post-header) */
.admin-error-debug-terminal {
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    background: #0f172a;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.admin-error-debug-terminal__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.admin-error-debug-terminal__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #e2e8f0;
}

.admin-error-debug-terminal__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-error-debug-terminal__collapse {
    min-width: 2.5rem;
    justify-content: center;
}

.admin-error-debug-terminal__viewport {
    max-height: 16rem;
    overflow: auto;
    padding: 0.75rem 1rem;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.admin-error-debug-terminal__viewport--collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

.admin-error-debug-terminal--collapsed .admin-error-debug-terminal__viewport,
html.admin-error-debug-terminal-collapsed-preload [data-admin-error-debug-terminal-wrap] .admin-error-debug-terminal__viewport {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

.admin-error-debug-terminal--collapsed .admin-error-debug-terminal__toolbar,
html.admin-error-debug-terminal-collapsed-preload [data-admin-error-debug-terminal-wrap] .admin-error-debug-terminal__toolbar {
    border-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
    .admin-error-debug-terminal__viewport {
        transition: none;
    }
}

.admin-error-debug-terminal__pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #a7f3d0;
    white-space: pre-wrap;
    word-break: break-word;
}

body.admin-shell.admin-theme-dark .admin-error-debug-terminal,
body.admin-shell.admin-theme-system .admin-error-debug-terminal {
    border-color: var(--admin-border-strong);
    background: #0b1220;
}

/* Global Search */
.admin-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    min-height: 2.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    color: #374151;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-search-trigger:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.08);
}

body.admin-shell.admin-theme-dark .admin-search-trigger,
body.admin-shell.admin-theme-system .admin-search-trigger {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    color: var(--admin-text);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .admin-search-trigger:hover,
body.admin-shell.admin-theme-system .admin-search-trigger:hover {
    background: var(--admin-surface-2);
    border-color: var(--admin-border-strong);
    color: var(--admin-text);
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .admin-search-trigger kbd,
body.admin-shell.admin-theme-system .admin-search-trigger kbd {
    background: var(--admin-surface-3);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

.admin-search-trigger kbd,
.admin-global-search-input-hint {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.admin-search-trigger kbd {
    padding: 0.28rem 0.65rem;
    border-radius: 9999px;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 0.72rem;
    line-height: 1.15;
    min-height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-shell-toolbar-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    background: transparent;
    color: #374151;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.admin-shell-toolbar-button:hover {
    color: #2563eb;
}

.admin-shell-toolbar-button--icon {
    gap: 0;
    padding: 0;
}

.admin-shell-toolbar-button--sidebar-toggle {
    display: inline-flex;
}

@media (min-width: 768px) {
    body.admin-shell .admin-shell-toolbar-button.admin-shell-toolbar-button--sidebar-toggle {
        display: none;
    }
}

body.admin-shell.admin-theme-dark .admin-shell-toolbar-button,
body.admin-shell.admin-theme-system .admin-shell-toolbar-button {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .admin-shell-toolbar-button:hover,
body.admin-shell.admin-theme-system .admin-shell-toolbar-button:hover {
    color: #93c5fd;
}

body.admin-global-search-open {
    overflow: hidden;
}

.admin-global-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(17, 24, 39, 0.64);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 1rem 1rem;
}

.admin-global-search-panel {
    width: min(760px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    transform: translateY(0);
}

.admin-global-search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.admin-global-search-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.admin-global-search-input-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0.7rem 0.95rem;
    border: 1px solid #dbe3ec;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 18px rgba(15, 23, 42, 0.05);
}

.admin-global-search-input {
    width: 100%;
    border: none;
    background: transparent;
    color: #111827;
    font-size: 1rem;
    padding: 0;
    line-height: 1.4;
    cursor: text;
}

.admin-global-search-input:focus {
    outline: none;
}

.admin-global-search-input::placeholder {
    color: #9ca3af;
}

.admin-global-search-close {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    width: auto;
    min-width: auto;
    padding: 0.45rem 0.8rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #374151;
    transition: all 0.2s ease;
    border: none;
}

.admin-global-search-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.admin-global-search-close-label {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.admin-global-search-close-label kbd {
    padding: 0.22rem 0.6rem;
    border-radius: 9999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.72rem;
    line-height: 1.15;
    min-height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-global-search-nav-hints {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.admin-global-search-nav-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.7rem;
    border-radius: 9999px;
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.admin-global-search-nav-hint kbd {
    padding: 0.22rem 0.55rem;
    border-radius: 9999px;
    background: #e5e7eb;
    color: #334155;
    font-size: 0.7rem;
    line-height: 1.15;
    min-height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-global-search-results {
    padding: 0.75rem;
    overflow-y: auto;
}

.admin-global-search-group {
    margin-bottom: 0.75rem;
}

.admin-global-search-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-global-search-group-count {
    background: #eef2ff;
    color: #4338ca;
    border-radius: 9999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
}

.admin-global-search-group-list {
    display: grid;
    gap: 0.5rem;
}

.admin-global-search-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 0.85rem 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    color: #111827;
    text-align: left;
    transition: all 0.15s ease;
}

.admin-global-search-item:hover,
.admin-global-search-item.is-active {
    transform: translateY(-1px);
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 14px 28px rgba(59, 130, 246, 0.12);
}

.admin-global-search-item-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f3f4f6;
    color: #2563eb;
    flex-shrink: 0;
}

.admin-global-search-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.admin-global-search-item-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.admin-global-search-item-label {
    font-weight: 700;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-global-search-highlight {
    padding: 0 0.14em;
    border-radius: 0.3em;
    background: rgba(250, 204, 21, 0.32);
    color: inherit;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.admin-global-search-item-group {
    color: #6b7280;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.admin-global-search-item-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.45;
}

.admin-global-search-item-arrow {
    color: #cbd5e1;
    flex-shrink: 0;
}

.admin-global-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 1.25rem;
    text-align: center;
    color: #6b7280;
}

.admin-global-search-empty-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
}

.admin-global-search-empty-error {
    background: #fef2f2;
    color: #dc2626;
}

.admin-global-search-empty p {
    margin: 0;
    font-weight: 600;
    color: #374151;
}

.admin-global-search-empty span {
    font-size: 0.875rem;
    color: #6b7280;
}

.admin-global-search-input-hint {
    display: block;
    margin: 0 0 0.5rem;
    padding: 0.65rem 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    background: #fafafa;
}

@media (max-width: 768px) {
    .admin-global-search-panel {
        max-height: 94vh;
        border-radius: 20px;
    }

    .admin-global-search-nav-hints {
        display: none;
    }

    .admin-global-search-item-topline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 768px) {
    .admin-header-title,
    .admin-header-site-name,
    .admin-view-site-label {
        display: none;
    }

    .admin-view-site-button {
        display: none;
    }

    .admin-search-trigger {
        display: none;
    }

    .admin-language-trigger-label {
        display: none;
    }

    .admin-user-dropdown-label {
        display: none;
    }
}

.quick-action-emerald {
    background: #ecfdf5;
}

.quick-action-card.quick-action-emerald:hover {
    background: #d1fae5;
}

.quick-action-icon.quick-action-emerald {
    background: #d1fae5;
    color: #059669;
}

.quick-action-orange {
    background: #fff7ed;
}

.quick-action-card.quick-action-orange:hover {
    background: #ffedd5;
}

.quick-action-icon.quick-action-orange {
    background: #ffedd5;
    color: #ea580c;
}

body.admin-shell.admin-theme-dark .quick-action-card,
body.admin-shell.admin-theme-system .quick-action-card {
    background: linear-gradient(180deg, var(--admin-surface-elevated) 0%, var(--admin-surface-2) 100%) !important;
    color: var(--admin-text) !important;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .quick-action-card:hover,
body.admin-shell.admin-theme-system .quick-action-card:hover {
    background: var(--admin-surface-2) !important;
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .quick-action-icon,
body.admin-shell.admin-theme-system .quick-action-icon {
    background-color: var(--admin-surface-3) !important;
}

body.admin-shell.admin-theme-dark .quick-action-card .text-gray-800,
body.admin-shell.admin-theme-dark .quick-action-card .text-gray-600,
body.admin-shell.admin-theme-system .quick-action-card .text-gray-800,
body.admin-shell.admin-theme-system .quick-action-card .text-gray-600 {
    color: var(--admin-text) !important;
}

body.admin-shell.admin-theme-dark aside#sidebar a.bg-blue-50,
body.admin-shell.admin-theme-dark aside#sidebar a.hover\:bg-blue-50:hover,
body.admin-shell.admin-theme-dark aside#sidebar a.bg-blue-50.text-blue-600,
body.admin-shell.admin-theme-system aside#sidebar a.bg-blue-50,
body.admin-shell.admin-theme-system aside#sidebar a.hover\:bg-blue-50:hover,
body.admin-shell.admin-theme-system aside#sidebar a.bg-blue-50.text-blue-600 {
    background-color: var(--admin-surface-3) !important;
    color: var(--admin-link-hover) !important;
}

body.admin-shell.admin-theme-dark aside#sidebar a.bg-blue-50 i,
body.admin-shell.admin-theme-dark aside#sidebar a.hover\:bg-blue-50:hover i,
body.admin-shell.admin-theme-dark aside#sidebar a.bg-blue-50.text-blue-600 i,
body.admin-shell.admin-theme-system aside#sidebar a.bg-blue-50 i,
body.admin-shell.admin-theme-system aside#sidebar a.hover\:bg-blue-50:hover i,
body.admin-shell.admin-theme-system aside#sidebar a.bg-blue-50.text-blue-600 i {
    color: inherit !important;
}

/* Form Styles */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: var(--admin-required-label, "Required");
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.12rem 0.45rem 0.12rem 1.2rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
    color: #b91c1c;
    background-color: #fef2f2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23dc2626'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.35rem center;
    background-size: 0.75rem 0.75rem;
    border: 1px solid #fecaca;
}

body.admin-shell.admin-theme-dark .form-label.required::after,
body.admin-shell.admin-theme-system .form-label.required::after {
    color: #fecaca;
    background-color: rgba(127, 29, 29, 0.35);
    border-color: rgba(248, 113, 113, 0.35);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23fca5a5'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.form-input {
    width: 100%;
    padding: 0.50rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    width: 100%;
    padding: 0.50rem 2.5rem 0.50rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.5rem center / 1.5em 1.5em;
    background-clip: padding-box;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select.error {
    border-color: #ef4444;
}

/* â”€â”€ Searchable select widget (Location Hierarchy parent selector) â”€â”€â”€â”€â”€â”€â”€â”€ */
.lh-ss-hidden-select {
    display: none !important;
}

.lh-searchable-select {
    position: relative;
}

.lh-ss-control {
    position: relative;
    display: flex;
    align-items: center;
}

.lh-ss-input {
    width: 100%;
    padding: 0.50rem 8.5rem 0.50rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    cursor: text;
}

.lh-ss-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lh-ss-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
    pointer-events: auto;
    flex-shrink: 0;
}

.lh-ss-clear {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.9rem;
    height: 1.4rem;
    padding: 0 0.7rem;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    z-index: 2;
}

.lh-ss-clear:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.lh-ss-clear:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.lh-ss-clear[hidden] {
    display: none !important;
}

.lh-ss-listbox {
    display: none;
    position: absolute;
    z-index: 9999;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.lh-ss-listbox.lh-ss-open {
    display: block;
}

.lh-ss-option {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.12s;
    line-height: 1.4;
}

.lh-ss-option:hover,
.lh-ss-option.lh-ss-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.lh-ss-option.lh-ss-selected {
    font-weight: 600;
    color: #1d4ed8;
}

.lh-ss-highlight {
    background: #fde68a;
    color: inherit;
    border-radius: 2px;
    font-style: normal;
}

.lh-ss-empty {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.lh-ss-dropdown {
    display: none;
    position: absolute;
    z-index: 9999;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.lh-ss-dropdown.lh-ss-open {
    display: block;
}

.lh-ss-dropdown .lh-ss-listbox {
    display: block;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    max-height: 240px;
    overflow-y: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.lh-ss-create-wrap {
    margin-top: 0;
    padding: 0.75rem;
    background: #f8fbff;
    border-top: 1px solid #bfdbfe;
}

.lh-ss-create-wrap[hidden] {
    display: none !important;
}

.lh-ss-create-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.lh-ss-create-button:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1e40af;
}

.lh-ss-create-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.lh-ss-create-button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.lh-ss-create-message {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #6b7280;
}

.lh-ss-create-message.is-error {
    color: #dc2626;
}

body.admin-shell.admin-theme-dark .lh-ss-input,
body.admin-shell.admin-theme-system .lh-ss-input {
    background-color: var(--admin-input-bg);
    border-color: var(--admin-input-border);
    color: var(--admin-input-text);
}

body.admin-shell.admin-theme-dark .lh-ss-input::placeholder,
body.admin-shell.admin-theme-system .lh-ss-input::placeholder {
    color: var(--admin-input-placeholder);
}

body.admin-shell.admin-theme-dark .lh-ss-input:focus,
body.admin-shell.admin-theme-system .lh-ss-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

body.admin-shell.admin-theme-dark .lh-ss-arrow,
body.admin-shell.admin-theme-system .lh-ss-arrow {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

body.admin-shell.admin-theme-dark .lh-ss-clear,
body.admin-shell.admin-theme-system .lh-ss-clear {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .lh-ss-clear:hover,
body.admin-shell.admin-theme-system .lh-ss-clear:hover {
    background: var(--admin-surface-3);
    border-color: var(--admin-border-strong);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .lh-ss-clear:focus,
body.admin-shell.admin-theme-system .lh-ss-clear:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

body.admin-shell.admin-theme-dark .lh-ss-listbox,
body.admin-shell.admin-theme-system .lh-ss-listbox {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .lh-ss-dropdown,
body.admin-shell.admin-theme-system .lh-ss-dropdown {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .lh-ss-create-wrap,
body.admin-shell.admin-theme-system .lh-ss-create-wrap {
    background: var(--admin-surface-2);
    border-top-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .lh-ss-option,
body.admin-shell.admin-theme-system .lh-ss-option {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .lh-ss-option:hover,
body.admin-shell.admin-theme-dark .lh-ss-option.lh-ss-active,
body.admin-shell.admin-theme-system .lh-ss-option:hover,
body.admin-shell.admin-theme-system .lh-ss-option.lh-ss-active {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

body.admin-shell.admin-theme-dark .lh-ss-option.lh-ss-selected,
body.admin-shell.admin-theme-system .lh-ss-option.lh-ss-selected {
    color: #bfdbfe;
}

body.admin-shell.admin-theme-dark .lh-ss-highlight,
body.admin-shell.admin-theme-system .lh-ss-highlight {
    background: rgba(251, 191, 36, 0.35);
    color: inherit;
}

body.admin-shell.admin-theme-dark .lh-ss-empty,
body.admin-shell.admin-theme-system .lh-ss-empty {
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .lh-ss-create-button,
body.admin-shell.admin-theme-system .lh-ss-create-button {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .lh-ss-create-button:hover:not(:disabled),
body.admin-shell.admin-theme-system .lh-ss-create-button:hover:not(:disabled) {
    background: var(--admin-surface-3);
    border-color: var(--admin-border-strong);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .lh-ss-create-message,
body.admin-shell.admin-theme-system .lh-ss-create-message {
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .lh-ss-create-message.is-error,
body.admin-shell.admin-theme-system .lh-ss-create-message.is-error {
    color: #fca5a5;
}

/* Shared searchable multi-select styling for feature selectors */
.feature-selector {
    overflow: visible;
}

.feature-selector .choices {
    margin-bottom: 0;
    position: relative;
    overflow: visible;
}

.feature-selector.feature-selector--open,
.feature-selector:has(.choices.is-open) {
    position: relative;
    z-index: 10000;
}

.feature-selector .choices.is-focused,
.feature-selector .choices.is-open {
    z-index: 10001;
    overflow: visible;
}

.feature-selector .choices[data-type*="select-multiple"] .choices__inner,
.feature-selector .choices[data-type*="select-one"] .choices__inner {
    min-height: 48px;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.feature-selector .choices__inner {
    min-height: 48px;
    padding: 0.375rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.feature-selector .choices__inner:focus,
.feature-selector .choices.is-focused .choices__inner,
.feature-selector .choices.is-open .choices__inner {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.feature-selector .choices__input {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
    padding: 0.25rem 0;
    min-width: 9rem;
    flex: 1 1 9rem;
    width: auto !important;
    outline: none;
}

.feature-selector .choices__input::placeholder {
    color: #9ca3af;
}

.feature-selector .choices__list--dropdown,
.feature-selector .choices__list[aria-expanded] {
    position: absolute;
    margin-top: 0.375rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    z-index: 10002;
}

.feature-selector .choices__list--dropdown .choices__item--choice {
    padding: 0.8rem 0.95rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.feature-selector .choices__list--dropdown .choices__item--choice:last-child {
    border-bottom: 0;
}

.feature-selector .choices__list--dropdown .choices__item--choice.is-highlighted {
    background: #eff6ff;
    color: #1d4ed8;
}

.feature-selector .choices__list--dropdown .choices__item--choice:hover {
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
}

body.admin-shell.admin-theme-dark .feature-selector .choices__inner,
body.admin-shell.admin-theme-system .feature-selector .choices__inner {
    background: var(--admin-input-bg);
    border-color: var(--admin-input-border);
    color: var(--admin-input-text);
}

body.admin-shell.admin-theme-dark .feature-selector .choices__inner:focus,
body.admin-shell.admin-theme-dark .feature-selector .choices.is-focused .choices__inner,
body.admin-shell.admin-theme-dark .feature-selector .choices.is-open .choices__inner,
body.admin-shell.admin-theme-system .feature-selector .choices__inner:focus,
body.admin-shell.admin-theme-system .feature-selector .choices.is-focused .choices__inner,
body.admin-shell.admin-theme-system .feature-selector .choices.is-open .choices__inner {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

body.admin-shell.admin-theme-dark .feature-selector .choices__input,
body.admin-shell.admin-theme-system .feature-selector .choices__input {
    color: var(--admin-input-text);
}

body.admin-shell.admin-theme-dark .feature-selector .choices__input::placeholder,
body.admin-shell.admin-theme-system .feature-selector .choices__input::placeholder {
    color: var(--admin-input-placeholder);
}

body.admin-shell.admin-theme-dark .feature-selector .choices__list--dropdown,
body.admin-shell.admin-theme-system .feature-selector .choices__list--dropdown {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .feature-selector .choices__list--dropdown .choices__item--choice,
body.admin-shell.admin-theme-system .feature-selector .choices__list--dropdown .choices__item--choice {
    border-bottom-color: var(--admin-border);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .feature-selector .choices__list--dropdown .choices__item--choice.is-highlighted,
body.admin-shell.admin-theme-dark .feature-selector .choices__list--dropdown .choices__item--choice:hover,
body.admin-shell.admin-theme-system .feature-selector .choices__list--dropdown .choices__item--choice.is-highlighted,
body.admin-shell.admin-theme-system .feature-selector .choices__list--dropdown .choices__item--choice:hover {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

.feature-selector__choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
}

.feature-selector__choice-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    font-weight: 500;
}

.feature-selector__choice-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.feature-selector__choice-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.feature-selector .choices__list--multiple .choices__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid #1d4ed8;
    border-radius: 9999px;
    color: #fff;
    padding: 0.22rem 0.72rem;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.25;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.18);
}

.feature-selector .choices__list--multiple .choices__item.is-highlighted {
    background-color: #2563eb;
    border-color: #1d4ed8;
}

.feature-selector .choices[data-type*="select-multiple"] .choices__button,
.feature-selector .choices[data-type*="text"] .choices__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1rem;
    min-width: 1rem;
    height: 1rem;
    border: 0;
    margin-left: 0.35rem;
    padding: 0;
    border-radius: 9999px;
    cursor: pointer;
    opacity: 1;
    color: #fff;
    -webkit-mask: none;
    mask: none;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    position: relative;
    transition: background-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.feature-selector .choices[data-type*="select-multiple"] .choices__button:hover,
.feature-selector .choices[data-type*="text"] .choices__button:hover,
.feature-selector .choices[data-type*="select-multiple"] .choices__button:focus,
.feature-selector .choices[data-type*="text"] .choices__button:focus {
    background-color: #b91c1c;
    transform: scale(1.05);
    color: #fff;
}

.feature-selector .choices__list--multiple {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    row-gap: 0.35rem;
}

.feature-selector__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.feature-selector__item-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.feature-selector__help {
    margin-top: 0.5rem;
    color: #4b5563;
}

.feature-selector__quick-add-button {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-selector__quick-add-button:hover {
    border-color: #3b82f6;
    color: #2563eb;
    background: #eff6ff;
}

.feature-selector__quick-add-button.is-active {
    border-color: #3b82f6;
    color: #1d4ed8;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-help {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Content management form help blocks */
.content-management-form .form-help {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    margin-top: 0.375rem;
    border-radius: 0.5rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.14);
    color: #1e3a8a;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.content-management-form .form-help:not(.form-help--explicit-icon)::before {
    content: "\f05a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    flex: 0 0 auto;
    margin-top: 0.1rem;
    color: currentColor;
}

.content-management-form .form-help i {
    color: currentColor !important;
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.content-management-form .form-help span {
    flex: 1 1 auto;
}

.content-management-form .form-help a {
    color: #1d4ed8;
    text-decoration: underline;
    font-weight: 600;
}

.content-management-form .form-help.text-amber-600,
.content-management-form .form-help.text-red-600,
.content-management-form .form-help.text-green-600 {
    background: inherit;
    color: inherit;
    padding: 0;
    border-radius: 0;
    display: block;
}

.content-management-form .form-help.text-amber-600::before,
.content-management-form .form-help.text-red-600::before,
.content-management-form .form-help.text-green-600::before {
    content: none;
}

.content-management-form .form-help.form-help--permalink-status-success {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    margin-top: 0.375rem;
    border-radius: 0.5rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: #166534;
}

.content-management-form .form-help.form-help--permalink-status-success::before {
    content: none;
}

/* Settings form help blocks */
.settings-form .form-help {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    margin-top: 0.375rem;
    border-radius: 0.5rem;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.14);
    color: #1e3a8a;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.settings-form .form-help:not(.form-help--explicit-icon)::before {
    content: "\f05a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    flex: 0 0 auto;
    margin-top: 0.1rem;
    color: currentColor;
}

.settings-form .form-help i {
    color: currentColor !important;
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.settings-form .form-help span {
    flex: 1 1 auto;
}

.settings-form .form-help a {
    color: #1d4ed8;
    text-decoration: underline;
    font-weight: 600;
}

.settings-form .form-help.text-amber-600,
.settings-form .form-help.text-red-600,
.settings-form .form-help.text-green-600 {
    background: inherit;
    color: inherit;
    padding: 0;
    border-radius: 0;
    display: block;
}

.settings-form .form-help.text-amber-600::before,
.settings-form .form-help.text-red-600::before,
.settings-form .form-help.text-green-600::before {
    content: none;
}

.settings-form .form-help.form-help--permalink-status-success {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    margin-top: 0.375rem;
    border-radius: 0.5rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: #166534;
}

.settings-form .form-help.form-help--permalink-status-success::before {
    content: none;
}

/* ========================================
   BUTTON STYLES - Global Gradient System
   ======================================== */

/* Base Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

/* Primary - Blue Gradient (Main Brand) */
.btn-primary {
    background: var(--gradient-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--gradient-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.22);
}

/* Success - Green Gradient */
.btn-success {
    background: var(--gradient-green);
    color: white;
}

.btn-success:hover {
    background: var(--gradient-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22);
}

/* Danger - Red Gradient */
.btn-danger {
    background: var(--gradient-red);
    color: white;
}

.btn-danger:hover {
    background: var(--gradient-red-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.22);
}

/* Warning/Orange - Orange Gradient */
.btn-warning,
.btn-orange {
    background: var(--gradient-orange);
    color: white;
}

.btn-warning:hover,
.btn-orange:hover {
    background: var(--gradient-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 145, 19, 0.22);
}

/* Bone / off-white — list header drafts and similar soft actions */
.btn-bone {
    background: #d4c6b0;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-bone:hover,
.btn-bone:focus-visible {
    background: #c6b69c;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 164, 136, 0.35);
}

.btn-bone.btn-bone--active {
    background: #c0ae94;
    color: #ffffff;
}

.admin-card-header__actions .btn-bone,
.admin-gradient-header__actions .btn-bone {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

.admin-card-header__actions .btn-bone i,
.admin-gradient-header__actions .btn-bone i {
    color: #ffffff;
}

body.admin-shell.admin-theme-dark .btn-bone {
    background: #c9bba6;
    color: #ffffff;
}

body.admin-shell.admin-theme-dark .btn-bone:hover,
body.admin-shell.admin-theme-dark .btn-bone:focus-visible {
    background: #b8a890;
    color: #ffffff;
}

.admin-action-btn--with-badge {
    position: relative;
}

.admin-action-btn--with-badge.is-active,
.btn-secondary.admin-action-btn--with-badge.is-active {
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.55);
}

.admin-action-btn__badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

body.admin-shell.admin-theme-dark .admin-action-btn__badge {
    box-shadow: 0 0 0 2px #1f2937;
}

/* Secondary - Elevated Surface */
.btn-secondary {
    background: var(--admin-button-secondary-bg, #ffffff);
    color: var(--admin-button-secondary-text, #1d4ed8);
    border: 1px solid var(--admin-button-secondary-border, #bfdbfe);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--admin-button-secondary-hover-bg, #eff6ff);
    color: var(--admin-button-secondary-hover-text, #1d4ed8);
    border-color: var(--admin-button-secondary-hover-border, #93c5fd);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.16);
}

/* Additional Gradient Buttons */

/* Purple Gradient */
.btn-purple {
    background: var(--gradient-purple);
    color: white;
}

.btn-purple:hover {
    background: var(--gradient-purple-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Yellow Gradient */
.btn-yellow {
    background: var(--gradient-yellow);
    color: white;
}

.btn-yellow:hover {
    background: var(--gradient-yellow-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Outline Button (No Gradient) */
.btn-outline {
    background: transparent;
    border: 1px solid var(--admin-button-secondary-border, #bfdbfe);
    color: var(--admin-button-secondary-text, #1d4ed8);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: var(--admin-button-secondary-hover-bg, #eff6ff);
    border-color: var(--admin-button-secondary-hover-border, #93c5fd);
    color: var(--admin-button-secondary-hover-text, #1d4ed8);
}

/* Legacy outline aliases retained for older button markup */
.btn-outline-primary,
.btn-outline-blue {
    background: transparent;
    border: 2px solid rgba(59, 130, 246, 0.35);
    color: #1d4ed8;
}

.btn-outline-primary:hover,
.btn-outline-blue:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.55);
    color: #1d4ed8;
}

.btn-outline-secondary,
.btn-outline-gray {
    background: transparent;
    border: 1px solid var(--admin-button-secondary-border, #bfdbfe);
    color: var(--admin-button-secondary-text, #1d4ed8);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible,
.btn-outline-gray:hover,
.btn-outline-gray:focus-visible {
    background: var(--admin-button-secondary-hover-bg, #eff6ff);
    border-color: var(--admin-button-secondary-hover-border, #93c5fd);
    color: var(--admin-button-secondary-hover-text, #1d4ed8);
}

.btn-outline-success,
.btn-outline-emerald {
    background: transparent;
    border: 2px solid rgba(16, 185, 129, 0.35);
    color: #059669;
}

.btn-outline-success:hover,
.btn-outline-emerald:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.55);
    color: #047857;
}

.btn-outline-warning,
.btn-outline-orange {
    background: transparent;
    border: 2px solid rgba(245, 158, 11, 0.35);
    color: #d97706;
}

.btn-outline-warning:hover,
.btn-outline-orange:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.55);
    color: #b45309;
}

.btn-outline-danger,
.btn-outline-red {
    background: transparent;
    border: 2px solid rgba(220, 38, 38, 0.35);
    color: #dc2626;
}

.btn-outline-danger:hover,
.btn-outline-red:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.55);
    color: #b91c1c;
}

.btn-outline-purple {
    background: transparent;
    border: 2px solid rgba(37, 99, 235, 0.35);
    color: #2563eb;
}

.btn-outline-purple:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.55);
    color: #1d4ed8;
}

/* White Button */
.btn-white {
    background: #ffffff;
    border: 2px solid #ffffff;
    color: #0f172a;
}

.btn-white:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

/* Button Sizes */
.btn-xs {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
    min-width: auto;
}

.btn-xs-tight {
    padding: 0.4375rem 0.625rem;
    font-size: 0.6875rem;
    min-width: auto;
}

.btn-xs-tight i {
    font-size: 0.75rem;
}

.btn-sm {
    padding: 0.6875rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Disabled State */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Alias Classes for Specific Actions */
/* âš ï¸ DEPRECATED: These classes are maintained for backward compatibility only.
   Use standard button variants instead:
   - .btn-edit â†’ Use .btn-success instead
   - .btn-view â†’ Use .btn-primary instead
   - .btn-delete â†’ Use .btn-danger instead
   - .btn-clear â†’ Use .btn-danger instead
   See docs/BUTTON_COMPONENT_GUIDE.md for details */

.btn-edit {
    background: var(--gradient-green);
    color: white;
}

.btn-edit:hover {
    background: var(--gradient-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-view {
    background: var(--gradient-blue);
    color: white;
}

.btn-view:hover {
    background: var(--gradient-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-delete,
.btn-clear {
    background: var(--gradient-red);
    color: white;
}

.btn-delete:hover,
.btn-clear:hover {
    background: var(--gradient-red-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Shared admin action bar layout fallback */
.admin-action-bar {
    margin-bottom: 1.5rem;
}

.admin-action-bar__container {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.admin-action-bar__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.admin-action-bar__container .btn {
    flex: 0 0 auto;
}

/* Shared KPI grid fallback */
.admin-metric-grid {
    display: grid;
    gap: 1rem;
}

.admin-metric-grid--content-management,
.admin-metric-grid--content-management-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-metric-grid--dashboard {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.admin-metric-grid--dashboard-summary {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.admin-metric-grid--cache-control,
.admin-metric-grid--cache-config,
.admin-metric-grid--cache-analytics,
.admin-metric-grid--cache-link-preload,
.admin-metric-grid--language-management,
.admin-metric-grid--language-management-translations,
.admin-metric-grid--module-manager,
.admin-metric-grid--integrations-provider-usage,
.admin-metric-grid--integrations-analytics-row {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.admin-metric-grid--metric-progress-list {
    display: block;
}

.admin-metric-grid--metric-progress-list > * + * {
    margin-top: 0.75rem;
}

@media (min-width: 640px) {
    .admin-metric-grid--language-management,
    .admin-metric-grid--language-management-translations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metric-grid--dashboard:not(.admin-metric-grid--dashboard-summary) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metric-grid--dashboard-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .admin-metric-grid--content-management,
    .admin-metric-grid--content-management-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-metric-grid--dashboard:not(.admin-metric-grid--dashboard-summary) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-metric-grid--cache-control {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-metric-grid--cache-config,
    .admin-metric-grid--cache-analytics,
    .admin-metric-grid--cache-link-preload,
    .admin-metric-grid--integrations-analytics-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metric-grid--language-management {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-metric-grid--language-management-translations,
    .admin-metric-grid--integrations-provider-usage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .admin-metric-grid--integrations-provider-usage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .admin-metric-grid--language-management {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .admin-metric-grid--language-management-translations {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-metric-grid--cache-config,
    .admin-metric-grid--cache-analytics,
    .admin-metric-grid--cache-link-preload {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-metric-grid--module-manager {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .admin-metric-grid--integrations-analytics-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ========================================
   ADMIN AUTH SHELL
   ======================================== */

body.admin-auth-shell {
    color: #0f172a;
    color-scheme: light;
}

body.admin-auth-shell .admin-auth-shell__bg {
    min-height: 100vh;
    background: var(--gradient-blue);
}

body.admin-auth-shell .admin-auth-shell__page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1rem;
}

body.admin-auth-shell .admin-auth-shell__stack {
    width: 100%;
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

body.admin-auth-shell .admin-auth-shell__hero {
    min-height: 13.5rem;
    text-align: center;
}

body.admin-auth-shell .admin-auth-shell__title {
    color: #ffffff;
}

body.admin-auth-shell .admin-auth-shell__card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

body.admin-auth-shell .admin-auth-shell__logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: fit-content;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.admin-auth-shell .admin-auth-shell__logo-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.15);
}

body.admin-auth-shell .admin-auth-shell__logo {
    display: block;
    height: 5.75rem;
    width: auto;
    max-width: none;
    transition: filter 0.2s ease;
}

body.admin-auth-shell .admin-auth-shell__preferences {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

body.admin-auth-shell .admin-auth-shell__choice-group {
    padding-top: 1.25rem;
    border-top: 1px solid #d1d5db;
}

body.admin-auth-shell .admin-auth-shell__choice-label {
    margin: 0 0 0.75rem;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

body.admin-auth-shell .admin-auth-shell__choice-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

body.admin-auth-shell .admin-auth-shell__choice-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.625rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.admin-auth-shell .admin-auth-shell__choice-link:hover,
body.admin-auth-shell .admin-auth-shell__choice-link:focus-visible {
    transform: translateY(-1px);
    background: #f9fafb;
    border-color: #cbd5e1;
    color: #1d4ed8;
    outline: none;
}

body.admin-auth-shell .admin-auth-shell__choice-link--active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

body.admin-auth-shell .admin-auth-shell__choice-link--language {
    min-width: 8rem;
    justify-content: flex-start;
}

body.admin-auth-shell .admin-auth-shell__choice-link--theme {
    min-width: 7.25rem;
    justify-content: center;
}

body.admin-auth-shell .admin-auth-shell__choice-flag,
body.admin-auth-shell .admin-auth-shell__choice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.admin-auth-shell .admin-auth-shell__choice-icon {
    font-size: 0.95rem;
}

body.admin-auth-shell .admin-auth-shell__choice-text {
    white-space: nowrap;
}

body.admin-auth-shell .admin-auth-shell__alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
}

body.admin-auth-shell .admin-auth-shell__alert--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

body.admin-auth-shell .admin-auth-shell__alert--success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

body.admin-auth-shell .admin-auth-shell__alert--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

body.admin-auth-shell .admin-auth-shell__label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

body.admin-auth-shell .admin-auth-shell__input {
    appearance: none;
    display: block;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #ffffff;
    padding: 0.5rem 0.75rem;
    color: #111827;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

body.admin-auth-shell .admin-auth-shell__input::placeholder {
    color: #9ca3af;
}

body.admin-auth-shell .admin-auth-shell__input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

body.admin-auth-shell .admin-auth-shell__input--icon {
    padding-right: 2.5rem;
}

body.admin-auth-shell .admin-auth-shell__checkbox {
    border: 1px solid #d1d5db;
    accent-color: #2563eb;
}

body.admin-auth-shell .admin-auth-shell__icon-button {
    position: absolute;
    inset: 0 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 0.75rem;
    color: #9ca3af;
}

body.admin-auth-shell .admin-auth-shell__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.admin-auth-shell .admin-auth-shell__btn:hover {
    transform: translateY(-1px);
}

body.admin-auth-shell .admin-auth-shell__btn--primary {
    background: #2563eb;
    color: #ffffff;
}

body.admin-auth-shell .admin-auth-shell__btn--primary:hover {
    background: #1d4ed8;
}

body.admin-auth-shell .admin-auth-shell__btn--secondary {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

body.admin-auth-shell .admin-auth-shell__btn--secondary:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
}

body.admin-auth-shell .admin-auth-shell__surface {
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 1rem;
}

body.admin-auth-shell .admin-auth-shell__surface--soft {
    background: #f1f5f9;
}

body.admin-auth-shell .admin-auth-shell__surface--warning {
    background: #fffbeb;
    border-color: #fde68a;
}

body.admin-auth-shell .admin-auth-shell__surface--success {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

body.admin-auth-shell .admin-auth-shell__surface--danger {
    background: #fef2f2;
    border-color: #fecaca;
}

body.admin-auth-shell .admin-auth-shell__muted {
    color: #6b7280;
}

body.admin-auth-shell .admin-auth-shell__link {
    color: #2563eb;
    transition: color 0.2s ease, opacity 0.2s ease;
}

body.admin-auth-shell .admin-auth-shell__link:hover {
    color: #1d4ed8;
}

body.admin-auth-shell .admin-auth-shell__footer {
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}

body.admin-auth-shell .admin-auth-shell__password-strength {
    height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

body.admin-auth-shell .admin-auth-shell__password-strength-bar {
    height: 100%;
    border-radius: 999px;
    transition: all 0.3s ease;
}

body.admin-auth-shell .admin-auth-shell__password-strength-bar--weak {
    background: #ef4444;
    width: 25%;
}

body.admin-auth-shell .admin-auth-shell__password-strength-bar--fair {
    background: #f59e0b;
    width: 50%;
}

body.admin-auth-shell .admin-auth-shell__password-strength-bar--good {
    background: #10b981;
    width: 75%;
}

body.admin-auth-shell .admin-auth-shell__password-strength-bar--strong {
    background: #059669;
    width: 100%;
}

@media (prefers-color-scheme: dark) {
    body.admin-auth-shell.admin-theme-system .admin-auth-shell__bg {
        background: linear-gradient(135deg, #020617 0%, #0f172a 55%, #111827 100%);
    }

    body.admin-auth-shell.admin-theme-system {
        color-scheme: dark;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__card {
        background: rgba(15, 23, 42, 0.92);
        border-color: rgba(148, 163, 184, 0.18);
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__logo-box {
        background: rgba(15, 23, 42, 0.82);
        border-color: rgba(148, 163, 184, 0.18);
        box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3);
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__logo {
        filter: brightness(0) invert(1);
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__label,
    body.admin-auth-shell.admin-theme-system .admin-auth-shell__muted {
        color: #cbd5e1;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__input {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
        box-shadow: none;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__input::placeholder {
        color: #94a3b8;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__input:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__btn--secondary {
        background: #1e293b;
        border-color: #475569;
        color: #e2e8f0;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__btn--secondary:hover {
        background: #334155;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__surface {
        background: #0f172a;
        border-color: #334155;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__surface--soft {
        background: #111827;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__surface--warning {
        background: #451a03;
        border-color: #b45309;
        color: #fef3c7;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__surface--success {
        background: #052e16;
        border-color: #166534;
        color: #dcfce7;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__surface--danger {
        background: #450a0a;
        border-color: #991b1b;
        color: #fee2e2;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__alert--error {
        background: #450a0a;
        border-color: #991b1b;
        color: #fee2e2;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__alert--success {
        background: #052e16;
        border-color: #166534;
        color: #dcfce7;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__alert--warning {
        background: #451a03;
        border-color: #b45309;
        color: #fef3c7;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__link {
        color: #93c5fd;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__link:hover {
        color: #bfdbfe;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__footer {
        color: rgba(226, 232, 240, 0.75);
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__password-strength {
        background: #334155;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__choice-group {
        border-top-color: #334155;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__choice-label {
        color: #cbd5e1;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__choice-link {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__choice-link:hover,
    body.admin-auth-shell.admin-theme-system .admin-auth-shell__choice-link:focus-visible {
        background: #111827;
        border-color: #475569;
        color: #bfdbfe;
    }

    body.admin-auth-shell.admin-theme-system .admin-auth-shell__choice-link--active {
        background: rgba(37, 99, 235, 0.2);
        border-color: rgba(96, 165, 250, 0.45);
        color: #dbeafe;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    }
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__bg {
    background: linear-gradient(135deg, #020617 0%, #0f172a 55%, #111827 100%);
}

body.admin-auth-shell.admin-theme-dark {
    color-scheme: dark;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__card {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__logo-box {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3);
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__logo {
    filter: brightness(0) invert(1);
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__label,
body.admin-auth-shell.admin-theme-dark .admin-auth-shell__muted {
    color: #cbd5e1;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
    box-shadow: none;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__checkbox {
    border-color: #475569;
    accent-color: #60a5fa;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__input::placeholder {
    color: #94a3b8;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__btn--secondary {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__btn--secondary:hover {
    background: #334155;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__surface {
    background: #0f172a;
    border-color: #334155;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__surface--soft {
    background: #111827;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__surface--warning {
    background: #451a03;
    border-color: #b45309;
    color: #fef3c7;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__surface--success {
    background: #052e16;
    border-color: #166534;
    color: #dcfce7;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__surface--danger {
    background: #450a0a;
    border-color: #991b1b;
    color: #fee2e2;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__alert--error {
    background: #450a0a;
    border-color: #991b1b;
    color: #fee2e2;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__alert--success {
    background: #052e16;
    border-color: #166534;
    color: #dcfce7;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__alert--warning {
    background: #451a03;
    border-color: #b45309;
    color: #fef3c7;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__link {
    color: #93c5fd;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__link:hover {
    color: #bfdbfe;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__footer {
    color: rgba(226, 232, 240, 0.75);
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__password-strength {
    background: #334155;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__choice-group {
    border-top-color: #334155;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__choice-label {
    color: #cbd5e1;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__choice-link {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__choice-link:hover,
body.admin-auth-shell.admin-theme-dark .admin-auth-shell__choice-link:focus-visible {
    background: #111827;
    border-color: #475569;
    color: #bfdbfe;
}

body.admin-auth-shell.admin-theme-dark .admin-auth-shell__choice-link--active {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.45);
    color: #dbeafe;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

/* ========================================
   ADMIN FEATURE BADGE COMPACT CELL
   ======================================== */

.admin-table td:has(.admin-feature-badges-compact),
.admin-table th:has(.admin-feature-badges-compact) {
    overflow: visible;
}

.admin-feature-badges-compact {
    position: relative;
}

.admin-feature-badge-pill {
    line-height: 1.2;
}

.admin-feature-badges-compact__overflow {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.admin-feature-badges-compact__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.625rem;
    height: 1.625rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
    color: var(--admin-text-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-feature-badges-compact__count:hover,
.admin-feature-badges-compact__count:focus-visible {
    background: color-mix(in srgb, var(--admin-accent, #2563eb) 12%, var(--admin-surface-2));
    border-color: color-mix(in srgb, var(--admin-accent, #2563eb) 35%, var(--admin-border));
    color: var(--admin-accent, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
    outline: none;
}

.admin-feature-badges-compact__popover {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.45rem);
    z-index: 120;
    min-width: 11rem;
    max-width: 16rem;
    padding: 0.625rem;
    border-radius: 0.75rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-elevated);
    color: var(--admin-text);
    box-shadow: var(--admin-shadow-panel);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.admin-feature-badges-compact__popover::after {
    content: '';
    position: absolute;
    left: 0.85rem;
    top: 100%;
    width: 0.65rem;
    height: 0.65rem;
    background: var(--admin-surface-elevated);
    border-right: 1px solid var(--admin-border);
    border-bottom: 1px solid var(--admin-border);
    transform: translateY(-50%) rotate(45deg);
}

.admin-feature-badges-compact__popover-title {
    margin-bottom: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--admin-text-muted);
}

.admin-feature-badges-compact__popover-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
}

.admin-feature-badges-compact__overflow:hover .admin-feature-badges-compact__popover,
.admin-feature-badges-compact__overflow:focus-within .admin-feature-badges-compact__popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ========================================
   TOOLTIP COMPONENT
   ======================================== */

.admin-tooltip {
    opacity: 0;
}

.admin-tooltip.show {
    opacity: 1;
}

/* Table Styles */
.admin-table {
    width: 100%;
    background: var(--admin-surface-elevated);
    color: var(--admin-text);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
    table-layout: auto; /* Allow flexible column widths based on content and constraints */
}

.admin-table th {
    background: var(--admin-surface-2);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--admin-text);
    border-bottom: 1px solid var(--admin-border);
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

/* Flexible columns - allow growth (flex-1 works differently in tables, we use min-width + auto width) */
.admin-table th[class*="min-w"],
.admin-table td[class*="min-w"] {
    width: auto; /* Allow columns to grow beyond min-width */
}

/* Fixed width columns */
.admin-table th[class*="w-["],
.admin-table td[class*="w-["] {
    width: var(--col-width, auto); /* Fixed width from Tailwind classes */
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
    color: var(--admin-text);
    font-size: 0.875rem;
}

.admin-table-cell-truncate {
    display: block;
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--admin-text-muted);
}

.admin-table-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 7.5rem;
}

.admin-table-actions__dropdown {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
}

.admin-table-actions__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    white-space: nowrap;
    transition: transform 160ms ease;
}

.admin-table-actions__toggle:hover,
.admin-table-actions__toggle:focus-visible {
    background: transparent;
    border-color: #e5e7eb;
    color: #374151;
    transform: scale(1.03);
    box-shadow: none;
}

.admin-table-actions__toggle-chevron {
    font-size: 0.65rem;
    transition: transform 160ms ease;
}

.admin-table-actions__toggle[aria-expanded="true"] .admin-table-actions__toggle-chevron {
    transform: rotate(180deg);
}

.admin-table-actions__menu {
    position: absolute;
    z-index: 10000;
    top: calc(100% + 0.35rem);
    right: 0;
    display: grid;
    min-width: 11rem;
    max-width: min(15rem, calc(100vw - 1.5rem));
    padding: 0.35rem;
    gap: 0.15rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.65rem;
    background: var(--admin-surface, var(--dcm-surface-elevated));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.admin-table-actions__menu[hidden] {
    display: none;
}

.admin-table-actions__menu .admin-table-actions__button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.35rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.45rem;
    text-align: left;
}

.admin-table-actions__menu a.btn,
.admin-table-actions__menu button.btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.35rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.45rem;
    text-align: left;
}

.admin-table-actions__menu > a:not(.btn),
.admin-table-actions__menu > button:not(.btn),
.admin-table-actions__menu > form,
.admin-table-actions__menu > form > button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.35rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.45rem;
    text-align: left;
}

/* Keep legacy action variants readable when the menu is positioned above a row. */
.admin-table-actions__menu a.btn-edit,
.admin-table-actions__menu button.btn-edit,
.admin-table-actions__menu a.btn-success,
.admin-table-actions__menu button.btn-success {
    background: var(--gradient-green);
    color: #fff;
}

.admin-table-actions__menu a.btn-view,
.admin-table-actions__menu button.btn-view,
.admin-table-actions__menu a.btn-info,
.admin-table-actions__menu button.btn-info,
.admin-table-actions__menu a.btn-purple,
.admin-table-actions__menu button.btn-purple,
.admin-table-actions__menu a.btn-primary,
.admin-table-actions__menu button.btn-primary {
    background: var(--gradient-blue);
    color: #fff;
}

.admin-table-actions__menu a.btn-delete,
.admin-table-actions__menu button.btn-delete,
.admin-table-actions__menu a.btn-clear,
.admin-table-actions__menu button.btn-clear,
.admin-table-actions__menu a.btn-danger,
.admin-table-actions__menu button.btn-danger {
    background: var(--gradient-red);
    color: #fff;
}

.admin-table-actions__menu a.btn-warning,
.admin-table-actions__menu button.btn-warning,
.admin-table-actions__menu a.btn-orange,
.admin-table-actions__menu button.btn-orange {
    background: var(--gradient-orange);
    color: #fff;
}

.admin-table-actions__menu a.btn-edit:hover,
.admin-table-actions__menu button.btn-edit:hover,
.admin-table-actions__menu a.btn-success:hover,
.admin-table-actions__menu button.btn-success:hover,
.admin-table-actions__menu a.btn-view:hover,
.admin-table-actions__menu button.btn-view:hover,
.admin-table-actions__menu a.btn-info:hover,
.admin-table-actions__menu button.btn-info:hover,
.admin-table-actions__menu a.btn-purple:hover,
.admin-table-actions__menu button.btn-purple:hover,
.admin-table-actions__menu a.btn-primary:hover,
.admin-table-actions__menu button.btn-primary:hover,
.admin-table-actions__menu a.btn-delete:hover,
.admin-table-actions__menu button.btn-delete:hover,
.admin-table-actions__menu a.btn-clear:hover,
.admin-table-actions__menu button.btn-clear:hover,
.admin-table-actions__menu a.btn-danger:hover,
.admin-table-actions__menu button.btn-danger:hover,
.admin-table-actions__menu a.btn-warning:hover,
.admin-table-actions__menu button.btn-warning:hover,
.admin-table-actions__menu a.btn-orange:hover,
.admin-table-actions__menu button.btn-orange:hover {
    color: #fff;
}

.admin-table-actions__menu a.btn:hover,
.admin-table-actions__menu button.btn:hover,
.admin-table-actions__menu > a:not(.btn):hover,
.admin-table-actions__menu > button:not(.btn):hover,
.admin-table-actions__menu > form:hover,
.admin-table-actions__menu > form > button:hover {
    transform: none;
    box-shadow: none;
}

.admin-table-actions__menu a.btn-edit:hover,
.admin-table-actions__menu button.btn-edit:hover,
.admin-table-actions__menu a.btn-success:hover,
.admin-table-actions__menu button.btn-success:hover {
    background: var(--gradient-green);
}

.admin-table-actions__menu a.btn-view:hover,
.admin-table-actions__menu button.btn-view:hover,
.admin-table-actions__menu a.btn-info:hover,
.admin-table-actions__menu button.btn-info:hover,
.admin-table-actions__menu a.btn-purple:hover,
.admin-table-actions__menu button.btn-purple:hover,
.admin-table-actions__menu a.btn-primary:hover,
.admin-table-actions__menu button.btn-primary:hover {
    background: var(--gradient-blue);
}

.admin-table-actions__menu a.btn-delete:hover,
.admin-table-actions__menu button.btn-delete:hover,
.admin-table-actions__menu a.btn-clear:hover,
.admin-table-actions__menu button.btn-clear:hover,
.admin-table-actions__menu a.btn-danger:hover,
.admin-table-actions__menu button.btn-danger:hover {
    background: var(--gradient-red);
}

.admin-table-actions__menu a.btn-warning:hover,
.admin-table-actions__menu button.btn-warning:hover,
.admin-table-actions__menu a.btn-orange:hover,
.admin-table-actions__menu button.btn-orange:hover {
    background: var(--gradient-orange);
}

.admin-table-actions__menu .admin-table-actions__button:hover,
.admin-table-actions__menu .admin-table-actions__button:focus-visible {
    background: var(--admin-surface-2);
}

.admin-table-actions__menu .admin-table-actions__button--delete:hover,
.admin-table-actions__menu .admin-table-actions__button--delete:focus-visible {
    background: var(--admin-danger-surface, rgba(239, 68, 68, 0.1));
}

/* Final hover contract: action colours must not be replaced by the generic
   table-button hover surface. */
.admin-table-actions__menu a.btn-edit:hover,
.admin-table-actions__menu button.btn-edit:hover,
.admin-table-actions__menu a.btn-success:hover,
.admin-table-actions__menu button.btn-success:hover {
    background: var(--gradient-green);
    color: #fff;
}

.admin-table-actions__menu a.btn-view:hover,
.admin-table-actions__menu button.btn-view:hover,
.admin-table-actions__menu a.btn-info:hover,
.admin-table-actions__menu button.btn-info:hover,
.admin-table-actions__menu a.btn-purple:hover,
.admin-table-actions__menu button.btn-purple:hover,
.admin-table-actions__menu a.btn-primary:hover,
.admin-table-actions__menu button.btn-primary:hover {
    background: var(--gradient-blue);
    color: #fff;
}

.admin-table-actions__menu a.btn-delete:hover,
.admin-table-actions__menu button.btn-delete:hover,
.admin-table-actions__menu a.btn-clear:hover,
.admin-table-actions__menu button.btn-clear:hover,
.admin-table-actions__menu a.btn-danger:hover,
.admin-table-actions__menu button.btn-danger:hover {
    background: var(--gradient-red);
    color: #fff;
}

.admin-table-actions__menu a.btn-warning:hover,
.admin-table-actions__menu button.btn-warning:hover,
.admin-table-actions__menu a.btn-orange:hover,
.admin-table-actions__menu button.btn-orange:hover {
    background: var(--gradient-orange);
    color: #fff;
}

.admin-table-actions__menu a.btn:hover,
.admin-table-actions__menu button.btn:hover,
.admin-table-actions__menu > a:not(.btn):hover,
.admin-table-actions__menu > button:not(.btn):hover,
.admin-table-actions__menu > form:hover,
.admin-table-actions__menu > form > button:hover {
    transform: none;
    box-shadow: none;
}

.admin-table-actions__button {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 2rem;
    padding: 0.375rem 0.55rem;
    font-size: 0.6875rem;
    line-height: 1.1;
    text-decoration: none;
    box-shadow: none;
}

@media (max-width: 767px) {
    .admin-table-wrap,
    .admin-card-surface--table .admin-card-surface__body,
    .overflow-x-auto:has(.admin-table) {
        -webkit-overflow-scrolling: touch;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.625rem 0.75rem;
    }

    .admin-table-actions__button span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .admin-table-actions {
        min-width: 0;
    }

    .admin-table-actions__toggle {
        min-height: 2.75rem;
        padding: 0.55rem 0.7rem;
    }

    .admin-table-actions__toggle span {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
    }

    .admin-table-actions__menu .admin-table-actions__button span {
        position: static;
        width: auto;
        height: auto;
        margin: 0 0 0 0.35rem;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
    }

    .admin-table-actions__menu {
        position: fixed;
        top: auto;
        right: 0.75rem;
        max-height: calc(100vh - 1.5rem);
        overflow-y: auto;
    }

    .admin-table-actions__button {
        position: relative;
        min-width: 2rem;
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

.admin-table-actions__button i {
    font-size: 0.75rem;
}

.admin-table-actions__button span {
    display: inline-block;
}

.admin-table.admin-table--compact th,
.admin-table.admin-table--compact td {
    padding: 0.625rem 0.75rem;
}

.admin-table tbody tr:hover {
    background: var(--admin-surface-2);
}

.admin-table tbody tr.module-row--quarantined > td {
    background: #fee2e2;
    border-bottom-color: rgba(239, 68, 68, 0.22);
}

.admin-table tbody tr.module-row--quarantined > td:first-child {
    box-shadow: inset 4px 0 0 var(--color-danger-bright);
}

.admin-table tbody tr.module-row--quarantined:hover > td {
    background: #fecaca;
}

.admin-table td.module-manager-state-cell {
    vertical-align: middle;
}

.module-manager-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

.module-manager-state-badge .fas,
.module-manager-state-badge .far,
.module-manager-state-badge .fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.module-manager-state-badge--quarantined {
    font-weight: 600;
}

.admin-table tbody tr.module-row--quarantined > td.module-manager-state-cell .module-manager-state-badge--quarantined {
    background: #fecaca;
    color: #991b1b;
}

body.admin-shell.admin-theme-dark .admin-table tbody tr.module-row--quarantined > td.module-manager-state-cell .module-manager-state-badge--quarantined {
    background: rgba(127, 29, 29, 0.55);
    color: #fecaca;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   TABLE SORTING STYLES
   ======================================== */

/* Sortable header styling */
.admin-table th.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.admin-table th.sortable-header:hover {
    background: var(--admin-surface-3);
}

.admin-table th.sortable-header .sort-header-link {
    display: block;
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.admin-table th.sortable-header .sort-header-link:hover {
    color: var(--admin-link);
}

.admin-table th.sortable-header .sort-header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.admin-table th.sortable-header .sort-indicator {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.admin-table th.sortable-header:hover .sort-indicator {
    color: var(--admin-link);
}

.admin-table th.sortable-header.sort-asc .sort-indicator,
.admin-table th.sortable-header.sort-desc .sort-indicator {
    color: var(--admin-link);
}

.admin-table th.sortable-header .sort-indicator.sort-inactive {
    opacity: 0.4;
}

.admin-table th.sortable-header:hover .sort-indicator.sort-inactive {
    opacity: 0.7;
}

.admin-table-seq-id {
    display: inline-flex;
    align-items: center;
    line-height: 1.15;
}

.admin-table-seq-id__seq {
    font-weight: 600;
    color: #111827;
}

body.admin-shell.admin-theme-dark .admin-table-seq-id__seq,
body.admin-shell.admin-theme-system .admin-table-seq-id__seq {
    color: var(--admin-text);
}

/* ========================================
   ALERT COMPONENTS - Standardized Notifications
   See docs/ALERT_COMPONENT_GUIDE.md
   ======================================== */

/* Alert Base */
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid;
    margin-bottom: 1.5rem;
}

.alert-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.alert-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.alert-text {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

/* Success Alert - Green */
.alert-success {
    background-color: #dcfce7; /* green-100 */
    border-color: #86efac; /* green-300 */
    color: #166534; /* green-800 */
}

/* Error Alert - Red */
.alert-error {
    background-color: #fee2e2; /* red-100 */
    border-color: #fca5a5; /* red-300 */
    color: #991b1b; /* red-800 */
}

/* Warning Alert - Yellow */
.alert-warning {
    background-color: #fef3c7; /* yellow-100 */
    border-color: #fde047; /* yellow-300 */
    color: #92400e; /* yellow-800 */
}

/* Info Alert - Blue */
.alert-info {
    background-color: #dbeafe; /* blue-100 */
    border-color: #93c5fd; /* blue-300 */
    color: #1e40af; /* blue-800 */
}

/* Admin Alert Cards
   Used by delete confirmation pages to present a more polished, high-contrast warning state. */
.admin-alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.375rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.94));
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-alert-sticky {
    position: sticky;
    top: calc(var(--admin-shell-top-offset, 4.65rem) + 1rem);
    z-index: 25;
}

.admin-alert-dismissible {
    padding-right: 1rem;
}

.admin-alert::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.375rem;
    background: var(--admin-alert-accent, var(--brand-primary));
}

.admin-alert::after {
    content: '';
    position: absolute;
    inset: auto -1.5rem -1.5rem auto;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--admin-alert-glow, rgba(59, 130, 246, 0.14)) 0%, rgba(255, 255, 255, 0) 72%);
    pointer-events: none;
}

.admin-alert-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-alert-icon-bg, rgba(59, 130, 246, 0.12));
    color: var(--admin-alert-accent, var(--brand-primary));
    font-size: 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.admin-alert-content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.admin-alert-title {
    margin: 0 0 0.35rem 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

.admin-alert-message {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.admin-alert-message strong {
    color: inherit;
    font-weight: 700;
}

.admin-alert-dismiss {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.admin-alert-dismiss:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

body.admin-shell.admin-theme-dark .admin-alert-dismiss,
body.admin-shell.admin-theme-system .admin-alert-dismiss {
    background: var(--admin-surface-2);
    color: var(--admin-text-muted);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-sm);
}

body.admin-shell.admin-theme-dark .admin-alert-dismiss:hover,
body.admin-shell.admin-theme-system .admin-alert-dismiss:hover {
    background: var(--admin-surface-3);
    color: var(--admin-text);
    border-color: var(--admin-border-strong);
}

.admin-surface-callout {
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: #f8fafc;
    box-shadow: var(--shadow-sm);
}

.admin-surface-callout--soft {
    background: #f9fafb;
}

.admin-surface-callout--warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.admin-surface-callout--danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.admin-surface-muted {
    color: #6b7280;
}

body.admin-shell.admin-theme-dark .admin-surface-callout,
body.admin-shell.admin-theme-system .admin-surface-callout {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .admin-surface-callout--soft,
body.admin-shell.admin-theme-system .admin-surface-callout--soft {
    background: var(--admin-surface-3);
}

body.admin-shell.admin-theme-dark .admin-surface-callout--warning,
body.admin-shell.admin-theme-system .admin-surface-callout--warning {
    background: #451a03;
    border-color: #b45309;
}

body.admin-shell.admin-theme-dark .admin-surface-callout--danger,
body.admin-shell.admin-theme-system .admin-surface-callout--danger {
    background: #450a0a;
    border-color: #991b1b;
}

body.admin-shell.admin-theme-dark .admin-surface-muted,
body.admin-shell.admin-theme-system .admin-surface-muted {
    color: var(--admin-text-muted);
}

.admin-surface-icon-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: var(--admin-surface-3);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.admin-surface-icon-bubble--info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-primary);
}

body.admin-shell.admin-theme-dark .admin-surface-icon-bubble,
body.admin-shell.admin-theme-system .admin-surface-icon-bubble {
    background: var(--admin-surface-2);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .admin-surface-icon-bubble--info,
body.admin-shell.admin-theme-system .admin-surface-icon-bubble--info {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

.admin-preview-frame {
    width: 100%;
    min-height: 760px;
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    background: var(--admin-surface);
}

body.admin-shell.admin-theme-dark .admin-preview-frame,
body.admin-shell.admin-theme-system .admin-preview-frame {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

.admin-surface-code {
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    background: #111827;
    color: #e5e7eb;
    box-shadow: var(--shadow-sm);
}

.admin-surface-tile {
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    background: var(--admin-surface);
    box-shadow: var(--shadow-sm);
}

.admin-surface-tile:hover {
    border-color: var(--brand-primary);
}

.admin-surface-tile--static:hover {
    border-color: var(--admin-border);
}

.admin-surface-value {
    color: var(--admin-text);
}

.admin-surface-value--muted {
    color: var(--admin-text-muted);
}

.admin-surface-mono {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
}

body.admin-shell.admin-theme-dark .admin-surface-code,
body.admin-shell.admin-theme-system .admin-surface-code {
    background: #020617;
    color: #e2e8f0;
}

body.admin-shell.admin-theme-dark .admin-surface-tile,
body.admin-shell.admin-theme-system .admin-surface-tile {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
}

.admin-tooltip {
    position: fixed;
    z-index: 50;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    pointer-events: none;
    background: #000000;
    color: #ffffff;
    box-shadow: var(--shadow-lg);
}

.admin-tooltip--floating {
    border: 1px solid var(--admin-border);
}

body.admin-shell.admin-theme-dark .admin-tooltip,
body.admin-shell.admin-theme-system .admin-tooltip {
    background: #000000;
    color: #ffffff;
    border: 1px solid #1f2937;
}

.admin-tooltip.show {
    animation: tooltip-fade-in 0.2s ease-out;
}

@keyframes tooltip-fade-in {
    from {
        opacity: 0;
        transform: translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-alert.is-dismissing,
.admin-alert[data-admin-notice][hidden] {
    display: none !important;
}

.admin-alert-warning {
    --admin-alert-accent: var(--color-warning-dark);
    --admin-alert-icon-bg: rgba(245, 158, 11, 0.16);
    --admin-alert-glow: rgba(245, 158, 11, 0.16);
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.86));
    border-color: rgba(245, 158, 11, 0.22);
}

.admin-alert-warning .admin-alert-title {
    color: #92400e;
}

.admin-alert-warning .admin-alert-message {
    color: #78350f;
}

.admin-alert-info {
    --admin-alert-accent: var(--color-info-dark);
    --admin-alert-icon-bg: rgba(59, 130, 246, 0.14);
    --admin-alert-glow: rgba(59, 130, 246, 0.14);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.84));
    border-color: rgba(59, 130, 246, 0.22);
}

.admin-alert-info .admin-alert-title {
    color: #1e40af;
}

.admin-alert-info .admin-alert-message {
    color: #1d4ed8;
}

.admin-alert-danger {
    --admin-alert-accent: var(--color-danger-dark);
    --admin-alert-icon-bg: rgba(220, 38, 38, 0.14);
    --admin-alert-glow: rgba(220, 38, 38, 0.14);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.84));
    border-color: rgba(220, 38, 38, 0.22);
}

.admin-alert-danger .admin-alert-title {
    color: #991b1b;
}

.admin-alert-danger .admin-alert-message {
    color: #7f1d1d;
}

.admin-alert-danger .admin-alert-icon,
.admin-alert-warning .admin-alert-icon,
.admin-alert-info .admin-alert-icon,
.admin-alert-success .admin-alert-icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.admin-alert-success {
    --admin-alert-accent: var(--color-success-dark);
    --admin-alert-icon-bg: rgba(16, 185, 129, 0.16);
    --admin-alert-glow: rgba(34, 197, 94, 0.14);
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.86));
    border-color: rgba(34, 197, 94, 0.22);
}

.admin-alert-success .admin-alert-title {
    color: var(--color-success-text);
}

.admin-alert-success .admin-alert-message {
    color: #14532d;
}

/* Message-only inline notices (post-header slot, session flash, AJAX feedback) */
.admin-alert--inline {
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
}

.admin-alert--inline::after {
    width: 5rem;
    height: 5rem;
    inset: auto -0.75rem -0.75rem auto;
}

.admin-alert--inline .admin-alert-icon,
.admin-alert--inline .admin-alert-icon--inline {
    width: 2rem;
    height: 2rem;
    font-size: 0.95rem;
}

.admin-alert--inline .admin-alert-message {
    font-size: 0.9375rem;
    line-height: 1.4;
}

.admin-alert--inline .admin-alert-body {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.admin-alert--inline .admin-alert-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.admin-alert--inline .admin-alert--inline-shell {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.faq-info-item,
.tour-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.faq-info-label,
.tour-info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
}

.faq-info-value,
.tour-info-value {
    color: var(--gray-900);
}

.tour-image-preview {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tour-image-placeholder {
    border: 2px dashed var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    background: var(--gray-50);
}

.dependencies-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dependency-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.125rem;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.96), rgba(243, 244, 246, 0.9));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.dependency-icon {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.dependency-content {
    flex: 1;
    min-width: 0;
}

.dependency-type {
    font-weight: 700;
    color: var(--gray-900);
}

.dependency-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.15rem;
}

.dependency-count {
    flex: 0 0 auto;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    color: var(--gray-800);
    font-size: 0.8125rem;
    font-weight: 700;
}

.tour-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tour-type-cultural { background: #f3e8ff; color: #7e22ce; }
.tour-type-adventure { background: #dcfce7; color: #166534; }
.tour-type-culinary { background: #ffedd5; color: #c2410c; }
.tour-type-multi-day { background: #dbeafe; color: #1d4ed8; }
.tour-type-specialized { background: #fee2e2; color: #b91c1c; }
.tour-type-nature { background: #ccfbf1; color: #0f766e; }
.tour-type-religious { background: #e0e7ff; color: #4338ca; }
.tour-type-photography { background: #fce7f3; color: #be185d; }
.tour-type-wellness { background: #fef3c7; color: #a16207; }

/* ========================================
   STATUS BADGES
   ======================================== */

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fee2e2;
    color: #dc2626;
}

.status-featured {
    background: #fef3c7;
    color: #d97706;
}

.status-pending {
    background: #e0e7ff;
    color: #3730a3;
}

.type-color-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.type-color-badge__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.type-color-swatch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.type-color-swatch {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.type-color-swatch:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.type-color-swatch.is-active {
    border-color: #111827;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.12), 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px) scale(1.04);
}

.type-color-preview-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 1rem;
}

.media-category-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 500;
}

.media-category-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #6b7280;
}

.media-selector-meta-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
}

.media-selector-meta-badge--filename {
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.media-selector-meta-badge i {
    flex: 0 0 auto;
}

.media-selector-meta-badge-label {
    opacity: 0.78;
}

.media-selector-meta-badge-value {
    min-width: 0;
    word-break: break-word;
}

.media-selector-meta-badge--uploaded {
    background: #eef2ff;
    color: #4338ca;
}

.media-selector-meta-badge--size {
    background: #f8fafc;
    color: #334155;
}

.media-selector-meta-badge--size-resolution {
    background: #f8fafc;
    color: #334155;
}

.media-selector-meta-badge__split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    width: 100%;
    min-width: 0;
}

.media-selector-meta-badge__segment {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.media-selector-meta-badge__segment--resolution {
    justify-content: flex-end;
    text-align: right;
}

.media-selector-meta-badge--resolution {
    background: #e0f2fe;
    color: #0369a1;
}

.media-selector-meta-badge--featured {
    background: #fef3c7;
    color: #92400e;
}

.media-selector-meta-badge--thumbnails {
    background: #dcfce7;
    color: #166534;
}

.media-selector-meta-badge--thumbnails-empty {
    background: #fee2e2;
    color: #991b1b;
}

/* Image Upload Styles */
.image-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: #3b82f6;
}

.image-upload-area.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Search and Filter Styles */
.search-filter-bar {
    width: 100%;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.search-filter-bar--with-pagination {
    display: block;
}

.search-filter-bar__pagination-summary {
    width: 100%;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.search-filter-bar__pagination-summary .pagination-top {
    margin: 0;
}

.search-filter-bar--inline {
    display: block;
}

.search-filter-bar__inline-form {
    width: 100%;
}

.search-filter-bar__inline-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.search-filter-bar__inline-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    flex-wrap: wrap;
    max-width: max-content;
}

/* Range sits under the whole Per-page control without stretching the filter row */
.search-filter-bar__inline-per-page {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.search-filter-bar__inline-summary .pagination-per-page {
    margin: 0;
}

.search-filter-bar__inline-summary-text {
    position: absolute;
    left: 0;
    top: calc(100% + 0.15rem);
    color: #6b7280;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.15;
    white-space: nowrap;
    pointer-events: none;
}

/* Room for absolute range under Per page without shifting sibling controls */
.search-filter-bar--inline .search-filter-bar__inline-form {
    padding-bottom: 0.85rem;
}

.search-filter-bar__inline-search {
    flex: 1 1 280px;
    min-width: 240px;
}

.search-filter-bar__inline-filters {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.search-filter-bar__inline-field {
    min-width: 0;
}

.search-filter-bar__inline-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-wrap: wrap;
    overflow: visible;
    position: relative;
    z-index: 40;
}

.admin-saved-filters {
    position: relative;
    z-index: 50;
}

.admin-saved-filters__toggle {
    list-style: none;
    cursor: pointer;
}

.admin-saved-filters__toggle::-webkit-details-marker {
    display: none;
}

.admin-saved-filters__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 60;
    min-width: 14rem;
    max-width: 18rem;
    padding: 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid var(--admin-border-color, #d1d5db);
    background: var(--admin-surface, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.admin-saved-filters__save {
    width: 100%;
    margin-bottom: 0.5rem;
}

.admin-saved-filters__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 12rem;
    overflow: auto;
}

.admin-saved-filters__item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.admin-saved-filters__load {
    flex: 1 1 auto;
    text-align: left;
    border: 1px solid var(--admin-border-color, #d1d5db);
    background: var(--admin-surface-muted, #f8fafc);
    border-radius: 0.375rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    color: inherit;
    cursor: pointer;
}

.admin-saved-filters__delete {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: #b45309;
    cursor: pointer;
    padding: 0.25rem;
}

.admin-list-loading-overlay.is-error .admin-pagination-overlay__text {
    color: #b91c1c;
}

html.dark-mode .admin-saved-filters__panel,
body.dark-mode .admin-saved-filters__panel {
    background: var(--admin-surface, #1f2937);
    border-color: var(--admin-border-color, #374151);
}

html.dark-mode .admin-saved-filters__load,
body.dark-mode .admin-saved-filters__load {
    background: var(--admin-surface-muted, #111827);
}

.search-filter-bar__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-filter-bar.is-collapsed .search-filter-bar__header {
    margin-bottom: 0;
}

.search-filter-bar__title-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-width: 0;
}

.search-filter-bar__title-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: inherit;
    text-align: left;
    min-width: 0;
}

.search-filter-bar__title-toggle:hover .search-filter-bar__toggle-icon,
.search-filter-bar__title-toggle:focus-visible .search-filter-bar__toggle-icon {
    color: #2563eb;
}

.search-filter-bar__title-toggle:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 4px;
    border-radius: 8px;
}

.search-filter-bar__summary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.search-filter-bar__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-filter-bar__clear {
    white-space: nowrap;
}

.search-filter-bar__toggle-icon {
    transition: transform 0.2s ease;
}

.search-filter-bar__toggle-icon.is-collapsed {
    transform: rotate(-180deg);
}

.search-filter-bar__body {
    display: block;
}

.search-filter-bar.is-collapsed .search-filter-bar__body {
    display: none;
}

.search-input {
    width: 100%;
    padding: 0.50rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select {
    padding: 0.50rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
}

@media (max-width: 640px) {
    .search-filter-bar {
        padding: 1rem;
    }

    .search-filter-bar__header {
        flex-direction: column;
    }

    .search-filter-bar__title-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .search-filter-bar__actions {
        width: 100%;
        justify-content: space-between;
    }

    .search-filter-bar__inline-row {
        gap: 0.75rem;
    }

    .search-filter-bar__inline-summary,
    .search-filter-bar__inline-search,
    .search-filter-bar__inline-filters,
    .search-filter-bar__inline-actions {
        width: 100%;
        margin-left: 0;
    }

    .search-filter-bar__inline-search {
        min-width: 0;
    }
}

/* Global Pagination System */
.pagination-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.pagination-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-per-page label {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.pagination-per-page select {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.pagination-per-page select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pagination-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pagination a {
    color: #6b7280;
    border-color: #e5e7eb;
    background: white;
}

.pagination a:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.pagination .active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination .disabled {
    color: #d1d5db;
    cursor: not-allowed;
    background: #f9fafb;
}

.pagination .pagination-ellipsis {
    color: #9ca3af;
    cursor: default;
}

.admin-pagination-loading {
    overflow: hidden;
}

.admin-pagination-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.admin-pagination-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.admin-pagination-overlay__panel {
    min-width: 240px;
    max-width: 420px;
    padding: 2rem 2.25rem;
    border-radius: 18px;
    background: var(--admin-surface-elevated);
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-floating);
    text-align: center;
}

.admin-pagination-overlay__spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border: 5px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-right-color: #3b82f6;
    border-radius: 9999px;
    animation: spin 0.8s linear infinite;
}

.admin-pagination-overlay__text {
    margin-top: 1rem;
    color: var(--admin-text);
    font-size: 1rem;
    font-weight: 600;
}

.admin-loading-surface {
    position: relative;
}

.admin-loading-surface--loading {
    overflow: hidden;
}

.admin-loading-overlay.admin-loading-overlay--surface {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(4px);
    border-radius: inherit;
}

.admin-loading-overlay.admin-loading-overlay--surface .admin-loading-overlay__panel {
    min-width: 180px;
    max-width: 320px;
    padding: 1.5rem 1.75rem;
}

body.admin-shell.admin-theme-dark .admin-loading-overlay.admin-loading-overlay--surface,
body.admin-shell.admin-theme-system .admin-loading-overlay.admin-loading-overlay--surface {
    background: rgba(15, 23, 42, 0.58);
}

.admin-bulk-operation-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
}

.admin-bulk-operation-overlay__panel {
    background: var(--admin-surface-elevated);
    border: 1px solid var(--admin-border);
    padding: 40px 50px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--admin-shadow-floating);
}

.admin-bulk-operation-overlay__spinner {
    font-size: 48px;
    color: #3b82f6;
    margin-bottom: 20px;
}

.admin-bulk-operation-overlay__title {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--admin-text);
}

.admin-bulk-operation-overlay__text {
    font-size: 14px;
    color: var(--admin-text-muted);
}

.admin-bulk-operation-overlay__hint {
    font-size: 12px;
    margin-top: 10px;
    color: var(--admin-text-soft);
}

.admin-bulk-operation-overlay--hidden {
    display: none;
}

.admin-bulk-operation-overlay__panel--progress {
    width: min(100%, 42rem);
    max-width: 42rem;
    padding: 2rem 2.25rem;
    text-align: left;
}

.admin-bulk-operation-overlay__progress {
    margin-top: 1.25rem;
}

.admin-bulk-operation-overlay__progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.admin-bulk-operation-overlay__progress-track {
    width: 100%;
    height: 0.75rem;
    border-radius: 9999px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 1rem;
}

.admin-bulk-operation-overlay__progress-bar {
    height: 100%;
    width: 0;
    border-radius: 9999px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.admin-bulk-operation-overlay[data-operation="delete"] .admin-bulk-operation-overlay__progress-bar {
    background: #ef4444;
}

.admin-bulk-operation-overlay[data-operation="delete"] .admin-bulk-operation-overlay__spinner {
    color: #ef4444;
}

.admin-bulk-operation-overlay[data-operation="edit"] .admin-bulk-operation-overlay__progress-bar {
    background: #3b82f6;
}

.admin-bulk-operation-overlay[data-operation="edit"] .admin-bulk-operation-overlay__spinner {
    color: #3b82f6;
}

.admin-bulk-operation-overlay[data-operation="duplicate"] .admin-bulk-operation-overlay__progress-bar {
    background: #3b82f6;
}

.admin-bulk-operation-overlay[data-operation="duplicate"] .admin-bulk-operation-overlay__spinner {
    color: #3b82f6;
}

.admin-bulk-operation-overlay__progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-bulk-operation-overlay__progress-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
}

.admin-bulk-operation-overlay__progress-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.admin-bulk-operation-overlay__progress-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.admin-bulk-operation-overlay__status {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.admin-bulk-operation-overlay__log-wrap {
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--admin-surface);
}

.admin-bulk-operation-overlay__log-title {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.admin-bulk-operation-overlay__log {
    max-height: 10rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-bulk-operation-overlay__log-entry {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--admin-text-muted);
}

.admin-bulk-operation-overlay__log-entry--success i {
    color: #16a34a;
}

.admin-bulk-operation-overlay__log-entry--error i {
    color: #dc2626;
}

.admin-bulk-operation-overlay__log-entry--info i {
    color: #2563eb;
}

.admin-bulk-operation-overlay__actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.admin-bulk-operation-overlay__stop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.admin-bulk-operation-overlay__stop-icon {
    font-size: 0.75rem;
    line-height: 1;
}

.admin-bulk-operation-overlay .admin-bulk-operation-overlay__stop-btn.btn-danger {
    border-color: #dc2626;
}

.admin-bulk-operation-overlay .admin-bulk-operation-overlay__stop-btn.btn-danger:hover:not(:disabled) {
    border-color: #b91c1c;
}

body.admin-bulk-operation-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 640px) {
    .pagination-top {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-per-page {
        justify-content: center;
    }
    
    .pagination a,
    .pagination span {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.5rem;
        font-size: 0.75rem;
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox:not([hidden]) {
    display: block;
}

.lightbox[hidden] {
    display: none !important;
}

.admin-progress-fill {
    width: 0%;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
    padding: 1rem;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
}

.clickable-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.3);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Admin Dialog Manager â€” canonical rules load through admin-header.php. */

/* Responsive Design */
@media (max-width: 768px) {
    .admin-card {
        padding: 1rem;
    }
    
    .admin-form {
        padding: 1rem;
    }
    
    .search-filter-bar {
        padding: 1rem;
    }
    
    .admin-table {
        font-size: 0.875rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 1rem;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .admin-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .btn {
        display: none !important;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Remove focus outline from all interactive elements */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: none;
}

/* Media Library Styles */
.media-item {
    transition: all 0.3s ease;
}

.media-item:hover {
    transform: translateY(-2px);
}

.media-item img {
    transition: transform 0.3s ease;
}

.media-item:hover img {
    transform: scale(1.05);
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--admin-text-muted);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
}

.pagination-link:hover {
    background: var(--admin-surface-2);
    color: var(--admin-text);
}

.pagination-link.active {
    background: var(--admin-link);
    color: white;
    border: 1px solid var(--admin-link);
}

.pagination-link.pagination-prev,
.pagination-link.pagination-next {
    width: auto;
    min-width: 0;
    padding: 0 0.9rem;
    white-space: nowrap;
}

.pagination-link.pagination-prev {
    color: var(--admin-text-muted);
    background: var(--admin-surface);
}

.pagination-link.pagination-next {
    background: var(--admin-link);
    color: #ffffff;
    border-color: var(--admin-link);
}

.pagination-link.pagination-next:hover {
    background: var(--admin-link-hover);
    color: #ffffff;
    border-color: var(--admin-link-hover);
}

.pagination-link.pagination-prev:hover {
    background: var(--admin-surface-2);
    color: var(--admin-text);
}

/* File Upload Drag & Drop */
.upload-area {
    border: 2px dashed var(--admin-border-strong);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--admin-surface-2);
    color: var(--admin-text);
}

.upload-area:hover {
    border-color: var(--admin-link);
    background: var(--admin-surface-3);
}

.upload-area.dragover {
    border-color: var(--admin-link);
    background: var(--admin-surface-3);
    transform: scale(1.02);
}

.upload-area.has-file {
    border-color: var(--color-success);
    background: rgba(16, 185, 129, 0.12);
}

/* Image Preview */
.image-preview-container {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
    transition: transform 0.3s ease;
}

.image-preview:hover {
    transform: scale(1.05);
}

.featured-image-section__preview-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.featured-image-section__preview-wrap .image-preview {
    display: block;
    margin-top: 0;
}

.featured-image-section__clear {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.featured-image-section__clear:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.featured-image-section__clear:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.featured-image-section__empty.hidden {
    display: none !important;
}

/* Media Actions */
.media-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-actions {
    opacity: 1;
}

.media-action-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.media-action-btn:hover {
    transform: scale(1.1);
}

.media-action-btn.copy {
    background: #3b82f6;
    color: white;
}

.media-action-btn.copy:hover {
    background: #2563eb;
}

.media-action-btn.delete {
    background: #ef4444;
    color: white;
}

.media-action-btn.delete:hover {
    background: #dc2626;
}

/* File Info */
.file-info {
    padding: 0.75rem;
    background: white;
}

.file-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.file-category {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading States */
.upload-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.upload-loading .loading {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

/* Success/Error States */
.upload-success {
    border-color: #10b981;
    background: #f0fdf4;
    color: #065f46;
}

.upload-error {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .admin-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
    
    .media-item {
        border: 2px solid #000;
    }
}

/* ==========================================
   SUPPORT ROBOT WIDGET
   ========================================== */

/* Main widget container */
.support-robot-widget {
    position: fixed; /* Fixed to viewport */
    bottom: 100px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.support-robot-widget--docked {
    position: relative;
    inset: auto;
    bottom: auto;
    right: auto;
    z-index: auto;
    width: 100%;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
    box-sizing: border-box;
}

.support-robot-widget--hidden {
    display: none !important;
}

/* Cloud Speech Bubble */
.robot-speech-bubble {
    position: relative;
    background: var(--admin-surface-elevated);
    border-radius: 20px;
    padding: 16px 32px 16px 24px;
    max-width: 220px;
    border: 1px solid var(--admin-border);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.15);
    animation: cloudFloat 3s ease-in-out infinite, cloudFadeIn 0.5s ease-out;
    z-index: 999;
    margin-bottom: 10px;
    color: var(--admin-text);
}

.support-robot-widget--docked .robot-speech-bubble {
    max-width: none;
    width: 100%;
    margin-bottom: 0;
}

.support-robot-widget--docked .robot-speech-bubble + .support-menu {
    margin-top: 0.25rem;
}

/* Close Bubble Button */
.close-bubble-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 1001;
}

.close-bubble-btn:hover {
    background: color-mix(in srgb, var(--admin-surface-elevated) 80%, var(--admin-border) 20%);
    color: #ef4444;
    transform: scale(1.1);
}

/* Hidden bubble state */
.bubble-hidden {
    display: none !important;
}

/* Cloud floating animation */
@keyframes cloudFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes cloudFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Message text inside cloud */
#robot-message {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-text);
    text-align: center;
    line-height: 1.4;
    position: relative;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

/* Support Menu */
.support-menu {
    position: fixed; /* Changed from absolute to fixed for proper positioning */
    bottom: 190px; /* Position above the robot and scroll-to-top button */
    right: 24px; /* Align with widget */
    background: var(--admin-surface-elevated);
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-floating, 0 10px 40px rgba(0, 0, 0, 0.2));
    padding: 8px;
    min-width: 220px;
    animation: menuSlideUp 0.3s ease-out;
    z-index: 1000;
    color: var(--admin-text);
}

.support-robot-widget--docked .support-menu {
    position: static;
    bottom: auto;
    right: auto;
    min-width: 0;
    width: 100%;
}

@keyframes menuSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Menu Items */
.support-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--admin-link);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    cursor: pointer;
    margin-bottom: 6px;
}

.support-robot-widget--docked .support-menu-item {
    width: 100%;
}

.support-menu-item:last-child {
    margin-bottom: 0;
}

.support-menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* WhatsApp button */
.support-menu-item.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
}

.support-menu-item.whatsapp:hover {
    background: linear-gradient(135deg, #20BA5A 0%, #1DA851 100%);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Support button */
.support-menu-item.support {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.support-menu-item.support:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Feedback button */
.support-menu-item.feedback {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.support-menu-item.feedback:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Admin Scroll to Top Button — brand primary (no orange) */
body.admin-shell .admin-scroll-to-top {
    --scroll-progress: 0;
    position: fixed !important;
    top: auto !important;
    right: var(--admin-scroll-to-top-right) !important;
    bottom: calc(var(--admin-scroll-to-top-bottom) + var(--admin-bottom-dock-reserved-height, 0px)) !important;
    left: auto !important;
    width: var(--admin-scroll-to-top-size);
    height: var(--admin-scroll-to-top-size);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #000000 !important;
    border: none;
    border-radius: 50%;
    background: var(--gradient-blue);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--brand-primary) 35%, transparent);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
}

body.admin-shell .admin-scroll-to-top i,
body.admin-shell .admin-scroll-to-top i::before {
    color: #000000 !important;
}

body.admin-shell.admin-theme-dark .admin-scroll-to-top,
body.admin-shell.admin-theme-dark .admin-scroll-to-top i,
body.admin-shell.admin-theme-dark .admin-scroll-to-top i::before {
    color: #ffffff !important;
}

@media (prefers-color-scheme: dark) {
    body.admin-shell.admin-theme-system .admin-scroll-to-top,
    body.admin-shell.admin-theme-system .admin-scroll-to-top i,
    body.admin-shell.admin-theme-system .admin-scroll-to-top i::before {
        color: #ffffff !important;
    }
}

body.admin-shell .admin-scroll-to-top::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: conic-gradient(
        var(--brand-primary) calc(var(--scroll-progress) * 1%),
        transparent calc(var(--scroll-progress) * 1%)
    );
    z-index: -1;
    transition: none;
}

body.admin-shell .admin-scroll-to-top::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: white;
    z-index: -1;
}

body.admin-shell.admin-theme-dark .admin-scroll-to-top::after,
body.admin-shell.admin-theme-system .admin-scroll-to-top::after {
    background: var(--admin-surface-elevated) !important;
}

body.admin-shell .admin-scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

body.admin-shell .admin-scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--brand-primary) 45%, transparent);
    background: var(--gradient-blue-hover);
    color: #000000 !important;
}

body.admin-shell.admin-theme-dark .admin-scroll-to-top:hover {
    color: #ffffff !important;
}

@media (prefers-color-scheme: dark) {
    body.admin-shell.admin-theme-system .admin-scroll-to-top:hover {
    color: #ffffff !important;
}
}

body.admin-shell .admin-scroll-to-top:active {
    transform: translateY(-2px);
}

/* Responsive Design for Support Robot */
@media (max-width: 768px) {
    body.admin-shell {
        --admin-scroll-to-top-bottom: 20px;
        --admin-scroll-to-top-right: 18px;
        --admin-scroll-to-top-size: 45px;
    }

    body.admin-shell .admin-scroll-to-top {
        right: var(--admin-scroll-to-top-right) !important;
        bottom: calc(var(--admin-scroll-to-top-bottom) + var(--admin-bottom-dock-reserved-height, 0px)) !important;
        width: var(--admin-scroll-to-top-size);
        height: var(--admin-scroll-to-top-size);
    }

    /* Adjust widget position */
    .support-robot-widget {
        bottom: 85px;
        right: 18px;
    }
    
    /* Adjust menu width */
    .support-menu {
        min-width: 200px;
        bottom: 165px; /* Adjusted for smaller robot */
        right: 18px; /* Align with mobile positioning */
    }

    body.admin-shell .admin-scroll-to-top {
        top: auto;
        bottom: calc(var(--admin-scroll-to-top-bottom) + var(--admin-bottom-dock-reserved-height, 0px));
        right: var(--admin-scroll-to-top-right);
    }
}

@media (max-width: 480px) {
    body.admin-shell {
        --admin-scroll-to-top-bottom: 15px;
        --admin-scroll-to-top-right: 13px;
        --admin-scroll-to-top-size: 45px;
    }

    body.admin-shell .admin-scroll-to-top {
        right: var(--admin-scroll-to-top-right) !important;
        bottom: calc(var(--admin-scroll-to-top-bottom) + var(--admin-bottom-dock-reserved-height, 0px)) !important;
        width: var(--admin-scroll-to-top-size);
        height: var(--admin-scroll-to-top-size);
    }

    .support-robot-widget {
        bottom: 75px;
        right: 13px;
    }
    
    .support-menu {
        bottom: 145px;
        min-width: 180px;
    }
    
    .support-menu-item {
        padding: 10px 12px;
        font-size: 13px;
    }

    body.admin-shell .admin-scroll-to-top {
        top: auto;
        bottom: calc(var(--admin-scroll-to-top-bottom) + var(--admin-bottom-dock-reserved-height, 0px));
        right: var(--admin-scroll-to-top-right);
    }
}

/* Hide helper class */
.hidden {
    display: none !important;
}

#color-preview [data-brand-color-state-panel][hidden],
#color-preview [data-brand-color-state-panel].hidden {
    display: none !important;
}

#color-preview .frontend-customizer-brand-colors__picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

#color-preview .frontend-customizer-brand-colors__picker-trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem;
    border: 1px solid #dbe3ec;
    border-radius: 0.85rem;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

#color-preview .frontend-customizer-brand-colors__picker-trigger-swatch {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.65rem;
    background: var(--brand-color, #113d5a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

#color-preview .frontend-customizer-brand-colors__picker-trigger-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
    transition: none;
    transform: none;
}

#color-preview .frontend-customizer-brand-colors__picker-trigger-content strong {
    font-size: 0.8rem;
    color: #0f172a;
    transition: none;
}

#color-preview .frontend-customizer-brand-colors__picker-trigger-code {
    font-size: 0.68rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.06em;
    transition: none;
}

#color-preview .frontend-customizer-brand-colors__picker {
    position: relative;
    width: 100%;
}

#color-preview .frontend-customizer-brand-colors__picker-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    z-index: 40;
    width: min(21rem, calc(100vw - 2rem));
    max-height: 18rem;
    overflow: auto;
    padding: 0.85rem;
    border: 1px solid #dbe3ec;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

#color-preview .frontend-customizer-brand-colors__picker-panel-search {
    margin-bottom: 0.65rem;
}

#color-preview .frontend-customizer-brand-colors__hex-input {
    width: 100%;
    height: 2.35rem;
    margin-bottom: 0.65rem;
    border-radius: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#color-preview .frontend-customizer-brand-colors__picker-search {
    width: 100%;
    height: 2.35rem;
    border-radius: 0.7rem;
}

#color-preview .frontend-customizer-brand-colors__picker-section {
    margin-top: 0.75rem;
}

#color-preview .frontend-customizer-brand-colors__picker-section-title {
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
}

#color-preview .frontend-customizer-brand-colors__swatch-palette {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0;
}

#color-preview .frontend-customizer-brand-colors__swatch-palette--recent {
    margin-top: 0;
}

#color-preview .frontend-customizer-brand-colors__swatch-option {
    width: 100%;
    height: 2rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.55rem;
    background: var(--swatch-color, #113d5a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

#color-preview .frontend-customizer-brand-colors__swatch-option.is-active {
    outline: 2px solid #113d5a;
    outline-offset: 2px;
}

#color-preview .frontend-customizer-brand-colors__picker-trigger-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem;
    border: 1px solid #dbe3ec;
    border-radius: 0.95rem;
    background: #ffffff;
}

#color-preview .frontend-customizer-brand-colors__picker-trigger {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

#color-preview .frontend-customizer-brand-colors__picker-trigger-content {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
}

#color-preview .frontend-customizer-brand-colors__picker-trigger-content strong {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0f172a;
}

#color-preview .frontend-customizer-brand-colors__picker-toggle {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3ec;
    border-radius: 0.7rem;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
}

#color-preview .frontend-customizer-brand-colors__picker-toggle:hover {
    border-color: #cbd5e1;
    background: #eef2f7;
    color: #0f172a;
}

#color-preview .frontend-customizer-brand-colors__picker-empty {
    margin: 0.7rem 0 0;
    font-size: 0.72rem;
    color: #64748b;
}

/* ================================
   SEO WIZARD STYLES
   ================================ */

/* Wizard Modal Enhancements */
#seoWizardModal .border-b {
    border-bottom-width: 2px;
}

/* Progress Bar Animation */
#wizard-progress-bar {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, #9333ea 0%, #a855f7 100%);
}

/* Wizard Item Badge */
#wizard-item-type-badge {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Keyboard Shortcut Overlay */
#keyboardShortcutsOverlay kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border: 1px solid #d1d5db;
}

/* Wizard Button States */
#wizard-btn-previous:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Smooth transitions for wizard content */
#seoWizardForm input,
#seoWizardForm textarea {
    transition: border-color 0.2s ease;
}

#seoWizardForm input:focus,
#seoWizardForm textarea:focus {
    border-color: #9333ea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* Wizard Skip Button Animation */
button[onclick="wizardSkip()"] {
    transition: all 0.2s ease;
}

button[onclick="wizardSkip()"]:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2);
}

/* Item counter pulse effect */
@keyframes wizard-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

#wizard-skipped-count {
    animation: wizard-pulse 2s ease-in-out infinite;
}

/* Wizard modal fade in */
@keyframes wizard-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#seoWizardModal > div {
    animation: wizard-fade-in 0.2s ease-out;
}

/* Character count warning - red color with pulse animation */
.text-red-600.font-medium {
    animation: wizard-pulse 1.5s ease-in-out infinite;
}

/* ========================================
   VEHICLE GENERAL TAB
   ======================================== */

.vehicle-general-panel .vehicle-general-section + .vehicle-general-section {
    margin-top: 0;
}

[data-admin-form-tabs] > .admin-card.no-collapse,
.content-management-shell > .admin-card.no-collapse {
    scroll-margin-top: 5.5rem;
}

/* ========================================
   VEHICLE PRICING TAB
   ======================================== */

.vehicle-pricing-section__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
}

.vehicle-pricing-base-price .form-control {
    min-height: 3rem;
}

.vehicle-pricing-section--requirements.admin-card {
    overflow: hidden;
}

.vehicle-pricing-section--requirements .admin-card-header.collapsible {
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
}

.vehicle-pricing-section--requirements .admin-card-body {
    padding: 1.25rem;
}

/* Tabbed form validation feedback */
.form-group.is-invalid .form-input,
.form-group.is-invalid .form-select,
.form-group.is-invalid .form-textarea {
    border-color: #dc2626;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

/* ========================================
   STICKY BOTTOM SAVE BAR - Global Component
   Used in: Security Center, Settings, Weather, Profile, Breadcrumbs, Sliders
   Version: 1.0.7
   ======================================== */

body.admin-shell {
    --sticky-save-bar-bottom-offset: 2.808rem;
    --admin-z-sticky-save-bar: 100;
    /* Dropdown hosts must sit above the sticky save bar while Choices.js is open */
    --admin-z-dropdown-host: 150;
}

.sticky-save-bar {
    position: sticky;
    bottom: var(--sticky-save-bar-bottom-offset);
    z-index: var(--admin-z-sticky-save-bar);
    display: flex;
    justify-content: center;
    width: 100%;
    align-self: stretch;
    pointer-events: auto;
}

.sticky-save-bar-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    width: 60%;
    max-width: 72rem;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.sticky-save-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.sticky-save-bar-info {
    font-size: 0.875rem;
    color: #4b5563;
    display: flex;
    align-items: center;
}

.sticky-save-bar-info i {
    margin-right: 0.5rem;
}

/* Support for multiple buttons (e.g., breadcrumbs with Reset + Save) */
.sticky-save-bar-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.admin-table tr.is-list-row-highlighted {
    background-color: #ecfdf5;
    box-shadow: inset 3px 0 0 #10b981;
    transition: background-color 0.3s ease;
}

body.admin-shell.admin-theme-dark .admin-table tr.is-list-row-highlighted {
    background-color: rgba(16, 185, 129, 0.12);
    box-shadow: inset 3px 0 0 #34d399;
}

@media (max-width: 768px) {
    .sticky-save-bar-container {
        width: 95%;
        max-width: none;
    }
}

.sticky-save-bar .btn,
.sticky-save-bar .btn-lg,
.sticky-save-bar .btn-sm,
.sticky-save-bar .btn-xs,
.sticky-save-bar .btn-xs-tight {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.2;
    min-height: 2.5rem;
}

.sticky-save-bar .btn i,
.sticky-save-bar .btn-lg i,
.sticky-save-bar .btn-sm i,
.sticky-save-bar .btn-xs i,
.sticky-save-bar .btn-xs-tight i {
    font-size: 0.875rem;
}

.tour-bottom-action-bar {
    position: static !important;
    transform: none !important;
}

/* ========================================
   ADMIN FLOATING SURFACE - Shared Component
   Used for overlay notices, utility bars, and minimized tabs
   ======================================== */

body.admin-shell {
    --admin-shell-top-offset: 4.65rem;
    --admin-floating-surface-base-top: var(--admin-shell-top-offset);
    --admin-floating-surface-base-bottom: 1rem;
    --admin-floating-surface-base-inline: 1rem;
    --admin-floating-surface-gap: 0.75rem;
    --admin-floating-surface-z-index: 1005;
    --admin-floating-surface-border: var(--admin-border);
    --admin-floating-surface-bg: var(--admin-surface);
    --admin-floating-surface-text: var(--admin-text);
    --admin-floating-surface-muted: var(--admin-text-muted);
    --admin-floating-surface-shadow: var(--admin-shadow-floating);
    --admin-floating-surface-tab-border: var(--admin-border);
    --admin-floating-surface-tab-bg: var(--admin-surface);
    --admin-floating-surface-tab-text: var(--admin-text);
    --admin-floating-surface-tab-shadow: var(--admin-shadow-floating);
}

.admin-floating-surface {
    position: fixed;
    z-index: var(--admin-floating-surface-z-index);
    box-sizing: border-box;
    pointer-events: none;
}

.admin-floating-surface[data-admin-floating-surface-zone="top-left"] {
    top: calc(var(--admin-floating-surface-base-top) + var(--admin-floating-surface-stack-offset, 0px));
    left: var(--admin-floating-surface-base-inline);
    right: auto;
    bottom: auto;
    display: flex;
    justify-content: flex-start;
    width: calc(100vw - (var(--admin-floating-surface-base-inline) * 2));
    padding: 0;
}

.admin-floating-surface[data-admin-floating-surface-zone="top-right"] {
    top: calc(var(--admin-floating-surface-base-top) + var(--admin-floating-surface-stack-offset, 0px));
    right: var(--admin-floating-surface-base-inline);
    left: auto;
    bottom: auto;
    display: flex;
    justify-content: flex-end;
    width: auto;
    max-width: calc(100vw - (var(--admin-floating-surface-base-inline) * 2));
    padding: 0;
}

.admin-floating-surface[data-admin-floating-surface-zone="top-center"] {
    top: calc(var(--admin-floating-surface-base-top) + var(--admin-floating-surface-stack-offset, 0px));
    left: 0;
    right: 0;
    bottom: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 var(--admin-floating-surface-base-inline);
}

.admin-floating-surface[data-admin-floating-surface-zone="bottom-left"] {
    bottom: calc(var(--admin-floating-surface-base-bottom) + var(--admin-floating-surface-stack-offset, 0px));
    left: var(--admin-floating-surface-base-inline);
    right: auto;
    top: auto;
    display: flex;
    justify-content: flex-start;
    width: calc(100vw - (var(--admin-floating-surface-base-inline) * 2));
    padding: 0;
}

.admin-floating-surface[data-admin-floating-surface-zone="bottom-right"] {
    bottom: calc(var(--admin-floating-surface-base-bottom) + var(--admin-floating-surface-stack-offset, 0px));
    right: var(--admin-floating-surface-base-inline);
    left: auto;
    top: auto;
    display: flex;
    justify-content: flex-end;
    width: auto;
    max-width: calc(100vw - (var(--admin-floating-surface-base-inline) * 2));
    padding: 0;
}

.admin-floating-surface--compact {
    --admin-floating-surface-panel-max-width: min(44rem, calc(100vw - 2rem));
    --admin-floating-surface-panel-padding-y: 0.875rem;
    --admin-floating-surface-panel-padding-x: 1rem;
    --admin-floating-surface-tab-max-width: min(18rem, calc(100vw - 2rem));
    --admin-floating-surface-tab-padding-y: 0.8rem;
    --admin-floating-surface-tab-padding-x: 0.95rem;
}

.admin-floating-surface--toast {
    direction: ltr;
    unicode-bidi: isolate;
    --admin-floating-surface-panel-max-width: min(24rem, calc(100vw - 1rem));
    --admin-floating-surface-panel-padding-y: 0.9rem;
    --admin-floating-surface-panel-padding-x: 1rem;
    --admin-floating-surface-border: rgba(148, 163, 184, 0.22);
    --admin-floating-surface-bg: rgba(255, 255, 255, 0.96);
    --admin-floating-surface-text: var(--admin-text);
    --admin-floating-surface-muted: var(--admin-text-muted);
    --admin-floating-surface-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.admin-floating-surface--notification-success {
    --admin-floating-surface-border: rgba(34, 197, 94, 0.28);
    --admin-floating-surface-bg: rgba(240, 253, 244, 0.96);
    --admin-floating-surface-text: #14532d;
    --admin-floating-surface-muted: #166534;
    --admin-floating-surface-shadow: 0 18px 34px rgba(34, 197, 94, 0.14);
}

.admin-floating-surface--notification-success .admin-floating-surface__label,
.admin-floating-surface--notification-success .admin-floating-surface__message {
    color: #14532d;
}

.admin-floating-surface--notification-success .admin-floating-surface__label i {
    color: #16a34a;
}

.admin-floating-surface--notification-info {
    --admin-floating-surface-border: rgba(59, 130, 246, 0.28);
    --admin-floating-surface-bg: rgba(239, 246, 255, 0.96);
    --admin-floating-surface-text: #1e3a8a;
    --admin-floating-surface-muted: #1d4ed8;
    --admin-floating-surface-shadow: 0 18px 34px rgba(59, 130, 246, 0.14);
}

.admin-floating-surface--notification-info .admin-floating-surface__label,
.admin-floating-surface--notification-info .admin-floating-surface__message {
    color: #1e3a8a;
}

.admin-floating-surface--notification-info .admin-floating-surface__label i {
    color: #2563eb;
}

.admin-floating-surface--notification-warning {
    --admin-floating-surface-border: rgba(245, 158, 11, 0.28);
    --admin-floating-surface-bg: rgba(255, 251, 235, 0.98);
    --admin-floating-surface-text: #92400e;
    --admin-floating-surface-muted: #b45309;
    --admin-floating-surface-shadow: 0 18px 34px rgba(245, 158, 11, 0.14);
}

.admin-floating-surface--notification-warning .admin-floating-surface__label,
.admin-floating-surface--notification-warning .admin-floating-surface__message {
    color: #92400e;
}

.admin-floating-surface--notification-warning .admin-floating-surface__label i {
    color: #d97706;
}

.admin-floating-surface--notification-error {
    --admin-floating-surface-border: rgba(239, 68, 68, 0.28);
    --admin-floating-surface-bg: rgba(254, 242, 242, 0.98);
    --admin-floating-surface-text: #991b1b;
    --admin-floating-surface-muted: #b91c1c;
    --admin-floating-surface-shadow: 0 18px 34px rgba(239, 68, 68, 0.16);
}

.admin-floating-surface--notification-error .admin-floating-surface__label,
.admin-floating-surface--notification-error .admin-floating-surface__message {
    color: #991b1b;
}

.admin-floating-surface--notification-error .admin-floating-surface__label i {
    color: #dc2626;
}

.admin-floating-surface--toast .admin-floating-surface__panel {
    border-radius: 1rem;
    border-left-width: 4px;
}

.admin-floating-surface--toast .admin-floating-surface__content {
    align-items: center;
    gap: 0.875rem;
}

.admin-floating-surface--toast .admin-floating-surface__copy {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-floating-surface--toast .admin-floating-surface__label {
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.9;
}

.admin-floating-surface--toast .admin-floating-surface__message {
    margin-top: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.admin-floating-surface--toast .admin-floating-surface__meta {
    margin-top: 0.1rem;
    font-size: 0.8rem;
}

.admin-floating-surface--toast .admin-floating-surface__actions {
    gap: 0.4rem;
}

.admin-floating-surface--toast .admin-floating-surface__toggle,
.admin-floating-surface--toast .admin-floating-surface__dismiss {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.9);
}

.admin-floating-surface--toast .admin-floating-surface__panel {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
}

.admin-floating-surface--toast.is-expanded .admin-floating-surface__panel,
.admin-floating-surface--toast.is-visible .admin-floating-surface__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.admin-floating-surface--toast.is-dismissing .admin-floating-surface__panel {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}

.admin-floating-surface--toast.is-prepared .admin-floating-surface__panel {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
}

.admin-floating-surface--impersonation {
    --admin-floating-surface-border: var(--impersonation-bar-border);
    --admin-floating-surface-bg: var(--impersonation-bar-bg);
    --admin-floating-surface-text: var(--impersonation-bar-text);
    --admin-floating-surface-muted: var(--impersonation-bar-muted);
    --admin-floating-surface-shadow: var(--impersonation-bar-shadow);
    --admin-floating-surface-tab-border: var(--impersonation-bar-border);
    --admin-floating-surface-tab-bg: var(--impersonation-bar-bg);
    --admin-floating-surface-tab-text: var(--impersonation-bar-text);
    --admin-floating-surface-tab-shadow: var(--impersonation-bar-shadow);
    --admin-floating-surface-base-top: 4.25rem;
    --admin-floating-surface-base-bottom: 7.75rem;
    --admin-floating-surface-base-inline: 1.5rem;
}

.admin-floating-surface__expanded,
.admin-floating-surface__collapsed {
    width: 100%;
    transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 240ms;
    will-change: opacity, transform;
}

.admin-floating-surface__expanded {
    position: relative;
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
}

.admin-floating-surface__collapsed {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    visibility: hidden;
    pointer-events: none;
}

.admin-floating-surface__panel {
    width: 100%;
    max-width: var(--admin-floating-surface-panel-max-width, min(44rem, calc(100vw - 2rem)));
    padding: var(--admin-floating-surface-panel-padding-y, 0.875rem) var(--admin-floating-surface-panel-padding-x, 1rem);
    border: 1px solid var(--admin-floating-surface-border);
    border-radius: 0.875rem;
    background: var(--admin-floating-surface-bg);
    box-shadow: var(--admin-floating-surface-shadow);
    color: var(--admin-floating-surface-text);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.admin-floating-surface__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-floating-surface__copy {
    min-width: 0;
    flex: 1 1 auto;
}

.admin-floating-surface__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--admin-floating-surface-text);
}

.admin-floating-surface__message {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-floating-surface-text);
}

.admin-floating-surface__meta {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--admin-floating-surface-muted);
}

.admin-floating-surface__actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.admin-floating-surface__toggle {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.35);
    color: inherit;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-floating-surface__toggle:hover,
.admin-floating-surface__toggle:focus-visible {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.15);
    transform: translateY(-1px);
    outline: none;
}

.admin-floating-surface__toggle:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.45);
    outline-offset: 2px;
}

.admin-floating-surface__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: var(--admin-floating-surface-tab-max-width, min(18rem, calc(100vw - 2rem)));
    padding: var(--admin-floating-surface-tab-padding-y, 0.8rem) var(--admin-floating-surface-tab-padding-x, 0.95rem);
    border-radius: 9999px;
    border: 1px solid var(--admin-floating-surface-tab-border);
    background: var(--admin-floating-surface-tab-bg);
    box-shadow: var(--admin-floating-surface-tab-shadow);
    color: var(--admin-floating-surface-tab-text);
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-floating-surface__tab:hover,
.admin-floating-surface__tab:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(217, 119, 6, 0.22);
    filter: saturate(1.02);
    outline: none;
}

.admin-floating-surface__tab:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.45);
    outline-offset: 3px;
}

.admin-floating-surface__tab-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.admin-floating-surface__tab-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.admin-floating-surface__tab-label {
    font-size: 0.875rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-floating-surface__tab-hint {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.82;
    white-space: nowrap;
}

.admin-floating-surface__tab-arrow {
    flex-shrink: 0;
    font-size: 0.85rem;
    opacity: 0.9;
    transition: transform 180ms ease;
}

.admin-floating-surface__dismiss {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
}

.admin-floating-surface.is-collapsed .admin-floating-surface__expanded {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    visibility: hidden;
    pointer-events: none;
}

.admin-floating-surface.is-collapsed .admin-floating-surface__collapsed {
    position: relative;
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.admin-floating-surface.is-expanded .admin-floating-surface__expanded {
    position: relative;
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.admin-floating-surface.is-expanded .admin-floating-surface__collapsed {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 768px) {
    body.admin-shell {
        --admin-shell-top-offset: 4.25rem;
        --admin-floating-surface-base-top: var(--admin-shell-top-offset);
        --admin-floating-surface-base-inline: 1rem;
    }

    .admin-floating-surface--compact {
        --admin-floating-surface-panel-padding-y: 0.8rem;
        --admin-floating-surface-panel-padding-x: 0.9rem;
        --admin-floating-surface-tab-padding-y: 0.72rem;
        --admin-floating-surface-tab-padding-x: 0.85rem;
    }

    .admin-floating-surface__content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .admin-floating-surface__actions {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 480px) {
    body.admin-shell {
        --admin-shell-top-offset: 4.15rem;
        --admin-floating-surface-base-top: var(--admin-shell-top-offset);
        --admin-floating-surface-base-inline: 0.5rem;
    }

    .admin-floating-surface--compact {
        --admin-floating-surface-panel-padding-y: 0.75rem;
        --admin-floating-surface-panel-padding-x: 0.8rem;
        --admin-floating-surface-tab-padding-x: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-floating-surface__expanded,
    .admin-floating-surface__collapsed,
    .admin-floating-surface__panel,
    .admin-floating-surface__toggle,
    .admin-floating-surface__dismiss,
    .admin-floating-surface__tab,
    .admin-floating-surface__tab-arrow {
        transition: none;
    }
}

/* ========================================
   DOCKED CHAT FLOATING SURFACE
   Bottom-anchored live-chat style widget
   ======================================== */

.admin-floating-surface--docked-chat {
    --admin-floating-surface-shell-width: min(26rem, calc(100vw - 1rem));
    --admin-docked-chat-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --admin-docked-chat-duration: 280ms;
    --admin-docked-chat-fade-duration: 220ms;
    pointer-events: none;
}

.admin-floating-surface--docked-chat[data-admin-floating-surface-zone="bottom-right"] {
    left: auto;
    right: var(--admin-floating-surface-base-inline, var(--admin-scroll-to-top-right));
    bottom: var(--admin-floating-surface-stack-offset, 0px);
    top: auto;
    width: auto;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0;
    margin: 0;
}

.admin-floating-surface--docked-chat[data-admin-floating-surface-zone="bottom-left"] {
    left: var(--admin-floating-surface-base-inline, 1rem);
    right: auto;
    bottom: var(--admin-floating-surface-stack-offset, 0px);
    top: auto;
    width: auto;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    margin: 0;
}

.admin-floating-surface--docked-chat .admin-floating-surface__shell {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: var(--admin-floating-surface-shell-width);
    transform-origin: bottom right;
}

.admin-floating-surface--docked-chat[data-admin-floating-surface-zone="bottom-left"] .admin-floating-surface__shell {
    transform-origin: bottom left;
}

.admin-floating-surface--docked-chat .admin-floating-surface__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0;
}

.admin-floating-surface--docked-chat .admin-floating-surface__window {
    overflow: hidden;
    max-height: 0;
    min-height: 0;
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--admin-floating-surface-border);
    border-bottom: none;
    border-radius: 0.95rem 0.95rem 0 0;
    background: var(--admin-floating-surface-bg);
    box-shadow: var(--admin-floating-surface-shadow);
    color: var(--admin-floating-surface-text);
    will-change: max-height, opacity, transform;
    transition:
        max-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        opacity var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        transform var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        visibility 0s linear var(--admin-docked-chat-duration);
}

.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__window {
    max-height: 0;
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    pointer-events: none;
    transition:
        max-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        opacity var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        transform var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        visibility 0s linear var(--admin-docked-chat-duration);
}

.admin-floating-surface--docked-chat.is-expanded .admin-floating-surface__window {
    min-height: var(--admin-floating-surface-window-min-height, 14rem);
    max-height: clamp(
        var(--admin-floating-surface-window-min-height, 14rem),
        var(--admin-floating-surface-window-height, 24rem),
        var(--admin-floating-surface-window-max-height, min(50vh, 28rem))
    );
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition:
        max-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        opacity var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        transform var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        visibility 0s linear 0s;
}

.admin-floating-surface--docked-chat .admin-floating-surface__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
}

.admin-floating-surface--docked-chat .admin-floating-surface__header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex-shrink: 0;
    max-width: 100%;
}

.admin-floating-surface--docked-chat .admin-floating-surface__header-actions .btn-sm {
    white-space: nowrap;
}

.admin-floating-surface--docked-chat .admin-floating-surface__header .admin-floating-surface__label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.admin-floating-surface--docked-chat .admin-floating-surface__body {
    padding: 0.65rem 0.75rem 0.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.admin-floating-surface--docked-chat .admin-floating-surface__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem 0.65rem;
    border-top: 1px solid rgba(245, 158, 11, 0.12);
}

.admin-floating-surface--docked-chat .admin-floating-surface__footer-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.admin-floating-surface--docked-chat .admin-floating-surface__footer .admin-floating-surface__message {
    margin-top: 0;
}

.admin-floating-surface--docked-chat .admin-floating-surface__footer .admin-floating-surface__meta {
    margin-top: 0.125rem;
}

.admin-floating-surface--docked-chat .admin-floating-surface__footer .admin-floating-surface__actions {
    display: inline-flex;
    justify-content: flex-end;
    margin-left: auto;
    width: auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
    justify-self: end;
}

.admin-floating-surface--docked-chat .admin-floating-surface__launcher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 0;
    max-height: 3.5rem;
    padding: 0.55rem 0.95rem;
    margin: 0;
    border: 1px solid var(--admin-floating-surface-tab-border);
    border-bottom: none;
    border-radius: 0.65rem 0.65rem 0 0;
    background: var(--admin-floating-surface-tab-bg);
    box-shadow: var(--admin-floating-surface-tab-shadow);
    color: var(--admin-floating-surface-tab-text);
    cursor: pointer;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    pointer-events: none;
    will-change: max-height, opacity, transform;
    transition:
        max-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        min-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        opacity var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        transform var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        padding var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        border-color var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        box-shadow var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        visibility 0s linear var(--admin-docked-chat-fade-duration);
}

.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__launcher {
    min-height: 2.8rem;
    max-height: 3.5rem;
    padding: 0.55rem 0.95rem;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    border-color: var(--admin-floating-surface-tab-border);
    box-shadow: var(--admin-floating-surface-tab-shadow);
    transition:
        max-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        min-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        opacity var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        transform var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        padding var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        border-color var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        box-shadow var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        visibility 0s linear 0s;
}

.admin-floating-surface--docked-chat.is-expanded .admin-floating-surface__launcher {
    min-height: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    pointer-events: none;
    border-color: transparent;
    box-shadow: none;
    transition:
        max-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        min-height var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        opacity var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        transform var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        padding var(--admin-docked-chat-duration) var(--admin-docked-chat-ease),
        border-color var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        box-shadow var(--admin-docked-chat-fade-duration) var(--admin-docked-chat-ease),
        visibility 0s linear var(--admin-docked-chat-duration);
}

.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__launcher:hover,
.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__launcher:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(217, 119, 6, 0.18);
    filter: saturate(1.02);
    outline: none;
}

.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__launcher:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.45);
    outline-offset: 2px;
}

.admin-floating-surface--docked-chat .admin-floating-surface__tab-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.admin-floating-surface--docked-chat .admin-floating-surface__tab-label {
    font-size: 0.875rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-floating-surface--docked-chat .admin-floating-surface__tab-hint {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.82;
    white-space: nowrap;
}

.admin-floating-surface--docked-chat .admin-floating-surface__tab-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.admin-floating-surface--docked-chat .admin-floating-surface__tab-arrow {
    flex-shrink: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.admin-floating-surface--docked-chat .admin-floating-surface__tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .admin-floating-surface--docked-chat {
        --admin-floating-surface-shell-width: calc(100vw - (var(--admin-scroll-to-top-right) * 2));
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-floating-surface--docked-chat .admin-floating-surface__window,
    .admin-floating-surface--docked-chat .admin-floating-surface__launcher {
        transition: none;
    }
}

/* ========================================
   PINNED WORKSPACE SHELL - Global Component
   Used for impersonation and future draft-resume admin surfaces
   ======================================== */

.admin-pinned-workspace {
    --admin-floating-surface-base-inline: var(--admin-scroll-to-top-right);
}

.admin-pinned-workspace.admin-floating-surface--docked-chat[data-admin-floating-surface-zone="bottom-right"] {
    bottom: var(--admin-floating-surface-stack-offset, 0px);
    right: var(--admin-scroll-to-top-right);
}

/* ========================================
   ADMIN DOCKED SURFACES - Bottom-right operator docks
   Shared body chrome for impersonation, debug, and future tools
   ======================================== */

.admin-docked-surface {
    --admin-docked-surface-border: var(--admin-border, #e5e7eb);
    --admin-docked-surface-muted: var(--admin-text-muted, #6b7280);
}

.admin-docked-surface__stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

.admin-docked-surface__notice {
    margin-bottom: 0 !important;
}

.admin-alert--dock-compact.admin-docked-surface__notice {
    margin-bottom: 0;
    padding: 0.65rem 0.75rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    box-shadow: none;
}

.admin-docked-surface__item-label {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
}

.admin-docked-surface__impersonation-copy {
    padding: 0.65rem 0.75rem;
}

.admin-docked-surface__impersonation-copy .impersonation-bar-info {
    margin: 0;
}

.admin-docked-surface__quarantine-item + .admin-docked-surface__quarantine-item {
    border-top: 1px solid var(--admin-docked-surface-border, rgba(148, 163, 184, 0.25));
}

.admin-docked-surface__item-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 0 0.75rem 0.65rem;
}

.admin-docked-surface__item-actions .btn-sm {
    white-space: nowrap;
}

.admin-docked-surface__empty {
    margin: 0;
    padding: 1rem 0.85rem;
    font-size: 0.82rem;
    color: var(--admin-docked-surface-muted);
}

.admin-floating-surface__body--variant-chat-bubble {
    padding: 0.9rem;
}

.admin-floating-surface__body--variant-chat-bubble .admin-docked-surface__stack {
    gap: 0.65rem;
    padding: 0;
}

.admin-floating-surface__body--variant-chat-bubble .admin-docked-surface__quarantine-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-floating-surface__body--variant-chat-bubble .admin-alert--dock-compact.admin-docked-surface__notice {
    margin-bottom: 0;
    padding: 0.9rem 0.95rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--admin-surface-2, #ffffff) 96%, transparent);
    border-color: color-mix(in srgb, var(--admin-docked-surface-border, rgba(148, 163, 184, 0.28)) 70%, transparent);
    box-shadow: var(--shadow-sm);
}

.admin-floating-surface__body--variant-chat-bubble .admin-alert--dock-compact.admin-docked-surface__notice::before {
    width: 0.28rem;
}

.admin-floating-surface__body--variant-chat-bubble .admin-docked-surface__item-label {
    margin-bottom: 0.25rem;
}

.admin-floating-surface__body--variant-chat-bubble .admin-docked-surface__item-actions {
    padding: 0 0.6rem 0.25rem;
}

.admin-floating-surface__body--variant-notice-feed {
    padding: 0.85rem;
}

.admin-floating-surface__body--variant-notice-feed .admin-docked-surface__stack {
    gap: 0.6rem;
    padding: 0;
}

.admin-floating-surface__body--variant-notice-feed .admin-docked-surface__notice {
    margin-bottom: 0;
    border-radius: 0.9rem;
}

.admin-floating-surface__body--variant-action-grid {
    padding: 0.85rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked {
    gap: 0.85rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__search-wrap,
.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__results {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__search-wrap {
    padding: 0.85rem;
    border: 1px solid var(--admin-docked-surface-border, var(--admin-border, #e5e7eb));
    border-radius: 1rem;
    background: var(--admin-surface-2, var(--admin-surface, #ffffff));
    box-shadow: var(--shadow-sm);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__search-field {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.85rem;
    padding: 0 0.875rem;
    border: 1px solid var(--admin-input-border, var(--admin-border, #d1d5db));
    border-radius: 0.875rem;
    background: var(--admin-input-bg, var(--admin-surface, #ffffff));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 6px 14px rgba(15, 23, 42, 0.04);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__search-field:focus-within {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__search-input {
    width: 100%;
    min-width: 0;
    min-height: 2.85rem;
    border: 0;
    background: transparent;
    color: var(--admin-text, #111827);
    font-size: 0.96rem;
    outline: none;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__nav-hints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.78rem;
    line-height: 1.3;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__nav-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__nav-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__nav-hint kbd {
    padding: 0.08rem 0.35rem;
    border-radius: 0.4rem;
    background: var(--admin-surface, #ffffff);
    border: 1px solid var(--admin-docked-surface-border, var(--admin-border, #e5e7eb));
    box-shadow: var(--shadow-xs);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__nav-hint kbd i {
    font-size: 0.72rem;
    line-height: 1;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__results {
    gap: 0.85rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__empty {
    margin: 0;
    padding: 0.9rem 1rem;
    border: 1px dashed var(--admin-docked-surface-border, var(--admin-border, #e5e7eb));
    border-radius: 1rem;
    background: color-mix(in srgb, var(--admin-surface-2, var(--admin-surface, #ffffff)) 92%, transparent);
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.92rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__intro,
.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__group,
.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command {
    border-radius: 0.75rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__intro {
    border: 1px solid var(--admin-docked-surface-border, var(--admin-border, #e5e7eb));
    background: color-mix(in srgb, var(--admin-surface-2, var(--admin-surface, #ffffff)) 94%, transparent);
    box-shadow: var(--shadow-sm);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__intro-icon {
    background: rgba(59, 130, 246, 0.14);
    color: var(--brand-primary);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__group-label {
    margin: 0 0 0.65rem;
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__group {
    padding: 0.75rem;
    border: 1px solid var(--admin-docked-surface-border, var(--admin-border, #e5e7eb));
    background: var(--admin-surface-2, var(--admin-surface, #ffffff));
    box-shadow: var(--shadow-sm);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__group-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
    padding: 0.75rem;
    border-color: var(--admin-docked-surface-border, var(--admin-border, #e5e7eb));
    background: var(--admin-surface, #ffffff);
    text-decoration: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
    cursor: pointer;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command:hover,
.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command:focus-visible,
.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command.is-active {
    border-color: var(--brand-primary);
    background: var(--admin-surface, #ffffff);
    box-shadow: var(--shadow-sm);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command:hover {
    background: var(--admin-surface, #ffffff);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command.is-active {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12), var(--shadow-sm);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14), var(--shadow-sm);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__icon {
    background: var(--admin-surface-3, var(--admin-surface, #ffffff));
    color: var(--brand-primary);
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    text-align: left;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__label {
    color: var(--admin-text, #111827);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__description {
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.82rem;
    line-height: 1.3;
    word-break: break-word;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    margin-left: auto;
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.85rem;
    transition: color 150ms ease;
}

.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command:hover .admin-quick-actions-docked__go,
.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command:focus-visible .admin-quick-actions-docked__go,
.admin-floating-surface__body--variant-action-grid .admin-quick-actions-docked__command.is-active .admin-quick-actions-docked__go {
    color: var(--brand-primary);
}

.admin-floating-surface__body--variant-status-banner {
    padding: 0.85rem;
}

.admin-floating-surface__body--variant-status-banner .admin-docked-surface__impersonation-copy {
    min-height: 4rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--admin-docked-surface-border, var(--admin-border, #e5e7eb));
    background: var(--admin-surface-2, var(--admin-surface, #ffffff));
    box-shadow: var(--shadow-sm);
}

.admin-floating-surface__body--variant-status-banner .admin-docked-surface__impersonation-copy .impersonation-bar-info {
    margin: 0;
}

.admin-floating-surface__body--variant-terminal-stream {
    padding: 0;
}

.admin-floating-surface__body--variant-terminal-stream .admin-error-debug-terminal-wrap--tray {
    margin-bottom: 0;
}

.admin-floating-surface__body--variant-terminal-stream .admin-error-debug-terminal--tray .admin-error-debug-terminal__viewport {
    max-height: min(44vh, 20rem);
}

.admin-docked-surface-body--terminal {
    padding: 0;
}

.admin-error-debug-terminal-wrap--tray {
    margin-bottom: 0;
}

.admin-error-debug-terminal--tray .admin-error-debug-terminal__viewport {
    max-height: min(38vh, 18rem);
}

body.admin-shell.admin-theme-dark .admin-docked-surface__empty,
body.admin-shell.admin-theme-system .admin-docked-surface__empty {
    color: #9ca3af;
}

.admin-docked-surface-header {
    border-bottom: 1px solid rgba(59, 130, 246, 0.18);
}

/* ========================================
   ADMIN DOCKED TAB STRIP - Browser-style horizontal tabs
   Groups bottom-right docked-chat surfaces in one tab bar
   ======================================== */

.admin-docked-tab-strip {
    --admin-docked-tab-strip-gap: 0.5rem;
    position: fixed;
    right: var(--admin-scroll-to-top-right);
    bottom: 0;
    z-index: var(--admin-floating-surface-z-index);
    display: inline-flex;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
    gap: var(--admin-docked-tab-strip-gap);
    width: auto;
    max-width: calc(100vw - (var(--admin-scroll-to-top-right) * 2));
    pointer-events: none;
    box-sizing: border-box;
}

/* Pull strip members out of fixed viewport positioning so flex can cluster them. */
.admin-docked-tab-strip > .admin-floating-surface,
.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat[data-admin-floating-surface-zone="bottom-right"],
.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat[data-admin-floating-surface-zone="bottom-left"],
.admin-docked-tab-strip > .admin-pinned-workspace.admin-floating-surface--docked-chat[data-admin-floating-surface-zone="bottom-right"] {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto;
    display: block !important;
    flex: 0 0 auto;
    width: auto !important;
    max-width: none !important;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat .admin-floating-surface__shell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    pointer-events: auto;
}

/* Panel floats above the tab row; flex item width stays launcher-only. */
.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat .admin-floating-surface__window {
    position: absolute;
    right: 0;
    left: auto;
    width: var(--admin-floating-surface-shell-width, min(32rem, calc(100vw - (var(--admin-scroll-to-top-right) * 2))));
    min-width: min(20rem, calc(100vw - (var(--admin-scroll-to-top-right) * 2)));
    max-width: min(32rem, calc(100vw - (var(--admin-scroll-to-top-right) * 2)));
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__window {
    bottom: 0;
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-expanded .admin-floating-surface__window {
    bottom: 100%;
    border-bottom: none;
    border-radius: 0.95rem 0.95rem 0 0;
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat .admin-floating-surface__launcher {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: min(12.5rem, 36vw);
    border-radius: 0.65rem 0.65rem 0 0;
    border-bottom: none;
    margin: 0;
    white-space: nowrap;
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-expanded {
    z-index: 2;
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-expanded .admin-floating-surface__launcher {
    min-height: 2.8rem;
    max-height: 3.5rem;
    padding: 0.55rem 0.95rem;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    border-color: var(--admin-floating-surface-tab-border);
    box-shadow: var(--admin-floating-surface-tab-shadow);
    background: var(--admin-floating-surface-bg);
    color: var(--admin-floating-surface-text);
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__tab-hint,
.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-expanded .admin-floating-surface__tab-hint,
.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat .admin-floating-surface__tab-arrow {
    display: none;
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__tab-label {
    font-size: 0.8125rem;
    font-weight: 700;
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-expanded .admin-floating-surface__tab-label {
    font-weight: 800;
}

.admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat.is-collapsed .admin-floating-surface__tab-icon {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .admin-docked-tab-strip {
        --admin-docked-tab-strip-gap: 0.4rem;
    }

    .admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat .admin-floating-surface__launcher {
        max-width: min(10rem, 34vw);
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .admin-docked-tab-strip > .admin-floating-surface.admin-floating-surface--docked-chat .admin-floating-surface__tab-copy {
        min-width: 0;
    }
}

/* ========================================
   IMPERSONATION BAR - Global Component
   Used when a superadmin is acting as another admin account
   ======================================== */

.impersonation-bar {
    --admin-floating-surface-border: var(--impersonation-bar-border);
    --admin-floating-surface-bg: var(--impersonation-bar-bg);
    --admin-floating-surface-text: var(--impersonation-bar-text);
    --admin-floating-surface-muted: var(--impersonation-bar-muted);
    --admin-floating-surface-shadow: var(--impersonation-bar-shadow);
    --admin-floating-surface-tab-border: var(--impersonation-bar-border);
    --admin-floating-surface-tab-bg: var(--impersonation-bar-bg);
    --admin-floating-surface-tab-text: var(--impersonation-bar-text);
    --admin-floating-surface-tab-shadow: var(--impersonation-bar-shadow);
    --admin-floating-surface-base-inline: var(--admin-scroll-to-top-right);
}

.impersonation-bar .impersonation-bar-info,
.impersonation-bar .impersonation-bar-meta {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
}

.impersonation-bar .impersonation-bar-info {
    font-weight: 600;
}

.impersonation-bar .impersonation-bar-meta {
    color: var(--impersonation-bar-muted);
}

.impersonation-bar .impersonation-bar-toggle {
    width: 1.8rem;
    height: 1.8rem;
    color: inherit;
}

.impersonation-bar .impersonation-bar-footer .btn {
    padding: 0.44rem 0.75rem;
    border-radius: 0.65rem;
    box-shadow: none;
}

/* ========================================
   TOGGLE SWITCH COMPONENT - Global Component
   Used in: Security Center, Settings, Weather, Profile
   Version: 1.0.0
   ======================================== */

/* Toggle Switch Container */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Menu Manager tree indentation */
.menu-item-row.menu-item-level-0 { margin-left: 0; }
.menu-item-row.menu-item-level-1 { margin-left: 2rem; }
.menu-item-row.menu-item-level-2 { margin-left: 4rem; }
.menu-item-row.menu-item-level-3 { margin-left: 6rem; }
.menu-item-row.menu-item-level-4 { margin-left: 8rem; }
.menu-item-row.menu-item-level-5 { margin-left: 10rem; }
.menu-item-row.menu-item-level-6 { margin-left: 12rem; }

/* Toggle Slider (Background) */
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

/* Toggle Slider Circle (Knob) */
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

/* Checked State - Blue Background */
input:checked + .toggle-slider {
    background-color: #2563EB;
}

/* Checked State - Move Circle to Right */
input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Toggle row shell variants (settings and shared admin forms) */
.admin-toggle-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-default, #e5e7eb);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.admin-toggle-row--compact {
    padding: 0.75rem;
}

.admin-toggle-row--neutral:hover {
    background-color: var(--gray-50, #f9fafb);
}

.admin-toggle-row--warning {
    border-color: #fcd34d;
}

.admin-toggle-row--warning:hover {
    background-color: #fef3c7;
}

.admin-toggle-row--danger {
    border-color: #fecaca;
}

.admin-toggle-row--danger:hover {
    background-color: #fef2f2;
}

.admin-toggle-row--success {
    border-color: #bbf7d0;
}

.admin-toggle-row--success:hover {
    background-color: #f0fdf4;
}

.admin-toggle-row__content .form-label {
    display: block;
}

.admin-toggle-row__status {
    padding-top: 0.125rem;
}

/* ========================================
   PROFILE PAGE STYLES
   Version: 1.0.0
   ======================================== */

.profile-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.profile-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-right: 16px;
}

.profile-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.info-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.preference-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.preference-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preference-toggle-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.preference-toggle-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.preference-toggle-text p {
    font-size: 12px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

/* ========================================
   NATIVE LANGUAGE SWITCHER
   ======================================== */

/* Shared dropdown system used by the admin header language and user menus */
.admin-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.admin-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: auto;
    transform-origin: top right;
}

/* Native CSS Language Switcher Dropdown */
.language-switcher-native {
    position: relative;
}

/* Show dropdown on hover and focus */
.language-switcher-native:hover .language-dropdown,
.language-switcher-native:focus-within .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Dropdown transitions */
.language-dropdown {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
}

/* Prevent dropdown from closing when hovering over it */
.language-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Focus styles for accessibility */
.language-switcher-native div[tabindex="0"]:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Enhanced hover effects for language options */
.language-dropdown a:hover {
    background-color: #eff6ff;
    color: #2563eb;
}

/* Active language styling */
.language-dropdown a.bg-blue-50 {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

/* Smooth chevron rotation */
.language-switcher-native:hover .fa-chevron-down,
.language-switcher-native:focus-within .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.2s ease-in-out;
}

.language-switcher-native .fa-chevron-down {
    transition: transform 0.2s ease-in-out;
}

/* ========================================
   LANGUAGE DEBUG FOOTER
   ======================================== */

.admin-language-debug {
    position: relative;
    z-index: 20;
    margin: 1rem 1rem 0;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.admin-language-debug__details {
    display: block;
}

.admin-language-debug__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #1e293b;
    font-size: 0.8125rem;
    font-weight: 500;
}

.admin-language-debug__summary::-webkit-details-marker {
    display: none;
}

.admin-language-debug__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: #1d4ed8;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-language-debug__summary-text {
    color: #334155;
    line-height: 1.4;
}

.admin-language-debug__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

.admin-language-debug__item {
    padding: 0.75rem;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
}

.admin-language-debug__label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.admin-language-debug__value {
    display: block;
    font-size: 0.875rem;
    color: #0f172a;
    word-break: break-word;
}

.admin-language-debug__samples {
    padding: 0 1rem 1rem;
}

.admin-language-debug__samples-title {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
}

.admin-language-debug__sample-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.admin-language-debug__sample-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
}

.admin-language-debug__sample-key {
    color: #0f172a;
    font-size: 0.8125rem;
    word-break: break-word;
}

.admin-language-debug__sample-meta {
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.75rem;
    white-space: nowrap;
}

body.admin-shell.admin-theme-dark .profile-card,
body.admin-shell.admin-theme-dark .admin-card,
body.admin-shell.admin-theme-dark .admin-card-surface,
body.admin-shell.admin-theme-dark .admin-table,
body.admin-shell.admin-theme-dark .sticky-save-bar-container,
body.admin-shell.admin-theme-dark .admin-shell-footer__inner,
body.admin-shell.admin-theme-dark .admin-global-search-panel,
body.admin-shell.admin-theme-dark .admin-version-modal__dialog,
body.admin-shell.admin-theme-dark .admin-language-debug {
    background: var(--admin-surface-elevated);
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-xl);
}

body.admin-shell.admin-theme-dark .profile-card-header,
body.admin-shell.admin-theme-dark .admin-card-header,
body.admin-shell.admin-theme-dark .admin-card-header.collapsible,
body.admin-shell.admin-theme-dark .admin-global-search-header,
body.admin-shell.admin-theme-dark .admin-version-modal__header {
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .profile-card-title,
body.admin-shell.admin-theme-dark .admin-card-title,
body.admin-shell.admin-theme-dark .admin-version-modal__title,
body.admin-shell.admin-theme-dark .admin-global-search-input,
body.admin-shell.admin-theme-dark .admin-language-debug__value,
body.admin-shell.admin-theme-dark .admin-language-debug__sample-key {
    color: var(--text-primary);
}

body.admin-shell.admin-theme-dark .admin-card-subtitle,
body.admin-shell.admin-theme-dark .info-label,
body.admin-shell.admin-theme-dark .info-value,
body.admin-shell.admin-theme-dark .preference-toggle-text p,
body.admin-shell.admin-theme-dark .admin-global-search-close,
body.admin-shell.admin-theme-dark .admin-version-modal__eyebrow,
body.admin-shell.admin-theme-dark .admin-version-modal__subtitle,
body.admin-shell.admin-theme-dark .admin-language-debug__summary,
body.admin-shell.admin-theme-dark .admin-language-debug__summary-text,
body.admin-shell.admin-theme-dark .admin-language-debug__sample-meta,
body.admin-shell.admin-theme-dark .admin-shell-footer__copyright,
body.admin-shell.admin-theme-dark .admin-shell-footer__credit,
body.admin-shell.admin-theme-dark .admin-shell-footer__metric,
body.admin-shell.admin-theme-dark .admin-shell-footer__session-reference,
body.admin-shell.admin-theme-dark .sticky-save-bar-info {
    color: var(--text-secondary);
}

body.admin-shell.admin-theme-dark .profile-card,
body.admin-shell.admin-theme-dark .info-item,
body.admin-shell.admin-theme-dark .preference-toggle,
body.admin-shell.admin-theme-dark .preference-toggle-icon,
body.admin-shell.admin-theme-dark .admin-card,
body.admin-shell.admin-theme-dark .admin-card-surface,
body.admin-shell.admin-theme-dark .admin-table,
body.admin-shell.admin-theme-dark .admin-global-search-input-wrapper,
body.admin-shell.admin-theme-dark .admin-version-modal__close,
body.admin-shell.admin-theme-dark .admin-shell-footer__metric,
body.admin-shell.admin-theme-dark .admin-language-debug__item,
body.admin-shell.admin-theme-dark .admin-language-debug__sample-item {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .admin-table tbody tr.module-row--quarantined > td {
    background: rgba(127, 29, 29, 0.42);
    border-bottom-color: rgba(248, 113, 113, 0.22);
}

body.admin-shell.admin-theme-dark .admin-table tbody tr.module-row--quarantined > td:first-child {
    box-shadow: inset 4px 0 0 #f87171;
}

body.admin-shell.admin-theme-dark .admin-table tbody tr.module-row--quarantined:hover > td {
    background: rgba(127, 29, 29, 0.52);
}

body.admin-shell.admin-theme-dark .profile-card-icon,
body.admin-shell.admin-theme-dark .admin-page-header-icon {
    background: rgba(96, 165, 250, 0.16);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.28);
    box-shadow: none;
}

body.admin-shell.admin-theme-dark .admin-page-header-card__banner .admin-page-header-icon,
body.admin-shell.admin-theme-system .admin-page-header-card__banner .admin-page-header-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
}

body.admin-shell.admin-theme-dark .preference-toggle {
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}

body.admin-shell.admin-theme-dark .preference-toggle-icon {
    color: #bfdbfe;
}

body.admin-shell.admin-theme-dark .admin-card-header.collapsible:hover {
    background-color: rgba(30, 41, 59, 0.72);
}

body.admin-shell.admin-theme-dark .admin-card-header.collapsible .collapse-icon {
    color: var(--text-secondary);
}

body.admin-shell.admin-theme-dark .admin-card-header.collapsible:hover .collapse-icon {
    color: var(--text-primary);
}

body.admin-shell.admin-theme-dark .admin-card-subtitle {
    color: #cbd5e1;
}

body.admin-shell.admin-theme-dark .admin-info-card {
    --admin-info-card-bg: rgba(15, 23, 42, 0.76);
    --admin-info-card-border: rgba(148, 163, 184, 0.24);
    --admin-info-card-title: #f8fafc;
    --admin-info-card-body: #cbd5e1;
    --admin-info-card-icon-bg: rgba(59, 130, 246, 0.16);
    --admin-info-card-icon-color: #bfdbfe;
    --admin-info-card-pattern-opacity: 0.08;
}

body.admin-shell.admin-theme-dark .admin-info-card--info {
    --admin-info-card-bg: rgba(15, 23, 42, 0.8);
    --admin-info-card-border: rgba(96, 165, 250, 0.24);
    --admin-info-card-title: #dbeafe;
    --admin-info-card-body: #bfdbfe;
    --admin-info-card-icon-bg: rgba(37, 99, 235, 0.18);
    --admin-info-card-icon-color: #93c5fd;
}

body.admin-shell.admin-theme-dark .admin-info-card--success {
    --admin-info-card-bg: rgba(6, 78, 59, 0.22);
    --admin-info-card-border: rgba(52, 211, 153, 0.22);
    --admin-info-card-title: #d1fae5;
    --admin-info-card-body: #a7f3d0;
    --admin-info-card-icon-bg: rgba(16, 185, 129, 0.18);
    --admin-info-card-icon-color: #6ee7b7;
}

body.admin-shell.admin-theme-dark .admin-info-card--warning {
    --admin-info-card-bg: rgba(120, 53, 15, 0.22);
    --admin-info-card-border: rgba(251, 191, 36, 0.22);
    --admin-info-card-title: #fde68a;
    --admin-info-card-body: #fcd34d;
    --admin-info-card-icon-bg: rgba(245, 158, 11, 0.18);
    --admin-info-card-icon-color: #fbbf24;
}

body.admin-shell.admin-theme-dark .admin-info-card--danger {
    --admin-info-card-bg: rgba(127, 29, 29, 0.24);
    --admin-info-card-border: rgba(248, 113, 113, 0.22);
    --admin-info-card-title: #fecaca;
    --admin-info-card-body: #fca5a5;
    --admin-info-card-icon-bg: rgba(239, 68, 68, 0.18);
    --admin-info-card-icon-color: #f87171;
}

body.admin-shell.admin-theme-dark .admin-info-card--neutral {
    --admin-info-card-bg: rgba(30, 41, 59, 0.72);
    --admin-info-card-border: rgba(71, 85, 105, 0.9);
    --admin-info-card-title: #f8fafc;
    --admin-info-card-body: #cbd5e1;
    --admin-info-card-icon-bg: rgba(148, 163, 184, 0.16);
    --admin-info-card-icon-color: #e2e8f0;
}

body.admin-shell.admin-theme-dark .admin-info-card--blue {
    --admin-info-card-bg: rgba(15, 23, 42, 0.8);
    --admin-info-card-border: rgba(96, 165, 250, 0.24);
    --admin-info-card-title: #dbeafe;
    --admin-info-card-body: #bfdbfe;
    --admin-info-card-icon-bg: rgba(37, 99, 235, 0.18);
    --admin-info-card-icon-color: #93c5fd;
}

body.admin-shell.admin-theme-dark .admin-info-card--purple {
    --admin-info-card-bg: rgba(76, 29, 149, 0.22);
    --admin-info-card-border: rgba(167, 139, 250, 0.22);
    --admin-info-card-title: #ede9fe;
    --admin-info-card-body: #ddd6fe;
    --admin-info-card-icon-bg: rgba(37, 99, 235, 0.18);
    --admin-info-card-icon-color: #c4b5fd;
}

body.admin-shell.admin-theme-dark .admin-info-card--cyan {
    --admin-info-card-bg: rgba(14, 116, 144, 0.2);
    --admin-info-card-border: rgba(34, 211, 238, 0.22);
    --admin-info-card-title: #cffafe;
    --admin-info-card-body: #a5f3fc;
    --admin-info-card-icon-bg: rgba(8, 145, 178, 0.18);
    --admin-info-card-icon-color: #67e8f9;
}

body.admin-shell.admin-theme-dark .admin-info-card--emerald {
    --admin-info-card-bg: rgba(6, 78, 59, 0.24);
    --admin-info-card-border: rgba(52, 211, 153, 0.24);
    --admin-info-card-title: #d1fae5;
    --admin-info-card-body: #a7f3d0;
    --admin-info-card-icon-bg: rgba(16, 185, 129, 0.2);
    --admin-info-card-icon-color: #6ee7b7;
}

body.admin-shell.admin-theme-dark .admin-tabs {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-sm);
}

body.admin-shell.admin-theme-dark .admin-tabs-stack--unified {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-sm);
}

body.admin-shell.admin-theme-dark .admin-tabs-stack--unified .admin-tabs-stack__row--primary {
    --admin-tabs-scroll-fade: var(--admin-surface-elevated);
}

body.admin-shell.admin-theme-dark .admin-tabs-stack--unified .admin-tabs-stack__row--secondary {
    background: rgba(15, 23, 42, 0.35);
    --admin-tabs-scroll-fade: rgba(15, 23, 42, 0.72);
}

body.admin-shell.admin-theme-dark .admin-tabs-stack--unified .admin-tabs-stack__row:not(:last-child) .admin-tabs__inner,
body.admin-shell.admin-theme-dark .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__inner {
    border-bottom-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .admin-tabs__inner,
body.admin-shell.admin-theme-dark .admin-tabs__inner--compact,
body.admin-shell.admin-theme-dark .admin-tabs__separator {
    border-color: var(--admin-border);
    background: transparent;
}

body.admin-shell.admin-theme-dark .admin-tabs__tab.is-active.is-swipe-resting {
    color: var(--text-muted);
}

body.admin-shell.admin-theme-dark .admin-tabs__badge {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

body.admin-shell.admin-theme-dark .sticky-save-bar-container {
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

body.admin-shell.admin-theme-dark .admin-shell-footer__inner {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.92) 100%);
}

body.admin-shell.admin-theme-dark .admin-shell-footer__credit a,
body.admin-shell.admin-theme-dark .admin-shell-footer__version-link {
    color: #93c5fd;
}

body.admin-shell.admin-theme-dark .admin-shell-footer__credit a:hover,
body.admin-shell.admin-theme-dark .admin-shell-footer__version-link:hover,
body.admin-shell.admin-theme-dark .admin-shell-footer__version-link:focus-visible {
    color: #bfdbfe;
}

body.admin-shell.admin-theme-dark .admin-shell-footer__separator {
    color: #64748b;
}

body.admin-shell.admin-theme-dark .admin-shell-footer__session {
    background: rgba(30, 64, 175, 0.22);
    color: #bfdbfe;
}

body.admin-shell.admin-theme-dark .admin-shell-footer__session.is-warning {
    background: rgba(146, 64, 14, 0.24);
    color: #fde68a;
}

body.admin-shell.admin-theme-dark .admin-shell-footer__session.is-danger {
    background: rgba(153, 27, 27, 0.24);
    color: #fecaca;
}

body.admin-shell.admin-theme-dark .admin-global-search-header {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.92) 100%);
}

body.admin-shell.admin-theme-dark .admin-global-search-input-wrapper {
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08), 0 8px 18px rgba(2, 6, 23, 0.22);
}

body.admin-shell.admin-theme-dark .admin-global-search-input-wrapper,
body.admin-shell.admin-theme-dark .admin-version-modal__close,
body.admin-shell.admin-theme-dark .admin-global-search-close {
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .admin-global-search-close {
    background: rgba(51, 65, 85, 0.9);
}

body.admin-shell.admin-theme-dark .admin-global-search-close:hover {
    background: rgba(127, 29, 29, 0.4);
    color: #fecaca;
}

body.admin-shell.admin-theme-dark .admin-global-search-close-label kbd {
    background: rgba(51, 65, 85, 0.95);
    color: #cbd5e1;
}

body.admin-shell.admin-theme-dark .admin-version-modal__overlay {
    background: rgba(2, 6, 23, 0.78);
}

body.admin-shell.admin-theme-dark .admin-version-modal__header {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.9) 100%);
}

body.admin-shell.admin-theme-dark .admin-version-modal__subtitle-separator {
    color: #475569;
}

body.admin-shell.admin-theme-dark .admin-version-modal__load-more {
    background: rgba(30, 64, 175, 0.22);
    border-color: rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
}

body.admin-shell.admin-theme-dark .admin-version-modal__load-more:hover,
body.admin-shell.admin-theme-dark .admin-version-modal__load-more:focus-visible {
    background: rgba(37, 99, 235, 0.3);
    border-color: rgba(147, 197, 253, 0.32);
    color: #eff6ff;
}

body.admin-shell.admin-theme-dark .admin-language-debug {
    border-color: rgba(96, 165, 250, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.92) 100%);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.32);
}

body.admin-shell.admin-theme-dark .admin-language-debug__summary {
    color: #dbeafe;
}

body.admin-shell.admin-theme-dark .admin-language-debug__badge {
    background: rgba(37, 99, 235, 0.34);
    color: #eff6ff;
}

body.admin-shell.admin-theme-dark .admin-language-debug__sample-item {
    background: rgba(30, 41, 59, 0.88);
    border-color: rgba(71, 85, 105, 0.85);
}

body.admin-shell.admin-theme-dark .admin-dropdown-menu {
    filter: drop-shadow(0 18px 34px rgba(2, 6, 23, 0.35));
}

/* ========================================
   ADMIN SHELL FOOTER BAR
   ======================================== */

.admin-shell-footer {
    position: relative;
    flex-shrink: 0;
    z-index: 15;
    display: flex;
    justify-content: center;
    margin: 1.5rem 1rem 0;
}

.admin-shell-footer__inner {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    overflow-x: auto;
    width: 60%;
    min-width: 0;
    max-width: 72rem;
}

body.admin-shell.page-accommodations-add,
body.admin-shell.page-accommodations-edit {
    --sticky-save-bar-bottom-offset: 1rem;
}

body.admin-shell.page-accommodations-add .admin-shell-footer,
body.admin-shell.page-accommodations-edit .admin-shell-footer {
    margin-top: 1rem;
}

.admin-shell-footer__brand {
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.625rem;
    flex: 1 1 auto;
}

.admin-shell-footer__meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}

.admin-shell-footer__copyright,
.admin-shell-footer__credit,
.admin-shell-footer__metric {
    font-size: 0.8125rem;
    color: #475569;
    white-space: nowrap;
}

.admin-shell-footer__credit a {
    color: #1d4ed8;
    text-decoration: none;
}

.admin-shell-footer__credit a:hover {
    text-decoration: underline;
}

.admin-shell-footer__separator {
    color: #cbd5e1;
    flex-shrink: 0;
}

.admin-shell-footer__separator--spacer {
    margin-left: 0.25rem;
}

.admin-shell-footer__metric {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.45rem 0.75rem;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #334155;
    flex-shrink: 0;
    border: 0;
    text-align: left;
    transition: all 0.2s ease;
    font-weight: 700;
}

.admin-shell-footer__version-link {
    color: #1d4ed8;
    cursor: pointer;
    text-decoration: none;
}

.admin-shell-footer__version-link:hover,
.admin-shell-footer__version-link:focus-visible {
    color: #2563eb;
    outline: none;
}

.admin-shell-footer__session {
    background: #eff6ff;
    color: #1e40af;
}

.admin-shell-footer__session.is-warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-shell-footer__session.is-danger {
    background: #fee2e2;
    color: #991b1b;
}

.admin-shell-footer__session-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: inherit;
}

.admin-shell-footer__session-countdown {
    font-weight: 800;
    letter-spacing: 0.01em;
    color: inherit;
}

.admin-shell-footer__session-reference {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========================================
   VERSION CHANGELOG MODAL
   ======================================== */

.admin-version-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-version-modal.hidden {
    display: none;
}

.admin-version-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.admin-version-modal__dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(80vh, 900px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
}

.admin-version-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.admin-version-modal__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-version-modal__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
    color: #0f172a;
}

.admin-version-modal__subtitle {
    margin: 0.3rem 0 0;
    font-size: 0.8125rem;
    color: #475569;
}

.admin-version-modal__subtitle-separator {
    margin: 0 0.35rem;
    color: #cbd5e1;
}

.admin-version-modal__close {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
}

.admin-version-modal__close:hover,
.admin-version-modal__close:focus-visible {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
}

.admin-version-modal__body {
    overflow-y: auto;
    padding: 1rem 1.1rem 1.1rem;
}

.admin-version-modal__changelog-list {
    display: grid;
    gap: 0.85rem;
}

.admin-version-modal__load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.admin-version-modal__load-more {
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    padding: 0.6rem 1rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-version-modal__load-more:hover,
.admin-version-modal__load-more:focus-visible {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
    transform: translateY(-1px);
}

.admin-version-modal__entry {
    padding: 0.9rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.admin-version-modal__entry-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.admin-version-modal__entry-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-version-modal__entry-meta {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.admin-version-modal__entry-description {
    margin: 0.7rem 0 0;
    font-size: 0.875rem;
    color: #334155;
}

.admin-version-modal__entry-list {
    margin: 0.75rem 0 0 1.1rem;
    padding: 0;
    color: #475569;
    font-size: 0.8125rem;
    display: grid;
    gap: 0.35rem;
}

.admin-version-modal__empty {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

/* ========================================
   ADMIN LOADING ANIMATIONS
   ======================================== */

.admin-loading-animations-enabled .admin-shell {
    animation: adminShellFadeIn 0.18s ease-out;
}

.admin-loading-animations-enabled.admin-loading-is-loading {
    overflow: hidden;
}

.admin-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.admin-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.admin-loading-overlay__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 220px;
    max-width: min(100%, 360px);
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    text-align: center;
}

.admin-loading-overlay__spinner {
    font-size: 1.75rem;
    color: #2563eb;
}

.admin-loading-overlay__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.admin-loading-overlay__text {
    margin: 0;
    font-size: 0.875rem;
    color: #475569;
}

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

@media (prefers-reduced-motion: reduce) {
    .admin-loading-animations-enabled .admin-shell {
        animation: none;
    }

    .admin-loading-overlay {
        transition: none;
    }

    .admin-loading-overlay__spinner {
        animation: none;
    }
}

@media (max-width: 768px) {
    .admin-shell-footer {
        margin: 1rem 0.75rem 0;
        justify-content: stretch;
    }

    .admin-shell-footer__inner {
        gap: 0.75rem;
        padding: 0.75rem 0.875rem;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
    }

    .admin-shell-footer__brand {
        gap: 0.5rem;
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-shell-footer__meta {
        gap: 0.5rem;
        margin-left: 0;
        flex-wrap: wrap;
        justify-self: auto;
        justify-content: flex-start;
    }

    .admin-version-modal {
        padding: 0.5rem;
    }

    .admin-version-modal__header {
        flex-direction: column;
    }
}

body.admin-shell.admin-theme-dark .modal-content,
body.admin-shell.admin-theme-system .modal-content {
    background: var(--admin-surface-elevated);
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .modal-header,
body.admin-shell.admin-theme-dark .modal-footer,
body.admin-shell.admin-theme-system .modal-header,
body.admin-shell.admin-theme-system .modal-footer {
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .modal-title,
body.admin-shell.admin-theme-system .modal-title {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .admin-global-search-panel,
body.admin-shell.admin-theme-system .admin-global-search-panel {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .admin-global-search-header,
body.admin-shell.admin-theme-system .admin-global-search-header {
    background: linear-gradient(180deg, var(--admin-surface-elevated) 0%, var(--admin-surface-2) 100%);
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .admin-global-search-input-wrapper,
body.admin-shell.admin-theme-system .admin-global-search-input-wrapper {
    background: var(--admin-input-bg);
    border-color: var(--admin-input-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 18px rgba(15, 23, 42, 0.08);
}

body.admin-shell.admin-theme-dark .admin-global-search-input,
body.admin-shell.admin-theme-system .admin-global-search-input {
    color: var(--admin-input-text);
}

body.admin-shell.admin-theme-dark .admin-global-search-input::placeholder,
body.admin-shell.admin-theme-system .admin-global-search-input::placeholder {
    color: var(--admin-input-placeholder);
}

body.admin-shell.admin-theme-dark .admin-global-search-close,
body.admin-shell.admin-theme-system .admin-global-search-close {
    background: var(--admin-surface-2);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .admin-global-search-close:hover,
body.admin-shell.admin-theme-system .admin-global-search-close:hover {
    background: rgba(239, 68, 68, 0.16);
    color: #f87171;
}

body.admin-shell.admin-theme-dark .admin-global-search-close-label kbd,
body.admin-shell.admin-theme-system .admin-global-search-close-label kbd,
body.admin-shell.admin-theme-dark .admin-global-search-nav-hint,
body.admin-shell.admin-theme-system .admin-global-search-nav-hint {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .admin-global-search-nav-hint kbd,
body.admin-shell.admin-theme-system .admin-global-search-nav-hint kbd {
    background: var(--admin-surface-3);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .admin-global-search-group-header,
body.admin-shell.admin-theme-system .admin-global-search-group-header,
body.admin-shell.admin-theme-dark .admin-global-search-item-group,
body.admin-shell.admin-theme-system .admin-global-search-item-group,
body.admin-shell.admin-theme-dark .admin-global-search-item-description,
body.admin-shell.admin-theme-system .admin-global-search-item-description,
body.admin-shell.admin-theme-dark .admin-global-search-empty,
body.admin-shell.admin-theme-system .admin-global-search-empty,
body.admin-shell.admin-theme-dark .admin-global-search-empty span,
body.admin-shell.admin-theme-system .admin-global-search-empty span,
body.admin-shell.admin-theme-dark .admin-version-modal__eyebrow,
body.admin-shell.admin-theme-system .admin-version-modal__eyebrow,
body.admin-shell.admin-theme-dark .admin-version-modal__subtitle,
body.admin-shell.admin-theme-system .admin-version-modal__subtitle,
body.admin-shell.admin-theme-dark .admin-version-modal__entry-meta,
body.admin-shell.admin-theme-system .admin-version-modal__entry-meta,
body.admin-shell.admin-theme-dark .admin-version-modal__entry-list,
body.admin-shell.admin-theme-system .admin-version-modal__entry-list,
body.admin-shell.admin-theme-dark .admin-version-modal__empty,
body.admin-shell.admin-theme-system .admin-version-modal__empty,
body.admin-shell.admin-theme-dark .admin-loading-overlay__text,
body.admin-shell.admin-theme-system .admin-loading-overlay__text {
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .admin-global-search-group-count,
body.admin-shell.admin-theme-system .admin-global-search-group-count {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

body.admin-shell.admin-theme-dark .admin-global-search-item,
body.admin-shell.admin-theme-system .admin-global-search-item,
body.admin-shell.admin-theme-dark .admin-version-modal__entry,
body.admin-shell.admin-theme-system .admin-version-modal__entry,
body.admin-shell.admin-theme-dark .admin-loading-overlay__panel,
body.admin-shell.admin-theme-system .admin-loading-overlay__panel {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .admin-global-search-item:hover,
body.admin-shell.admin-theme-dark .admin-global-search-item.is-active,
body.admin-shell.admin-theme-system .admin-global-search-item:hover,
body.admin-shell.admin-theme-system .admin-global-search-item.is-active,
body.admin-shell.admin-theme-dark .admin-version-modal__load-more:hover,
body.admin-shell.admin-theme-dark .admin-version-modal__load-more:focus-visible,
body.admin-shell.admin-theme-system .admin-version-modal__load-more:hover,
body.admin-shell.admin-theme-system .admin-version-modal__load-more:focus-visible {
    background: var(--admin-surface-2);
    border-color: var(--admin-border-strong);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .admin-global-search-item-icon,
body.admin-shell.admin-theme-system .admin-global-search-item-icon,
body.admin-shell.admin-theme-dark .admin-global-search-empty-icon,
body.admin-shell.admin-theme-system .admin-global-search-empty-icon,
body.admin-shell.admin-theme-dark .admin-version-modal__close,
body.admin-shell.admin-theme-system .admin-version-modal__close {
    background: var(--admin-surface-2);
    color: var(--brand-primary);
}

body.admin-shell.admin-theme-dark .admin-global-search-item-label,
body.admin-shell.admin-theme-system .admin-global-search-item-label,
body.admin-shell.admin-theme-dark .admin-global-search-empty p,
body.admin-shell.admin-theme-system .admin-global-search-empty p,
body.admin-shell.admin-theme-dark .admin-version-modal__title,
body.admin-shell.admin-theme-system .admin-version-modal__title,
body.admin-shell.admin-theme-dark .admin-version-modal__entry-title,
body.admin-shell.admin-theme-system .admin-version-modal__entry-title,
body.admin-shell.admin-theme-dark .admin-loading-overlay__title,
body.admin-shell.admin-theme-system .admin-loading-overlay__title {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .admin-global-search-item-arrow,
body.admin-shell.admin-theme-system .admin-global-search-item-arrow {
    color: var(--admin-text-soft);
}

body.admin-shell.admin-theme-dark .admin-global-search-empty-error,
body.admin-shell.admin-theme-system .admin-global-search-empty-error {
    background: rgba(127, 29, 29, 0.2);
    color: #fca5a5;
}

body.admin-shell.admin-theme-dark .admin-global-search-input-hint,
body.admin-shell.admin-theme-system .admin-global-search-input-hint {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .search-filter-bar,
body.admin-shell.admin-theme-system .search-filter-bar {
    background: var(--admin-surface-elevated);
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .search-filter-bar__pagination-summary,
body.admin-shell.admin-theme-system .search-filter-bar__pagination-summary {
    border-bottom-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .search-filter-bar__summary,
body.admin-shell.admin-theme-system .search-filter-bar__summary {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

body.admin-shell.admin-theme-dark .search-filter-bar__inline-summary-text,
body.admin-shell.admin-theme-system .search-filter-bar__inline-summary-text,
body.admin-shell.admin-theme-dark .search-filter-bar .pagination-info,
body.admin-shell.admin-theme-system .search-filter-bar .pagination-info,
body.admin-shell.admin-theme-dark .search-filter-bar .pagination-per-page label,
body.admin-shell.admin-theme-system .search-filter-bar .pagination-per-page label {
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .search-filter-bar .search-input,
body.admin-shell.admin-theme-system .search-filter-bar .search-input,
body.admin-shell.admin-theme-dark .search-filter-bar .filter-select,
body.admin-shell.admin-theme-system .search-filter-bar .filter-select,
body.admin-shell.admin-theme-dark .search-filter-bar .pagination-per-page select,
body.admin-shell.admin-theme-system .search-filter-bar .pagination-per-page select {
    background-color: var(--admin-input-bg);
    border-color: var(--admin-input-border);
    color: var(--admin-input-text);
}

body.admin-shell.admin-theme-dark .search-filter-bar .search-input::placeholder,
body.admin-shell.admin-theme-system .search-filter-bar .search-input::placeholder {
    color: var(--admin-input-placeholder);
}

body.admin-shell.admin-theme-dark .search-filter-bar .filter-select,
body.admin-shell.admin-theme-system .search-filter-bar .filter-select,
body.admin-shell.admin-theme-dark .search-filter-bar .pagination-per-page select,
body.admin-shell.admin-theme-system .search-filter-bar .pagination-per-page select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

body.admin-shell.admin-theme-dark .search-filter-bar .search-input:focus,
body.admin-shell.admin-theme-system .search-filter-bar .search-input:focus,
body.admin-shell.admin-theme-dark .search-filter-bar .filter-select:focus,
body.admin-shell.admin-theme-system .search-filter-bar .filter-select:focus,
body.admin-shell.admin-theme-dark .search-filter-bar .pagination-per-page select:focus,
body.admin-shell.admin-theme-system .search-filter-bar .pagination-per-page select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

body.admin-shell.admin-theme-dark .admin-version-modal__dialog,
body.admin-shell.admin-theme-system .admin-version-modal__dialog {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border);
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .admin-version-modal__header,
body.admin-shell.admin-theme-system .admin-version-modal__header {
    background: linear-gradient(180deg, var(--admin-surface-elevated) 0%, var(--admin-surface-2) 100%);
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .admin-version-modal__subtitle-separator,
body.admin-shell.admin-theme-system .admin-version-modal__subtitle-separator {
    color: var(--admin-text-soft);
}

body.admin-shell.admin-theme-dark .admin-version-modal__close:hover,
body.admin-shell.admin-theme-dark .admin-version-modal__close:focus-visible,
body.admin-shell.admin-theme-system .admin-version-modal__close:hover,
body.admin-shell.admin-theme-system .admin-version-modal__close:focus-visible {
    background: var(--admin-surface-3);
    color: var(--admin-text);
    border-color: var(--admin-border-strong);
}

body.admin-shell.admin-theme-dark .admin-version-modal__load-more,
body.admin-shell.admin-theme-system .admin-version-modal__load-more {
    background: var(--admin-surface-2);
    color: var(--brand-primary);
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .admin-loading-overlay__panel,
body.admin-shell.admin-theme-system .admin-loading-overlay__panel {
    background: var(--admin-surface-elevated);
}

body.admin-shell.admin-theme-dark .admin-loading-overlay__spinner,
body.admin-shell.admin-theme-system .admin-loading-overlay__spinner {
    color: var(--brand-primary);
}

body.admin-shell.admin-theme-dark .stat-card,
body.admin-shell.admin-theme-system .stat-card {
    background: linear-gradient(180deg, var(--admin-surface-elevated) 0%, var(--admin-surface-2) 100%);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .stat-card:hover,
body.admin-shell.admin-theme-system .stat-card:hover {
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .stat-card-icon,
body.admin-shell.admin-theme-system .stat-card-icon {
    opacity: 1;
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .stat-card-number,
body.admin-shell.admin-theme-dark .stat-card-label,
body.admin-shell.admin-theme-system .stat-card-number,
body.admin-shell.admin-theme-system .stat-card-label {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .stat-card-number,
body.admin-shell.admin-theme-system .stat-card-number {
    color: var(--admin-kpi-value);
}

body.admin-shell.admin-theme-dark .stat-card.stat-blue,
body.admin-shell.admin-theme-system .stat-card.stat-blue,
body.admin-shell.admin-theme-dark .stat-card.stat-indigo,
body.admin-shell.admin-theme-system .stat-card.stat-indigo {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(37, 99, 235, 0.14) 100%);
    border-color: rgba(96, 165, 250, 0.24);
}

body.admin-shell.admin-theme-dark .stat-card.stat-green,
body.admin-shell.admin-theme-system .stat-card.stat-green,
body.admin-shell.admin-theme-dark .stat-card.stat-emerald,
body.admin-shell.admin-theme-system .stat-card.stat-emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.14) 100%);
    border-color: rgba(52, 211, 153, 0.24);
}

body.admin-shell.admin-theme-dark .stat-card.stat-yellow,
body.admin-shell.admin-theme-system .stat-card.stat-yellow {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.14) 100%);
    border-color: rgba(251, 191, 36, 0.24);
}

body.admin-shell.admin-theme-dark .stat-card.stat-pink,
body.admin-shell.admin-theme-system .stat-card.stat-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.22) 0%, rgba(219, 39, 119, 0.14) 100%);
    border-color: rgba(244, 114, 182, 0.24);
}

body.admin-shell.admin-theme-dark .stat-card.stat-purple,
body.admin-shell.admin-theme-system .stat-card.stat-purple {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(37, 99, 235, 0.14) 100%);
    border-color: rgba(196, 181, 253, 0.24);
}

body.admin-shell.admin-theme-dark .stat-card.stat-red,
body.admin-shell.admin-theme-system .stat-card.stat-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(220, 38, 38, 0.14) 100%);
    border-color: rgba(248, 113, 113, 0.24);
}

body.admin-shell.admin-theme-dark .stat-card.stat-cyan,
body.admin-shell.admin-theme-system .stat-card.stat-cyan {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22) 0%, rgba(8, 145, 178, 0.14) 100%);
    border-color: rgba(103, 232, 249, 0.24);
}

body.admin-shell.admin-theme-dark .stat-card.stat-orange,
body.admin-shell.admin-theme-system .stat-card.stat-orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22) 0%, rgba(234, 88, 12, 0.14) 100%);
    border-color: rgba(253, 186, 116, 0.24);
}

body.admin-shell.admin-theme-dark .stat-card.stat-teal,
body.admin-shell.admin-theme-system .stat-card.stat-teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.22) 0%, rgba(13, 148, 136, 0.14) 100%);
    border-color: rgba(103, 232, 249, 0.18);
}

body.admin-shell.admin-theme-dark .stat-card.stat-gray,
body.admin-shell.admin-theme-system .stat-card.stat-gray {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.22) 0%, rgba(71, 85, 105, 0.14) 100%);
    border-color: rgba(148, 163, 184, 0.24);
}

body.admin-shell.admin-theme-dark .metric-card,
body.admin-shell.admin-theme-system .metric-card {
    --metric-card-bg: var(--admin-surface-elevated);
    --metric-card-border: var(--admin-border);
    --metric-card-title: var(--admin-text-muted);
    --metric-card-value: var(--admin-kpi-value);
    --metric-card-subtitle: var(--admin-text-muted);
    --metric-card-note: var(--admin-text-soft);
    --metric-card-icon-bg: var(--admin-surface-2);
    --metric-card-icon-color: var(--brand-primary);
    box-shadow: var(--admin-shadow-panel);
}

body.admin-shell.admin-theme-dark .metric-card:hover,
body.admin-shell.admin-theme-system .metric-card:hover {
    box-shadow: var(--admin-shadow-floating);
}

body.admin-shell.admin-theme-dark .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card__icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.admin-shell.admin-theme-dark .metric-card--critical,
body.admin-shell.admin-theme-system .metric-card--critical,
body.admin-shell.admin-theme-dark .metric-card--high,
body.admin-shell.admin-theme-system .metric-card--high,
body.admin-shell.admin-theme-dark .metric-card--medium,
body.admin-shell.admin-theme-system .metric-card--medium,
body.admin-shell.admin-theme-dark .metric-card--low,
body.admin-shell.admin-theme-system .metric-card--low,
body.admin-shell.admin-theme-dark .metric-card--success,
body.admin-shell.admin-theme-system .metric-card--success,
body.admin-shell.admin-theme-dark .metric-card--warning,
body.admin-shell.admin-theme-system .metric-card--warning,
body.admin-shell.admin-theme-dark .metric-card--neutral,
body.admin-shell.admin-theme-system .metric-card--neutral,
body.admin-shell.admin-theme-dark .metric-card--purple,
body.admin-shell.admin-theme-system .metric-card--purple,
body.admin-shell.admin-theme-dark .metric-card--cyan,
body.admin-shell.admin-theme-system .metric-card--cyan,
body.admin-shell.admin-theme-dark .metric-card--orange,
body.admin-shell.admin-theme-system .metric-card--orange,
body.admin-shell.admin-theme-dark .metric-card--emerald,
body.admin-shell.admin-theme-system .metric-card--emerald {
    --metric-card-bg: var(--admin-surface-elevated);
    --metric-card-border: var(--admin-border);
    --metric-card-title: var(--admin-text-muted);
    --metric-card-value: var(--admin-kpi-value);
    --metric-card-subtitle: var(--admin-text-muted);
    --metric-card-note: var(--admin-text-soft);
    --metric-card-icon-bg: var(--admin-surface-2);
    --metric-card-icon-color: var(--brand-primary);
}

body.admin-shell.admin-theme-dark .metric-card--info,
body.admin-shell.admin-theme-system .metric-card--info {
    --metric-card-bg: var(--admin-surface-elevated);
    --metric-card-border: var(--admin-border);
    --metric-card-title: var(--admin-text-muted);
    --metric-card-value: var(--admin-kpi-value);
    --metric-card-subtitle: var(--admin-text-muted);
    --metric-card-note: var(--admin-text-soft);
    --metric-card-icon-bg: var(--admin-surface-2);
    --metric-card-icon-color: var(--brand-primary);
}

body.admin-shell.admin-theme-dark .metric-card--critical .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--critical .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--high .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--high .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--medium .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--medium .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--low .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--low .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--success .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--success .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--warning .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--warning .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--neutral .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--neutral .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--purple .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--purple .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--cyan .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--cyan .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--orange .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--orange .metric-card__icon,
body.admin-shell.admin-theme-dark .metric-card--emerald .metric-card__icon,
body.admin-shell.admin-theme-system .metric-card--emerald .metric-card__icon {
    background: var(--admin-surface-2);
    color: var(--brand-primary);
}

body.admin-shell.admin-theme-dark .admin-shell-footer__metric,
body.admin-shell.admin-theme-system .admin-shell-footer__metric {
    background: var(--admin-surface-2);
    color: var(--admin-text-muted);
    border: 1px solid var(--admin-border);
}

body.admin-shell.admin-theme-dark .metric-card__value,
body.admin-shell.admin-theme-system .metric-card__value {
    color: var(--admin-kpi-value);
}

body.admin-shell.admin-theme-dark .metric-card,
body.admin-shell.admin-theme-system .metric-card {
    --metric-card-progress-track: var(--admin-surface-3);
}

body.admin-shell.admin-theme-dark .admin-shell-footer__metric:hover,
body.admin-shell.admin-theme-system .admin-shell-footer__metric:hover,
body.admin-shell.admin-theme-dark .admin-shell-footer__version-link:hover,
body.admin-shell.admin-theme-system .admin-shell-footer__version-link:hover {
    background: var(--admin-surface-3);
    color: var(--admin-text);
    border-color: var(--admin-border-strong);
}

/* Impersonation docked-chat footer row contract. */
.impersonation-bar.admin-floating-surface--docked-chat .impersonation-bar-footer {
    display: block;
}

.impersonation-bar.admin-floating-surface--docked-chat .impersonation-bar-footer-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.impersonation-bar.admin-floating-surface--docked-chat .impersonation-bar-footer-row > .impersonation-bar-footer-copy {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    min-inline-size: 0;
    justify-self: start;
    text-align: left;
    white-space: nowrap;
}

.impersonation-bar.admin-floating-surface--docked-chat .impersonation-bar-footer-row > .impersonation-bar-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: auto;
}

.impersonation-bar.admin-floating-surface--docked-chat .impersonation-bar-footer-row > .impersonation-bar-footer-actions form {
    display: inline-flex;
    margin: 0;
}

.impersonation-bar.admin-floating-surface--docked-chat .impersonation-bar-footer-row > .impersonation-bar-footer-actions .btn {
    white-space: nowrap;
}

/* ========================================
   CONTENT MEDIA GALLERY (admin edit grid)
   ======================================== */

.gallery-item {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gallery-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.gallery-item--featured {
    box-shadow: 0 0 0 2px #f59e0b;
}

.gallery-item__media-wrap {
    isolation: isolate;
}

.gallery-item .clickable-image {
    cursor: zoom-in;
}

.gallery-item__chrome {
    position: absolute;
    z-index: 20;
}

.gallery-item__featured-action {
    z-index: 30;
}

.gallery-item__featured-action .btn {
    position: relative;
    z-index: 31;
    pointer-events: auto;
}

.gallery-item .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-700, #374151);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    z-index: 31;
    touch-action: none;
}

.gallery-drag-handle i {
    font-size: 0.75rem;
    opacity: 0.85;
}

.gallery-drag-handle:hover {
    color: var(--gray-900, #111827);
    border-color: var(--gray-400, #9ca3af);
    background: #ffffff;
}

.gallery-drag-handle:active {
    cursor: grabbing;
}

.gallery-sortable-ghost {
    opacity: 0.45;
}

.gallery-sortable-chosen {
    box-shadow: 0 0 0 2px #3b82f6;
}

.gallery-sortable-drag {
    opacity: 0.85;
}

.menu-manager-drag-handle {
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Tour itinerary tab — sticky step navigator */
.tour-itinerary-panel {
    min-width: 0;
    --tour-itinerary-nav-sticky-top: 5.5rem;
}

.content-management-shell .admin-card-surface:has([data-tour-itinerary-panel]) {
    overflow: visible;
}

.tour-itinerary-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .tour-itinerary-layout {
        grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr);
        gap: 1.25rem;
    }
}

.tour-itinerary-nav-host {
    position: relative;
    align-self: start;
    min-width: 0;
    z-index: 20;
}

.tour-itinerary-nav-sentinel {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
    visibility: hidden;
}

.tour-itinerary-main {
    min-width: 0;
}

.tour-itinerary-nav {
    position: sticky;
    top: var(--tour-itinerary-nav-sticky-top, 5.5rem);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    max-height: calc(100vh - var(--tour-itinerary-nav-sticky-top, 5.5rem) - 1.5rem);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tour-itinerary-nav.is-stuck {
    border-color: color-mix(in srgb, var(--primary-500, #3b82f6) 18%, var(--gray-200, #e5e7eb));
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.08),
        0 2px 6px rgba(15, 23, 42, 0.04);
}

.tour-itinerary-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 1;
    padding-bottom: 0.125rem;
    background: inherit;
}

.tour-itinerary-nav__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700, #374151);
}

.tour-itinerary-nav__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.375rem;
    border-radius: 999px;
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-600, #4b5563);
    font-size: 0.75rem;
    font-weight: 600;
}

.tour-itinerary-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

@media (max-width: 1023px) {
    .tour-itinerary-nav-host {
        position: sticky;
        top: var(--tour-itinerary-nav-sticky-top, 4.75rem);
        z-index: 35;
        margin: 0 0 0.25rem;
    }

    .tour-itinerary-nav {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
        padding: 0.75rem;
    }

    .tour-itinerary-nav__head {
        position: static;
        margin-bottom: 0.125rem;
    }

    .tour-itinerary-nav__list {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .tour-itinerary-nav__item {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .tour-itinerary-nav__link {
        min-width: 11rem;
        max-width: 14rem;
    }
}

.tour-itinerary-nav__link {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    background: transparent;
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tour-itinerary-nav__link:hover {
    background: var(--gray-50, #f9fafb);
    border-color: var(--gray-200, #e5e7eb);
}

.tour-itinerary-nav__link.is-active {
    background: color-mix(in srgb, var(--primary-50, #eff6ff) 88%, white);
    border-color: color-mix(in srgb, var(--primary-500, #3b82f6) 28%, var(--gray-200, #e5e7eb));
    box-shadow: inset 3px 0 0 var(--primary-500, #3b82f6);
}

.tour-itinerary-nav__day {
    flex: 0 0 auto;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-600, #2563eb);
}

.tour-itinerary-nav__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.tour-itinerary-nav__title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-itinerary-nav__meta {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-itinerary-row {
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 0.875rem;
    background: #fff;
    overflow: visible;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tour-itinerary-row.is-expanded {
    border-color: color-mix(in srgb, var(--primary-500, #3b82f6) 24%, var(--gray-200, #e5e7eb));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.tour-itinerary-row__header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50, #f9fafb);
    border-bottom: 1px solid transparent;
}

.tour-itinerary-row.is-expanded .tour-itinerary-row__header {
    border-bottom-color: var(--gray-200, #e5e7eb);
}

.tour-itinerary-row__toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.tour-itinerary-row__badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    padding: 0.375rem 0.625rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-700, #374151);
}

.tour-itinerary-row.is-expanded .tour-itinerary-row__badge {
    background: color-mix(in srgb, var(--primary-500, #3b82f6) 12%, white);
    border-color: color-mix(in srgb, var(--primary-500, #3b82f6) 24%, var(--gray-200, #e5e7eb));
    color: var(--primary-700, #1d4ed8);
}

.tour-itinerary-row__summary {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.tour-itinerary-row__title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
}

.tour-itinerary-row__meta {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-itinerary-row__chevron {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--gray-400, #9ca3af);
    transition: transform 0.18s ease;
}

.tour-itinerary-row.is-expanded .tour-itinerary-row__chevron {
    transform: rotate(180deg);
}

.tour-itinerary-row__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
    flex: 0 0 auto;
}

.tour-itinerary-row__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tour-itinerary-step-sections {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.tour-itinerary-step-section {
    border: 1px solid var(--admin-border-subtle, #e5e7eb);
    border-radius: 0.75rem;
    background: var(--admin-surface-muted, #f9fafb);
    overflow: visible;
}

.tour-itinerary-step-section__head {
    padding: 0.875rem 1rem 0.625rem;
    border-bottom: 1px solid color-mix(in srgb, var(--admin-border-subtle, #e5e7eb) 70%, transparent);
}

.tour-itinerary-step-section__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--admin-text-primary, #111827);
}

.tour-itinerary-step-section__lead {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--admin-text-secondary, #6b7280);
}

.tour-itinerary-step-section__body {
    padding: 1rem;
    background: var(--admin-surface-elevated, #fff);
}

.tour-itinerary-step-section__body .form-group:last-child,
.tour-itinerary-step-section__body .feature-selector:last-child {
    margin-bottom: 0;
}

.tour-itinerary-step-visibility {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed color-mix(in srgb, var(--admin-border-subtle, #e5e7eb) 80%, transparent);
}

.tour-itinerary-step-visibility__toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
}

.tour-itinerary-step-visibility__copy {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--admin-text-secondary, #6b7280);
}

.tour-itinerary-step-visibility__copy strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--admin-text-primary, #111827);
}

.tour-itinerary-step-section .feature-selector__help {
    margin-top: 0.375rem;
}

body.admin-shell.admin-theme-dark .tour-itinerary-step-section,
body.admin-shell.admin-theme-system .tour-itinerary-step-section {
    background: color-mix(in srgb, var(--admin-surface-muted, #1f2937) 88%, transparent);
    border-color: var(--admin-border-subtle, #374151);
}

body.admin-shell.admin-theme-dark .tour-itinerary-step-section__body,
body.admin-shell.admin-theme-system .tour-itinerary-step-section__body {
    background: color-mix(in srgb, var(--admin-surface-elevated, #111827) 96%, transparent);
}

body.admin-shell.admin-theme-dark .tour-itinerary-step-section__title,
body.admin-shell.admin-theme-system .tour-itinerary-step-section__title,
body.admin-shell.admin-theme-dark .tour-itinerary-step-visibility__copy strong,
body.admin-shell.admin-theme-system .tour-itinerary-step-visibility__copy strong {
    color: var(--admin-text-primary, #f9fafb);
}

body.admin-shell.admin-theme-dark .tour-itinerary-step-section__head,
body.admin-shell.admin-theme-system .tour-itinerary-step-section__head {
    border-bottom-color: var(--admin-border-subtle, #374151);
}

body.admin-shell.admin-theme-dark .tour-itinerary-step-visibility,
body.admin-shell.admin-theme-system .tour-itinerary-step-visibility {
    border-top-color: var(--admin-border-subtle, #374151);
}

.tour-itinerary-row__body[hidden] {
    display: none !important;
}

#tourItineraryContainer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

body.admin-shell.admin-theme-dark .tour-itinerary-nav,
body.admin-shell.admin-theme-system .tour-itinerary-nav {
    background: color-mix(in srgb, var(--admin-surface-elevated, #111827) 96%, transparent);
    border-color: var(--admin-border-subtle, #374151);
}

body.admin-shell.admin-theme-dark .tour-itinerary-nav.is-stuck,
body.admin-shell.admin-theme-system .tour-itinerary-nav.is-stuck {
    border-color: color-mix(in srgb, var(--primary-400, #60a5fa) 24%, var(--admin-border-subtle, #374151));
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.28),
        0 2px 8px rgba(0, 0, 0, 0.18);
}

body.admin-shell.admin-theme-dark .tour-itinerary-nav__title,
body.admin-shell.admin-theme-system .tour-itinerary-nav__title,
body.admin-shell.admin-theme-dark .tour-itinerary-nav__link .tour-itinerary-nav__title,
body.admin-shell.admin-theme-system .tour-itinerary-nav__link .tour-itinerary-nav__title,
body.admin-shell.admin-theme-dark .tour-itinerary-row__title,
body.admin-shell.admin-theme-system .tour-itinerary-row__title {
    color: var(--admin-text-primary, #f9fafb);
}

body.admin-shell.admin-theme-dark .tour-itinerary-nav__link:hover,
body.admin-shell.admin-theme-system .tour-itinerary-nav__link:hover {
    background: color-mix(in srgb, var(--admin-surface-muted, #1f2937) 88%, transparent);
}

body.admin-shell.admin-theme-dark .tour-itinerary-row,
body.admin-shell.admin-theme-system .tour-itinerary-row {
    background: var(--admin-surface-elevated, #111827);
    border-color: var(--admin-border-subtle, #374151);
}

body.admin-shell.admin-theme-dark .tour-itinerary-row__header,
body.admin-shell.admin-theme-system .tour-itinerary-row__header {
    background: color-mix(in srgb, var(--admin-surface-muted, #1f2937) 88%, transparent);
}

.tour-itinerary-toolbar {
    position: static;
    top: auto;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin: 0 0 0.5rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 0.75rem;
    background: var(--gray-50, #f9fafb);
}

.tour-itinerary-toolbar--actions {
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
    margin: 0 0 0.75rem;
    border-radius: 0.875rem;
}

.tour-itinerary-toolbar__lead {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.375rem 0.5rem;
}

.tour-itinerary-toolbar--actions .tour-itinerary-row__meta {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

@media (max-width: 639px) {
    .tour-itinerary-toolbar--actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tour-itinerary-toolbar--actions .tour-itinerary-row__toolbar {
        justify-content: flex-end;
        padding-top: 0.125rem;
    }
}

.tour-itinerary-toolbar--footer {
    position: static;
    top: auto;
    margin-top: 0.5rem;
    margin-bottom: 0;
    background: var(--gray-50, #f9fafb);
}

.tour-itinerary-toolbar__copy {
    min-width: 0;
    flex: 1 1 14rem;
}

body.admin-shell.admin-theme-system .tour-itinerary-toolbar {
    background: color-mix(in srgb, var(--admin-surface-elevated, #111827) 92%, transparent);
    border-color: var(--admin-border-subtle, #374151);
}

body.admin-shell.admin-theme-system .tour-itinerary-toolbar--footer {
    background: color-mix(in srgb, var(--admin-surface-muted, #1f2937) 88%, transparent);
}

/* Content translation workspace — section + language navigation */
.content-translation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .content-translation-layout:not(.content-translation-layout--single-section) {
        grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
        gap: 1.25rem;
    }
}

.content-translation-main,
.content-translation-sections,
.content-translation-workspace-layout {
    min-width: 0;
}

.content-translation-nav,
.content-translation-language-nav {
    position: sticky;
    top: 5rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    max-height: calc(100vh - 8rem);
    overflow: auto;
}

.content-translation-nav__head,
.content-translation-language-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.content-translation-nav__title,
.content-translation-language-nav__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700, #374151);
}

.content-translation-nav__count,
.content-translation-language-nav__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.375rem;
    border-radius: 999px;
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-600, #4b5563);
    font-size: 0.75rem;
    font-weight: 600;
}

.content-translation-nav__list,
.content-translation-language-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

@media (max-width: 1023px) {
    .content-translation-nav,
    .content-translation-language-nav {
        position: static;
        max-height: none;
    }

    .content-translation-nav__list,
    .content-translation-language-nav__list {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
    }

    .content-translation-nav__item,
    .content-translation-language-nav__item {
        flex: 0 0 auto;
    }
}

.content-translation-nav__link,
.content-translation-language-nav__link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    width: 100%;
    min-width: 10rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    background: transparent;
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.content-translation-language-nav__link {
    min-width: 8rem;
}

.content-translation-nav__link:hover,
.content-translation-language-nav__link:hover {
    background: var(--gray-50, #f9fafb);
    border-color: var(--gray-200, #e5e7eb);
}

.content-translation-nav__link.is-active,
.content-translation-language-nav__link.is-active {
    background: color-mix(in srgb, var(--primary-50, #eff6ff) 88%, white);
    border-color: color-mix(in srgb, var(--primary-500, #3b82f6) 28%, var(--gray-200, #e5e7eb));
    box-shadow: inset 3px 0 0 var(--primary-500, #3b82f6);
}

.content-translation-nav__title,
.content-translation-language-nav__code {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.content-translation-nav__meta,
.content-translation-language-nav__meta {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.content-translation-section,
.content-translation-language-panel {
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 0.875rem;
    background: #fff;
    overflow: visible;
}

.content-translation-section.is-expanded,
.content-translation-language-panel.is-expanded {
    border-color: color-mix(in srgb, var(--primary-500, #3b82f6) 24%, var(--gray-200, #e5e7eb));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.content-translation-section__header,
.content-translation-language-panel__header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50, #f9fafb);
    border-bottom: 1px solid transparent;
}

.content-translation-section.is-expanded .content-translation-section__header,
.content-translation-language-panel.is-expanded .content-translation-language-panel__header {
    border-bottom-color: var(--gray-200, #e5e7eb);
}

.content-translation-section__toggle,
.content-translation-language-panel__toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.content-translation-section__summary,
.content-translation-language-panel__summary {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.content-translation-section__title,
.content-translation-language-panel__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
}

.content-translation-section__description {
    font-size: 0.8125rem;
    color: var(--gray-600, #4b5563);
}

.content-translation-section__meta,
.content-translation-language-panel__meta {
    font-size: 0.75rem;
    color: var(--gray-500, #6b7280);
}

.content-translation-language-panel__code {
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--gray-500, #6b7280);
}

.content-translation-section__chevron,
.content-translation-language-panel__chevron {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--gray-400, #9ca3af);
    transition: transform 0.18s ease;
}

.content-translation-section.is-expanded .content-translation-section__chevron,
.content-translation-language-panel.is-expanded .content-translation-language-panel__chevron {
    transform: rotate(180deg);
}

.content-translation-section__toolbar,
.content-translation-language-panel__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
    flex: 0 0 auto;
}

.content-translation-section__body,
.content-translation-language-panel__body {
    padding: 1rem;
}

.content-translation-section__body[hidden],
.content-translation-language-panel__body[hidden] {
    display: none !important;
}

.content-translation-workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .content-translation-workspace-layout:has(.content-translation-language-nav:not(.hidden)) {
        grid-template-columns: minmax(10rem, 12rem) minmax(0, 1fr);
    }
}

.content-translation-workspace-panels {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.content-translation-field-group + .content-translation-field-group {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-200, #e5e7eb);
}

.content-translation-field-group__title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gray-500, #6b7280);
    margin-bottom: 0.75rem;
}

body.admin-shell.admin-theme-dark .content-translation-nav,
body.admin-shell.admin-theme-system .content-translation-nav,
body.admin-shell.admin-theme-dark .content-translation-language-nav,
body.admin-shell.admin-theme-system .content-translation-language-nav {
    background: color-mix(in srgb, var(--admin-surface-elevated, #111827) 92%, transparent);
    border-color: var(--admin-border-subtle, #374151);
}

body.admin-shell.admin-theme-dark .content-translation-section,
body.admin-shell.admin-theme-system .content-translation-section,
body.admin-shell.admin-theme-dark .content-translation-language-panel,
body.admin-shell.admin-theme-system .content-translation-language-panel {
    background: var(--admin-surface-elevated, #111827);
    border-color: var(--admin-border-subtle, #374151);
}

body.admin-shell.admin-theme-dark .content-translation-section__header,
body.admin-shell.admin-theme-system .content-translation-section__header,
body.admin-shell.admin-theme-dark .content-translation-language-panel__header,
body.admin-shell.admin-theme-system .content-translation-language-panel__header {
    background: color-mix(in srgb, var(--admin-surface-muted, #1f2937) 88%, transparent);
}

body.admin-shell.admin-theme-dark .content-translation-section__title,
body.admin-shell.admin-theme-system .content-translation-section__title,
body.admin-shell.admin-theme-dark .content-translation-language-panel__title,
body.admin-shell.admin-theme-system .content-translation-language-panel__title,
body.admin-shell.admin-theme-dark .content-translation-nav__title,
body.admin-shell.admin-theme-system .content-translation-nav__title {
    color: var(--admin-text-primary, #f9fafb);
}

/* Activities Tag Input CSS */
.activities-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.50rem 1rem;
    min-height: 2.75rem;
    background-color: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: text;
}

.activities-tags-container:focus-within {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.activities-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.activities-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    padding: 0.1875rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
}

.activities-tag-close {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #3b82f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease;
}

.activities-tag-close:hover {
    color: #1d4ed8;
}

.activities-tag-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.875rem;
    flex: 1;
    min-width: 120px;
    background: transparent !important;
    color: #111827;
}

.activities-tag-input::placeholder {
    color: #9ca3af;
}

/* Dark Mode Theme Support */
body.admin-shell.admin-theme-dark .activities-tags-container,
body.admin-shell.admin-theme-system .activities-tags-container {
    background-color: var(--admin-input-bg) !important;
    border-color: var(--admin-input-border) !important;
    color: var(--admin-input-text) !important;
}

body.admin-shell.admin-theme-dark .activities-tags-container:focus-within,
body.admin-shell.admin-theme-system .activities-tags-container:focus-within {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18) !important;
}

body.admin-shell.admin-theme-dark .activities-tag-pill,
body.admin-shell.admin-theme-system .activities-tag-pill {
    background-color: rgba(59, 130, 246, 0.18) !important;
    color: #bfdbfe !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

body.admin-shell.admin-theme-dark .activities-tag-close,
body.admin-shell.admin-theme-system .activities-tag-close {
    color: #60a5fa !important;
}

body.admin-shell.admin-theme-dark .activities-tag-close:hover,
body.admin-shell.admin-theme-system .activities-tag-close:hover {
    color: #93c5fd !important;
}

body.admin-shell.admin-theme-dark .activities-tag-input,
body.admin-shell.admin-theme-system .activities-tag-input {
    color: var(--admin-input-text) !important;
}

body.admin-shell.admin-theme-dark .activities-tag-input::placeholder,
body.admin-shell.admin-theme-system .activities-tag-input::placeholder {
    color: var(--admin-input-placeholder) !important;
}

/* Reservation add/edit — booking target chips and selected listing */
.admin-reservation-module-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-reservation-module-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.admin-reservation-module-chip:hover {
    border-color: var(--admin-primary);
    background: var(--admin-surface-hover, var(--admin-surface));
}

.admin-reservation-module-chip.is-active {
    border-color: var(--admin-primary);
    background: var(--admin-primary-soft, rgba(59, 130, 246, 0.1));
    color: var(--admin-primary);
}

.admin-reservation-module-chip i {
    font-size: 0.875rem;
    opacity: 0.85;
}

.admin-reservation-selected-listing {
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    background: var(--admin-surface);
}

.admin-reservation-selected-listing__inner {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.admin-reservation-selected-listing__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: var(--admin-surface-muted, rgba(0, 0, 0, 0.04));
    color: var(--admin-text-muted);
    font-size: 1.25rem;
    overflow: hidden;
}

.admin-reservation-selected-listing__thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-reservation-selected-listing__body {
    flex: 1;
    min-width: 0;
}

.admin-reservation-selected-listing--readonly {
    border-style: dashed;
}

#reservation_item_picker_widget.admin-searchable-select--open,
#reservation_item_picker_widget:has(.lh-ss-open) {
    z-index: 10000;
}

#reservation_item_listbox.lh-ss-open {
    z-index: 10001;
}

@media (prefers-reduced-motion: reduce) {
    .admin-reservation-module-chip {
        transition: none;
    }
}

/* ========================================
   DARK MODE — AUDIT REMEDIATION (JUL 2026)
   Delete shell, outline buttons, badges,
   pagination, chips, dock, media meta badges
   ======================================== */

body.admin-shell.admin-theme-dark .delete-page__warning,
body.admin-shell.admin-theme-system .delete-page__warning {
    background: rgba(127, 29, 29, 0.24);
    border-color: rgba(248, 113, 113, 0.35);
}

body.admin-shell.admin-theme-dark .delete-page__callout-title,
body.admin-shell.admin-theme-system .delete-page__callout-title {
    color: #fecaca;
}

body.admin-shell.admin-theme-dark .delete-page__warning .text-sm,
body.admin-shell.admin-theme-dark .delete-page__callout .text-sm,
body.admin-shell.admin-theme-system .delete-page__warning .text-sm,
body.admin-shell.admin-theme-system .delete-page__callout .text-sm {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .delete-page__summary,
body.admin-shell.admin-theme-dark .delete-page__section,
body.admin-shell.admin-theme-system .delete-page__summary,
body.admin-shell.admin-theme-system .delete-page__section {
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .delete-page__label,
body.admin-shell.admin-theme-system .delete-page__label {
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .delete-page__value,
body.admin-shell.admin-theme-system .delete-page__value {
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .btn.btn-outline,
body.admin-shell.admin-theme-system .btn.btn-outline {
    border-color: var(--admin-border-strong);
    color: var(--admin-text);
    background: transparent;
}

body.admin-shell.admin-theme-dark .btn.btn-outline:hover,
body.admin-shell.admin-theme-dark .btn.btn-outline:focus-visible,
body.admin-shell.admin-theme-system .btn.btn-outline:hover,
body.admin-shell.admin-theme-system .btn.btn-outline:focus-visible {
    background: var(--admin-surface-3);
    border-color: var(--admin-border-strong);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .btn.btn-outline-primary,
body.admin-shell.admin-theme-dark .btn.btn-outline-blue,
body.admin-shell.admin-theme-system .btn.btn-outline-primary,
body.admin-shell.admin-theme-system .btn.btn-outline-blue {
    border-color: rgba(96, 165, 250, 0.45);
    color: var(--admin-link);
}

body.admin-shell.admin-theme-dark .btn.btn-outline-primary:hover,
body.admin-shell.admin-theme-dark .btn.btn-outline-blue:hover,
body.admin-shell.admin-theme-system .btn.btn-outline-primary:hover,
body.admin-shell.admin-theme-system .btn.btn-outline-blue:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(96, 165, 250, 0.65);
    color: var(--admin-link-hover);
}

body.admin-shell.admin-theme-dark .btn.btn-outline-secondary,
body.admin-shell.admin-theme-dark .btn.btn-outline-gray,
body.admin-shell.admin-theme-system .btn.btn-outline-secondary,
body.admin-shell.admin-theme-system .btn.btn-outline-gray {
    border-color: var(--admin-button-secondary-border);
    color: var(--admin-button-secondary-text);
}

body.admin-shell.admin-theme-dark .btn.btn-outline-secondary:hover,
body.admin-shell.admin-theme-dark .btn.btn-outline-gray:hover,
body.admin-shell.admin-theme-system .btn.btn-outline-secondary:hover,
body.admin-shell.admin-theme-system .btn.btn-outline-gray:hover {
    background: var(--admin-button-secondary-hover-bg);
    color: var(--admin-button-secondary-hover-text);
}

body.admin-shell.admin-theme-dark .btn.btn-outline-danger,
body.admin-shell.admin-theme-dark .btn.btn-outline-red,
body.admin-shell.admin-theme-system .btn.btn-outline-danger,
body.admin-shell.admin-theme-system .btn.btn-outline-red,
body.admin-shell.admin-theme-dark .btn.btn-outline.text-red-600,
body.admin-shell.admin-theme-system .btn.btn-outline.text-red-600 {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fca5a5;
}

body.admin-shell.admin-theme-dark .btn.btn-outline-danger:hover,
body.admin-shell.admin-theme-dark .btn.btn-outline-red:hover,
body.admin-shell.admin-theme-system .btn.btn-outline-danger:hover,
body.admin-shell.admin-theme-system .btn.btn-outline-red:hover,
body.admin-shell.admin-theme-dark .btn.btn-outline.text-red-600:hover,
body.admin-shell.admin-theme-system .btn.btn-outline.text-red-600:hover {
    background: rgba(127, 29, 29, 0.28);
    color: #fecaca;
}

body.admin-shell.admin-theme-dark .status-active,
body.admin-shell.admin-theme-system .status-active {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}

body.admin-shell.admin-theme-dark .status-inactive,
body.admin-shell.admin-theme-system .status-inactive {
    background: rgba(220, 38, 38, 0.22);
    color: #fca5a5;
}

body.admin-shell.admin-theme-dark .status-featured,
body.admin-shell.admin-theme-system .status-featured {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
}

body.admin-shell.admin-theme-dark .status-pending,
body.admin-shell.admin-theme-system .status-pending {
    background: rgba(99, 102, 241, 0.22);
    color: #c7d2fe;
}

body.admin-shell.admin-theme-dark .bg-green-100,
body.admin-shell.admin-theme-dark .bg-emerald-100,
body.admin-shell.admin-theme-dark .bg-yellow-100,
body.admin-shell.admin-theme-dark .bg-amber-100,
body.admin-shell.admin-theme-dark .bg-red-100,
body.admin-shell.admin-theme-dark .bg-blue-100,
body.admin-shell.admin-theme-dark .bg-indigo-100,
body.admin-shell.admin-theme-dark .bg-gray-100,
body.admin-shell.admin-theme-system .bg-green-100,
body.admin-shell.admin-theme-system .bg-emerald-100,
body.admin-shell.admin-theme-system .bg-yellow-100,
body.admin-shell.admin-theme-system .bg-amber-100,
body.admin-shell.admin-theme-system .bg-red-100,
body.admin-shell.admin-theme-system .bg-blue-100,
body.admin-shell.admin-theme-system .bg-indigo-100,
body.admin-shell.admin-theme-system .bg-gray-100 {
    background-color: var(--admin-surface-3) !important;
    border-color: var(--admin-border) !important;
}

body.admin-shell.admin-theme-dark .border-yellow-200,
body.admin-shell.admin-theme-dark .border-green-200,
body.admin-shell.admin-theme-dark .border-red-200,
body.admin-shell.admin-theme-dark .border-blue-200,
body.admin-shell.admin-theme-dark .border-gray-200,
body.admin-shell.admin-theme-system .border-yellow-200,
body.admin-shell.admin-theme-system .border-green-200,
body.admin-shell.admin-theme-system .border-red-200,
body.admin-shell.admin-theme-system .border-blue-200,
body.admin-shell.admin-theme-system .border-gray-200 {
    border-color: var(--admin-border) !important;
}

body.admin-shell.admin-theme-dark .text-green-800,
body.admin-shell.admin-theme-dark .text-green-700,
body.admin-shell.admin-theme-dark .text-emerald-800,
body.admin-shell.admin-theme-dark .text-emerald-700,
body.admin-shell.admin-theme-dark .text-yellow-800,
body.admin-shell.admin-theme-dark .text-amber-800,
body.admin-shell.admin-theme-dark .text-amber-900,
body.admin-shell.admin-theme-dark .text-red-800,
body.admin-shell.admin-theme-dark .text-red-700,
body.admin-shell.admin-theme-dark .text-blue-800,
body.admin-shell.admin-theme-dark .text-blue-700,
body.admin-shell.admin-theme-dark .text-indigo-800,
body.admin-shell.admin-theme-dark .text-gray-800,
body.admin-shell.admin-theme-dark .text-gray-700,
body.admin-shell.admin-theme-system .text-green-800,
body.admin-shell.admin-theme-system .text-green-700,
body.admin-shell.admin-theme-system .text-emerald-800,
body.admin-shell.admin-theme-system .text-emerald-700,
body.admin-shell.admin-theme-system .text-yellow-800,
body.admin-shell.admin-theme-system .text-amber-800,
body.admin-shell.admin-theme-system .text-amber-900,
body.admin-shell.admin-theme-system .text-red-800,
body.admin-shell.admin-theme-system .text-red-700,
body.admin-shell.admin-theme-system .text-blue-800,
body.admin-shell.admin-theme-system .text-blue-700,
body.admin-shell.admin-theme-system .text-indigo-800,
body.admin-shell.admin-theme-system .text-gray-800,
body.admin-shell.admin-theme-system .text-gray-700 {
    color: var(--admin-text) !important;
}

body.admin-shell.admin-theme-dark .pagination-link.active,
body.admin-shell.admin-theme-dark .pagination-link.pagination-next,
body.admin-shell.admin-theme-system .pagination-link.active,
body.admin-shell.admin-theme-system .pagination-link.pagination-next {
    background: #1e40af;
    border-color: #2563eb;
    color: #f8fafc;
}

body.admin-shell.admin-theme-dark .pagination-link.active:hover,
body.admin-shell.admin-theme-dark .pagination-link.pagination-next:hover,
body.admin-shell.admin-theme-system .pagination-link.active:hover,
body.admin-shell.admin-theme-system .pagination-link.pagination-next:hover {
    background: #1d4ed8;
    border-color: #3b82f6;
    color: #ffffff;
}

body.admin-shell.admin-theme-dark .pagination .active,
body.admin-shell.admin-theme-system .pagination .active {
    background: #1e40af;
    border-color: #2563eb;
    color: #f8fafc;
}

body.admin-shell.admin-theme-dark .pagination .disabled,
body.admin-shell.admin-theme-system .pagination .disabled {
    background: var(--admin-surface-3);
    color: var(--admin-text-soft);
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .pagination .pagination-ellipsis,
body.admin-shell.admin-theme-system .pagination .pagination-ellipsis {
    color: var(--admin-text-soft);
}

body.admin-shell.admin-theme-dark .admin-floating-surface__toggle,
body.admin-shell.admin-theme-system .admin-floating-surface__toggle {
    background: rgba(17, 24, 39, 0.78);
    border-color: rgba(245, 158, 11, 0.35);
    color: var(--admin-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.admin-shell.admin-theme-dark .admin-floating-surface__toggle:hover,
body.admin-shell.admin-theme-dark .admin-floating-surface__toggle:focus-visible,
body.admin-shell.admin-theme-system .admin-floating-surface__toggle:hover,
body.admin-shell.admin-theme-system .admin-floating-surface__toggle:focus-visible {
    background: rgba(31, 41, 55, 0.92);
    border-color: rgba(245, 158, 11, 0.5);
}

body.admin-shell.admin-theme-dark .admin-floating-surface__tab-icon,
body.admin-shell.admin-theme-system .admin-floating-surface__tab-icon {
    background: rgba(255, 255, 255, 0.08);
    color: var(--admin-text);
}

body.admin-shell.admin-theme-dark .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-tab-highlighted,
body.admin-shell.admin-theme-dark .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:not(.is-swipe-resting),
body.admin-shell.admin-theme-dark .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:hover:not(.is-swipe-resting),
body.admin-shell.admin-theme-dark .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:focus:not(.is-swipe-resting),
body.admin-shell.admin-theme-dark .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active.is-tab-highlighted,
body.admin-shell.admin-theme-system .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-tab-highlighted,
body.admin-shell.admin-theme-system .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:not(.is-swipe-resting),
body.admin-shell.admin-theme-system .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:hover:not(.is-swipe-resting),
body.admin-shell.admin-theme-system .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active:focus:not(.is-swipe-resting),
body.admin-shell.admin-theme-system .admin-tabs__nav--subnav.has-tab-swipe-indicator .admin-tabs__tab.is-active.is-tab-highlighted {
    color: white;
}

body.admin-shell.admin-theme-dark .media-selector-meta-badge,
body.admin-shell.admin-theme-system .media-selector-meta-badge {
    background: var(--admin-surface-3);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

body.admin-shell.admin-theme-dark .media-selector-meta-badge--filename,
body.admin-shell.admin-theme-system .media-selector-meta-badge--filename {
    background: var(--admin-surface-2);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

body.admin-shell.admin-theme-dark .media-selector-meta-badge--uploaded,
body.admin-shell.admin-theme-system .media-selector-meta-badge--uploaded {
    background: rgba(67, 56, 202, 0.22);
    color: #c7d2fe;
    border-color: rgba(129, 140, 248, 0.35);
}

body.admin-shell.admin-theme-dark .media-selector-meta-badge--size,
body.admin-shell.admin-theme-dark .media-selector-meta-badge--size-resolution,
body.admin-shell.admin-theme-system .media-selector-meta-badge--size,
body.admin-shell.admin-theme-system .media-selector-meta-badge--size-resolution {
    background: var(--admin-surface-3);
    color: var(--admin-text-muted);
}

body.admin-shell.admin-theme-dark .media-selector-meta-badge--resolution,
body.admin-shell.admin-theme-system .media-selector-meta-badge--resolution {
    background: rgba(3, 105, 161, 0.22);
    color: #7dd3fc;
}

body.admin-shell.admin-theme-dark .media-selector-meta-badge--featured,
body.admin-shell.admin-theme-system .media-selector-meta-badge--featured {
    background: rgba(146, 64, 14, 0.24);
    color: #fcd34d;
}

body.admin-shell.admin-theme-dark .media-selector-meta-badge--thumbnails,
body.admin-shell.admin-theme-system .media-selector-meta-badge--thumbnails {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}

body.admin-shell.admin-theme-dark .media-selector-meta-badge--thumbnails-empty,
body.admin-shell.admin-theme-system .media-selector-meta-badge--thumbnails-empty {
    background: rgba(127, 29, 29, 0.22);
    color: #fca5a5;
}
/* Canonical metric-card alignment layer. Keep page-specific column counts, but
 * enforce one internal rhythm and equal-height rows across every metric strip. */
.admin-metric-grid {
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

.admin-card-surface__body > .p-6:has(> .admin-metric-grid) {
    padding: 0;
}

.admin-card-surface__body:has(> .p-6 > .admin-metric-grid),
.admin-card-surface__body:has(> .admin-metric-grid) {
    padding: 0 !important;
}

.admin-card-surface .admin-card-surface__body > .p-6:has(> .admin-metric-grid) {
    padding: 0 !important;
}

.admin-metric-grid > .metric-card-link,
.admin-metric-grid > .metric-card {
    display: flex;
    align-self: stretch;
    min-width: 0;
    height: 100%;
}

.admin-metric-grid > .metric-card-link .metric-card {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
}

.metric-card:not(.metric-card--usage):not(.metric-card--dashboard-pill) {
    align-items: flex-start;
    height: 7.75rem;
    min-height: 7.75rem;
}

.metric-card:not(.metric-card--usage):not(.metric-card--dashboard-pill) .metric-card__content {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-width: 0;
}

.metric-card:not(.metric-card--usage):not(.metric-card--dashboard-pill) .metric-card__label {
    min-height: 2.2em;
    display: flex;
    align-items: flex-start;
}

.metric-card:not(.metric-card--usage):not(.metric-card--dashboard-pill) .metric-card__value {
    min-height: 1.85rem;
}

.metric-card:not(.metric-card--usage):not(.metric-card--dashboard-pill) .metric-card__subtitle,
.metric-card__subtitle--placeholder {
    min-height: 1.2em;
}

@media (max-width: 767px) {
    body .admin-metric-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body .admin-metric-grid.grid-cols-2,
    html body .admin-card-surface .admin-card-surface__body .admin-metric-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .admin-metric-grid {
        gap: 0.75rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-card-surface__body > .admin-metric-grid,
    .admin-card-surface > .admin-card-surface__body .admin-metric-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .metric-card:not(.metric-card--usage):not(.metric-card--dashboard-pill) {
        height: 7.75rem;
        min-height: 7.75rem;
    }
}

/* Keep legacy tab surfaces transparent above the shared moving indicator. */
.dcm-tab-swipe-group .is-dcm-tab-highlighted,
.dcm-tab-swipe-group .is-dcm-tab-resting,
.dcm-tab-swipe-group .is-dcm-tab-highlighted:hover,
.dcm-tab-swipe-group .is-dcm-tab-highlighted:focus-visible {
    background: transparent !important;
}

.dcm-tab-swipe-group--pill .is-dcm-tab-highlighted,
.dcm-tab-swipe-group--pill .is-dcm-tab-highlighted:hover,
.dcm-tab-swipe-group--pill .is-dcm-tab-highlighted:focus-visible {
    border-color: transparent !important;
    box-shadow: none !important;
    color: white !important;
}

.dcm-tab-swipe-group--underline .is-dcm-tab-highlighted,
.dcm-tab-swipe-group--underline .is-dcm-tab-highlighted:hover,
.dcm-tab-swipe-group--underline .is-dcm-tab-highlighted:focus-visible {
    border-bottom-color: transparent !important;
    color: var(--brand-primary, #2563eb) !important;
}

/* Tab items keep their content width; the moving pill must not stretch across the row. */
@media (min-width: 768px) {
    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__nav {
        justify-content: flex-start;
    }

    .admin-tabs-stack--unified .admin-tabs-stack__row--secondary .admin-tabs__tab {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }
}
