        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* ===============================
           GLOBAL THEME TOKENS (DO NOT EDIT IN COMPONENTS)
           =============================== */

        :root {
            /* Backgrounds */
            --bg-main: #DBDDDE;
            --bg-card: #FFFFFF;
            --bg-muted: #6A6B6E;

            /* Accents */
            --accent-primary: #B48A63;
            --accent-strong: #573111;
            --accent-primary-rgb: 180, 138, 99;

            /* Text */
            --text-primary: #302C2B;
            --text-muted: #6A6B6E;
            --text-primary-rgb: 48, 44, 43;

            /* UI */
            --border-soft: rgba(var(--text-primary-rgb), 0.12);
            --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.08);
        }

        /* ===============================
           OFFICE CLASSIC THEME (formerly Luxury Light)
           Cool denim, easy on the eyes
           =============================== */

        [data-theme="luxury"] {
            --bg-main: #D6DEE7;
            --widget-bg: #FFFFFF;
            --widget-bg-alt: #F8FAFC;
            --widget-text: #2E2C2A;
            --widget-border: rgba(62, 85, 107, 0.2);
            --card-noise: none;
            --widget-shadow: 0 0 0 1px rgba(62, 85, 107, 0.14), 0 10px 24px rgba(255, 255, 255, 0.65), 0 8px 18px rgba(62, 85, 107, 0.12);

            --bg-card: var(--widget-bg);
            --bg-muted: var(--widget-bg-alt);

            --card-bg: var(--widget-bg);
            --card-bg-alt: var(--widget-bg-alt);

            --header-bg: #3E556B;
            --header-text: #FFFFFF;

            --btn-primary-bg: #4F6B85;
            --btn-primary-text: #F8F6F2;
            --btn-secondary-bg: #EEF1F3;
            --btn-secondary-text: var(--widget-text);

            --input-bg: var(--widget-bg);
            --input-text: var(--widget-text);
            --input-border: var(--widget-border);

            --accent-primary: #4F6B85;
            --accent-strong: #3E556B;
            --accent-primary-rgb: 79, 107, 133;

            --text-primary: var(--widget-text);
            --text-muted: #6A6B6E;
            --text-primary-rgb: 46, 44, 42;

            --border-soft: var(--widget-border);
            --border-strong: rgba(60, 60, 60, 0.3);
            --shadow-card: var(--widget-shadow);
        }

        /* ===============================
           LUXURY DARK THEME
           =============================== */

        [data-theme="luxury-dark"] {
            --bg-main: #1E1C1B;
            --bg-card: #302C2B;
            --bg-muted: #6A6B6E;

            --accent-primary: #B48A63;
            --accent-strong: #8C4A2F;
            --accent-primary-rgb: 180, 138, 99;

            --text-primary: #DBDDDE;
            --text-muted: #9CA3AF;
            --text-primary-rgb: 219, 221, 222;
            --border-soft: rgba(255, 255, 255, 0.35);
        }

        /* ===============================
           DEEP BLUE THEME
           =============================== */

        [data-theme="deep-blue"] {
            --bg-main: #0B1B3A;
            --bg-card: rgba(12, 24, 50, 0.75);
            --bg-muted: rgba(14, 30, 58, 0.9);

            --accent-primary: #2D8CFF;
            --accent-strong: #0F3D7A;
            --accent-primary-rgb: 45, 140, 255;

            --text-primary: #E6F2FF;
            --text-muted: #8FB6E6;
            --text-primary-rgb: 230, 242, 255;

            --border-soft: rgba(110, 165, 255, 0.35);
            --shadow-card: 0 12px 30px rgba(6, 12, 28, 0.55);
        }

        /* ===============================
           CLASSIC DARK THEME
           =============================== */

        [data-theme="dark"] {
            --bg-main: #2b2b2b;
            --bg-card: #3a3a3a;
            --bg-muted: #4a4a4a;

            --accent-primary: #667eea;
            --accent-strong: #764ba2;
            --accent-primary-rgb: 102, 126, 234;

            --text-primary: #e0e0e0;
            --text-muted: #b0b0b0;
            --text-primary-rgb: 224, 224, 224;

            --border-soft: #555;
            --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.35);
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
                "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
            background: var(--bg-main);
            color: var(--text-primary);
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            -webkit-text-size-adjust: 100%;
        }

        body[data-theme="dark"] {
            background: radial-gradient(circle at top left, #6d6d6d 0%, #2b2b2b 40%, #000000 100%);
            color: var(--text-primary);
        }

        .hidden {
            display: none !important;
        }

        .toast-container {
            position: fixed;
            right: 24px;
            bottom: 24px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 9999;
            pointer-events: none;
        }

        .toast {
            background: #2a2a2a;
            color: #e0e0e0;
            border: 1px solid #555;
            border-left: 4px solid #4ade80;
            border-radius: 10px;
            padding: 12px 16px;
            font-size: 13px;
            font-weight: 600;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
            opacity: 0;
            transform: translateY(8px);
            transition: opacity 0.2s ease, transform 0.2s ease;
        }

        .toast.show {
            opacity: 1;
            transform: translateY(0);
        }

        @media (max-width: 768px) {
            input,
            textarea,
            select {
                font-size: 16px;
            }
        }

        @supports not (gap: 1rem) {
            .toast-container > * + * {
                margin-top: 10px;
            }
        }

        .toast.info {
            border-left-color: #3b82f6;
        }

        .toast.warning {
            border-left-color: #fbbf24;
        }

        .toast.error {
            border-left-color: #ef4444;
        }

        /* ===============================
           LUXURY THEME OVERRIDES
           =============================== */

        body[data-theme^="luxury"] {
            background: var(--bg-main);
            color: var(--text-primary);
        }

        body[data-theme="luxury"] {
            background:
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035' numOctaves='5' stitchTiles='stitch' result='noise'/%3E%3CfeDiffuseLighting in='noise' lighting-color='%23D6DEE7' surfaceScale='1.8' result='light'%3E%3CfeDistantLight azimuth='45' elevation='55'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23paper)' opacity='0.5'/%3E%3C/svg%3E"),
                linear-gradient(145deg,
                    rgba(210,220,232,0.45) 0%,
                    rgba(202,213,226,0.35) 25%,
                    rgba(214,225,238,0.4) 50%,
                    rgba(198,210,224,0.45) 75%,
                    rgba(207,218,231,0.4) 100%),
                linear-gradient(to bottom right,
                    rgba(186,199,214,0.18) 0%,
                    transparent 50%,
                    rgba(176,190,206,0.12) 100%),
                #D1D9E3;
            background-repeat: repeat, no-repeat, no-repeat, no-repeat;
            background-size: 300px 300px, 100% 100%, 100% 100%, auto;
            background-attachment: fixed, fixed, fixed, fixed;
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .app,
        body[data-theme="luxury"] .main,
        body[data-theme="luxury"] .card,
        body[data-theme="luxury"] .nav {
            position: relative;
            z-index: 1;
        }

        body[data-theme="luxury"] .card > *,
        body[data-theme="luxury"] .modal > *,
        body[data-theme="luxury"] .searchable-dropdown-list > * {
            position: relative;
            z-index: 1;
        }

        body[data-theme="luxury"] .card-accent,
        body[data-theme="luxury"] .highlight,
        body[data-theme="luxury"] .active-row {
            background: linear-gradient(135deg, var(--btn-primary-bg), var(--header-bg));
            color: var(--btn-primary-text);
        }

        body[data-theme="luxury"] .card,
        body[data-theme="luxury"] button,
        body[data-theme="luxury"] input,
        body[data-theme="luxury"] select {
            border: 1px solid var(--border-soft);
        }

        body[data-theme="luxury"] button,
        body[data-theme="luxury"] .btn,
        body[data-theme="luxury"] [role="button"] {
            position: relative;
            overflow: hidden;
        }

        body[data-theme="luxury"] button::before,
        body[data-theme="luxury"] .btn::before,
        body[data-theme="luxury"] [role="button"]::before {
            content: none;
        }

        body[data-theme^="luxury"] .page-title {
            color: var(--text-primary);
            text-shadow: none;
        }

        body[data-theme^="luxury"] .header {
            background: var(--text-primary);
        }

        body[data-theme^="luxury"] .header.scrolled {
            background: var(--text-primary);
            box-shadow: 0 6px 22px rgba(var(--text-primary-rgb), 0.25);
        }

        body[data-theme^="luxury"] .nav-item {
            color: var(--bg-main);
            text-shadow: none;
        }

        body[data-theme^="luxury"] .nav-item:hover {
            color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .nav-item.active {
            color: var(--accent-primary);
            border-bottom-color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .username {
            color: var(--bg-main);
            text-shadow: none;
        }

        body[data-theme^="luxury"] .logout-btn {
            color: var(--bg-main);
            border-color: var(--border-soft);
            background-color: transparent;
        }

        body[data-theme^="luxury"] .settings-icon,
        body[data-theme^="luxury"] .notification-icon {
            color: var(--bg-main);
        }

        body[data-theme^="luxury"] .crm-header,
        body[data-theme^="luxury"] .admin-header,
        body[data-theme^="luxury"] .coordinator-header-panel {
            background: var(--bg-card);
            color: var(--text-primary);
            box-shadow: var(--shadow-card);
            border: 1px solid var(--border-soft);
        }

        /* ===========================================
           OFFICE CLASSIC - Widget/Card Styling
           Softer backgrounds with visible separation
           =========================================== */

        /* ===========================================
           OFFICE CLASSIC - Warm Off-White Widget/Card Styling
           Soft warm backgrounds, subtle texture
           =========================================== */

        body[data-theme="luxury"] .crm-section,
        body[data-theme="luxury"] .admin-section,
        body[data-theme="luxury"] .crm-stat-card,
        body[data-theme="luxury"] .admin-stat-card,
        body[data-theme="luxury"] .card,
        body[data-theme="luxury"] .widget,
        body[data-theme="luxury"] .box,
        body[data-theme="luxury"] .panel,
        body[data-theme="luxury"] .house-listings,
        body[data-theme="luxury"] .map-filter-section,
        body[data-theme="luxury"] .notification-panel,
        body[data-theme="luxury"] .modal {
            background: var(--widget-bg);
            border: 1px solid var(--border-soft);
            box-shadow: var(--widget-shadow);
        }

        body[data-theme="luxury"] .house-item,
        body[data-theme="luxury"] .crm-property-card,
        body[data-theme="luxury"] .crm-note-item,
        body[data-theme="luxury"] .crm-document-card,
        body[data-theme="luxury"] .crm-contact-card,
        body[data-theme="luxury"] .task-item,
        body[data-theme="luxury"] .client-list-card,
        body[data-theme="luxury"] .timeline-content,
        body[data-theme="luxury"] .notification-item {
            background: var(--widget-bg);
            border: 1px solid var(--border-soft);
            box-shadow: var(--widget-shadow);
        }

        body[data-theme="luxury"] .house-item:hover,
        body[data-theme="luxury"] .client-list-card:hover,
        body[data-theme="luxury"] .notification-item:hover {
            background: var(--card-bg-alt);
        }

        /* ===========================================
           OFFICE CLASSIC - Text Contrast (Soft Ink)
           All text dark and readable with softened contrast
           =========================================== */

        body[data-theme="luxury"] .crm-stat-value,
        body[data-theme="luxury"] .admin-stat-value,
        body[data-theme="luxury"] .crm-section-title,
        body[data-theme="luxury"] .admin-section-title,
        body[data-theme="luxury"] .crm-client-name,
        body[data-theme="luxury"] .admin-header-title,
        body[data-theme="luxury"] .page-title,
        body[data-theme="luxury"] h1,
        body[data-theme="luxury"] h2,
        body[data-theme="luxury"] h3,
        body[data-theme="luxury"] h4 {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .crm-stat-label,
        body[data-theme="luxury"] .admin-stat-label,
        body[data-theme="luxury"] .crm-detail-label,
        body[data-theme="luxury"] label,
        body[data-theme="luxury"] .form-label {
            color: var(--text-muted);
        }

        body[data-theme="luxury"] p,
        body[data-theme="luxury"] span,
        body[data-theme="luxury"] .crm-detail-text {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .text-muted {
            color: var(--text-muted);
        }

        body[data-theme="luxury"] .notification-title,
        body[data-theme="luxury"] .notification-message {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .notification-time {
            color: var(--text-muted);
        }

        /* Admin table text - deep denim neutrals */
        body[data-theme="luxury"] table,
        body[data-theme="luxury"] td,
        body[data-theme="luxury"] th,
        body[data-theme="luxury"] .admin-table td,
        body[data-theme="luxury"] .admin-table th,
        body[data-theme="luxury"] .table-cell,
        body[data-theme="luxury"] .agent-name,
        body[data-theme="luxury"] .agent-email,
        body[data-theme="luxury"] .agent-stats {
            color: var(--text-primary);
        }

        /* Input fields - cool paper background */
        body[data-theme="luxury"] input,
        body[data-theme="luxury"] select,
        body[data-theme="luxury"] textarea,
        body[data-theme="luxury"] .searchable-dropdown-input {
            background: var(--input-bg) !important;
            color: var(--input-text) !important;
            border-color: var(--input-border) !important;
        }

        body[data-theme="luxury"] input::placeholder,
        body[data-theme="luxury"] textarea::placeholder {
            color: var(--text-muted) !important;
        }

        body[data-theme="luxury"] .admin-table tbody tr {
            background: var(--bg-card);
            border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        }

        body[data-theme="luxury"] .admin-table tbody tr:hover {
            background: var(--card-bg-alt);
        }

        /* ===========================================
           OFFICE CLASSIC - Admin Team Agents Table
           All numbers and text must be dark/readable
           =========================================== */

        body[data-theme="luxury"] .agents-table {
            background: var(--card-bg-alt);
        }

        body[data-theme="luxury"] .agents-table th {
            background: var(--header-bg);
            color: var(--header-text);
            border-bottom: 2px solid var(--border-strong);
        }

        body[data-theme="luxury"] .agents-table td {
            color: var(--text-primary);
            border-bottom: 1px solid var(--border-soft);
        }

        body[data-theme="luxury"] .agents-table tr:hover {
            background: var(--card-bg);
        }

        body[data-theme="luxury"] .agent-name,
        body[data-theme="luxury"] .agent-email,
        body[data-theme="luxury"] .agent-phone,
        body[data-theme="luxury"] .agent-role,
        body[data-theme="luxury"] .agent-clients,
        body[data-theme="luxury"] .agent-pending,
        body[data-theme="luxury"] .agent-closed,
        body[data-theme="luxury"] .agent-revenue,
        body[data-theme="luxury"] .agent-last-active {
            color: var(--text-primary) !important;
        }

        body[data-theme="luxury"] .admin-section-title,
        body[data-theme="luxury"] .admin-section-header h3 {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .admin-stat-value {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .admin-stat-label {
            color: var(--text-muted);
        }

        body[data-theme^="luxury"] .crm-client-info-card {
            background: var(--bg-card);
            color: var(--text-primary);
            border: 1px solid var(--border-soft);
        }

        body[data-theme^="luxury"] .crm-detail-text,
        body[data-theme^="luxury"] .crm-detail-icon {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .crm-stat-card,
        body[data-theme^="luxury"] .crm-section,
        body[data-theme^="luxury"] .admin-stat-card,
        body[data-theme^="luxury"] .admin-section,
        body[data-theme^="luxury"] .assignment-panel,
        body[data-theme^="luxury"] .coordinator-folder {
            background: var(--bg-card);
            color: var(--text-primary);
            border-color: var(--border-soft);
            box-shadow: var(--shadow-card);
        }

        body[data-theme^="luxury"] .crm-stat-card,
        body[data-theme^="luxury"] .admin-stat-card,
        body[data-theme^="luxury"] .agent-profile-stat-card,
        body[data-theme^="luxury"] .broker-risk-item,
        body[data-theme^="luxury"] .coordinator-contract-item {
            border-left-color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .crm-stat-card.blue {
            border-left-color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .crm-stat-label,
        body[data-theme^="luxury"] .admin-stat-label,
        body[data-theme^="luxury"] .crm-section-title,
        body[data-theme^="luxury"] .admin-section-title,
        body[data-theme^="luxury"] .admin-header-subtitle,
        body[data-theme^="luxury"] .coordinator-subtitle {
            color: var(--text-muted);
        }

        body[data-theme^="luxury"] .crm-stat-value,
        body[data-theme^="luxury"] .admin-stat-value,
        body[data-theme^="luxury"] .crm-client-name,
        body[data-theme^="luxury"] .admin-header-title {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .searchable-dropdown-input,
        body[data-theme^="luxury"] input,
        body[data-theme^="luxury"] select,
        body[data-theme^="luxury"] textarea {
            background: var(--bg-card);
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        body[data-theme^="luxury"] input::placeholder,
        body[data-theme^="luxury"] textarea::placeholder,
        body[data-theme^="luxury"] .searchable-dropdown-input::placeholder {
            color: var(--text-muted);
        }

        /* Filter buttons and tabs */
        body[data-theme^="luxury"] .filter-mode-btn,
        body[data-theme^="luxury"] .filter-tag {
            color: var(--text-primary);
            background: var(--bg-card);
            border-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .filter-mode-btn.active,
        body[data-theme^="luxury"] .filter-tag.active {
            background: var(--accent-primary);
            color: #ffffff;
            border-color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .btn,
        body[data-theme^="luxury"] .crm-action-btn,
        body[data-theme^="luxury"] .admin-action-btn.primary,
        body[data-theme^="luxury"] .coordinator-start-btn-corner {
            background: var(--accent-primary);
            border-color: var(--accent-primary);
            color: #ffffff;
        }

        body[data-theme^="luxury"] .btn:hover,
        body[data-theme^="luxury"] .crm-action-btn:hover,
        body[data-theme^="luxury"] .admin-action-btn.primary:hover,
        body[data-theme^="luxury"] .coordinator-start-btn-corner:hover {
            box-shadow: var(--shadow-card);
            transform: translateY(-1px);
        }

        body[data-theme^="luxury"] .crm-action-btn.secondary {
            background: transparent;
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .searchable-dropdown-list {
            background: var(--bg-card);
            color: var(--text-primary);
            border: 1px solid var(--border-soft);
            box-shadow: 0 4px 12px rgba(var(--text-primary-rgb), 0.12);
        }

        body[data-theme^="luxury"] .searchable-dropdown-item {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .searchable-dropdown-item:hover {
            background: rgba(var(--accent-primary-rgb), 0.12);
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .searchable-dropdown-empty {
            color: var(--text-muted);
        }

        body[data-theme^="luxury"] .modal,
        body[data-theme^="luxury"] .settings-modal-content {
            background: var(--bg-card);
            color: var(--text-primary);
        }

        /* Notification panel - MUST appear above all dropdowns and search inputs */
        body[data-theme^="luxury"] .notification-panel {
            background: var(--bg-card);
            color: var(--text-primary);
            z-index: 99999 !important;
            position: absolute;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
            border: 1px solid var(--border-soft);
        }

        /* Searchable dropdowns - LOW z-index, must NOT overlap notifications */
        body[data-theme^="luxury"] .searchable-dropdown {
            z-index: 100 !important;
        }

        body[data-theme^="luxury"] .searchable-dropdown-list {
            z-index: 101 !important;
        }

        body[data-theme^="luxury"] .map-filter-section,
        body[data-theme^="luxury"] .filter-content {
            z-index: 50 !important;
        }

        body[data-theme^="luxury"] .modal-header {
            border-bottom-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .modal-title,
        body[data-theme^="luxury"] .settings-modal-header h2 {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .notification-panel-header {
            background: var(--bg-card);
            border-bottom-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .notification-panel-header h3,
        body[data-theme^="luxury"] .notification-panel-title {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .notification-item {
            border-bottom-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .notification-title {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .notification-message,
        body[data-theme^="luxury"] .notification-time {
            color: var(--text-muted);
        }

        body[data-theme^="luxury"] .notification-actions button,
        body[data-theme^="luxury"] .notification-filter-btn {
            color: var(--text-primary);
            background: var(--bg-card);
            border-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .notification-filter-btn.active {
            background: var(--accent-primary);
            color: #ffffff;
            border-color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .view-all-notifications,
        body[data-theme^="luxury"] .notification-panel a {
            color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .mark-all-read,
        body[data-theme^="luxury"] .clear-read-btn {
            color: var(--text-muted);
        }

        body[data-theme^="luxury"] .notification-checkbox {
            accent-color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .toast {
            background: var(--bg-card);
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        /* Office Classic foreground refinements */
        body[data-theme="luxury"] .header,
        body[data-theme="luxury"] .header.scrolled,
        body[data-theme="luxury"] .crm-header,
        body[data-theme="luxury"] .admin-header,
        body[data-theme="luxury"] .super-admin-header,
        body[data-theme="luxury"] .coordinator-header-panel,
        body[data-theme="luxury"] .admin-section-header,
        body[data-theme="luxury"] .crm-section-header,
        body[data-theme="luxury"] .notification-panel-header,
        body[data-theme="luxury"] .settings-modal-header,
        body[data-theme="luxury"] .modal-header {
            background: var(--header-bg);
            color: var(--header-text);
            border-color: var(--border-strong);
        }

        body[data-theme="luxury"] .nav-item,
        body[data-theme="luxury"] .username,
        body[data-theme="luxury"] .settings-icon,
        body[data-theme="luxury"] .notification-icon,
        body[data-theme="luxury"] .logout-btn {
            color: var(--header-text);
        }

        body[data-theme="luxury"] .logo,
        body[data-theme="luxury"] .logo span {
            color: var(--header-text);
        }

        body[data-theme="luxury"] .nav-item:hover {
            color: var(--header-text);
        }

        body[data-theme="luxury"] .nav-item.active {
            color: var(--header-text);
            border-bottom-color: var(--btn-primary-bg);
        }

        body[data-theme="luxury"] .logout-btn {
            border-color: var(--border-strong);
        }

        body[data-theme="luxury"] .admin-section-header h3,
        body[data-theme="luxury"] .admin-header-title,
        body[data-theme="luxury"] .admin-header-subtitle,
        body[data-theme="luxury"] .crm-section-title,
        body[data-theme="luxury"] .client-selector-label,
        body[data-theme="luxury"] .notification-panel-header h3,
        body[data-theme="luxury"] .notification-panel-title,
        body[data-theme="luxury"] .modal-title,
        body[data-theme="luxury"] .settings-modal-header h2 {
            color: var(--header-text);
        }

        body[data-theme="luxury"] .coordinator-header-panel .page-title,
        body[data-theme="luxury"] .coordinator-header-panel .coordinator-subtitle {
            color: var(--header-text);
        }

        body[data-theme="luxury"] .admin-header-subtitle {
            opacity: 0.85;
        }

        body[data-theme="luxury"] .crm-section-header,
        body[data-theme="luxury"] .admin-section-header {
            margin: -25px -25px 20px;
            padding: 16px 25px;
            border-radius: 12px 12px 0 0;
            border-bottom: 1px solid var(--border-strong);
        }

        body[data-theme="luxury"] .content-box {
            background: var(--widget-bg);
            color: var(--text-primary);
            border: 1px solid var(--border-soft);
            box-shadow: var(--shadow-card);
        }

        body[data-theme="luxury"] .content-box h3,
        body[data-theme="luxury"] .content-box p,
        body[data-theme="luxury"] .content-box strong {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .filter-mode-btn,
        body[data-theme="luxury"] .filter-tag {
            border-color: var(--border-strong);
        }

        body[data-theme="luxury"] .filter-mode-btn.active,
        body[data-theme="luxury"] .filter-tag.active {
            color: var(--btn-primary-text);
        }

        body[data-theme="luxury"] .notification-filter-btn.active {
            color: var(--btn-primary-text);
            border-color: var(--btn-primary-bg);
        }

        body[data-theme="luxury"] .view-all-notifications,
        body[data-theme="luxury"] .notification-panel a {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .btn,
        body[data-theme="luxury"] .crm-action-btn,
        body[data-theme="luxury"] .admin-action-btn,
        body[data-theme="luxury"] .admin-action-btn.primary,
        body[data-theme="luxury"] .admin-section-action,
        body[data-theme="luxury"] .coordinator-start-btn,
        body[data-theme="luxury"] .coordinator-start-btn-center,
        body[data-theme="luxury"] .coordinator-start-btn-corner,
        body[data-theme="luxury"] .coordinator-start-btn-inline,
        body[data-theme="luxury"] .compare-btn,
        body[data-theme="luxury"] .settings-save-btn,
        body[data-theme="luxury"] .notification-clear-btn,
        body[data-theme="luxury"] .companion-send-btn,
        body[data-theme="luxury"] .crm-contact-action-btn,
        body[data-theme="luxury"] .crm-section-action,
        body[data-theme="luxury"] .crm-preferences-btn {
            background: var(--btn-primary-bg);
            color: var(--btn-primary-text);
            border-color: var(--border-strong);
        }

        body[data-theme="luxury"] .btn:hover,
        body[data-theme="luxury"] .crm-action-btn:hover,
        body[data-theme="luxury"] .admin-action-btn:hover,
        body[data-theme="luxury"] .admin-action-btn.primary:hover,
        body[data-theme="luxury"] .admin-section-action:hover,
        body[data-theme="luxury"] .coordinator-start-btn:hover,
        body[data-theme="luxury"] .coordinator-start-btn-center:hover,
        body[data-theme="luxury"] .coordinator-start-btn-corner:hover,
        body[data-theme="luxury"] .coordinator-start-btn-inline:hover,
        body[data-theme="luxury"] .compare-btn:hover,
        body[data-theme="luxury"] .settings-save-btn:hover,
        body[data-theme="luxury"] .notification-clear-btn:hover,
        body[data-theme="luxury"] .companion-send-btn:hover,
        body[data-theme="luxury"] .crm-contact-action-btn:hover,
        body[data-theme="luxury"] .crm-section-action:hover,
        body[data-theme="luxury"] .crm-preferences-btn:hover {
            background: var(--header-bg);
        }

        body[data-theme="luxury"] .btn.btn-secondary,
        body[data-theme="luxury"] .btn-secondary,
        body[data-theme="luxury"] .crm-action-btn.secondary,
        body[data-theme="luxury"] .admin-action-btn.secondary,
        body[data-theme="luxury"] .admin-section-action.secondary,
        body[data-theme="luxury"] .crm-section-action.secondary,
        body[data-theme="luxury"] .coordinator-folder-action-btn.secondary,
        body[data-theme="luxury"] .clear-compare-btn,
        body[data-theme="luxury"] .clear-filters-btn {
            background: var(--btn-secondary-bg);
            color: var(--btn-secondary-text);
            border-color: var(--border-strong);
        }

        body[data-theme="luxury"] .btn.btn-secondary:hover,
        body[data-theme="luxury"] .btn-secondary:hover,
        body[data-theme="luxury"] .crm-action-btn.secondary:hover,
        body[data-theme="luxury"] .admin-action-btn.secondary:hover,
        body[data-theme="luxury"] .crm-section-action.secondary:hover,
        body[data-theme="luxury"] .coordinator-folder-action-btn.secondary:hover,
        body[data-theme="luxury"] .clear-compare-btn:hover,
        body[data-theme="luxury"] .clear-filters-btn:hover {
            background: var(--card-bg-alt);
        }

        body[data-theme="luxury-dark"] .header,
        body[data-theme="luxury-dark"] .header.scrolled {
            background: var(--bg-card);
        }

        body[data-theme="luxury-dark"] .nav-item,
        body[data-theme="luxury-dark"] .username,
        body[data-theme="luxury-dark"] .settings-icon,
        body[data-theme="luxury-dark"] .notification-icon {
            color: var(--text-primary);
        }

        body[data-theme="luxury-dark"] .logout-btn {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .btn,
        body[data-theme^="luxury"] .crm-action-btn,
        body[data-theme^="luxury"] .admin-action-btn,
        body[data-theme^="luxury"] .admin-action-btn.primary,
        body[data-theme^="luxury"] .coordinator-start-btn,
        body[data-theme^="luxury"] .coordinator-start-btn-center,
        body[data-theme^="luxury"] .coordinator-start-btn-corner,
        body[data-theme^="luxury"] .coordinator-start-btn-inline,
        body[data-theme^="luxury"] .compare-btn,
        body[data-theme^="luxury"] .clear-compare-btn,
        body[data-theme^="luxury"] .clear-filters-btn,
        body[data-theme^="luxury"] .settings-save-btn,
        body[data-theme^="luxury"] .notification-clear-btn,
        body[data-theme^="luxury"] .companion-send-btn,
        body[data-theme^="luxury"] .crm-contact-action-btn,
        body[data-theme^="luxury"] .crm-section-action,
        body[data-theme^="luxury"] .crm-preferences-btn {
            border: 1px solid var(--border-soft);
        }

        body[data-theme="luxury-dark"] .btn,
        body[data-theme="luxury-dark"] .crm-action-btn,
        body[data-theme="luxury-dark"] .admin-action-btn,
        body[data-theme="luxury-dark"] .admin-action-btn.primary,
        body[data-theme="luxury-dark"] .coordinator-start-btn,
        body[data-theme="luxury-dark"] .coordinator-start-btn-center,
        body[data-theme="luxury-dark"] .coordinator-start-btn-corner,
        body[data-theme="luxury-dark"] .coordinator-start-btn-inline,
        body[data-theme="luxury-dark"] .compare-btn,
        body[data-theme="luxury-dark"] .clear-compare-btn,
        body[data-theme="luxury-dark"] .clear-filters-btn,
        body[data-theme="luxury-dark"] .settings-save-btn,
        body[data-theme="luxury-dark"] .notification-clear-btn,
        body[data-theme="luxury-dark"] .companion-send-btn,
        body[data-theme="luxury-dark"] .crm-contact-action-btn,
        body[data-theme="luxury-dark"] .crm-section-action,
        body[data-theme="luxury-dark"] .crm-preferences-btn {
            border-color: #ffffff !important;
        }

        body[data-theme="luxury-dark"] button,
        body[data-theme="luxury-dark"] [role="button"] {
            border: 1px solid #ffffff !important;
        }

        /* ===============================
           CLASSIC DARK THEME OVERRIDES
           =============================== */

        body[data-theme="dark"] .settings-icon,
        body[data-theme="dark"] .notification-icon {
            color: #f5f5f5;
        }

        /* ===============================
           DEEP BLUE THEME OVERRIDES
           =============================== */

        body[data-theme="deep-blue"] {
            background: var(--bg-main);
            color: var(--text-primary);
        }

        body[data-theme="deep-blue"] .page-title {
            color: var(--text-primary);
            text-shadow: none;
        }

        body[data-theme="deep-blue"] .header {
            background: rgba(7, 15, 30, 0.82);
            border-bottom: 1px solid var(--border-soft);
            box-shadow: 0 8px 24px rgba(4, 10, 24, 0.55);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        body[data-theme="deep-blue"] .header.scrolled {
            background: rgba(7, 15, 30, 0.92);
            box-shadow: 0 10px 28px rgba(4, 10, 24, 0.65);
        }

        body[data-theme="deep-blue"] .nav-item {
            color: var(--text-muted);
            text-shadow: none;
        }

        body[data-theme="deep-blue"] .nav-item:hover {
            color: var(--text-primary);
        }

        body[data-theme="deep-blue"] .nav-item.active {
            color: var(--accent-primary);
            border-bottom-color: var(--accent-primary);
        }

        body[data-theme="deep-blue"] .username {
            color: var(--text-primary);
            text-shadow: none;
        }

        body[data-theme="deep-blue"] .logout-btn {
            color: var(--text-primary);
            border-color: var(--border-soft);
            background: rgba(9, 18, 36, 0.45);
        }

        body[data-theme="deep-blue"] .logout-btn:hover {
            background: rgba(45, 140, 255, 0.15);
            border-color: rgba(110, 165, 255, 0.6);
            box-shadow: 0 6px 16px rgba(10, 35, 90, 0.4);
        }

        body[data-theme="deep-blue"] .settings-icon,
        body[data-theme="deep-blue"] .notification-icon {
            color: var(--text-primary);
        }

        body[data-theme="deep-blue"] .crm-header,
        body[data-theme="deep-blue"] .admin-header,
        body[data-theme="deep-blue"] .coordinator-header-panel,
        body[data-theme="deep-blue"] .crm-client-info-card,
        body[data-theme="deep-blue"] .crm-stat-card,
        body[data-theme="deep-blue"] .crm-section,
        body[data-theme="deep-blue"] .admin-stat-card,
        body[data-theme="deep-blue"] .admin-section,
        body[data-theme="deep-blue"] .assignment-panel,
        body[data-theme="deep-blue"] .coordinator-folder,
        body[data-theme="deep-blue"] .agent-profile-stat-card,
        body[data-theme="deep-blue"] .broker-risk-item,
        body[data-theme="deep-blue"] .coordinator-contract-item,
        body[data-theme="deep-blue"] .client-list-card,
        body[data-theme="deep-blue"] .house-item,
        body[data-theme="deep-blue"] .house-listings,
        body[data-theme="deep-blue"] .map-container,
        body[data-theme="deep-blue"] .map-filter-section,
        body[data-theme="deep-blue"] .compare-modal-content,
        body[data-theme="deep-blue"] .compare-modal .modal,
        body[data-theme="deep-blue"] .modal,
        body[data-theme="deep-blue"] .settings-modal-content,
        body[data-theme="deep-blue"] .notification-panel,
        body[data-theme="deep-blue"] .toast {
            background: var(--bg-card);
            color: var(--text-primary);
            border-color: var(--border-soft);
            box-shadow: 0 0 0 1px var(--border-soft), var(--shadow-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        body[data-theme="deep-blue"] .notification-panel,
        body[data-theme="deep-blue"] .notifications-modal,
        body[data-theme="deep-blue"] .notification-detail-modal {
            background: #0c1832;
        }

        body[data-theme="deep-blue"] .crm-stat-card,
        body[data-theme="deep-blue"] .admin-stat-card,
        body[data-theme="deep-blue"] .agent-profile-stat-card,
        body[data-theme="deep-blue"] .broker-risk-item,
        body[data-theme="deep-blue"] .coordinator-contract-item {
            border-left-color: var(--accent-primary);
        }

        body[data-theme="deep-blue"] .crm-stat-label,
        body[data-theme="deep-blue"] .admin-stat-label,
        body[data-theme="deep-blue"] .crm-section-title,
        body[data-theme="deep-blue"] .admin-section-title,
        body[data-theme="deep-blue"] .admin-header-subtitle,
        body[data-theme="deep-blue"] .coordinator-subtitle,
        body[data-theme="deep-blue"] .client-list-details,
        body[data-theme="deep-blue"] .client-list-budget {
            color: var(--text-muted);
        }

        body[data-theme="deep-blue"] .crm-stat-value,
        body[data-theme="deep-blue"] .admin-stat-value,
        body[data-theme="deep-blue"] .crm-client-name,
        body[data-theme="deep-blue"] .admin-header-title,
        body[data-theme="deep-blue"] .client-list-name {
            color: var(--text-primary);
        }

        body[data-theme="deep-blue"] .searchable-dropdown-input,
        body[data-theme="deep-blue"] input,
        body[data-theme="deep-blue"] select,
        body[data-theme="deep-blue"] textarea {
            background: rgba(9, 18, 36, 0.6);
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        body[data-theme="deep-blue"] .searchable-dropdown-input:focus,
        body[data-theme="deep-blue"] input:focus,
        body[data-theme="deep-blue"] select:focus,
        body[data-theme="deep-blue"] textarea:focus {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.22);
        }

        body[data-theme="deep-blue"] .searchable-dropdown-list {
            background: rgba(9, 18, 36, 0.92);
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        body[data-theme="deep-blue"] .searchable-dropdown-item:hover {
            background: rgba(45, 140, 255, 0.12);
        }

        body[data-theme="deep-blue"] .searchable-dropdown {
            z-index: 1500;
        }

        body[data-theme="deep-blue"] .searchable-dropdown-list,
        body[data-theme="deep-blue"] .folder-menu-dropdown,
        body[data-theme="deep-blue"] .crm-property-menu-list {
            z-index: 1501;
        }

        /* Fix dropdown clipping - ensure parent containers allow overflow */
        body[data-theme="deep-blue"] .map-filter-section,
        body[data-theme="deep-blue"] .filter-content,
        body[data-theme="deep-blue"] .client-selector-wrapper {
            overflow: visible;
        }

        body[data-theme="deep-blue"] .listings-header {
            overflow: visible;
            z-index: 100;
        }

        /* Keep house-listings scrollable - don't break the layout */
        body[data-theme="deep-blue"] .house-listings {
            overflow-y: auto;
            overflow-x: visible;
        }

        body[data-theme="deep-blue"] select,
        body[data-theme="deep-blue"] .client-select-dropdown {
            position: relative;
            z-index: 100;
        }

        /* CRM filter dropdown fixes */
        body[data-theme="deep-blue"] .crm-section {
            overflow: visible;
        }

        body[data-theme="deep-blue"] .crm-header {
            overflow: visible;
        }

        body[data-theme="deep-blue"] button,
        body[data-theme="deep-blue"] [role="button"] {
            border: 1px solid var(--border-soft);
        }

        body[data-theme="deep-blue"] .btn,
        body[data-theme="deep-blue"] .crm-action-btn,
        body[data-theme="deep-blue"] .admin-action-btn,
        body[data-theme="deep-blue"] .admin-action-btn.primary,
        body[data-theme="deep-blue"] .coordinator-start-btn,
        body[data-theme="deep-blue"] .coordinator-start-btn-center,
        body[data-theme="deep-blue"] .coordinator-start-btn-corner,
        body[data-theme="deep-blue"] .coordinator-start-btn-inline,
        body[data-theme="deep-blue"] .compare-btn,
        body[data-theme="deep-blue"] .settings-save-btn,
        body[data-theme="deep-blue"] .companion-send-btn {
            background: linear-gradient(135deg, #1F6BFF 0%, #3DA0FF 100%);
            border-color: rgba(110, 165, 255, 0.75);
            color: #EAF4FF;
            box-shadow: 0 6px 16px rgba(10, 40, 110, 0.45);
        }

        body[data-theme="deep-blue"] .btn:hover,
        body[data-theme="deep-blue"] .crm-action-btn:hover,
        body[data-theme="deep-blue"] .admin-action-btn:hover,
        body[data-theme="deep-blue"] .admin-action-btn.primary:hover,
        body[data-theme="deep-blue"] .coordinator-start-btn:hover,
        body[data-theme="deep-blue"] .coordinator-start-btn-center:hover,
        body[data-theme="deep-blue"] .coordinator-start-btn-corner:hover,
        body[data-theme="deep-blue"] .coordinator-start-btn-inline:hover,
        body[data-theme="deep-blue"] .compare-btn:hover,
        body[data-theme="deep-blue"] .settings-save-btn:hover,
        body[data-theme="deep-blue"] .companion-send-btn:hover {
            box-shadow: 0 0 18px rgba(45, 140, 255, 0.45), 0 10px 22px rgba(6, 18, 50, 0.65);
            transform: translateY(-1px);
        }

        body[data-theme="deep-blue"] .btn.btn-secondary,
        body[data-theme="deep-blue"] .crm-action-btn.secondary,
        body[data-theme="deep-blue"] .clear-compare-btn,
        body[data-theme="deep-blue"] .clear-filters-btn,
        body[data-theme="deep-blue"] .notification-clear-btn,
        body[data-theme="deep-blue"] .crm-reset-layout-btn,
        body[data-theme="deep-blue"] .crm-widgets-btn,
        body[data-theme="deep-blue"] .all-clients-action-btn {
            background: rgba(9, 18, 36, 0.65);
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        body[data-theme="deep-blue"] .btn.btn-secondary:hover,
        body[data-theme="deep-blue"] .crm-action-btn.secondary:hover,
        body[data-theme="deep-blue"] .clear-compare-btn:hover,
        body[data-theme="deep-blue"] .clear-filters-btn:hover,
        body[data-theme="deep-blue"] .notification-clear-btn:hover,
        body[data-theme="deep-blue"] .crm-reset-layout-btn:hover,
        body[data-theme="deep-blue"] .crm-widgets-btn:hover,
        body[data-theme="deep-blue"] .all-clients-action-btn:hover {
            background: rgba(45, 140, 255, 0.12);
            border-color: rgba(110, 165, 255, 0.6);
        }

        body[data-theme="deep-blue"] .crm-note-action-btn.danger,
        body[data-theme="deep-blue"] .crm-document-btn.danger,
        body[data-theme="deep-blue"] .table-action-btn.danger,
        body[data-theme="deep-blue"] .folder-menu-item.delete,
        body[data-theme="deep-blue"] .coordinator-folder-delete,
        body[data-theme="deep-blue"] .notification-item .notification-delete-btn {
            background: rgba(7, 12, 24, 0.85);
            color: var(--text-muted);
            border-color: rgba(90, 120, 170, 0.35);
        }

        body[data-theme="deep-blue"] .crm-note-action-btn.danger:hover,
        body[data-theme="deep-blue"] .crm-document-btn.danger:hover,
        body[data-theme="deep-blue"] .table-action-btn.danger:hover,
        body[data-theme="deep-blue"] .folder-menu-item.delete:hover,
        body[data-theme="deep-blue"] .coordinator-folder-delete:hover,
        body[data-theme="deep-blue"] .notification-item .notification-delete-btn:hover {
            background: rgba(12, 22, 45, 0.95);
            color: var(--text-primary);
        }

        /* Animated background layers (theme-specific) */
        .animated-bg {
            position: fixed;
            inset: 0;
            z-index: -2;
            pointer-events: none;
            display: none;
        }

        body[data-theme="deep-blue"] .animated-bg {
            background: radial-gradient(circle at 20% 20%, rgba(45, 140, 255, 0.25), transparent 40%),
                radial-gradient(circle at 80% 30%, rgba(80, 120, 255, 0.2), transparent 45%),
                radial-gradient(circle at 50% 80%, rgba(30, 90, 200, 0.25), transparent 50%),
                linear-gradient(180deg, #0B1B3A, #070E1A);
            animation: bg-drift 40s ease-in-out infinite alternate;
            display: block;
        }

        .liquid-bg {
            position: fixed;
            inset: 0;
            z-index: -1;
            background: radial-gradient(circle at top, #3a3a3a 0%, #1f1f1f 55%, #141414 100%);
            overflow: hidden;
            pointer-events: none;
            display: none;
        }

        body[data-theme="dark"] .liquid-bg {
            display: block;
        }

        .blob {
            position: absolute;
            width: 520px;
            height: 520px;
            opacity: 0.95;
            filter: blur(4px);
            will-change: transform, border-radius;
        }

        .blob::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background:
                radial-gradient(circle at 50% 50%, #050505 38%, transparent 60%),
                conic-gradient(#ffffff, #a36bff, #3a7bff, #6b9cff, #ffffff);
            filter: blur(10px);
        }

        .b1 {
            top: 4%;
            left: 5%;
            animation: blob1 42s ease-in-out infinite;
        }

        .b2 {
            top: 6%;
            right: 4%;
            animation: blob2 48s ease-in-out infinite;
        }

        .b3 {
            bottom: 6%;
            left: 8%;
            animation: blob3 44s ease-in-out infinite;
        }

        .b4 {
            bottom: 5%;
            right: 6%;
            animation: blob4 52s ease-in-out infinite;
        }

        .b5 {
            top: 35%;
            left: 35%;
            width: 620px;
            height: 620px;
            animation: blobCenter 36s ease-in-out infinite;
        }

        .bubble-container {
            position: fixed;
            inset: 0;
            z-index: -1;
            overflow: hidden;
            pointer-events: none;
            display: none;
        }

        body[data-theme="deep-blue"] .bubble-container {
            display: block;
        }

        .bubble {
            position: absolute;
            bottom: -140px;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.45), rgba(var(--accent-primary-rgb), 0.12));
            opacity: 0.55;
            animation: floatUp linear infinite;
        }

        body.bg-animations-paused .animated-bg,
        body.bg-animations-paused .blob,
        body.bg-animations-paused .bubble {
            animation: none !important;
        }

        body.bg-animations-paused[data-theme="dark"] .blob {
            display: none;
        }

        body.reduced-effects .animated-bg,
        body.reduced-effects .liquid-bg,
        body.reduced-effects .bubble-container {
            display: none !important;
        }

        body.reduced-effects .blob,
        body.reduced-effects .bubble {
            animation: none !important;
        }

        body.reduced-effects * {
            animation: none !important;
            transition: none !important;
        }

        body.reduced-effects .header,
        body.reduced-effects .logout-btn,
        body.reduced-effects .map-search-input,
        body.reduced-effects .map-label,
        body.reduced-effects .settings-modal,
        body.reduced-effects .settings-modal-content,
        body.reduced-effects .crm-header,
        body.reduced-effects .crm-stat-card,
        body.reduced-effects .crm-section,
        body.reduced-effects .client-list-card,
        body.reduced-effects .content-box,
        body.reduced-effects .modal {
            box-shadow: none !important;
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
        }

        body.reduced-effects.is-scrolling * {
            animation: none !important;
            transition: none !important;
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
            box-shadow: none !important;
        }

        html.safari-legacy .animated-bg,
        html.safari-legacy .liquid-bg,
        html.safari-legacy .bubble-container {
            display: none !important;
        }

        html.safari-legacy .blob,
        html.safari-legacy .bubble {
            animation: none !important;
        }

        html.safari-legacy .header,
        html.safari-legacy .logout-btn,
        html.safari-legacy .map-search-input,
        html.safari-legacy .map-label,
        html.safari-legacy .settings-modal,
        html.safari-legacy .settings-modal-content,
        html.safari-legacy .crm-header,
        html.safari-legacy .crm-stat-card,
        html.safari-legacy .crm-section,
        html.safari-legacy .client-list-card,
        html.safari-legacy .content-box,
        html.safari-legacy .modal {
            box-shadow: none !important;
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
        }

        @keyframes floatUp {
            from {
                transform: translateY(0);
            }
            to {
                transform: translateY(-120vh);
            }
        }

        .bubble:nth-child(1) { left: 8%; width: 18px; height: 18px; animation-duration: 20s; animation-delay: -2s; }
        .bubble:nth-child(2) { left: 18%; width: 34px; height: 34px; animation-duration: 26s; animation-delay: -10s; }
        .bubble:nth-child(3) { left: 30%; width: 14px; height: 14px; animation-duration: 18s; animation-delay: -6s; }
        .bubble:nth-child(4) { left: 44%; width: 38px; height: 38px; animation-duration: 30s; animation-delay: -14s; }
        .bubble:nth-child(5) { left: 56%; width: 24px; height: 24px; animation-duration: 22s; animation-delay: -4s; }
        .bubble:nth-child(6) { left: 66%; width: 16px; height: 16px; animation-duration: 16s; animation-delay: -12s; }
        .bubble:nth-child(7) { left: 76%; width: 42px; height: 42px; animation-duration: 32s; animation-delay: -18s; }
        .bubble:nth-child(8) { left: 86%; width: 20px; height: 20px; animation-duration: 21s; animation-delay: -8s; }
        .bubble:nth-child(9) { left: 4%; width: 28px; height: 28px; animation-duration: 28s; animation-delay: -16s; }
        .bubble:nth-child(10) { left: 92%; width: 12px; height: 12px; animation-duration: 15s; animation-delay: -5s; }

        @keyframes bg-drift {
            0% {
                background-position: 0% 0%, 100% 0%, 50% 100%, 0% 0%;
            }
            100% {
                background-position: 20% 10%, 80% 20%, 40% 70%, 0% 100%;
            }
        }

        @keyframes blob1 {
            0% {
                transform: translate(0, 0) rotate(0deg);
                border-radius: 25% 75% 60% 40% / 55% 30% 70% 45%;
            }
            50% {
                transform: translate(180px, -140px) rotate(22deg);
                border-radius: 70% 30% 25% 75% / 35% 65% 40% 60%;
            }
            100% {
                transform: translate(0, 0) rotate(0deg);
                border-radius: 25% 75% 60% 40% / 55% 30% 70% 45%;
            }
        }

        @keyframes blob2 {
            0% {
                transform: translate(0, 0) rotate(0deg);
                border-radius: 75% 25% 45% 55% / 30% 60% 40% 70%;
            }
            50% {
                transform: translate(-200px, 160px) rotate(-26deg);
                border-radius: 35% 65% 75% 25% / 60% 40% 65% 35%;
            }
            100% {
                transform: translate(0, 0) rotate(0deg);
                border-radius: 75% 25% 45% 55% / 30% 60% 40% 70%;
            }
        }

        @keyframes blob3 {
            0% {
                transform: translate(0, 0) rotate(0deg);
                border-radius: 35% 65% 55% 45% / 65% 40% 60% 35%;
            }
            50% {
                transform: translate(160px, -180px) rotate(28deg);
                border-radius: 75% 25% 30% 70% / 40% 60% 35% 65%;
            }
            100% {
                transform: translate(0, 0) rotate(0deg);
                border-radius: 35% 65% 55% 45% / 65% 40% 60% 35%;
            }
        }

        @keyframes blob4 {
            0% {
                transform: translate(0, 0) rotate(0deg);
                border-radius: 60% 40% 35% 65% / 45% 65% 35% 55%;
            }
            50% {
                transform: translate(-180px, -150px) rotate(-24deg);
                border-radius: 30% 70% 75% 25% / 60% 40% 65% 35%;
            }
            100% {
                transform: translate(0, 0) rotate(0deg);
                border-radius: 60% 40% 35% 65% / 45% 65% 35% 55%;
            }
        }

        @keyframes blobCenter {
            0% {
                transform: scale(1) rotate(0deg);
                border-radius: 20% 80% 65% 35% / 60% 25% 75% 40%;
            }
            33% {
                transform: scale(1.08) rotate(18deg);
                border-radius: 70% 30% 20% 80% / 30% 70% 35% 65%;
            }
            66% {
                transform: scale(0.92) rotate(-22deg);
                border-radius: 35% 65% 80% 20% / 75% 40% 60% 25%;
            }
            100% {
                transform: scale(1) rotate(0deg);
                border-radius: 20% 80% 65% 35% / 60% 25% 75% 40%;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            body[data-theme="deep-blue"] .animated-bg {
                animation: none;
            }
            body[data-theme="dark"] .blob {
                animation: none;
                opacity: 0.5;
            }
            body[data-theme="deep-blue"] .bubble {
                animation: none;
                opacity: 0.25;
            }
        }

/* Password visibility toggle */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.08);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.password-toggle .password-toggle-slash {
    opacity: 0;
}

.password-toggle.is-visible .password-toggle-slash {
    opacity: 1;
}

/* =============================================
   CUSTOM DROPDOWN - Universal Select Replacement
   ============================================= */

.custom-dropdown-hidden-select {
    display: none !important;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown .coordinator-tool-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: 8px;
}

.custom-dropdown .coordinator-tool-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #888;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-dropdown.is-open .coordinator-tool-btn::after {
    transform: rotate(180deg);
}

.custom-dropdown.is-empty .coordinator-tool-btn {
    color: #b0b0b0;
}

.custom-dropdown .coordinator-toolbar-dropdown {
    width: 100%;
    min-width: 0;
    max-height: 240px;
    overflow-y: auto;
}

.custom-dropdown .coordinator-toolbar-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown .coordinator-toolbar-dropdown::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.custom-dropdown .coordinator-toolbar-dropdown::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

.custom-dropdown.is-disabled .coordinator-tool-btn {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.custom-dropdown--inline {
    width: auto;
    min-width: 160px;
    display: inline-block;
}

.coordinator-toolbar-dropdown-item.is-placeholder {
    color: #888;
    font-style: italic;
}

/* Theme overrides for custom dropdowns */
body[data-theme^="luxury"] .custom-dropdown .coordinator-tool-btn,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-tool-btn {
    background: var(--widget-bg, transparent);
    color: var(--text-primary);
    border-color: var(--border-soft);
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-tool-btn:hover,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-tool-btn:hover {
    background: rgba(var(--accent-primary-rgb), 0.12);
    border-color: var(--accent-primary);
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-tool-btn::after,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-tool-btn::after {
    border-top-color: var(--text-primary);
    opacity: 0.5;
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-toolbar-dropdown,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-toolbar-dropdown {
    background: var(--widget-bg, #3a3a3a);
    border-color: var(--border-soft);
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-toolbar-dropdown-item,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-toolbar-dropdown-item {
    color: var(--text-primary);
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-toolbar-dropdown-item:hover,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-toolbar-dropdown-item:hover {
    background: rgba(var(--accent-primary-rgb), 0.12);
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-toolbar-dropdown-item.active,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-toolbar-dropdown-item.active {
    background: var(--accent-primary);
    color: white;
}

body[data-theme^="luxury"] .custom-dropdown.is-empty .coordinator-tool-btn,
body[data-theme="deep-blue"] .custom-dropdown.is-empty .coordinator-tool-btn {
    color: rgba(var(--text-primary-rgb), 0.5);
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-toolbar-dropdown-item.is-placeholder,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-toolbar-dropdown-item.is-placeholder {
    color: rgba(var(--text-primary-rgb), 0.5);
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-toolbar-dropdown::-webkit-scrollbar-track,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-toolbar-dropdown::-webkit-scrollbar-track {
    background: var(--widget-bg-alt, #2a2a2a);
}

body[data-theme^="luxury"] .custom-dropdown .coordinator-toolbar-dropdown::-webkit-scrollbar-thumb,
body[data-theme="deep-blue"] .custom-dropdown .coordinator-toolbar-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-soft);
}
