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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #f5f7fa;
            min-height: 100vh;
            zoom: 0.85;
        }

        /* Navigation */
        .nav-bar {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            padding: 15px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .nav-logo {
            color: white;
            font-size: 24px;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-logo img {
            height: 40px;
        }

        .nav-links {
            display: flex;
            gap: 20px;
        }

        .nav-link {
            color: rgba(255,255,255,0.8);
            text-decoration: none;
            padding: 8px 16px;
            border-radius: 6px;
            transition: all 0.2s;
        }

        .nav-link:hover, .nav-link.active {
            background: rgba(255,255,255,0.1);
            color: white;
        }

        .nav-user {
            display: flex;
            align-items: center;
            gap: 10px;
            color: white;
        }

        .nav-user-avatar {
            width: 36px;
            height: 36px;
            background: #3498db;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Social Media Button */
        .nav-btn.social-media-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: linear-gradient(135deg, #e1306c 0%, #fd1d1d 50%, #f77737 100%);
            color: white;
            text-decoration: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(225, 48, 108, 0.3);
        }

        .nav-btn.social-media-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
        }

        .nav-btn.social-media-btn i {
            font-size: 16px;
        }

        /* Main Content */
        .main-content {
            padding: 20px;
        }

        /* Tabs */
        .dashboard-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .tab-btn {
            padding: 12px 24px;
            border: none;
            background: white;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #7f8c8d;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .tab-btn:hover {
            background: #ecf0f1;
        }

        .tab-btn.active {
            background: #3498db;
            color: white;
        }

        .tab-content {
            display: none;
        }

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

        /* Airbnb Management */
        .properties-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .btn-add-property {
            padding: 12px 24px;
            background: #27ae60;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
        }

        .btn-add-property:hover {
            background: #2ecc71;
        }

        .properties-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
        }

        .property-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .property-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 15px;
        }

        .property-code {
            background: #ff5a5f;
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-weight: bold;
        }

        .property-status {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
        }

        .property-status.active {
            background: #e5ffe5;
            color: #27ae60;
        }

        .property-status.inactive {
            background: #ffe5e5;
            color: #e74c3c;
        }

        .property-name {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .property-location {
            color: #7f8c8d;
            font-size: 14px;
            margin-bottom: 15px;
        }

        .property-features {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 15px;
        }

        .feature-badge {
            padding: 4px 10px;
            background: #f5f7fa;
            border-radius: 15px;
            font-size: 12px;
            color: #5d6d7e;
        }

        .feature-badge.yes {
            background: #e5ffe5;
            color: #27ae60;
        }

        .feature-badge.no {
            background: #ffe5e5;
            color: #e74c3c;
        }

        .property-actions {
            display: flex;
            gap: 10px;
        }

        .property-actions button {
            flex: 1;
            padding: 8px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
        }

        .btn-edit {
            background: #3498db;
            color: white;
        }

        .btn-delete {
            background: #e74c3c;
            color: white;
        }

        /* Airbnb Sub-tabs */
        .airbnb-subtabs {
            display: flex;
            gap: 5px;
            margin-bottom: 20px;
            border-bottom: 2px solid #eee;
            padding-bottom: 10px;
        }

        .subtab-btn {
            padding: 10px 20px;
            border: none;
            background: #f5f5f5;
            border-radius: 8px 8px 0 0;
            cursor: pointer;
            font-size: 14px;
            color: #666;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .subtab-btn:hover {
            background: #e8e8e8;
        }

        .subtab-btn.active {
            background: #ff5a5f;
            color: white;
        }

        .airbnb-subtab-content {
            display: none;
        }

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

        /* Bookings Section */
        .bookings-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .bookings-actions {
            display: flex;
            gap: 10px;
        }

        .btn-add-booking {
            padding: 10px 20px;
            background: #27ae60;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
        }

        .btn-refresh-bookings {
            padding: 10px 15px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .bookings-filters {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .bookings-filters select,
        .bookings-filters input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 13px;
        }

        .bookings-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat-box {
            background: white;
            border-radius: 10px;
            padding: 15px;
            text-align: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .stat-box i {
            font-size: 24px;
            margin-bottom: 8px;
        }

        .stat-box.upcoming i { color: #3498db; }
        .stat-box.today i { color: #27ae60; }
        .stat-box.checkout i { color: #e67e22; }
        .stat-box.revenue i { color: #9b59b6; }

        .stat-box .stat-number {
            display: block;
            font-size: 28px;
            font-weight: bold;
            color: #2c3e50;
        }

        .stat-box .stat-label {
            font-size: 12px;
            color: #7f8c8d;
        }

        .bookings-table {
            width: 100%;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            font-size: 13px;
        }

        .bookings-table th,
        .bookings-table td {
            padding: 10px 8px;
            text-align: left;
            border-bottom: 1px solid #eee;
        }

        .bookings-table th {
            background: #f8f9fa;
            font-weight: 600;
            color: #5d6d7e;
            font-size: 11px;
            text-transform: uppercase;
        }

        .bookings-table tr:hover {
            background: #f8f9fa;
        }

        .booking-status {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 500;
        }

        .booking-status.confirmed { background: #d4edda; color: #155724; }
        .booking-status.pending { background: #fff3cd; color: #856404; }
        .booking-status.cancelled { background: #f8d7da; color: #721c24; }
        .booking-status.completed { background: #e2e3e5; color: #383d41; }

        .source-badge {
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: bold;
        }

        .source-badge.airbnb { background: #ff5a5f; color: white; }
        .source-badge.booking { background: #003580; color: white; }
        .source-badge.direct { background: #27ae60; color: white; }
        .source-badge.phone { background: #9b59b6; color: white; }

        .sms-status {
            font-size: 16px;
        }

        .sms-status.sent { color: #27ae60; }
        .sms-status.pending { color: #f39c12; }
        .sms-status.failed { color: #e74c3c; }

        .booking-actions {
            display: flex;
            gap: 5px;
        }

        .booking-actions button {
            padding: 5px 8px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }

        .btn-edit-booking { background: #3498db; color: white; }
        .btn-sms-booking { background: #27ae60; color: white; }
        .btn-delete-booking { background: #e74c3c; color: white; }

        /* Email Parser */
        .email-parser-header {
            margin-bottom: 20px;
        }

        .email-parser-header h2 {
            margin-bottom: 5px;
        }

        .email-parser-header .subtitle {
            color: #7f8c8d;
            font-size: 14px;
        }

        .email-parser-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .email-input-section textarea {
            width: 100%;
            padding: 15px;
            border: 2px dashed #ddd;
            border-radius: 10px;
            font-size: 13px;
            font-family: monospace;
            resize: vertical;
            min-height: 300px;
        }

        .email-input-section textarea:focus {
            border-color: #ff5a5f;
            outline: none;
        }

        .btn-parse-email {
            margin-top: 15px;
            padding: 12px 24px;
            background: #ff5a5f;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            width: 100%;
        }

        .email-preview-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
        }

        .email-preview-section h3 {
            color: #27ae60;
            margin-bottom: 15px;
        }

        .parsed-booking-details {
            background: white;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
        }

        .parsed-field {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #eee;
        }

        .parsed-field:last-child {
            border-bottom: none;
        }

        .parsed-field label {
            color: #7f8c8d;
            font-size: 12px;
        }

        .parsed-field span {
            font-weight: 500;
            color: #2c3e50;
        }

        .parsed-booking-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        /* Call History - Card Layout */
        .history-filters {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }

        .history-filters select,
        .history-filters input {
            padding: 8px 12px;
            border: 1px solid #333;
            border-radius: 8px;
            font-size: 13px;
            background: #1a1a2e;
            color: #fff;
        }

        .history-filters input[type="text"] {
            min-width: 220px;
            flex: 1;
        }

        .call-cards-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        /* Day separator header */
        .day-separator {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 18px 0 8px;
            margin-top: 10px;
        }

        .day-separator:first-child {
            margin-top: 0;
            padding-top: 0;
        }

        .day-separator-line {
            flex: 1;
            height: 1px;
            background: linear-gradient(90deg, #cbd5e1, transparent);
        }

        .day-separator-label {
            font-size: 13px;
            font-weight: 700;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            white-space: nowrap;
            padding: 6px 16px;
            background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
            border-radius: 20px;
            border: 1px solid #e2e8f0;
        }

        .day-separator-count {
            font-size: 11px;
            color: #94a3b8;
            font-weight: 500;
            white-space: nowrap;
        }

        .load-more-container {
            text-align: center;
            padding: 20px 0;
        }

        .btn-load-more {
            padding: 12px 32px;
            background: linear-gradient(135deg, #f8fafc, #e2e8f0);
            color: #475569;
            border: 2px solid #cbd5e1;
            border-radius: 12px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.2s;
            letter-spacing: 0.3px;
        }

        .btn-load-more:hover {
            background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
            border-color: #94a3b8;
            color: #1e293b;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .btn-load-more:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .load-more-info {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 8px;
        }

        /* =====================================================
           CALL CARDS - PRIORITY-BASED STYLING
           ===================================================== */
        .call-card {
            background: white;
            border-radius: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.06);
            overflow: hidden;
            transition: box-shadow 0.3s, transform 0.3s;
            border: 2px solid #e5e7eb;
            position: relative;
        }

        .call-card:hover {
            box-shadow: 0 6px 24px rgba(0,0,0,0.12);
            transform: translateY(-2px);
        }

        /* Priority border + left stripe */
        .call-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            width: 5px;
            border-radius: 14px 0 0 14px;
            background: #d1d5db;
        }

        /* Priority: Critical (red) - SELLER, EXISTING_OWNER, AIRBNB_OWNER */
        .call-card.priority-critical {
            border-color: #fca5a5;
            background: linear-gradient(135deg, #fff5f5 0%, #ffffff 40%);
            animation: pulse-critical 3s ease-in-out infinite;
        }
        .call-card.priority-critical::before { background: #dc2626; }
        .call-card.priority-critical:hover { box-shadow: 0 6px 28px rgba(220,38,38,0.2); }

        @keyframes pulse-critical {
            0%, 100% { box-shadow: 0 2px 12px rgba(220,38,38,0.08); }
            50% { box-shadow: 0 2px 20px rgba(220,38,38,0.18); }
        }

        /* Priority: High (orange) - HAS_CODE, SEARCHING, ON_SITE */
        .call-card.priority-high {
            border-color: #fdba74;
            background: linear-gradient(135deg, #fff8f1 0%, #ffffff 40%);
        }
        .call-card.priority-high::before { background: #ea580c; }
        .call-card.priority-high:hover { box-shadow: 0 6px 28px rgba(234,88,12,0.15); }

        /* Priority: Medium (yellow) - AIRBNB_GUEST */
        .call-card.priority-medium {
            border-color: #fde047;
            background: linear-gradient(135deg, #fefce8 0%, #ffffff 40%);
        }
        .call-card.priority-medium::before { background: #ca8a04; }
        .call-card.priority-medium:hover { box-shadow: 0 6px 28px rgba(202,138,4,0.15); }

        /* Priority: Low (blue) - INFO */
        .call-card.priority-low {
            border-color: #93c5fd;
            background: linear-gradient(135deg, #eff6ff 0%, #ffffff 40%);
        }
        .call-card.priority-low::before { background: #2563eb; }
        .call-card.priority-low:hover { box-shadow: 0 6px 28px rgba(37,99,235,0.15); }

        /* Priority: Neutral (gray) - DETECT */
        .call-card.priority-neutral {
            border-color: #e5e7eb;
            background: white;
        }
        .call-card.priority-neutral::before { background: #9ca3af; }

        /* Card header */
        .call-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px 12px 22px;
            border-bottom: 1px solid rgba(0,0,0,0.06);
            gap: 10px;
            flex-wrap: wrap;
        }

        .call-card-header .call-date {
            font-size: 13px;
            color: #6b7280;
            font-weight: 500;
        }

        .call-card-header .call-badges {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
        }

        .badge-duration {
            font-size: 12px;
            color: #555;
            background: #f3f4f6;
            padding: 3px 10px;
            border-radius: 10px;
            font-weight: 500;
        }

        .badge-bot {
            font-size: 11px;
            padding: 3px 10px;
            border-radius: 10px;
            font-weight: 600;
            background: #e8f5e9;
            color: #2e7d32;
        }

        .badge-agent {
            font-size: 11px;
            padding: 3px 10px;
            border-radius: 10px;
            font-weight: 600;
            background: #e3f2fd;
            color: #1565c0;
        }

        .status-badge {
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .status-badge.completed { background: #dcfce7; color: #15803d; }
        .status-badge.failed { background: #fee2e2; color: #dc2626; }
        .status-badge.no_answer { background: #fef3c7; color: #b45309; }

        /* Card body */
        .call-card-body {
            padding: 12px 16px 12px 22px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .call-card-body .info-item {
            display: flex;
            align-items: baseline;
            gap: 8px;
        }

        .call-card-body .info-label {
            font-size: 10px;
            color: #9ca3af;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            min-width: 110px;
            flex-shrink: 0;
        }

        .call-card-body .info-value {
            font-size: 14px;
            color: #1f2937;
            font-weight: 600;
        }

        .call-card-body .info-value.unknown {
            color: #d1d5db;
            font-style: italic;
            font-weight: 400;
        }

        .call-card-body .callback-detail {
            font-size: 14px;
            color: #1f2937;
            font-weight: 600;
            margin-left: 4px;
        }

        /* Section path visualization */
        .section-path {
            padding: 10px 16px 10px 22px;
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            border-top: 1px solid rgba(0,0,0,0.04);
        }

        .section-dot {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 6px;
        }

        .section-dot.active {
            outline: 2px solid;
            outline-offset: 1px;
        }

        .section-arrow {
            color: #ccc;
            font-size: 12px;
        }

        /* Section tag colors */
        .section-tag { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
        .section-tag.detect { background: #f3e8ff; color: #7c3aed; }
        .section-tag.has_code { background: #dbeafe; color: #1d4ed8; }
        .section-tag.searching { background: #fef3c7; color: #92400e; }
        .section-tag.on_site { background: #d1fae5; color: #065f46; }
        .section-tag.seller { background: #fce7f3; color: #9d174d; }
        .section-tag.airbnb_owner { background: #ffe4e6; color: #be123c; }
        .section-tag.airbnb_guest { background: #ffedd5; color: #c2410c; }
        .section-tag.existing_owner { background: #e0f2fe; color: #0369a1; }
        .section-tag.info { background: #f1f5f9; color: #475569; }

        /* Section tooltip on hover */
        .section-dot[data-section] {
            cursor: pointer;
        }
        .section-tooltip {
            position: fixed;
            background: #1f2937;
            color: #fff;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 400;
            line-height: 1.5;
            min-width: 250px;
            max-width: 420px;
            width: max-content;
            z-index: 99999;
            pointer-events: none;
            box-shadow: 0 4px 16px rgba(0,0,0,0.3);
            animation: tooltipFadeIn 0.15s ease;
        }
        .section-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 24px;
            border: 6px solid transparent;
            border-top-color: #1f2937;
        }
        .section-tooltip .tooltip-label {
            font-size: 11px !important;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: #ffffff !important;
            font-weight: 700 !important;
            margin-bottom: 5px;
        }
        .section-tooltip .tooltip-quote {
            font-style: italic;
            color: #ffffff !important;
            font-weight: 700 !important;
            font-size: 14px !important;
        }
        .section-tooltip .tooltip-loading {
            color: #ffffff !important;
            font-style: italic;
            font-weight: 600 !important;
        }
        @keyframes tooltipFadeIn {
            from { opacity: 0; transform: translateY(4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Card footer with priority badge */
        .call-card-footer {
            padding: 10px 16px 10px 22px;
            border-top: 1px solid rgba(0,0,0,0.04);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .call-card-footer .footer-left {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 0;
        }

        .card-priority-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .card-priority-badge.critical {
            background: #fee2e2;
            color: #dc2626;
            border: 1px solid #fca5a5;
        }

        .card-priority-badge.high {
            background: #fff7ed;
            color: #ea580c;
            border: 1px solid #fdba74;
        }

        .card-priority-badge.medium {
            background: #fefce8;
            color: #ca8a04;
            border: 1px solid #fde047;
        }

        .card-priority-badge.low {
            background: #eff6ff;
            color: #2563eb;
            border: 1px solid #93c5fd;
        }

        .card-priority-badge.neutral {
            background: #f9fafb;
            color: #6b7280;
            border: 1px solid #e5e7eb;
        }

        .call-card-footer .call-reason {
            font-size: 13px;
            color: #6b7280;
            flex: 1;
            line-height: 1.4;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .call-card-footer .card-actions {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }

        .btn-open-detail {
            padding: 8px 16px;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.2s;
            box-shadow: 0 2px 6px rgba(37,99,235,0.25);
        }

        .btn-open-detail:hover {
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            box-shadow: 0 4px 12px rgba(37,99,235,0.35);
            transform: translateY(-1px);
        }

        .btn-delete-call {
            padding: 8px 12px;
            background: #fef2f2;
            color: #dc2626;
            border: 1px solid #fecaca;
            border-radius: 8px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.2s;
        }

        .btn-delete-call:hover {
            background: #fee2e2;
            border-color: #fca5a5;
        }

        /* =====================================================
           CALL DETAIL OVERLAY
           ===================================================== */
        .call-detail-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.6);
            z-index: 10000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .call-detail-overlay.show {
            display: flex;
        }

        .call-detail-panel {
            background: white;
            border-radius: 16px;
            width: 100%;
            max-width: 900px;
            max-height: 90vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }

        .detail-header {
            padding: 20px 24px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-bottom: 1px solid #dee2e6;
        }

        .detail-header-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            margin-bottom: 14px;
        }

        .detail-header-identity {
            flex: 1;
        }

        .detail-header-name {
            font-size: 20px;
            font-weight: 700;
            color: #1a1a2e;
            margin-bottom: 4px;
            line-height: 1.3;
        }

        .detail-header-phone {
            font-size: 15px;
            color: #495057;
            font-weight: 500;
            font-family: 'JetBrains Mono', monospace;
        }

        .detail-header-meta {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }

        .detail-meta-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            background: white;
            color: #495057;
            border: 1px solid #dee2e6;
        }

        .detail-meta-chip i {
            font-size: 11px;
        }

        .detail-meta-chip.callback {
            background: #fff3cd;
            color: #856404;
            border-color: #ffc107;
        }

        .detail-meta-chip.bot {
            background: #e8f5e9;
            color: #2e7d32;
            border-color: #a5d6a7;
        }

        .detail-meta-chip.agent {
            background: #e3f2fd;
            color: #1565c0;
            border-color: #90caf9;
        }

        .detail-header-reason {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            padding: 0;
            margin-bottom: 10px;
            overflow: hidden;
        }

        .detail-header-reason .reason-label {
            font-size: 10px;
            color: #6b7280;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            padding: 8px 14px 4px;
            background: #f9fafb;
            border-bottom: 1px solid #f3f4f6;
        }

        .detail-header-reason .reason-text {
            padding: 0;
        }

        /* Reason items list - priority sorted */
        .reason-items-list {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .reason-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            border-bottom: 1px solid #f3f4f6;
            transition: background 0.15s;
        }

        .reason-item:last-child {
            border-bottom: none;
        }

        .reason-item:hover {
            background: rgba(0,0,0,0.015);
        }

        .reason-item-icon {
            font-size: 14px;
            flex-shrink: 0;
            width: 20px;
            text-align: center;
        }

        .reason-item-label {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 2px 8px;
            border-radius: 4px;
            white-space: nowrap;
            flex-shrink: 0;
            min-width: 90px;
            text-align: center;
        }

        .reason-item-desc {
            font-size: 13px;
            color: #374151;
            flex: 1;
        }

        /* Priority colors for reason items */
        .reason-item.critical { background: #fef2f2; }
        .reason-item.critical .reason-item-label {
            background: #dc2626;
            color: white;
        }
        .reason-item.critical .reason-item-desc { color: #991b1b; font-weight: 600; }

        .reason-item.high { background: #fff7ed; }
        .reason-item.high .reason-item-label {
            background: #ea580c;
            color: white;
        }
        .reason-item.high .reason-item-desc { color: #9a3412; font-weight: 500; }

        .reason-item.medium { background: #fffbeb; }
        .reason-item.medium .reason-item-label {
            background: #ca8a04;
            color: white;
        }
        .reason-item.medium .reason-item-desc { color: #854d0e; }

        .reason-item.low { background: #eff6ff; }
        .reason-item.low .reason-item-label {
            background: #2563eb;
            color: white;
        }
        .reason-item.low .reason-item-desc { color: #1e40af; }

        .reason-item.neutral { background: #f9fafb; }
        .reason-item.neutral .reason-item-label {
            background: #9ca3af;
            color: white;
        }
        .reason-item.neutral .reason-item-desc { color: #6b7280; }

        .reason-item.callback-item { background: #f0fdf4; }
        .reason-item.callback-item .reason-item-label {
            background: #16a34a;
            color: white;
        }
        .reason-item.callback-item .reason-item-desc { color: #166534; font-weight: 500; }

        .reason-item.note-item { background: #faf5ff; }
        .reason-item.note-item .reason-item-label {
            background: #7c3aed;
            color: white;
        }
        .reason-item.note-item .reason-item-desc { color: #5b21b6; }

        .detail-header-section-path {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .detail-close-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            background: #eee;
            color: #666;
            cursor: pointer;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: background 0.2s;
        }

        .detail-close-btn:hover {
            background: #ddd;
        }

        .detail-tabs {
            display: flex;
            border-bottom: 2px solid #eee;
        }

        .detail-tab-btn {
            flex: 1;
            padding: 12px 20px;
            border: none;
            background: transparent;
            font-size: 14px;
            font-weight: 500;
            color: #999;
            cursor: pointer;
            transition: all 0.2s;
            border-bottom: 3px solid transparent;
            margin-bottom: -2px;
        }

        .detail-tab-btn:hover {
            color: #333;
        }

        .detail-tab-btn.active {
            color: #3498db;
            border-bottom-color: #3498db;
        }

        .detail-content {
            flex: 1;
            overflow-y: auto;
            padding: 0;
        }

        .detail-tab-content {
            display: none;
            padding: 20px 24px;
        }

        .detail-tab-content.active {
            display: block;
        }

        .detail-loading {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .detail-loading i {
            font-size: 30px;
            margin-bottom: 12px;
            display: block;
        }

        /* Chat bubbles for detail panel */
        .detail-chat-message {
            margin-bottom: 16px;
            display: flex;
            gap: 12px;
            align-items: flex-start;
        }

        .detail-chat-message.bot-msg {
            flex-direction: row-reverse;
        }

        .detail-chat-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 14px;
        }

        .detail-chat-avatar.user-avatar {
            background: #e3f2fd;
            color: #1976d2;
        }

        .detail-chat-avatar.bot-avatar {
            background: #e8f5e9;
            color: #388e3c;
        }

        .detail-chat-body {
            flex: 1;
        }

        .detail-chat-body .detail-chat-label {
            font-size: 12px;
            color: #888;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .detail-chat-bubble {
            font-size: 15px;
            color: #2c3e50;
            line-height: 1.5;
            padding: 12px 16px;
            border-radius: 12px;
            display: inline-block;
            max-width: 90%;
        }

        .detail-chat-bubble.user-bubble {
            background: #e3f2fd;
            border-top-left-radius: 4px;
        }

        .detail-chat-bubble.bot-bubble {
            background: #e8f5e9;
            border-top-right-radius: 4px;
        }

        .bot-msg .detail-chat-body {
            text-align: right;
        }

        /* Timeline for detail panel */
        .detail-timeline-entry {
            padding: 18px 0;
            border-bottom: 1px solid #f0f0f0;
        }

        .detail-timeline-entry:last-child {
            border-bottom: none;
        }

        .detail-timeline-step-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        /* Session memory panel */
        .detail-session-json {
            background: #0d1117 !important;
            color: #e6edf3 !important;
            padding: 20px;
            border-radius: 12px;
            font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
            font-size: 13px;
            line-height: 1.7;
            white-space: pre-wrap;
            word-break: break-all;
            max-height: 500px;
            overflow-y: auto;
            border: 1px solid #30363d;
        }

        .detail-session-json .json-key { color: #79c0ff !important; }
        .detail-session-json .json-string { color: #a5d6ff !important; }
        .detail-session-json .json-number { color: #56d364 !important; }
        .detail-session-json .json-bool { color: #ff7b72 !important; }
        .detail-session-json .json-null { color: #8b949e !important; }
        .detail-session-json .json-bracket { color: #d2a8ff !important; }

        /* Recordings card layout */
        .recording-card {
            display: flex;
            align-items: center;
            gap: 16px;
            background: white;
            border-radius: 12px;
            padding: 14px 18px;
            border: 1px solid #eee;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            margin-bottom: 10px;
            flex-wrap: wrap;
        }

        .recording-card.missing {
            opacity: 0.6;
            background: #fff8f8;
        }

        .recording-card-info {
            flex: 1;
            min-width: 200px;
        }

        .recording-card-top {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 6px;
            flex-wrap: wrap;
        }

        .recording-card-name {
            font-weight: 600;
            font-size: 14px;
            color: #2c3e50;
        }

        .recording-card-meta {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
            font-size: 12px;
            color: #888;
        }

        .recording-card-meta span {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .recording-card-audio {
            flex-shrink: 0;
        }

        .recording-card-audio audio {
            height: 36px;
            border-radius: 18px;
        }

        .recording-card-actions {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
        }

        /* Modal */
        .modal,
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 9999;
            align-items: center;
            justify-content: center;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 12px;
            width: 90%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            padding: 20px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h3 {
            margin: 0;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #95a5a6;
        }

        .modal-body {
            padding: 20px;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
            color: #5d6d7e;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 14px;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        .form-checkbox {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .form-checkbox input {
            width: auto;
        }

        .modal-footer {
            padding: 20px;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .btn-cancel {
            padding: 10px 20px;
            background: #95a5a6;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .btn-save {
            padding: 10px 20px;
            background: #27ae60;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .btn-delete {
            padding: 10px 20px;
            background: #dc3545;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .btn-delete:hover {
            background: #c82333;
        }

        /* Settings Styles */
        .settings-section {
            background: white;
            border-radius: 12px;
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .settings-section h3 {
            margin: 0 0 20px 0;
            color: #2c3e50;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .settings-section h3 i {
            color: #3498db;
        }

        .pillar-card {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 15px;
            border-left: 4px solid #3498db;
        }

        .pillar-card.airbnb {
            border-left-color: #ff5a5f;
        }

        .pillar-card.realestate {
            border-left-color: #27ae60;
        }

        .pillar-card h4 {
            margin: 0 0 10px 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .pillar-card p {
            color: #5d6d7e;
            margin: 5px 0;
            font-size: 14px;
        }

        .prompt-box {
            background: #2c3e50;
            color: #ecf0f1;
            padding: 15px;
            border-radius: 8px;
            font-family: 'Monaco', 'Menlo', monospace;
            font-size: 13px;
            white-space: pre-wrap;
            max-height: 300px;
            overflow-y: auto;
            margin-top: 15px;
        }

        .feature-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 10px;
            margin-top: 15px;
        }

        .feature-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: white;
            border-radius: 6px;
            font-size: 14px;
        }

        .feature-item i {
            color: #27ae60;
        }

        /* Audio Templates */
        .audio-templates-grid {
            display: grid;
            gap: 10px;
        }

        .audio-template-item {
            display: grid;
            grid-template-columns: 180px 1fr auto auto;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: rgba(30, 30, 40, 0.6);
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 6px;
        }

        .audio-template-item:hover {
            background: rgba(40, 40, 55, 0.8);
        }

        .template-id {
            font-family: monospace;
            background: #27ae60;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .template-id.missing {
            background: #e74c3c;
        }

        .template-id.exists {
            background: #27ae60;
        }

        .template-text {
            font-size: 13px;
            color: #ecf0f1;
            line-height: 1.3;
        }

        .template-expected {
            font-size: 11px;
            color: #7f8c8d;
            font-style: italic;
        }

        .template-audio {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .template-audio audio {
            height: 30px;
            width: 160px;
        }

        .template-status {
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 600;
            white-space: nowrap;
        }

        .template-status.exists {
            background: rgba(39, 174, 96, 0.2);
            color: #2ecc71;
            border: 1px solid rgba(39, 174, 96, 0.4);
        }

        .template-status.missing {
            background: rgba(231, 76, 60, 0.2);
            color: #e74c3c;
            border: 1px solid rgba(231, 76, 60, 0.4);
        }

        .audio-category {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .audio-category:first-child {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
        }

        .audio-category h4 {
            margin: 0 0 10px 0;
            color: #3498db;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .audio-templates-grid {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        /* Settings Layout - Side Menu */
        .settings-layout {
            display: flex;
            gap: 0;
            height: calc(100vh - 180px);
            min-height: 500px;
        }

        .settings-sidebar {
            width: 260px;
            min-width: 260px;
            background: #f8f9fa;
            border-right: 1px solid #e0e0e0;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .settings-sidebar-header {
            padding: 20px;
            border-bottom: 1px solid #e0e0e0;
            background: white;
        }

        .settings-sidebar-header h3 {
            margin: 0;
            font-size: 18px;
            color: #2c3e50;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .settings-tabs {
            display: flex;
            flex-direction: column;
            gap: 2px;
            padding: 10px;
        }

        .settings-tab {
            padding: 12px 16px;
            border: none;
            background: transparent;
            cursor: pointer;
            font-size: 14px;
            color: #5d6d7e;
            border-radius: 8px;
            transition: all 0.2s;
            text-align: left;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .settings-tab i {
            width: 20px;
            text-align: center;
            font-size: 16px;
        }

        .settings-tab:hover {
            background: #e8f4fc;
            color: #3498db;
        }

        .settings-tab.active {
            background: #3498db;
            color: white;
        }

        .settings-tab.active i {
            color: white;
        }

        .settings-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px 30px;
            background: white;
        }

        .settings-panel {
            display: none;
        }

        .settings-panel.active {
            display: block;
        }

        /* Testnet Chat Styles */
        .testnet-container {
            display: grid;
            grid-template-columns: 1fr 350px;
            gap: 20px;
            height: calc(100vh - 300px);
            min-height: 500px;
        }

        .chat-panel {
            background: white;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .chat-header {
            padding: 15px 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .chat-header h4 {
            margin: 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chat-status {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            background: rgba(255,255,255,0.2);
            padding: 4px 10px;
            border-radius: 12px;
        }

        .chat-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #2ecc71;
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            background: #f8f9fa;
        }

        .chat-message {
            margin-bottom: 15px;
            display: flex;
            flex-direction: column;
        }

        .chat-message.user {
            align-items: flex-end;
        }

        .chat-message.ai {
            align-items: flex-start;
        }

        .message-bubble {
            max-width: 80%;
            padding: 12px 16px;
            border-radius: 18px;
            font-size: 14px;
            line-height: 1.4;
        }

        .chat-message.user .message-bubble {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-bottom-right-radius: 4px;
        }

        .chat-message.ai .message-bubble {
            background: white;
            color: #2c3e50;
            border-bottom-left-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .message-meta {
            font-size: 11px;
            color: #95a5a6;
            margin-top: 4px;
            padding: 0 5px;
        }

        .message-template-badge {
            display: inline-block;
            background: #3498db;
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 5px;
        }

        .template-play-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            background: #27ae60;
            color: white;
            border: none;
            border-radius: 50%;
            margin-left: 8px;
            cursor: pointer;
            font-size: 10px;
            transition: all 0.2s;
        }

        .template-play-btn:hover {
            background: #219a52;
            transform: scale(1.1);
        }

        .autoplay-toggle {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: #7f8c8d;
            margin-bottom: 5px;
        }

        .autoplay-toggle input[type="checkbox"] {
            width: 16px;
            height: 16px;
            cursor: pointer;
        }

        .chat-input-area {
            padding: 15px 20px;
            background: white;
            border-top: 1px solid #eee;
        }

        .chat-input-wrapper {
            display: flex;
            gap: 10px;
        }

        .chat-input {
            flex: 1;
            padding: 12px 16px;
            border: 2px solid #eee;
            border-radius: 25px;
            font-size: 14px;
            outline: none;
            transition: border-color 0.2s;
        }

        .chat-input:focus {
            border-color: #667eea;
        }

        .chat-send-btn {
            width: 45px;
            height: 45px;
            border: none;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s;
        }

        .chat-send-btn:hover {
            transform: scale(1.05);
        }

        .chat-send-btn:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
        }

        /* Debug Panel */
        .debug-panel {
            background: white;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .debug-header {
            padding: 15px 20px;
            background: #2c3e50;
            color: white;
        }

        .debug-header h4 {
            margin: 0;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .debug-content {
            flex: 1;
            overflow-y: auto;
            padding: 15px;
        }

        .debug-section {
            margin-bottom: 20px;
        }

        .debug-section-title {
            font-size: 11px;
            text-transform: uppercase;
            color: #7f8c8d;
            letter-spacing: 1px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .debug-value {
            background: #f8f9fa;
            padding: 10px;
            border-radius: 6px;
            font-family: monospace;
            font-size: 12px;
            word-break: break-all;
        }

        .debug-value.pillar-airbnb {
            border-left: 3px solid #ff5a5f;
        }

        .debug-value.pillar-realestate {
            border-left: 3px solid #27ae60;
        }

        .debug-value.pillar-details {
            border-left: 3px solid #e65100;
        }

        .debug-value.pillar-unknown {
            border-left: 3px solid #95a5a6;
        }

        .debug-badge {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 500;
        }

        .debug-badge.airbnb { background: #ffe5e6; color: #ff5a5f; }
        .debug-badge.realestate { background: #e5f7ed; color: #27ae60; }
        .debug-badge.details { background: #fff3e0; color: #e65100; }
        .debug-badge.unknown { background: #eee; color: #7f8c8d; }

        .extracted-data-item {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            border-bottom: 1px solid #eee;
            font-size: 12px;
        }

        .extracted-data-item:last-child {
            border-bottom: none;
        }

        .extracted-data-key {
            color: #7f8c8d;
        }

        .extracted-data-value {
            font-weight: 500;
            color: #2c3e50;
        }

        .template-match {
            background: #e8f5e9;
            border: 1px solid #c8e6c9;
            border-radius: 6px;
            padding: 10px;
            margin-top: 5px;
        }

        .template-match-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 5px;
        }

        .template-match-id {
            font-family: monospace;
            background: #27ae60;
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 11px;
        }

        .template-match-score {
            font-size: 11px;
            color: #27ae60;
        }

        .template-match-text {
            font-size: 12px;
            color: #5d6d7e;
        }

        .chat-quick-actions {
            padding: 10px 20px;
            background: #f8f9fa;
            border-top: 1px solid #eee;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .quick-action-btn {
            padding: 6px 12px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 15px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .quick-action-btn:hover {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .conversation-log {
            max-height: 150px;
            overflow-y: auto;
            background: #1a252f;
            border-radius: 6px;
            padding: 10px;
            font-family: monospace;
            font-size: 11px;
        }

        .log-entry {
            margin-bottom: 5px;
            padding: 3px 0;
        }

        .log-entry.user { color: #3498db; }
        .log-entry.ai { color: #2ecc71; }
        .log-entry.system { color: #f39c12; }

        /* Connection Status */
        .connection-status {
            position: fixed;
            bottom: 20px;
            right: 20px;
            padding: 10px 20px;
            border-radius: 20px;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .connection-status.connected {
            background: #27ae60;
            color: white;
        }

        .connection-status.disconnected {
            background: #e74c3c;
            color: white;
        }

        .connection-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: white;
        }

        /* ============================================
           LOGIN PAGE STYLES
           ============================================ */
        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        }

        .login-box {
            background: white;
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            width: 100%;
            max-width: 400px;
        }

        .login-logo {
            text-align: center;
            margin-bottom: 30px;
        }

        .login-logo i {
            font-size: 50px;
            color: #3498db;
            margin-bottom: 5px;
        }

        .login-logo h1 {
            color: #2c3e50;
            margin: 10px 0 5px;
        }

        .login-logo p {
            color: #7f8c8d;
            font-size: 14px;
        }

        .login-field {
            margin-bottom: 20px;
        }

        .login-field label {
            display: block;
            color: #5d6d7e;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .login-field input {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #ecf0f1;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.2s;
        }

        .login-field input:focus {
            outline: none;
            border-color: #3498db;
        }

        .login-error {
            background: #ffe5e5;
            color: #e74c3c;
            padding: 10px 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .login-btn {
            width: 100%;
            padding: 15px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }

        .login-btn:hover {
            background: #2980b9;
        }

        .login-btn:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
        }

        /* ============================================
           NAVBAR ADDITIONS
           ============================================ */
        .logout-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            margin-left: 15px;
            transition: background 0.2s;
        }

        .logout-btn:hover {
            background: rgba(231, 76, 60, 0.8);
        }

        .user-role-badge {
            font-size: 11px;
            padding: 3px 8px;
            border-radius: 4px;
            margin-left: 8px;
            font-weight: 600;
        }

        .user-role-badge.super-admin {
            background: #9b59b6;
            color: white;
        }

        .user-role-badge.admin {
            background: #27ae60;
            color: white;
        }

        .nav-bar .connection-status {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
        }

        .nav-bar .connection-status .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #27ae60;
        }

        .nav-bar .connection-status.disconnected .status-dot {
            background: #e74c3c;
        }

        /* ============================================
           TEAM CHAT STYLES
           ============================================ */
        /* Full height Team Chat when tab is active */
        #team-chat.active {
            position: fixed;
            top: 130px;
            left: 0;
            right: 0;
            bottom: 0;
            margin: 0;
            padding: 0;
            width: 100%;
            height: auto;
            z-index: 50;
            overflow: hidden;
        }

        .team-chat-container {
            background: white;
            border-radius: 0;
            padding: 20px;
            height: 100%;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .team-chat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 5px;
            padding: 15px 20px;
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            border: 1px solid rgba(52, 152, 219, 0.3);
            border-radius: 10px;
        }

        .team-chat-header h2 {
            color: #1a1a25;
            margin: 0;
        }

        .team-chat-header h2 i {
            color: #ffffff;
        }

        .online-users {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #ecf0f1;
        }

        .online-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #27ae60;
        }

        .btn-pinned-messages {
            background: #f39c12;
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 14px;
            position: relative;
            transition: all 0.2s;
        }

        .btn-pinned-messages:hover {
            background: #e67e22;
        }

        #pinned-count-badge {
            background: #e74c3c;
            color: white;
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 10px;
            min-width: 18px;
            text-align: center;
        }

        .pinned-item {
            background: #fff9e6;
            border: 1px solid #f1c40f;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 5px;
        }

        .pinned-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .pinned-item-user {
            font-weight: 600;
            color: #2c3e50;
        }

        .pinned-item-meta {
            font-size: 11px;
            color: #7f8c8d;
        }

        .pinned-item-text {
            color: #34495e;
            line-height: 1.4;
        }

        .pinned-item-media {
            margin: 10px 0;
        }

        .pinned-media-image {
            max-width: 350px;
            max-height: 300px;
            border-radius: 8px;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .pinned-media-image:hover {
            transform: scale(1.02);
        }

        .pinned-media-audio {
            width: 400px;
            height: 40px;
        }

        .pinned-item-actions {
            margin-top: 8px;
            text-align: right;
        }

        .btn-unpin {
            background: #e74c3c;
            color: white;
            border: none;
            padding: 4px 10px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }

        .btn-unpin:hover {
            background: #c0392b;
        }

        .pinned-messages {
            background: #fff9e6;
            border: 1px solid #f1c40f;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
        }

        .pinned-messages h4 {
            color: #f39c12;
            margin-bottom: 5px;
        }

        .pinned-message {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px;
            background: white;
            border-radius: 6px;
            margin-bottom: 8px;
        }

        .pinned-text {
            flex: 1;
            color: #5d6d7e;
        }

        .unpin-btn {
            background: none;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            padding: 5px;
        }

        .team-chat-container .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
            margin-bottom: 5px;
            min-height: 0;
        }

        /* Custom scrollbar for Team Chat */
        .team-chat-container .chat-messages::-webkit-scrollbar {
            width: 10px;
        }

        .team-chat-container .chat-messages::-webkit-scrollbar-track {
            background: #e0e0e0;
            border-radius: 5px;
        }

        .team-chat-container .chat-messages::-webkit-scrollbar-thumb {
            background: #b0b0b0;
            border-radius: 5px;
        }

        .team-chat-container .chat-messages::-webkit-scrollbar-thumb:hover {
            background: #909090;
        }

        /* ============================================
           MESSENGER-STYLE TEAM CHAT
           ============================================ */

        /* Date Separator */
        .team-chat-container .chat-date-separator {
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 20px 0;
        }

        .team-chat-container .chat-date-separator span {
            background: #e4e6eb;
            color: #65676b;
            font-size: 12px;
            font-weight: 500;
            padding: 6px 16px;
            border-radius: 16px;
        }

        /* Message Row - Messenger Style */
        .team-chat-container .chat-message {
            display: flex !important;
            flex-direction: row !important;
            align-items: flex-end;
            gap: 8px;
            margin-bottom: 1px;
            padding: 0 12px;
        }

        .team-chat-container .chat-message.own {
            flex-direction: row-reverse !important;
        }

        /* First message in group gets more margin on top */
        .team-chat-container .chat-message.group-start {
            margin-top: 16px;
        }

        /* Avatar */
        .team-chat-container .chat-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 11px;
            font-weight: 600;
            flex-shrink: 0;
            text-transform: uppercase;
        }

        .team-chat-container .chat-avatar.super-admin {
            background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
        }

        .team-chat-container .chat-avatar.admin {
            background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
        }

        /* Avatar shows ONLY on last message of group (group-end) */
        .team-chat-container .chat-message:not(.group-end) .chat-avatar {
            visibility: hidden;
        }

        /* Message Content Wrapper */
        .team-chat-container .chat-message-content {
            max-width: 65%;
            display: flex;
            flex-direction: column;
        }

        .team-chat-container .chat-message.own .chat-message-content {
            align-items: flex-end;
        }

        /* Bubble Row - contains bubble and footer side by side */
        .team-chat-container .chat-bubble-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* For own messages: footer on left, bubble on right */
        .team-chat-container .chat-message.own .chat-bubble-row {
            flex-direction: row-reverse;
        }

        /* Sender Name (only show for first message in group) */
        .team-chat-container .chat-sender-name {
            font-size: 12px;
            color: #65676b;
            margin-bottom: 2px;
            margin-left: 12px;
            font-weight: 500;
        }

        .team-chat-container .chat-message.own .chat-sender-name {
            display: none;
        }

        .team-chat-container .chat-message:not(.group-start) .chat-sender-name {
            display: none;
        }

        /* Message Bubble - Base */
        .team-chat-container .chat-bubble {
            padding: 8px 12px;
            border-radius: 18px;
            position: relative;
            word-break: break-word;
            max-width: 100%;
        }

        /* Other's messages - gray bubble (base) */
        .team-chat-container .chat-message:not(.own) .chat-bubble {
            background: #e4e6eb;
            color: #050505;
        }

        /* Own messages - blue bubble (base) */
        .team-chat-container .chat-message.own .chat-bubble {
            background: linear-gradient(135deg, #0084ff 0%, #0066cc 100%);
            color: white;
        }

        /* === BUBBLE RADIUS FOR OTHER'S MESSAGES (left side small) === */

        /* Middle messages: small radius on left side */
        .team-chat-container .chat-message:not(.own):not(.group-start):not(.group-end) .chat-bubble {
            border-top-left-radius: 4px;
            border-bottom-left-radius: 4px;
        }

        /* First message (not last): small bottom-left */
        .team-chat-container .chat-message:not(.own).group-start:not(.group-end) .chat-bubble {
            border-bottom-left-radius: 4px;
        }

        /* Last message (not first): small top-left */
        .team-chat-container .chat-message:not(.own).group-end:not(.group-start) .chat-bubble {
            border-top-left-radius: 4px;
        }

        /* === BUBBLE RADIUS FOR OWN MESSAGES (right side small) === */

        /* Middle messages: small radius on right side */
        .team-chat-container .chat-message.own:not(.group-start):not(.group-end) .chat-bubble {
            border-top-right-radius: 4px;
            border-bottom-right-radius: 4px;
        }

        /* First message (not last): small bottom-right */
        .team-chat-container .chat-message.own.group-start:not(.group-end) .chat-bubble {
            border-bottom-right-radius: 4px;
        }

        /* Last message (not first): small top-right */
        .team-chat-container .chat-message.own.group-end:not(.group-start) .chat-bubble {
            border-top-right-radius: 4px;
        }

        /* Message Text */
        .team-chat-container .chat-message-text {
            line-height: 1.4;
            font-size: 15px;
        }

        /* Links in messages */
        .team-chat-container .chat-message:not(.own) .chat-link {
            color: #0066cc;
        }

        .team-chat-container .chat-message.own .chat-link {
            color: #ffffff;
            text-decoration: underline;
        }

        /* Message Footer (time, likes, actions) - now beside bubble */
        .team-chat-container .chat-message-footer {
            display: flex;
            align-items: center;
            gap: 6px;
            opacity: 0;
            transition: opacity 0.2s;
            flex-shrink: 0;
        }

        .team-chat-container .chat-message:hover .chat-message-footer {
            opacity: 1;
        }

        /* Always show footer on touch devices */
        @media (hover: none) {
            .team-chat-container .chat-message-footer {
                opacity: 1;
            }
        }

        .team-chat-container .chat-time {
            color: #65676b;
            font-size: 11px;
        }

        .team-chat-container .chat-message.own .chat-time {
            color: #65676b;
        }

        /* Likes indicator */
        .team-chat-container .chat-likes {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            background: white;
            border-radius: 10px;
            padding: 2px 6px;
            font-size: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            position: absolute;
            bottom: -8px;
            right: 8px;
        }

        .team-chat-container .chat-message:not(.own) .chat-likes {
            left: 8px;
            right: auto;
        }

        /* Action Buttons */
        .team-chat-container .chat-actions {
            display: flex;
            gap: 6px;
            align-items: center;
        }

        .team-chat-container .chat-pin-btn,
        .team-chat-container .chat-delete-btn,
        .team-chat-container .chat-reply-btn {
            background: none;
            border: none;
            color: #65676b;
            cursor: pointer;
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 16px;
            transition: all 0.2s;
        }

        .team-chat-container .chat-pin-btn:hover {
            background: #f0f0f0;
            color: #f39c12;
        }

        .team-chat-container .chat-delete-btn:hover {
            background: #ffebee;
            color: #e74c3c;
        }

        .team-chat-container .chat-reply-btn:hover {
            background: #e3f2fd;
            color: #0084ff;
        }

        /* Reply Quote - shown inside the bubble, above the message */
        .team-chat-container .chat-reply-quote {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            align-items: flex-start;
            gap: 6px;
            margin-bottom: 8px;
            padding: 8px 10px;
            background: rgba(0, 0, 0, 0.06);
            border-radius: 8px;
            border-left: 3px solid #0084ff;
            cursor: pointer;
        }

        .team-chat-container .chat-message.own .chat-reply-quote {
            background: rgba(255, 255, 255, 0.15);
            border-left-color: rgba(255, 255, 255, 0.6);
        }

        .team-chat-container .chat-reply-quote .reply-arrow {
            color: #65676b;
            font-size: 12px;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .team-chat-container .chat-message.own .chat-reply-quote .reply-arrow {
            color: rgba(255, 255, 255, 0.7);
        }

        .team-chat-container .chat-reply-quote .reply-content {
            flex: 1;
            min-width: 0;
        }

        .team-chat-container .chat-reply-quote .reply-header {
            font-size: 12px;
            font-weight: 600;
            color: #1c1e21 !important;
            margin-bottom: 4px;
        }

        .team-chat-container .chat-message.own .chat-reply-quote .reply-header {
            color: #ffffff !important;
        }

        .team-chat-container .chat-reply-quote .reply-text {
            font-size: 13px;
            color: #65676b !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 250px;
        }

        .team-chat-container .chat-message.own .chat-reply-quote .reply-text {
            color: rgba(255, 255, 255, 0.8) !important;
        }

        /* Reply input preview bar */
        .chat-reply-preview {
            display: none;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            background: #f0f2f5;
            border-left: 3px solid #0084ff;
            margin-bottom: 8px;
            border-radius: 8px;
        }

        .chat-reply-preview.active {
            display: flex;
        }

        .chat-reply-preview .reply-preview-content {
            flex: 1;
            min-width: 0;
        }

        .chat-reply-preview .reply-preview-header {
            font-size: 12px;
            color: #0084ff;
            font-weight: 500;
        }

        .chat-reply-preview .reply-preview-text {
            font-size: 13px;
            color: #65676b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .chat-reply-preview .reply-cancel-btn {
            background: none;
            border: none;
            color: #65676b;
            cursor: pointer;
            padding: 4px;
            font-size: 16px;
            border-radius: 50%;
        }

        .chat-reply-preview .reply-cancel-btn:hover {
            background: #e4e6e9;
        }

        /* User Role Badge (small, in footer) */
        .chat-user-badge {
            font-size: 9px;
            padding: 2px 5px;
            border-radius: 3px;
            font-weight: 600;
        }

        .chat-user-badge.super-admin {
            background: #9b59b6;
            color: white;
        }

        .chat-user-badge.admin {
            background: #27ae60;
            color: white;
        }

        .chat-link {
            color: #3498db;
            text-decoration: underline;
        }

        .chat-link:hover {
            color: #2980b9;
        }

        /* Links in Live Support agent messages (colored background) */
        .support-msg.agent .chat-link {
            color: #ffeb3b;
            font-weight: 500;
        }

        .support-msg.agent .chat-link:hover {
            color: #fff;
        }

        .chat-input-container {
            display: flex;
            gap: 10px;
        }

        #team-chat #team-chat-input-container.chat-input-container {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
            margin-bottom: 0;
            padding-bottom: 5px;
        }

        #team-chat #chat-message-input {
            color: #000;
            background: #f0f0f0;
        }

        .chat-input-container input {
            flex: 1;
            padding: 12px 15px;
            border: 2px solid #ecf0f1;
            border-radius: 8px;
            font-size: 14px;
            background: #f0f0f0;
            color: #000;
        }

        .chat-input-container input:focus {
            outline: none;
            border-color: #3498db;
        }

        .chat-send-btn {
            padding: 12px 20px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .chat-send-btn:hover {
            background: #2980b9;
        }

        /* Team Chat Media Buttons */
        .team-media-buttons {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .team-media-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            font-size: 16px;
            cursor: pointer;
            background: #f0f0f0;
            color: #000;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .team-media-btn:hover {
            background: #3498db;
            color: white;
            transform: scale(1.1);
        }

        .team-media-btn.recording {
            background: #e74c3c;
            color: white;
            animation: pulse-recording 1s infinite;
        }

        /* Team Chat Voice Preview */
        .team-voice-preview {
            display: none;
            padding: 12px 15px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 8px;
            margin-bottom: 5px;
            align-items: center;
            gap: 12px;
        }

        .team-voice-preview.show {
            display: flex;
        }

        .team-voice-preview audio {
            flex: 1;
            height: 40px;
            max-width: 200px;
        }

        .team-voice-preview .preview-btns {
            display: flex;
            gap: 8px;
        }

        .team-voice-preview .btn-send-voice {
            padding: 8px 16px;
            background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
            color: white;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
        }

        .team-voice-preview .btn-cancel-voice {
            padding: 8px 16px;
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
        }

        /* Team Chat Upload Progress */
        .team-upload-progress {
            display: none;
            padding: 10px 15px;
            background: #f8f9fa;
            border-radius: 8px;
            margin-bottom: 5px;
        }

        .team-upload-progress.show {
            display: block;
        }

        .team-upload-progress .progress-bar {
            height: 4px;
            background: #e0e0e0;
            border-radius: 2px;
            overflow: hidden;
        }

        .team-upload-progress .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #3498db, #9b59b6);
            width: 0%;
            transition: width 0.3s;
        }

        .team-upload-progress .progress-text {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
            text-align: center;
        }

        /* Team Chat Media Message Styles */
        .team-media-message {
            margin-top: 8px;
        }

        .team-media-message img {
            max-width: 200px;
            border-radius: 8px;
            cursor: pointer;
        }

        .team-media-message img:hover {
            opacity: 0.9;
        }

        .team-voice-player {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(52, 152, 219, 0.1);
            padding: 10px 15px;
            border-radius: 20px;
        }

        .team-voice-player button {
            width: 35px;
            height: 35px;
            border: none;
            border-radius: 50%;
            background: #3498db;
            color: white;
            cursor: pointer;
            font-size: 14px;
        }

        .team-voice-player .duration {
            font-size: 13px;
            color: #666;
        }

        /* Media Expiry Timer */
        .media-expiry {
            font-size: 11px;
            color: #95a5a6;
            margin-top: 5px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .media-expiry i {
            font-size: 10px;
        }

        .media-expiry.expiring-soon {
            color: #e67e22;
        }

        /* Chat Media Messages - Messenger Style */

        /* Bubble with media - no background (using :has for modern browsers) */
        .team-chat-container .chat-bubble:has(.chat-message-media:not(.voice-message)) {
            background: transparent !important;
            padding: 0 !important;
        }

        /* Fallback: bubble with media class */
        .team-chat-container .chat-bubble.has-media {
            background: transparent !important;
            padding: 0 !important;
        }

        /* Override blue gradient for own media messages */
        .team-chat-container .chat-message.own .chat-bubble:has(.chat-message-media:not(.voice-message)),
        .team-chat-container .chat-message.own .chat-bubble.has-media {
            background: transparent !important;
            padding: 0 !important;
        }

        .chat-message-media {
            position: relative;
            display: inline-block;
            max-width: 300px;
        }

        .chat-media-image {
            max-width: 100%;
            max-height: 350px;
            border-radius: 18px;
            cursor: pointer;
            transition: opacity 0.2s;
            display: block;
        }

        .chat-media-image:hover {
            opacity: 0.9;
        }

        /* Reactions on media - positioned at bottom */
        .team-chat-container .chat-bubble:has(.chat-message-media) .chat-likes {
            bottom: 8px;
            right: 8px;
        }

        .team-chat-container .chat-message:not(.own) .chat-bubble:has(.chat-message-media) .chat-likes {
            left: auto;
            right: 8px;
        }

        /* ========================================
           VOICE MESSAGE - Messenger Style
           ======================================== */
        .chat-message-media.voice-message {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0;
            background: transparent;
            max-width: 200px;
        }

        /* Hide default audio player */
        .chat-message-media.voice-message audio {
            display: none;
        }

        /* Play button */
        .voice-play-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            background: #0084ff;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: transform 0.2s;
        }

        .voice-play-btn:hover {
            transform: scale(1.05);
        }

        .voice-play-btn i {
            font-size: 14px;
            margin-left: 2px;
        }

        .voice-play-btn.playing i:before {
            content: "\f04c"; /* pause icon */
        }

        /* Waveform container */
        .voice-waveform {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 2px;
            height: 32px;
        }

        .voice-waveform .waveform-bar {
            width: 3px;
            background: #65676b;
            border-radius: 2px;
            transition: background 0.1s;
            height: 8px;
        }

        /* Random heights for waveform effect */
        .voice-waveform .waveform-bar:nth-child(1) { height: 12px; }
        .voice-waveform .waveform-bar:nth-child(2) { height: 18px; }
        .voice-waveform .waveform-bar:nth-child(3) { height: 8px; }
        .voice-waveform .waveform-bar:nth-child(4) { height: 22px; }
        .voice-waveform .waveform-bar:nth-child(5) { height: 14px; }
        .voice-waveform .waveform-bar:nth-child(6) { height: 20px; }
        .voice-waveform .waveform-bar:nth-child(7) { height: 10px; }
        .voice-waveform .waveform-bar:nth-child(8) { height: 16px; }
        .voice-waveform .waveform-bar:nth-child(9) { height: 24px; }
        .voice-waveform .waveform-bar:nth-child(10) { height: 12px; }
        .voice-waveform .waveform-bar:nth-child(11) { height: 18px; }
        .voice-waveform .waveform-bar:nth-child(12) { height: 8px; }
        .voice-waveform .waveform-bar:nth-child(13) { height: 14px; }
        .voice-waveform .waveform-bar:nth-child(14) { height: 20px; }
        .voice-waveform .waveform-bar:nth-child(15) { height: 10px; }

        .team-chat-container .chat-message:not(.own) .voice-waveform .waveform-bar {
            background: #65676b;
        }

        .team-chat-container .chat-message.own .voice-waveform .waveform-bar {
            background: rgba(255,255,255,0.6);
        }

        .voice-waveform .waveform-bar.active {
            background: #0084ff;
        }

        .team-chat-container .chat-message.own .voice-waveform .waveform-bar.active {
            background: white;
        }

        /* Duration */
        .voice-duration {
            font-size: 12px;
            color: #65676b;
            min-width: 35px;
            text-align: right;
        }

        .team-chat-container .chat-message.own .voice-duration {
            color: rgba(255,255,255,0.8);
        }

        /* Voice message expiry - below the player */
        .chat-message-media.voice-message .media-expiry {
            position: absolute;
            bottom: -18px;
            left: 0;
            background: none;
            color: #65676b;
            padding: 0;
            font-size: 10px;
        }

        /* Hide pin button and badge on voice messages */
        .chat-message-media.voice-message .pin-media-btn,
        .chat-message-media.voice-message .media-pinned-badge {
            display: none;
        }

        /* ========================================
           PHOTO MESSAGE - Pin & Expiry styles
           ======================================== */

        /* Media pinned badge - on the image only */
        .team-chat-container .chat-message-media:not(.voice-message) .media-pinned-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background: rgba(241, 196, 15, 0.95);
            color: #2c3e50;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 600;
            z-index: 5;
            backdrop-filter: blur(4px);
        }

        /* Pin button - show on hover only (photos) */
        .team-chat-container .chat-message-media:not(.voice-message) .pin-media-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border: none;
            padding: 6px 10px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 11px;
            z-index: 10;
            opacity: 0;
            transition: opacity 0.2s;
            backdrop-filter: blur(4px);
        }

        .team-chat-container .chat-message-media:not(.voice-message):hover .pin-media-btn {
            opacity: 1;
        }

        .team-chat-container .chat-message-media:not(.voice-message) .pin-media-btn:hover {
            background: rgba(241, 196, 15, 0.95);
            color: #2c3e50;
        }

        /* Media expiry - on image only */
        .team-chat-container .chat-message-media:not(.voice-message) .media-expiry {
            position: absolute;
            bottom: 8px;
            left: 8px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            padding: 4px 8px;
            border-radius: 10px;
            font-size: 10px;
            backdrop-filter: blur(4px);
        }

        /* Pin Button */
        .pin-btn {
            background: none;
            border: none;
            color: #95a5a6;
            cursor: pointer;
            font-size: 12px;
            padding: 4px 8px;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .pin-btn:hover {
            background: rgba(241, 196, 15, 0.2);
            color: #f1c40f;
        }

        .pin-btn.pinned {
            color: #f1c40f;
        }

        .pinned-badge {
            background: #f1c40f;
            color: #2c3e50;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 8px;
        }

        .chat-unread-badge {
            background: #e74c3c;
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 10px;
            margin-left: 5px;
        }

        .typing-indicator-container {
            padding: 5px 20px;
            background: transparent;
        }

        .typing-indicator {
            padding: 8px 15px;
            background: #f0f0f0;
            border-radius: 8px;
            font-style: italic;
            color: #7f8c8d;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
        }

        .typing-indicator .dots {
            display: flex;
            gap: 4px;
        }

        .typing-indicator .dots span {
            width: 6px;
            height: 6px;
            background: #95a5a6;
            border-radius: 50%;
            animation: typingBounce 1.4s infinite ease-in-out;
        }

        .typing-indicator .dots span:nth-child(1) { animation-delay: 0s; }
        .typing-indicator .dots span:nth-child(2) { animation-delay: 0.2s; }
        .typing-indicator .dots span:nth-child(3) { animation-delay: 0.4s; }

        @keyframes typingBounce {
            0%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-5px); }
        }

        .system-message {
            padding: 8px 15px;
            background: #e8f4fd;
            border-left: 3px solid #3498db;
            border-radius: 0 8px 8px 0;
            margin-bottom: 5px;
            color: #5d6d7e;
            font-size: 13px;
        }

        .system-message.joined {
            border-left-color: #27ae60;
            background: #e8f8f0;
        }

        .system-message.left {
            border-left-color: #e74c3c;
            background: #fdeaea;
        }

        /* Message Actions (Like & Delete) */
        .chat-message-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #ecf0f1;
        }

        .chat-likes {
            display: flex;
            align-items: center;
            gap: 4px;
            color: #e74c3c;
            font-size: 13px;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 12px;
            transition: background 0.2s;
        }

        .chat-likes:hover {
            background: #fdeaea;
        }

        .chat-likes.liked {
            background: #fdeaea;
        }

        .chat-delete-btn {
            background: none;
            border: none;
            color: #bdc3c7;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 4px;
            opacity: 0;
            transition: all 0.2s;
        }

        .chat-message:hover .chat-delete-btn {
            opacity: 1;
        }

        .chat-delete-btn:hover {
            color: #e74c3c;
            background: #fdeaea;
        }

        .heart-animation {
            position: fixed;
            font-size: 50px;
            pointer-events: none;
            z-index: 9999;
            animation: heartFloat 0.8s ease-out forwards;
        }

        @keyframes heartFloat {
            0% { transform: scale(0.5); opacity: 1; }
            50% { transform: scale(1.2); opacity: 0.8; }
            100% { transform: scale(1) translateY(-50px); opacity: 0; }
        }

        /* ============================================
           LIVE SUPPORT STYLES
           ============================================ */
        .live-support-container {
            padding: 20px;
        }

        .support-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .support-header h2 {
            color: #2c3e50;
            font-size: 22px;
        }

        .support-header h2 i {
            color: #9b59b6;
            margin-right: 10px;
        }

        .support-stats {
            display: flex;
            gap: 15px;
        }

        .stat-waiting, .stat-active {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
        }

        .stat-waiting {
            background: #fff3e0;
            color: #e65100;
        }

        .stat-active {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .support-chat-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .support-chat-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 18px 20px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            border-left: 4px solid #bdc3c7;
            transition: all 0.2s;
        }

        .support-chat-item:hover {
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            transform: translateX(3px);
        }

        .support-chat-item.waiting {
            border-left-color: #e74c3c;
            animation: pulseWaiting 2s infinite;
        }

        @keyframes pulseWaiting {
            0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
            50% { box-shadow: 0 2px 15px rgba(231, 76, 60, 0.2); }
        }

        .support-chat-item.active {
            border-left-color: #27ae60;
        }

        .support-chat-item.closed {
            border-left-color: #95a5a6;
            opacity: 0.7;
        }

        .chat-item-info {
            display: flex;
            align-items: center;
            gap: 15px;
            flex: 1;
            min-width: 0;
        }

        .chat-item-avatar {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
        }

        .chat-item-details h4 {
            color: #2c3e50;
            font-size: 16px;
            margin-bottom: 4px;
        }

        .chat-item-details p {
            color: #7f8c8d;
            font-size: 13px;
            margin-bottom: 3px;
        }

        .chat-item-preview {
            color: #95a5a6;
            font-size: 13px;
            font-style: italic;
            max-width: 300px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .chat-item-meta {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            min-width: 130px;
            text-align: center;
        }

        .chat-item-right {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            min-width: 140px;
            text-align: center;
        }

        .chat-item-time {
            color: #95a5a6;
            font-size: 12px;
        }

        .chat-item-status {
            padding: 5px 12px;
            border-radius: 15px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .chat-item-status.waiting {
            background: #ffebee;
            color: #c62828;
        }

        .chat-item-status.active {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .chat-item-status.closed {
            background: #f5f5f5;
            color: #757575;
        }

        .chat-item-actions {
            display: flex;
            gap: 8px;
            min-width: 120px;
            justify-content: flex-end;
        }

        .btn-open-chat {
            padding: 10px 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
        }

        .btn-open-chat:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-takeover {
            padding: 10px 15px;
            background: #fff3e0;
            color: #e65100;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
        }

        .btn-takeover:hover {
            background: #ffe0b2;
        }

        /* Takeover Toast Notification */
        .takeover-toast {
            position: fixed;
            top: 20px;
            right: 20px;
            background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
            color: white;
            padding: 16px 20px;
            border-radius: 12px;
            box-shadow: 0 8px 30px rgba(255, 152, 0, 0.4);
            display: flex;
            align-items: center;
            gap: 15px;
            max-width: 400px;
            z-index: 10000;
            animation: slideInRight 0.4s ease;
        }

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

        .takeover-toast-icon {
            font-size: 24px;
            background: rgba(255,255,255,0.2);
            padding: 10px;
            border-radius: 50%;
        }

        .takeover-toast-content {
            flex: 1;
        }

        .takeover-toast-title {
            font-weight: 600;
            font-size: 15px;
            margin-bottom: 4px;
        }

        .takeover-toast-body {
            font-size: 13px;
            opacity: 0.95;
            line-height: 1.4;
        }

        .takeover-toast-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }

        .takeover-toast-close:hover {
            background: rgba(255,255,255,0.3);
        }

        .unread-badge {
            background: #e74c3c;
            color: white;
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
        }

        .support-unread-badge {
            background: #e74c3c;
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 10px;
            margin-left: 5px;
        }

        /* Support Modal */
        .support-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }

        .support-modal.show {
            display: flex;
        }

        .support-modal-content {
            width: 95%;
            max-width: 1100px;
            height: 90vh;
            max-height: 950px;
            background: white;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }

        .support-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 25px;
            border-bottom: 1px solid #ecf0f1;
            background: #f8f9fa;
            border-radius: 16px 16px 0 0;
        }

        .customer-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .customer-info i {
            font-size: 40px;
            color: #667eea;
        }

        .customer-name {
            display: block;
            font-weight: 600;
            font-size: 18px;
            color: #2c3e50;
        }

        .customer-phone {
            color: #7f8c8d;
            font-size: 14px;
        }

        .modal-actions {
            display: flex;
            gap: 10px;
        }

        .btn-close-chat {
            padding: 10px 18px;
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
        }

        .btn-close-chat:hover {
            background: #c0392b;
        }

        .btn-close-modal {
            padding: 10px 15px;
            background: #ecf0f1;
            color: #7f8c8d;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 18px;
        }

        .btn-close-modal:hover {
            background: #bdc3c7;
        }

        .support-modal-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background: #f8f9fa;
        }

        .support-msg {
            max-width: 75%;
            margin-bottom: 15px;
        }

        .support-msg.customer {
            margin-right: auto;
        }

        .support-msg.agent {
            margin-left: auto;
        }

        .support-msg-bubble {
            padding: 12px 18px;
            border-radius: 18px;
            font-size: 15px;
            line-height: 1.4;
        }

        .support-msg.customer .support-msg-bubble {
            background: white;
            color: #2c3e50;
            border-bottom-left-radius: 4px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

        .support-msg.agent .support-msg-bubble {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-bottom-right-radius: 4px;
        }

        .support-msg-info {
            font-size: 11px;
            color: #95a5a6;
            margin-top: 4px;
            padding: 0 5px;
        }

        .support-msg.agent .support-msg-info {
            text-align: right;
        }

        .support-modal-input {
            display: flex;
            gap: 12px;
            padding: 20px;
            border-top: 1px solid #ecf0f1;
        }

        .support-modal-input textarea {
            flex: 1;
            padding: 12px 18px;
            border: 2px solid #e0e0e0;
            border-radius: 12px;
            font-size: 15px;
            resize: none;
            font-family: inherit;
        }

        .support-modal-input textarea:focus {
            outline: none;
            border-color: #667eea;
        }

        .btn-send-support {
            padding: 15px 25px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-size: 18px;
        }

        .btn-send-support:hover {
            transform: scale(1.05);
        }

        /* Media Buttons for Support Chat */
        .support-media-buttons {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .support-media-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            font-size: 16px;
            cursor: pointer;
            background: #f0f0f0;
            color: #000;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .support-media-btn:hover {
            background: #667eea;
            color: white;
            transform: scale(1.1);
        }

        .support-media-btn.recording {
            background: #e74c3c;
            color: white;
            animation: pulse-recording 1s infinite;
        }

        @keyframes pulse-recording {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.15); }
        }

        .support-media-btn input[type="file"] {
            display: none;
        }

        #support-photo-input {
            display: none !important;
        }

        /* Support Voice Preview */
        .support-voice-preview {
            display: none;
            padding: 12px 20px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-top: 1px solid #dee2e6;
            align-items: center;
            gap: 12px;
        }

        .support-voice-preview.show {
            display: flex;
        }

        .support-voice-preview audio {
            flex: 1;
            height: 40px;
            max-width: 200px;
        }

        .support-voice-preview .preview-btns {
            display: flex;
            gap: 8px;
        }

        .support-voice-preview .btn-send-voice {
            padding: 8px 16px;
            background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
            color: white;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
        }

        .support-voice-preview .btn-cancel-voice {
            padding: 8px 16px;
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
        }

        /* Support Upload Progress */
        .support-upload-progress {
            display: none;
            padding: 10px 20px;
            background: #f8f9fa;
            border-top: 1px solid #ecf0f1;
        }

        .support-upload-progress.show {
            display: block;
        }

        .support-upload-progress .progress-bar {
            height: 4px;
            background: #e0e0e0;
            border-radius: 2px;
            overflow: hidden;
        }

        .support-upload-progress .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            width: 0%;
            transition: width 0.3s;
        }

        .support-upload-progress .progress-text {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
            text-align: center;
        }

        /* Media in support messages */
        .support-message-media {
            max-width: 200px;
            border-radius: 12px;
            overflow: hidden;
            margin-top: 5px;
        }

        .support-message-media img {
            width: 100%;
            cursor: pointer;
            transition: opacity 0.3s;
        }

        .support-message-media img:hover {
            opacity: 0.9;
        }

        .support-voice-player {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(0,0,0,0.05);
            padding: 10px 15px;
            border-radius: 20px;
            min-width: 180px;
        }

        .support-voice-player button {
            width: 35px;
            height: 35px;
            border: none;
            border-radius: 50%;
            background: #667eea;
            color: white;
            cursor: pointer;
            font-size: 14px;
        }

        .support-voice-player .duration {
            font-size: 13px;
            color: #666;
        }

        .support-message-media .media-expiry {
            position: absolute;
            bottom: 5px;
            left: 5px;
            background: rgba(0,0,0,0.6);
            color: white;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 10px;
        }

        .support-message-media {
            position: relative;
        }

        .support-voice-player .media-expiry {
            font-size: 11px;
            color: #999;
        }

        .support-voice-player .media-expiry.voice {
            margin-left: auto;
        }

        .media-expiry.expiring-soon {
            color: #e74c3c !important;
            background: rgba(231,76,60,0.2) !important;
        }

        /* Lightbox for support */
        .support-lightbox {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            z-index: 100000;
            justify-content: center;
            align-items: center;
        }

        .support-lightbox.show {
            display: flex;
        }

        .support-lightbox img {
            max-width: 90%;
            max-height: 90%;
            border-radius: 8px;
        }

        .support-lightbox .close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            background: rgba(255,255,255,0.2);
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 24px;
            cursor: pointer;
        }

        .no-chats-message {
            text-align: center;
            padding: 60px 20px;
            color: #95a5a6;
        }

        .no-chats-message i {
            font-size: 60px;
            margin-bottom: 20px;
            opacity: 0.5;
        }

        .no-chats-message p {
            font-size: 16px;
        }

        /* ============================================
           USER MANAGEMENT STYLES
           ============================================ */
        .users-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .users-table th,
        .users-table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #ecf0f1;
        }

        .users-table th {
            background: #f8f9fa;
            font-weight: 600;
            color: #2c3e50;
        }

        .users-table tr:hover {
            background: #f8f9fa;
        }

        .users-table .role-badge {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
        }

        .users-table .role-badge.super-admin {
            background: #9b59b6;
            color: white;
        }

        .users-table .role-badge.admin {
            background: #27ae60;
            color: white;
        }

        .users-table .action-btns {
            display: flex;
            gap: 8px;
        }

        .users-table .action-btn {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.2s;
        }

        .users-table .action-btn.edit {
            background: #3498db;
            color: white;
        }

        .users-table .action-btn.edit:hover {
            background: #2980b9;
        }

        .users-table .action-btn.delete {
            background: #e74c3c;
            color: white;
        }

        .users-table .action-btn.delete:hover {
            background: #c0392b;
        }

        .btn-edit-user, .btn-delete-user {
            padding: 6px 10px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.2s;
            margin: 0 2px;
        }

        .btn-edit-user {
            background: #3498db;
            color: white;
        }

        .btn-edit-user:hover {
            background: #2980b9;
        }

        .btn-delete-user {
            background: #e74c3c;
            color: white;
        }

        .btn-delete-user:hover {
            background: #c0392b;
        }

        .btn-primary {
            padding: 10px 20px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary:hover {
            background: #2980b9;
        }

        /* ============================================
           CALENDARS STYLES
           ============================================ */
        /* Google Calendar Style - Compact View */
        .gcal-container {
            display: flex;
            height: calc(100vh - 120px);
            background: white;
            border-radius: 0;
            overflow: hidden;
        }

        /* Full height calendar when Calendars tab is active */
        #calendars.active {
            position: fixed;
            top: 130px;
            left: 0;
            right: 0;
            bottom: 0;
            margin: 0;
            padding: 0;
            width: 100%;
            height: auto;
            z-index: 50;
        }

        #calendars.active .gcal-container {
            height: 100%;
            border-radius: 0;
        }

        .gcal-sidebar {
            width: 280px;
            padding: 15px;
            border-right: 1px solid #e0e0e0;
            overflow-y: auto;
            flex-shrink: 0;
            font-size: 12px;
            background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
        }

        /* Hide body scroll when calendar tab is active */
        body:has(#calendars.active) {
            overflow: hidden;
        }

        .gcal-create-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 12px 20px;
            background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            color: white;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
            margin-bottom: 20px;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            width: 100%;
        }

        .gcal-create-btn:hover {
            background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
            box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
            transform: translateY(-2px);
        }

        .gcal-create-btn i {
            color: white;
            font-size: 16px;
        }

        /* Mini Calendar - Orange Theme */
        .gcal-mini-calendar {
            margin-bottom: 20px;
            background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
            border: 1px solid #e6e6e6;
            border-radius: 12px;
            padding: 12px;
        }

        .mini-cal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 4px;
            margin-bottom: 8px;
        }

        .mini-cal-header span {
            font-size: 14px;
            font-weight: 700;
            color: #2c3e50;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .mini-cal-header button {
            background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
            border: none;
            color: white;
            cursor: pointer;
            padding: 0;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .mini-cal-header button:hover {
            background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
            transform: scale(1.1);
        }

        .mini-cal-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 3px;
            font-size: 12px;
        }

        .mini-cal-grid .day-name {
            text-align: center;
            color: #7f8c8d;
            padding: 6px 2px;
            font-weight: 700;
            text-transform: uppercase;
            font-size: 10px;
        }

        .mini-cal-grid .mini-day {
            text-align: center;
            padding: 8px 4px;
            border-radius: 8px;
            cursor: pointer;
            color: #2c3e50;
            font-weight: 500;
            transition: all 0.2s ease;
            border: 2px solid transparent;
        }

        .mini-cal-grid .mini-day:hover {
            background: linear-gradient(135deg, #fff5e6 0%, #ffe9cc 100%);
            border-color: #f39c12;
            transform: scale(1.05);
        }

        .mini-cal-grid .mini-day.today {
            border: 2px solid #e67e22;
            font-weight: 700;
            background: linear-gradient(135deg, #fff9f0 0%, #fff3e6 100%);
        }

        .mini-cal-grid .mini-day.selected {
            background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
            color: white;
            font-weight: 700;
        }

        .mini-cal-grid .mini-day.selected:hover {
            background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        }

        .mini-cal-grid .mini-day.other-month {
            color: #bbb;
            opacity: 0.4;
        }

        /* Calendar List */
        /* Today's Appointments Section - Orange Theme */
        .gcal-today-section {
            margin-bottom: 20px;
            padding: 12px;
            background: linear-gradient(to bottom, #fff9f0 0%, #fff3e6 100%);
            border-radius: 12px;
            border: 1px solid #ffe0b3;
        }

        .gcal-today-section h4 {
            font-size: 13px;
            font-weight: 700;
            color: #d35400;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .gcal-today-section h4 i {
            font-size: 14px;
            color: #e67e22;
        }

        .today-appointment-item {
            background: white;
            border-left: 4px solid #e67e22;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 5px;
            box-shadow: 0 2px 6px rgba(230, 126, 34, 0.15);
            cursor: pointer;
            transition: all 0.25s ease;
        }

        .today-appointment-item:hover {
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(230, 126, 34, 0.25);
            border-left-color: #f39c12;
        }

        .today-appointment-time {
            font-size: 12px;
            font-weight: 700;
            color: #e67e22;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .today-appointment-time i {
            font-size: 10px;
        }

        .today-appointment-title {
            font-size: 14px;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 2px;
        }

        .today-appointment-calendar {
            font-size: 11px;
            color: #5f6368;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .today-appointment-calendar .cal-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            display: inline-block;
        }

        .no-appointments-today {
            text-align: center;
            padding: 20px 10px;
            color: #5f6368;
            font-size: 13px;
        }

        .no-appointments-today i {
            font-size: 32px;
            color: #dadce0;
            display: block;
            margin-bottom: 5px;
        }

        .appointment-status {
            display: inline-block;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 10px;
            margin-left: 8px;
            font-weight: 600;
        }

        .appointment-status.upcoming {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .appointment-status.now {
            background: #fff3e0;
            color: #ef6c00;
            animation: pulse 2s infinite;
        }

        .appointment-status.past {
            background: #f5f5f5;
            color: #9e9e9e;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }

        @keyframes highlight {
            0% { transform: scale(1); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
            50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(26, 115, 232, 0.6); }
            100% { transform: scale(1); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
        }

        .gcal-calendars-list {
            background: white;
            border-radius: 12px;
            padding: 12px;
            border: 1px solid #e6e6e6;
        }

        .gcal-calendars-list h4 {
            font-size: 12px;
            text-transform: uppercase;
            color: #d35400;
            margin-bottom: 12px;
            letter-spacing: 0.5px;
            font-weight: 700;
        }

        .calendar-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }

        .calendar-item:hover {
            background: #f1f3f4;
        }

        .calendar-item input[type="checkbox"] {
            width: 16px;
            height: 16px;
            cursor: pointer;
        }

        .calendar-color {
            width: 10px;
            height: 10px;
            border-radius: 2px;
        }

        /* Main Calendar Area */
        .gcal-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .gcal-week-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 20px;
            border-bottom: 1px solid #e0e0e0;
        }

        .gcal-nav {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .gcal-today-btn {
            padding: 8px 16px;
            background: white;
            border: 1px solid #dadce0;
            border-radius: 4px;
            font-size: 14px;
            color: #3c4043;
            cursor: pointer;
        }

        .gcal-today-btn:hover {
            background: #f1f3f4;
        }

        .gcal-nav-btn {
            background: none;
            border: none;
            color: #5f6368;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            font-size: 16px;
        }

        .gcal-nav-btn:hover {
            background: #f1f3f4;
        }

        .gcal-week-header h2 {
            font-size: 22px;
            font-weight: 400;
            color: #3c4043;
            margin: 0;
        }

        .gcal-view-toggle {
            display: flex;
            gap: 5px;
        }

        .view-btn {
            padding: 8px 16px;
            background: white;
            border: 1px solid #dadce0;
            font-size: 14px;
            color: #5f6368;
            cursor: pointer;
        }

        .view-btn:first-child {
            border-radius: 4px 0 0 4px;
        }

        .view-btn:last-child {
            border-radius: 0 4px 4px 0;
        }

        .view-btn:not(:first-child) {
            border-left: none;
        }

        .view-btn.active {
            background: #e8f0fe;
            color: #1a73e8;
        }

        /* Month View */
        .gcal-month-view {
            display: none;
            flex: 1;
            overflow-y: auto;
            padding: 10px;
        }

        .gcal-month-view.active {
            display: block;
        }

        .gcal-month-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            border: 1px solid #dadce0;
            border-radius: 8px;
            overflow: hidden;
        }

        .gcal-month-grid .day-header {
            background: #f8f9fa;
            padding: 10px;
            text-align: center;
            font-size: 11px;
            font-weight: 600;
            color: #70757a;
            text-transform: uppercase;
            border-bottom: 1px solid #dadce0;
        }

        .gcal-month-grid .month-day {
            min-height: 100px;
            border: 1px solid #dadce0;
            border-top: none;
            border-left: none;
            padding: 5px;
            background: white;
            cursor: pointer;
            transition: background 0.2s;
        }

        .gcal-month-grid .month-day:hover {
            background: #f8f9fa;
        }

        .gcal-month-grid .month-day:nth-child(7n+1) {
            border-left: none;
        }

        .gcal-month-grid .month-day.other-month {
            background: #fafafa;
            color: #b0b0b0;
        }

        .gcal-month-grid .month-day.today .day-number {
            background: #1a73e8;
            color: white;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .gcal-month-grid .month-day .day-number {
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 5px;
        }

        .gcal-month-grid .month-day .month-event {
            font-size: 11px;
            padding: 2px 5px;
            margin-bottom: 2px;
            border-radius: 3px;
            background: #e8f0fe;
            color: #1a73e8;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
        }

        .gcal-month-grid .month-day .month-event:hover {
            background: #d2e3fc;
        }

        .gcal-month-grid .month-day .more-events {
            font-size: 11px;
            color: #1a73e8;
            cursor: pointer;
            padding: 2px 5px;
        }

        /* Year View */
        .gcal-year-view {
            display: none;
            flex: 1;
            overflow-y: auto;
            padding: 20px;
        }

        .gcal-year-view.active {
            display: block;
        }

        .gcal-year-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
        }

        @media (max-width: 1200px) {
            .gcal-year-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 900px) {
            .gcal-year-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .gcal-year-month {
            background: white;
            border: 1px solid #dadce0;
            border-radius: 8px;
            padding: 15px;
            cursor: pointer;
            transition: box-shadow 0.2s;
        }

        .gcal-year-month:hover {
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }

        .gcal-year-month .month-title {
            font-size: 14px;
            font-weight: 600;
            color: #3c4043;
            margin-bottom: 5px;
            text-align: center;
        }

        .gcal-year-month .mini-month-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 2px;
        }

        .gcal-year-month .mini-day-header {
            font-size: 9px;
            color: #70757a;
            text-align: center;
            padding: 2px;
        }

        .gcal-year-month .mini-day {
            font-size: 11px;
            text-align: center;
            width: 22px;
            height: 22px;
            line-height: 22px;
            padding: 0;
            border-radius: 50%;
            color: #3c4043;
            margin: 0 auto;
        }

        .gcal-year-month .mini-day.other-month {
            color: #dadce0;
        }

        .gcal-year-month .mini-day.today {
            background: #1a73e8;
            color: white;
        }

        .gcal-year-month .mini-day.has-events {
            font-weight: 600;
            color: #1a73e8;
        }

        .gcal-year-month .mini-day.has-events::after {
            content: '';
            display: block;
            width: 4px;
            height: 4px;
            background: #1a73e8;
            border-radius: 50%;
            margin: 0 auto;
        }

        /* Week View */
        .gcal-week-view {
            flex: 1;
            overflow-y: auto;
        }

        .gcal-day-headers {
            display: flex;
            border-bottom: 1px solid #e0e0e0;
            position: sticky;
            top: 0;
            background: white;
            z-index: 10;
        }

        .gcal-time-gutter {
            width: 50px;
            flex-shrink: 0;
        }

        .gcal-day-header {
            flex: 1;
            text-align: center;
            padding: 8px 0;
            border-left: 1px solid #e0e0e0;
            min-width: 100px;
        }

        .gcal-day-header .day-name {
            font-size: 10px;
            font-weight: 600;
            color: #70757a;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .gcal-day-header .day-num {
            font-size: 20px;
            font-weight: 500;
            color: #3c4043;
            width: 32px;
            height: 32px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            margin-top: 4px;
        }

        .gcal-day-header.today .day-num {
            background: #1a73e8;
            color: white;
        }

        .gcal-day-header.selected .day-num {
            background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(230, 126, 34, 0.4);
        }

        /* Time Grid */
        .gcal-time-grid {
            display: flex;
            position: relative;
            padding-top: 8px;
        }

        .gcal-time-column {
            width: 50px;
            flex-shrink: 0;
        }

        .gcal-time-slot-label {
            height: 50px;
            font-size: 10px;
            font-weight: 500;
            color: #5f6368;
            text-align: right;
            padding-right: 8px;
            position: relative;
            top: -6px;
        }

        .gcal-days-container {
            flex: 1;
            display: flex;
            height: 1200px; /* 24 hours * 50px */
        }

        .gcal-day-column {
            flex: 1;
            border-left: 1px solid #e0e0e0;
            position: relative;
            min-width: 100px;
            height: 1200px; /* 24 hours * 50px */
        }

        .gcal-hour-slot {
            height: 50px;
            border-bottom: 1px solid #e8eaed;
            cursor: pointer;
        }

        .gcal-hour-slot:hover {
            background: #f8f9fa;
        }

        /* Events - Google Calendar Style */
        .gcal-event {
            position: absolute;
            left: 2px;
            right: 2px;
            background: #1a73e8;
            color: white;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 12px;
            overflow: hidden;
            cursor: pointer;
            z-index: 5;
            box-shadow: 0 1px 2px rgba(0,0,0,0.2);
            border-left: 4px solid rgba(0,0,0,0.15);
            min-height: 24px;
            box-sizing: border-box;
        }

        .gcal-event:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            z-index: 10;
        }

        .gcal-event .event-time {
            font-size: 11px;
            font-weight: 500;
            opacity: 0.95;
            line-height: 1.2;
        }

        .gcal-event .event-title {
            font-weight: 600;
            font-size: 12px;
            line-height: 1.3;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        /* Event height variations for different durations */
        .gcal-event.short-event {
            padding: 2px 6px;
        }
        .gcal-event.short-event .event-title {
            -webkit-line-clamp: 1;
            white-space: nowrap;
        }

        /* Connect Button */
        .btn-connect-calendar {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 12px 20px;
            margin-top: 15px;
            background: #1a73e8;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
        }

        .btn-connect-calendar:hover {
            background: #1557b0;
        }

        .no-calendars, .loading-text {
            color: #5f6368;
            text-align: center;
            padding: 20px;
            font-size: 14px;
        }

        /* Current time line */
        .gcal-current-time-line {
            position: absolute;
            left: 0;
            right: 0;
            height: 2px;
            background: #ea4335;
            z-index: 1;
            pointer-events: none;
        }

        .gcal-current-time-line::before {
            content: '';
            position: absolute;
            left: -5px;
            top: -4px;
            width: 10px;
            height: 10px;
            background: #ea4335;
            border-radius: 50%;
        }

        /* ========== RECORDINGS TAB STYLES ========== */
        .recordings-dashboard {
            padding: 20px;
        }

        .recordings-dashboard .stats-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .recordings-dashboard .stat-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

        .recordings-dashboard .stat-icon {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            background: linear-gradient(135deg, #3498db, #2980b9);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
        }

        .recordings-dashboard .stat-info {
            display: flex;
            flex-direction: column;
        }

        .recordings-dashboard .stat-value {
            font-size: 24px;
            font-weight: 700;
            color: #2c3e50;
        }

        .recordings-dashboard .stat-label {
            font-size: 13px;
            color: #7f8c8d;
        }

        .recordings-filters {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .recordings-filters select,
        .recordings-filters input {
            padding: 10px 15px;
            border: 1px solid #dce4ec;
            border-radius: 8px;
            font-size: 14px;
            background: white;
        }

        .recordings-filters input {
            min-width: 200px;
        }

        .recordings-filters .btn-refresh {
            padding: 10px 15px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .recordings-filters .btn-refresh:hover {
            background: #2980b9;
        }

        .pillar-tag {
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 600;
        }

        .pillar-tag.airbnb {
            background: #ffe5e8;
            color: #ff5a5f;
        }

        .pillar-tag.realestate {
            background: #e8f5e9;
            color: #27ae60;
        }

        .pillar-tag.details {
            background: #fff3e0;
            color: #e65100;
        }

        .actions-cell {
            display: flex;
            gap: 5px;
        }

        .btn-play, .btn-download, .btn-delete-rec, .btn-edit-rec {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
        }

        .btn-play {
            background: #e3f2fd;
            color: #1976d2;
        }

        .btn-download {
            background: #e8f5e9;
            color: #27ae60;
        }

        .btn-delete-rec {
            background: #ffebee;
            color: #e74c3c;
        }

        .btn-edit-rec {
            background: #fff3e0;
            color: #f57c00;
        }

        .btn-play:hover { background: #bbdefb; }
        .btn-download:hover { background: #c8e6c9; }
        .btn-delete-rec:hover { background: #ffcdd2; }
        .btn-edit-rec:hover { background: #ffe0b2; }

        .missing-label {
            font-size: 11px;
            color: #e74c3c;
            font-style: italic;
        }

        .recordings-actions {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .btn-export, .btn-cleanup {
            padding: 12px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-export {
            background: #3498db;
            color: white;
        }

        .btn-cleanup {
            background: #e74c3c;
            color: white;
        }

        .btn-export:hover { background: #2980b9; }
        .btn-cleanup:hover { background: #c0392b; }

        /* Audio Player Modal */
        #audio-player-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .audio-player-content {
            background: white;
            padding: 30px;
            border-radius: 15px;
            min-width: 400px;
            position: relative;
        }

        .close-player {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 24px;
            background: none;
            border: none;
            cursor: pointer;
            color: #7f8c8d;
        }

        /* Cleanup Modal */
        .cleanup-modal-content {
            max-width: 400px;
        }

        .cleanup-modal-content h3 {
            margin-bottom: 15px;
            color: #2c3e50;
        }

        .cleanup-modal-content select {
            width: 100%;
            padding: 10px;
            border: 1px solid #dce4ec;
            border-radius: 8px;
            margin: 10px 0;
        }

        /* Edit Recording Modal */
        .edit-recording-content {
            min-width: 550px;
            padding: 35px 40px;
        }

        .edit-recording-content h3 {
            margin-bottom: 30px;
            color: #2c3e50;
            font-size: 24px;
        }

        .edit-field {
            margin-bottom: 25px;
        }

        .edit-field label {
            display: block;
            margin-bottom: 5px;
            font-weight: 600;
            color: #34495e;
            font-size: 16px;
        }

        .edit-field input,
        .edit-field select {
            width: 100%;
            padding: 15px 18px;
            border: 1px solid #dce4ec;
            border-radius: 10px;
            font-size: 17px;
            box-sizing: border-box;
        }

        .edit-field input:focus,
        .edit-field select:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
        }

        .modal-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
        }

        .btn-secondary {
            padding: 10px 20px;
            background: #ecf0f1;
            color: #2c3e50;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .btn-primary {
            padding: 10px 20px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .btn-danger {
            padding: 10px 20px;
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        /* ==================== MOBILE RESPONSIVE STYLES ==================== */

        /* Tablet (768px and below) */
        @media (max-width: 768px) {
            body {
                zoom: 1;
            }

            /* Navigation */
            .nav-bar {
                flex-wrap: wrap;
                padding: 10px 15px;
                gap: 10px;
            }

            .nav-logo {
                font-size: 18px;
            }

            .nav-logo img {
                height: 30px;
            }

            .nav-links {
                order: 3;
                width: 100%;
                flex-wrap: wrap;
                justify-content: center;
                gap: 8px;
            }

            .nav-link {
                padding: 6px 12px;
                font-size: 13px;
            }

            .nav-user {
                font-size: 14px;
            }

            /* Main Content */
            .main-content {
                padding: 10px;
            }

            /* Tabs */
            .dashboard-tabs {
                flex-wrap: wrap;
                gap: 8px;
            }

            .tab-btn {
                padding: 10px 16px;
                font-size: 13px;
                flex: 1 1 auto;
                min-width: 120px;
                justify-content: center;
            }

            /* Airbnb Sub-tabs */
            .airbnb-subtabs {
                flex-wrap: wrap;
                gap: 5px;
            }

            .subtab-btn {
                padding: 8px 14px;
                font-size: 12px;
                flex: 1 1 auto;
            }

            /* Properties Grid */
            .properties-grid {
                grid-template-columns: 1fr;
            }

            .properties-header {
                flex-direction: column;
                gap: 10px;
                align-items: stretch;
            }

            .properties-header h2 {
                text-align: center;
            }

            .btn-add-property {
                width: 100%;
            }

            /* Bookings Stats */
            .bookings-stats {
                grid-template-columns: repeat(2, 1fr);
            }

            .stat-box .stat-number {
                font-size: 22px;
            }

            /* Bookings Filters */
            .bookings-filters {
                flex-direction: column;
            }

            .bookings-filters select,
            .bookings-filters input {
                width: 100%;
            }

            .bookings-header {
                flex-direction: column;
                gap: 10px;
            }

            .bookings-actions {
                width: 100%;
                flex-direction: column;
            }

            .bookings-actions button {
                width: 100%;
            }

            /* Tables */
            .bookings-table {
                display: block;
                overflow-x: auto;
                white-space: nowrap;
            }

            .bookings-table th,
            .bookings-table td {
                padding: 8px 6px;
                font-size: 12px;
            }

            /* Email Parser */
            .email-parser-container {
                grid-template-columns: 1fr;
            }

            /* Call History Filters */
            .history-filters {
                flex-direction: column;
            }

            .history-filters select,
            .history-filters input {
                width: 100%;
            }

            /* Modal */
            .modal-content {
                width: 95%;
                max-height: 85vh;
                margin: 10px;
            }

            .modal-header,
            .modal-body,
            .modal-footer {
                padding: 15px;
            }

            .form-row {
                grid-template-columns: 1fr;
            }

            .modal-footer {
                flex-direction: column;
            }

            .modal-footer button {
                width: 100%;
            }

            .modal-buttons {
                flex-direction: column;
            }

            .modal-buttons button {
                width: 100%;
            }

            /* Settings */
            .settings-section {
                padding: 15px;
            }

            .feature-list {
                grid-template-columns: 1fr;
            }

            /* Audio Templates */
            .audio-template-item {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .audio-template-item audio {
                width: 100%;
            }

            /* Calendar */
            .gcal-year-grid {
                grid-template-columns: 1fr !important;
            }

            .gcal-toolbar {
                flex-wrap: wrap;
                gap: 10px;
            }

            .gcal-nav-buttons {
                order: 2;
            }

            .gcal-title {
                order: 1;
                width: 100%;
                text-align: center;
            }

            .gcal-view-buttons {
                order: 3;
                width: 100%;
                justify-content: center;
            }

            /* Phone Bans Mobile - Phase 36 */
            #ban-stats {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 10px !important;
            }

            #ban-stats > div {
                padding: 10px !important;
            }

            #ban-stats > div > div:first-child {
                font-size: 20px !important;
            }

            #phone-bans .settings-section > div[style*="background"] {
                padding: 15px !important;
            }

            #phone-bans table {
                display: block;
                overflow-x: auto;
            }

            #phone-bans table th,
            #phone-bans table td {
                padding: 8px 6px;
                font-size: 12px;
                white-space: nowrap;
            }

            #phone-bans button {
                min-height: 40px;
                min-width: 40px;
            }

            /* General touch-friendly improvements */
            button, .btn, .btn-primary, .btn-secondary {
                min-height: 44px;
                min-width: 44px;
            }

            /* Settings sidebar for mobile */
            .settings-layout {
                flex-direction: column !important;
            }

            .settings-sidebar {
                width: 100% !important;
                flex-shrink: 0 !important;
            }

            .settings-tabs {
                display: flex !important;
                flex-wrap: wrap !important;
                gap: 5px !important;
            }

            .settings-tab {
                flex: 1 1 auto !important;
                min-width: 120px !important;
                justify-content: center !important;
                padding: 10px !important;
            }

            .settings-content {
                padding: 15px !important;
            }
        }

        /* Mobile (576px and below) */
        @media (max-width: 576px) {
            /* Navigation */
            .nav-bar {
                padding: 8px 10px;
            }

            .nav-logo {
                font-size: 16px;
            }

            .nav-logo img {
                height: 25px;
            }

            .nav-links {
                gap: 5px;
            }

            .nav-link {
                padding: 5px 8px;
                font-size: 11px;
            }

            .nav-user span {
                display: none;
            }

            /* Tabs */
            .tab-btn {
                padding: 8px 12px;
                font-size: 12px;
                min-width: 100px;
            }

            .tab-btn span {
                display: none;
            }

            /* Bookings Stats */
            .bookings-stats {
                grid-template-columns: 1fr;
            }

            .stat-box {
                padding: 12px;
            }

            .stat-box i {
                font-size: 20px;
            }

            .stat-box .stat-number {
                font-size: 20px;
            }

            /* Property Card */
            .property-card {
                padding: 15px;
            }

            .property-card-header {
                flex-direction: column;
                gap: 8px;
            }

            .property-actions {
                flex-direction: column;
            }

            .property-actions button {
                width: 100%;
            }

            /* Modal */
            .modal-content {
                width: 98%;
                margin: 5px;
                border-radius: 8px;
            }

            .modal-header h3 {
                font-size: 16px;
            }

            .form-group label {
                font-size: 13px;
            }

            .form-group input,
            .form-group select,
            .form-group textarea {
                padding: 8px 12px;
                font-size: 14px;
            }

            /* Pillar Cards */
            .pillar-card {
                padding: 15px;
            }

            .pillar-card h4 {
                font-size: 14px;
            }

            .pillar-card p {
                font-size: 12px;
            }

            .prompt-box {
                font-size: 11px;
                padding: 10px;
            }

            /* Buttons */
            .btn-add-property,
            .btn-add-booking,
            .btn-refresh-bookings,
            .btn-parse-email,
            .btn-save,
            .btn-cancel,
            .btn-delete,
            .btn-primary,
            .btn-secondary,
            .btn-danger {
                padding: 10px 16px;
                font-size: 13px;
            }

            /* Email Parser */
            .email-input-section textarea {
                min-height: 200px;
                font-size: 12px;
            }

            .email-preview-section {
                padding: 15px;
            }

            .parsed-field {
                flex-direction: column;
                gap: 4px;
            }

            /* Calendar specific */
            .gcal-year-month {
                padding: 10px;
            }

            .gcal-year-month .month-title {
                font-size: 12px;
            }

            .gcal-year-month .mini-day {
                font-size: 10px;
                width: 18px;
                height: 18px;
                line-height: 18px;
            }
        }

        /* Extra small devices (400px and below) */
        @media (max-width: 400px) {
            .nav-logo span {
                display: none;
            }

            .tab-btn {
                min-width: 80px;
                padding: 6px 10px;
            }

            .subtab-btn {
                padding: 6px 10px;
                font-size: 11px;
            }

            h2 {
                font-size: 18px;
            }

            h3 {
                font-size: 16px;
            }
        }

        /* ========================================
           PHASE 36: MOBILE UI IMPROVEMENTS
           ======================================== */

        /* Scroll Indicator Arrow */
        .scroll-indicator {
            position: relative;
        }

        .scroll-indicator::after {
            content: '›';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            font-size: 24px;
            font-weight: bold;
            color: rgba(255, 255, 255, 0.8);
            background: linear-gradient(to left, rgba(26, 26, 36, 0.95) 60%, transparent);
            padding: 10px 8px 10px 25px;
            pointer-events: none;
            z-index: 10;
            animation: pulse-arrow 1.5s ease-in-out infinite;
            border-radius: 0 8px 8px 0;
        }

        .scroll-indicator.scrolled-end::after {
            display: none;
        }

        @keyframes pulse-arrow {
            0%, 100% { opacity: 1; transform: translateY(-50%) translateX(0); }
            50% { opacity: 0.6; transform: translateY(-50%) translateX(3px); }
        }

        /* Mobile Tabs - Horizontal Scroll */
        @media (max-width: 768px) {
            .dashboard-tabs {
                flex-wrap: nowrap !important;
                overflow-x: auto;
                overflow-y: hidden;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none; /* Firefox */
                padding-bottom: 5px;
                margin-bottom: 15px;
                gap: 8px;
                position: relative;
            }

            .dashboard-tabs::after {
                content: '›';
                position: sticky;
                right: 0;
                flex-shrink: 0;
                font-size: 20px;
                font-weight: bold;
                color: rgba(255, 255, 255, 0.9);
                background: linear-gradient(to left, rgba(26, 26, 36, 1) 50%, transparent);
                padding: 12px 10px 12px 20px;
                display: flex;
                align-items: center;
                animation: pulse-arrow 1.5s ease-in-out infinite;
                transition: opacity 0.3s ease;
            }

            .dashboard-tabs.scrolled-end::after {
                opacity: 0;
                pointer-events: none;
            }

            .dashboard-tabs::-webkit-scrollbar {
                display: none; /* Chrome, Safari */
            }

            .tab-btn {
                flex-shrink: 0 !important;
                min-width: auto !important;
                padding: 10px 14px;
                font-size: 12px;
                white-space: nowrap;
            }

            .tab-btn i {
                margin-right: 5px;
            }

            /* Hide text on very small screens, show only icons */
            @media (max-width: 480px) {
                .tab-btn {
                    padding: 12px 16px;
                    font-size: 16px;
                }

                .tab-btn i {
                    margin-right: 0;
                }

                /* Hide text, show only icon */
                .tab-btn {
                    font-size: 0;
                }

                .tab-btn i {
                    font-size: 18px;
                }
            }

            /* ======== LIVE CALLS TAB - Mobile ======== */

            /* Dashboard Header */
            .voice-dashboard-header {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 10px !important;
                padding: 15px !important;
            }

            .voice-dashboard-header h2 {
                font-size: 18px !important;
            }

            .voice-stats {
                display: flex !important;
                gap: 10px !important;
                width: 100% !important;
            }

            .voice-stats .stat-item {
                flex: 1 !important;
                padding: 8px !important;
                font-size: 12px !important;
            }

            /* Callbacks Section */
            .voice-pending-callbacks {
                padding: 12px !important;
                margin: 10px !important;
            }

            .voice-pending-callbacks h3 {
                font-size: 16px !important;
            }

            .callback-item {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 8px !important;
                padding: 12px !important;
            }

            .callback-info {
                width: 100% !important;
            }

            .callback-phone {
                font-size: 14px !important;
                word-break: break-all !important;
                overflow-wrap: break-word !important;
            }

            .callback-actions {
                width: 100% !important;
                display: flex !important;
                gap: 8px !important;
            }

            .callback-actions button {
                flex: 1 !important;
                padding: 10px !important;
                font-size: 13px !important;
            }

            /* Call History */
            .voice-call-history {
                padding: 12px !important;
                margin: 10px !important;
            }

            .history-item {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 8px !important;
                padding: 12px !important;
            }

            .history-phone {
                font-size: 14px !important;
                word-break: break-all !important;
            }

            .history-meta {
                display: flex !important;
                flex-wrap: wrap !important;
                gap: 8px !important;
                width: 100% !important;
            }

            /* Active Calls Grid */
            .voice-calls-grid {
                grid-template-columns: 1fr !important;
                gap: 10px !important;
                padding: 10px !important;
            }

            .voice-call-card {
                padding: 12px !important;
            }

            .call-phone {
                font-size: 14px !important;
                word-break: break-all !important;
            }

            /* No calls message */
            .no-calls-message {
                padding: 30px 15px !important;
            }

            .no-calls-message i {
                font-size: 40px !important;
            }

            .no-calls-message p {
                font-size: 14px !important;
            }

            /* Main content padding */
            .main-content {
                padding: 10px !important;
            }

            .tab-content {
                padding: 0 !important;
            }
        }

        /* Extra small screens (< 400px) */
        @media (max-width: 400px) {
            .voice-dashboard-header h2 {
                font-size: 16px !important;
            }

            .callback-phone,
            .history-phone,
            .call-phone {
                font-size: 12px !important;
            }

            .callback-code,
            .history-code {
                font-size: 12px !important;
            }
        }

        /* ======== BOOKINGS TAB - Mobile ======== */
        @media (max-width: 768px) {
            /* Bookings Header */
            .bookings-header {
                flex-direction: column !important;
                gap: 15px !important;
                margin-bottom: 15px !important;
            }

            .bookings-header h2 {
                font-size: 20px !important;
                margin: 0 !important;
            }

            .bookings-actions {
                display: flex !important;
                flex-direction: column !important;
                gap: 10px !important;
                width: 100% !important;
            }

            .bookings-actions button {
                width: 100% !important;
                padding: 12px !important;
                font-size: 14px !important;
            }

            /* Bookings Filters */
            .bookings-filters {
                display: flex !important;
                flex-direction: column !important;
                gap: 10px !important;
            }

            .bookings-filters select,
            .bookings-filters input[type="date"] {
                width: 100% !important;
                padding: 12px 15px !important;
                font-size: 14px !important;
                border-radius: 8px !important;
            }

            /* Bookings Stats */
            .bookings-stats {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 10px !important;
            }

            .stat-box {
                padding: 12px !important;
            }

            .stat-box .stat-number {
                font-size: 20px !important;
            }

            .stat-box .stat-label {
                font-size: 11px !important;
            }

            /* Booking Cards */
            .booking-card {
                padding: 12px !important;
            }

            .booking-card-header {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 8px !important;
            }

            .booking-guest-name {
                font-size: 16px !important;
            }

            .booking-dates {
                font-size: 13px !important;
            }

            .booking-card-actions {
                flex-direction: column !important;
                gap: 8px !important;
                width: 100% !important;
                margin-top: 10px !important;
            }

            .booking-card-actions button {
                width: 100% !important;
                padding: 10px !important;
            }

            /* Sub-tabs (Καταλύματα, Κρατήσεις, etc.) */
            .airbnb-subtabs {
                display: flex !important;
                flex-wrap: nowrap !important;
                overflow-x: auto !important;
                -webkit-overflow-scrolling: touch !important;
                scrollbar-width: none !important;
                gap: 8px !important;
                padding-bottom: 5px !important;
                position: relative !important;
            }

            .airbnb-subtabs::after {
                content: '›' !important;
                position: sticky !important;
                right: 0 !important;
                flex-shrink: 0 !important;
                font-size: 18px !important;
                font-weight: bold !important;
                color: rgba(52, 152, 219, 0.9) !important;
                background: linear-gradient(to left, rgba(26, 26, 36, 1) 50%, transparent) !important;
                padding: 10px 8px 10px 18px !important;
                display: flex !important;
                align-items: center !important;
                animation: pulse-arrow 1.5s ease-in-out infinite !important;
                transition: opacity 0.3s ease !important;
            }

            .airbnb-subtabs.scrolled-end::after {
                opacity: 0 !important;
                pointer-events: none !important;
            }

            .airbnb-subtabs::-webkit-scrollbar {
                display: none !important;
            }

            .subtab-btn {
                flex-shrink: 0 !important;
                padding: 10px 14px !important;
                font-size: 12px !important;
                white-space: nowrap !important;
            }
        }

        @media (max-width: 480px) {
            .bookings-stats {
                grid-template-columns: 1fr 1fr !important;
            }

            .stat-box i {
                font-size: 18px !important;
            }

            .booking-guest-name {
                font-size: 14px !important;
            }
        }

        /* =====================================================
           PHASE 36: SMS SETTINGS MOBILE
           ===================================================== */
        @media (max-width: 768px) {
            #subtab-sms-settings .sms-settings-container {
                padding: 10px !important;
                margin: 10px !important;
            }

            #subtab-sms-settings .sms-template-section,
            #subtab-sms-settings .sms-preview-section {
                padding: 15px !important;
            }

            /* Placeholders - make them smaller and more compact */
            #subtab-sms-settings .placeholders-info {
                padding: 12px !important;
            }

            #subtab-sms-settings .placeholders-info > div {
                gap: 6px !important;
            }

            #subtab-sms-settings .placeholders-info code {
                font-size: 11px !important;
                padding: 6px 10px !important;
            }

            /* Template textarea */
            #subtab-sms-settings textarea,
            #sms-template-text {
                font-size: 14px !important;
                padding: 12px !important;
            }

            /* Buttons - stack vertically on mobile */
            #subtab-sms-settings .sms-template-section > div:last-child {
                flex-direction: column !important;
                gap: 10px !important;
            }

            #subtab-sms-settings .sms-template-section > div:last-child button {
                width: 100% !important;
                margin-left: 0 !important;
                padding: 14px 20px !important;
            }

            /* Preview - full width */
            #subtab-sms-settings #sms-preview {
                max-width: 100% !important;
            }

            #subtab-sms-settings h2 {
                font-size: 18px !important;
            }

            #subtab-sms-settings h3 {
                font-size: 16px !important;
            }
        }

        @media (max-width: 400px) {
            #subtab-sms-settings .placeholders-info code {
                font-size: 10px !important;
                padding: 5px 8px !important;
            }
        }

        /* =====================================================
           CALL HISTORY & RECORDINGS MOBILE (Card Layout)
           ===================================================== */
        @media (max-width: 768px) {
            #call-history .history-filters {
                flex-direction: column !important;
                gap: 10px !important;
                padding: 10px !important;
            }

            #call-history .history-filters select,
            #call-history .history-filters input {
                width: 100% !important;
                padding: 12px !important;
                font-size: 14px !important;
            }

            .call-card-body {
                grid-template-columns: 1fr !important;
            }

            .call-detail-panel {
                max-width: 100% !important;
                max-height: 95vh !important;
                border-radius: 12px !important;
            }

            .detail-header-meta {
                gap: 6px !important;
            }

            .detail-meta-chip {
                font-size: 11px !important;
                padding: 4px 8px !important;
            }

            .detail-header-name {
                font-size: 17px !important;
            }

            .detail-tab-btn {
                font-size: 12px !important;
                padding: 10px 8px !important;
            }

            .recording-card {
                flex-direction: column !important;
                align-items: flex-start !important;
            }
        }

        @media (max-width: 768px) {
            #recordings .stats-row {
                grid-template-columns: 1fr 1fr !important;
                gap: 10px !important;
                padding: 10px !important;
            }

            #recordings .recordings-filters {
                flex-direction: column !important;
                gap: 10px !important;
            }

            #recordings .recordings-filters select,
            #recordings .recordings-filters input,
            #recordings .recordings-filters button {
                width: 100% !important;
                padding: 12px !important;
            }
        }

        @media (max-width: 480px) {
            #recordings .stats-row {
                grid-template-columns: 1fr !important;
            }
        }

        /* =====================================================
           PHASE 36: TEAM CHAT MOBILE
           ===================================================== */
        @media (max-width: 768px) {
            #team-chat .team-chat-container {
                padding: 10px !important;
            }

            #team-chat .team-chat-header {
                flex-direction: column !important;
                gap: 15px !important;
                padding: 10px !important;
            }

            #team-chat .team-chat-header h2 {
                font-size: 18px !important;
            }

            #team-chat .chat-messages {
                height: calc(100vh - 280px) !important;
                padding: 10px !important;
            }

            #team-chat .chat-message {
                max-width: 90% !important;
            }

            #team-chat .chat-input-container {
                padding: 10px !important;
            }

            #team-chat #chat-message-input {
                padding: 12px !important;
                font-size: 14px !important;
            }
        }

        /* =====================================================
           PHASE 36: LIVE SUPPORT MOBILE
           ===================================================== */
        @media (max-width: 768px) {
            #live-support .support-header {
                flex-direction: column !important;
                gap: 10px !important;
                text-align: center !important;
                padding: 12px !important;
            }

            #live-support .support-header h2 {
                font-size: 16px !important;
            }

            #live-support .support-stats {
                justify-content: center !important;
            }

            #live-support .support-filters {
                flex-direction: column !important;
                padding: 12px !important;
            }

            #live-support .support-filters > div {
                width: 100% !important;
                min-width: unset !important;
            }

            #live-support .support-filter-buttons {
                flex-direction: row !important;
                gap: 8px !important;
            }

            #live-support .support-filter-buttons button {
                flex: 1 !important;
                padding: 10px 8px !important;
                font-size: 12px !important;
            }

            /* Chat list and conversation on mobile */
            #live-support .support-layout {
                flex-direction: column !important;
            }

            #live-support .chat-list {
                max-height: 40vh !important;
                overflow-y: auto !important;
            }

            #live-support .chat-conversation {
                height: 50vh !important;
            }

            #live-support .chat-item {
                padding: 12px !important;
            }

            #live-support .chat-item-info h4,
            #live-support .chat-item-info div:first-child {
                font-size: 14px !important;
            }

            #live-support .chat-item-actions button {
                padding: 6px 10px !important;
                font-size: 11px !important;
            }

            /* Fix avatar size - don't stretch */
            #live-support .chat-item-avatar,
            .support-chat-item .chat-item-avatar {
                width: 45px !important;
                min-width: 45px !important;
                max-width: 45px !important;
                height: 45px !important;
                min-height: 45px !important;
                max-height: 45px !important;
                flex-shrink: 0 !important;
                border-radius: 50% !important;
            }

            /* Fix text overflow in chat items */
            .support-chat-item .chat-item-details {
                max-width: calc(100vw - 200px) !important;
                overflow: hidden !important;
            }

            .support-chat-item .chat-item-details h4 {
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
                max-width: 100% !important;
            }

            .support-chat-item .chat-item-details p {
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
                max-width: 100% !important;
            }

            .support-chat-item .chat-item-preview {
                max-width: 100% !important;
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
                display: block !important;
            }

            /* Support Chat Modal Mobile */
            .support-modal-content {
                width: 100% !important;
                max-width: 100% !important;
                height: 100% !important;
                max-height: 100% !important;
                border-radius: 0 !important;
                margin: 0 !important;
            }

            .support-modal-header {
                flex-direction: column !important;
                gap: 10px !important;
                padding: 10px !important;
            }

            .support-modal-header .customer-info {
                width: 100% !important;
            }

            .support-modal-header .modal-actions {
                width: 100% !important;
                justify-content: space-between !important;
                flex-wrap: wrap !important;
                gap: 8px !important;
            }

            .support-modal-header .btn-close-chat {
                flex: 1 !important;
                padding: 10px 12px !important;
                font-size: 12px !important;
                white-space: nowrap !important;
            }

            .support-modal-header .btn-close-modal {
                padding: 10px 15px !important;
            }
        }

        /* =====================================================
           PHASE 36: SETTINGS TAB MOBILE
           ===================================================== */
        @media (max-width: 768px) {
            #settings .settings-container {
                padding: 10px !important;
            }

            #settings .settings-section {
                padding: 15px !important;
                margin-bottom: 15px !important;
            }

            #settings .settings-section h3 {
                font-size: 16px !important;
            }

            #settings .form-group {
                margin-bottom: 12px !important;
            }

            #settings .form-group input,
            #settings .form-group select,
            #settings .form-group textarea {
                padding: 12px !important;
                font-size: 14px !important;
            }

            #settings .settings-buttons {
                flex-direction: column !important;
                gap: 10px !important;
            }

            #settings .settings-buttons button {
                width: 100% !important;
            }
        }

        /* =====================================================
           PHASE 36: CALENDAR TAB MOBILE
           ===================================================== */
        @media (max-width: 768px) {
            #calendars {
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch !important;
                height: auto !important;
                max-height: none !important;
            }

            #calendars .gcal-container {
                flex-direction: column !important;
                display: flex !important;
                height: auto !important;
                overflow: visible !important;
                min-height: auto !important;
            }

            #calendars .gcal-sidebar {
                width: 100% !important;
                max-width: 100% !important;
                border-right: none !important;
                border-bottom: 1px solid rgba(0,0,0,0.1) !important;
                padding: 10px !important;
                display: block !important;
                order: -1 !important;
                flex-shrink: 0 !important;
            }

            #calendars .gcal-create-btn {
                display: none !important;
            }

            #calendars .gcal-mini-calendar {
                margin: 0 auto 10px auto !important;
                max-width: 300px !important;
            }

            #calendars .gcal-today-section {
                display: none !important;
            }

            #calendars .gcal-main {
                width: 100% !important;
                min-height: auto !important;
                display: block !important;
                flex: 1 !important;
                overflow: visible !important;
            }

            #calendars .gcal-selector-bar {
                flex-wrap: wrap !important;
                gap: 10px !important;
                padding: 10px !important;
            }

            #calendars .gcal-selector-bar select {
                width: 100% !important;
                max-width: 100% !important;
            }

            #calendars .gcal-week-header {
                flex-direction: column !important;
                gap: 10px !important;
                padding: 10px !important;
            }

            #calendars .gcal-nav {
                width: 100% !important;
                justify-content: center !important;
                flex-wrap: wrap !important;
                gap: 8px !important;
            }

            #calendars .gcal-nav h2 {
                font-size: 16px !important;
                width: 100% !important;
                text-align: center !important;
                order: -1 !important;
            }

            #calendars .gcal-view-toggle {
                width: 100% !important;
                justify-content: center !important;
            }

            #calendars .gcal-view-toggle .view-btn {
                padding: 8px 12px !important;
                font-size: 12px !important;
            }

            /* Week view - scroll both directions */
            #calendars .gcal-week-view {
                overflow: scroll !important;
                -webkit-overflow-scrolling: touch !important;
                max-height: 50vh !important;
                touch-action: manipulation !important;
            }

            /* Allow body scroll on calendar tab */
            body.calendar-active {
                overflow: auto !important;
            }

            #calendars .gcal-day-headers {
                min-width: 700px !important;
                display: flex !important;
                position: sticky !important;
                top: 0 !important;
                z-index: 10 !important;
                background: #fff !important;
            }

            #calendars .gcal-time-grid {
                min-width: 700px !important;
                max-height: none !important;
            }

            #calendars .gcal-day-header {
                min-width: 90px !important;
                flex: 1 !important;
            }

            #calendars .gcal-day-column {
                min-width: 90px !important;
            }

            /* Month view */
            #calendars .gcal-month-grid {
                font-size: 12px !important;
            }

            #calendars .gcal-month-grid .month-day {
                min-height: 60px !important;
                padding: 2px !important;
            }
        }

        @media (max-width: 480px) {
            #calendars .gcal-sidebar {
                display: block !important;
            }

            #calendars .gcal-mini-calendar {
                max-width: 260px !important;
                transform: scale(0.9) !important;
                transform-origin: top center !important;
            }

            #calendars .gcal-view-toggle .view-btn {
                padding: 6px 8px !important;
                font-size: 11px !important;
            }

            #calendars .gcal-nav h2 {
                font-size: 14px !important;
            }
        }

        /* =====================================================
           PHASE 36: FINANCIALS TAB MOBILE
           ===================================================== */
        @media (max-width: 768px) {
            #financials .financials-container {
                padding: 10px !important;
            }

            #financials .financials-stats {
                grid-template-columns: 1fr !important;
                gap: 10px !important;
            }

            #financials .financials-filters {
                flex-direction: column !important;
                gap: 10px !important;
            }

            #financials .financials-filters select,
            #financials .financials-filters input,
            #financials .financials-filters button {
                width: 100% !important;
                padding: 12px !important;
            }

            /* Financials table to cards */
            #financials .financials-table thead {
                display: none !important;
            }

            #financials .financials-table tbody tr {
                display: block !important;
                background: var(--dark-card-bg) !important;
                border-radius: 12px !important;
                padding: 15px !important;
                margin-bottom: 12px !important;
                border: 1px solid var(--dark-glass-border) !important;
            }

            #financials .financials-table tbody td {
                display: flex !important;
                justify-content: space-between !important;
                padding: 8px 0 !important;
                border: none !important;
                border-bottom: 1px solid rgba(255,255,255,0.05) !important;
            }

            #financials .financials-table tbody td:last-child {
                border-bottom: none !important;
            }
        }

        /* =====================================================
           DARK GLASSMORPHISM THEME - SPITI 365
           ===================================================== */

        :root {
            --dark-bg-primary: #0a0a0f;
            --dark-bg-secondary: #12121a;
            --dark-bg-tertiary: #1a1a25;
            --dark-card-bg: rgba(255, 255, 255, 0.03);
            --dark-card-hover: rgba(255, 255, 255, 0.06);
            --dark-glass-bg: rgba(255, 255, 255, 0.05);
            --dark-glass-border: rgba(255, 255, 255, 0.1);
            --dark-text-primary: #ffffff;
            --dark-text-secondary: #ffffff;
            --dark-text-muted: rgba(255, 255, 255, 0.85);
            --dark-border-color: rgba(255, 255, 255, 0.08);
            --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --accent-glow: rgba(102, 126, 234, 0.3);
            --success-color: #10b981;
            --danger-color: #ef4444;
            --warning-color: #f59e0b;
            --airbnb-color: #ff5a5f;
        }

        /* Animated Background */
        body {
            background: var(--dark-bg-primary) !important;
            background-image:
                radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(240, 147, 251, 0.05) 0%, transparent 60%) !important;
            color: var(--dark-text-primary) !important;
            min-height: 100vh;
        }

        /* Navigation Bar - Glassmorphism */
        .nav-bar {
            background: rgba(18, 18, 26, 0.8) !important;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--dark-glass-border);
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
        }

        .nav-logo {
            color: var(--dark-text-primary) !important;
        }

        /* Main Content Area */
        .main-content {
            background: transparent !important;
        }

        /* Tabs - Glassmorphism */
        .tab-btn {
            background: var(--dark-glass-bg) !important;
            color: var(--dark-text-secondary) !important;
            border: 1px solid var(--dark-glass-border) !important;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease !important;
        }

        .tab-btn:hover {
            background: rgba(255, 255, 255, 0.1) !important;
            color: var(--dark-text-primary) !important;
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        }

        .tab-btn.active {
            background: var(--accent-gradient) !important;
            color: white !important;
            border: none !important;
            box-shadow: 0 5px 25px var(--accent-glow);
        }

        /* Airbnb Subtabs */
        .airbnb-subtabs {
            border-bottom-color: var(--dark-border-color) !important;
        }

        .subtab-btn {
            background: var(--dark-glass-bg) !important;
            color: var(--dark-text-secondary) !important;
            border: 1px solid var(--dark-glass-border) !important;
        }

        .subtab-btn:hover {
            background: rgba(255, 255, 255, 0.1) !important;
            color: var(--dark-text-primary) !important;
        }

        .subtab-btn.active {
            background: linear-gradient(135deg, #ff5a5f 0%, #ff8f6b 100%) !important;
            color: white !important;
            border: none !important;
            box-shadow: 0 5px 20px rgba(255, 90, 95, 0.3);
        }

        /* ===== SCRAPER UI STYLES ===== */
        .re-subtabs { display: flex; gap: 5px; }
        .re-subtab {
            background: transparent; border: none; color: rgba(255,255,255,0.5);
            padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 13px;
            font-weight: 600; transition: all 0.3s; display: flex; align-items: center; gap: 8px;
        }
        .re-subtab:hover { background: rgba(255,255,255,0.05); color: #fff; }
        .re-subtab.active { background: rgba(155,89,182,0.2); color: #9b59b6; border: 1px solid rgba(155,89,182,0.3); }
        .re-subtab-content { display: none; }
        .re-subtab-content.active { display: block; }

        .re-stat-card {
            background: var(--dark-glass-bg); border: 1px solid var(--dark-glass-border);
            border-radius: 12px; padding: 15px; text-align: center;
            backdrop-filter: blur(10px);
        }
        .re-stat-value { font-size: 28px; font-weight: 700; color: #fff !important; }
        .re-stat-label { font-size: 11px; color: #fff !important; text-transform: uppercase; margin-top: 4px; letter-spacing: 0.5px; }

        .re-properties-grid {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 16px;
        }

        .re-prop-card {
            background: var(--dark-glass-bg); border: 1px solid var(--dark-glass-border);
            border-radius: 14px; overflow: hidden; cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(20px);
        }
        .re-prop-card:hover {
            transform: translateY(-4px); border-color: rgba(155,89,182,0.4);
            box-shadow: 0 12px 40px rgba(0,0,0,0.4);
        }
        .re-prop-card-img {
            width: 100%; height: 180px; object-fit: cover;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .re-prop-card-body { padding: 16px; }
        .re-prop-card-title {
            color: #fff !important; font-size: 14px; font-weight: 600; margin: 0 0 8px 0;
            line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
            -webkit-box-orient: vertical; overflow: hidden;
        }
        .re-prop-card-location {
            color: #fff !important; font-size: 12px; margin-bottom: 10px;
            display: flex; align-items: center; gap: 5px;
        }
        .re-prop-card-meta {
            display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
        }
        .re-prop-meta-item {
            color: #fff !important; font-size: 12px;
            display: flex; align-items: center; gap: 4px;
        }
        .re-prop-card-footer {
            display: flex; justify-content: space-between; align-items: center;
            padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06);
        }
        .re-prop-price { font-size: 20px; font-weight: 700; color: #27ae60 !important; }
        .re-prop-old-price { font-size: 12px; color: #e74c3c; text-decoration: line-through; margin-left: 8px; }
        .re-prop-badge {
            padding: 4px 10px; border-radius: 20px; font-size: 10px;
            font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
        }
        .re-prop-badge.sale { background: rgba(39,174,96,0.2); color: #27ae60 !important; border: 1px solid rgba(39,174,96,0.3); }
        .re-prop-badge.rent { background: rgba(52,152,219,0.2); color: #3498db !important; border: 1px solid rgba(52,152,219,0.3); }
        .re-prop-code { color: #fff !important; font-size: 11px; font-weight: 600; }

        .cl-type-btn {
            background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.9); padding: 6px 14px; border-radius: 20px;
            cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.3s;
        }
        .cl-type-btn:hover { background: rgba(255,255,255,0.1); }
        .cl-type-btn.active { background: rgba(155,89,182,0.2); color: #9b59b6; border-color: rgba(155,89,182,0.4); }

        .cl-entry {
            background: var(--dark-glass-bg); border: 1px solid var(--dark-glass-border);
            border-radius: 12px; padding: 15px 20px; display: flex; gap: 15px; align-items: center;
        }
        .cl-entry-icon {
            width: 40px; height: 40px; border-radius: 10px; display: flex;
            align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
        }
        .cl-entry-icon.NEW { background: rgba(39,174,96,0.15); color: #27ae60; }
        .cl-entry-icon.REMOVED { background: rgba(231,76,60,0.15); color: #e74c3c; }
        .cl-entry-icon.PRICE_CHANGE { background: rgba(243,156,18,0.15); color: #f39c12; }
        .cl-entry-icon.INFO_CHANGE { background: rgba(52,152,219,0.15); color: #3498db; }

        .re-page-btn {
            background: var(--dark-glass-bg); border: 1px solid var(--dark-glass-border);
            color: #fff; padding: 8px 14px; border-radius: 8px; cursor: pointer;
            font-size: 13px; transition: all 0.3s;
        }
        .re-page-btn:hover { background: rgba(255,255,255,0.1); }
        .re-page-btn.active { background: rgba(155,89,182,0.3); border-color: rgba(155,89,182,0.5); }
        .re-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
        .btn-scrape:disabled { opacity: 0.5; cursor: not-allowed; }

        @media (max-width: 768px) {
            .re-properties-grid { grid-template-columns: 1fr; }
            .re-filters { flex-direction: column; }
            .re-filters input, .re-filters select { width: 100% !important; min-width: unset !important; }
        }
        
        /* Force white text in scraper property section */
        #re-property-modal,
        #re-property-modal div,
        #re-property-modal span,
        #re-property-modal p,
        #re-property-modal h3,
        #re-property-modal h4,
        #re-property-modal label {
            color: #fff !important;
        }
        #re-property-modal .re-prop-badge.sale {
            color: #27ae60 !important;
        }
        #re-property-modal .re-prop-badge.rent {
            color: #3498db !important;
        }
        #re-property-modal a[href*="spiti365"] {
            color: #9b59b6 !important;
        }
        #re-property-modal a[href*="youtube"],
        #re-property-modal a[href*="video"] {
            color: #e74c3c !important;
        }
        #re-property-modal .re-prop-price,
        .re-prop-price {
            color: #27ae60 !important;
        }
        .re-prop-card-body,
        .re-prop-card-body div,
        .re-prop-card-body span {
            color: #fff !important;
        }
        .re-prop-card-body .re-prop-badge.sale {
            color: #27ae60 !important;
        }
        .re-prop-card-body .re-prop-badge.rent {
            color: #3498db !important;
        }
        .re-prop-card-body .re-prop-price {
            color: #27ae60 !important;
        }
        .re-prop-card-body .re-prop-old-price {
            color: #e74c3c !important;
        }
        .re-stat-card,
        .re-stat-card div {
            color: #fff !important;
        }
        /* Changelog entries - force white */
        .cl-entry,
        .cl-entry div,
        .cl-entry span {
            color: #fff !important;
        }
        .cl-entry-icon.NEW { color: #27ae60 !important; }
        .cl-entry-icon.REMOVED { color: #e74c3c !important; }
        .cl-entry-icon.PRICE_CHANGE { color: #f39c12 !important; }
        .cl-entry-icon.INFO_CHANGE { color: #3498db !important; }
        #re-changelog-list > div {
            color: #fff !important;
        }

        /* ===== END SCRAPER UI STYLES ===== */


        /* Property Cards - Glassmorphism */
        .property-card {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }

        .property-card:hover {
            background: var(--dark-card-hover) !important;
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
            border-color: rgba(102, 126, 234, 0.3) !important;
        }

        .property-name {
            color: var(--dark-text-primary) !important;
        }

        .property-location {
            color: #ffffff !important;
        }

        .property-code {
            background: linear-gradient(135deg, #ff5a5f 0%, #ff8f6b 100%) !important;
            box-shadow: 0 3px 15px rgba(255, 90, 95, 0.3);
        }

        .property-status.active {
            background: rgba(16, 185, 129, 0.2) !important;
            color: #10b981 !important;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .property-status.inactive {
            background: rgba(239, 68, 68, 0.2) !important;
            color: #ef4444 !important;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        /* Feature Badges */
        .feature-badge {
            background: #ffffff !important;
            color: #333 !important;
            border: 1px solid #ddd;
        }

        .feature-badge.yes {
            background: rgba(16, 185, 129, 0.15) !important;
            color: #10b981 !important;
            border-color: rgba(16, 185, 129, 0.3);
        }

        .feature-badge.no {
            background: rgba(239, 68, 68, 0.15) !important;
            color: #ef4444 !important;
            border-color: rgba(239, 68, 68, 0.3);
        }

        /* Property card text - all white */
        .property-card h4,
        .property-card p,
        .property-card span {
            color: #ffffff !important;
        }
        .property-card .property-code {
            color: #ffffff !important;
        }

        /* Buttons */
        .btn-add-property {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
            box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3);
            transition: all 0.3s ease !important;
        }

        .btn-add-property:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
        }

        .btn-edit {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
            transition: all 0.3s ease !important;
        }

        .btn-edit:hover {
            transform: translateY(-1px);
            box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
        }

        .btn-delete {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
            transition: all 0.3s ease !important;
        }

        .btn-delete:hover {
            transform: translateY(-1px);
            box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
        }

        /* Tables */
        .bookings-table {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
        }

        .bookings-table th {
            background: rgba(0, 0, 0, 0.3) !important;
            color: var(--dark-text-secondary) !important;
            border-bottom-color: var(--dark-border-color) !important;
        }

        .bookings-table td {
            color: var(--dark-text-primary) !important;
            border-bottom-color: var(--dark-border-color) !important;
        }

        .bookings-table tr:hover {
            background: rgba(255, 255, 255, 0.05) !important;
        }

        /* Stat Boxes */
        .stat-box {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
        }

        .stat-box .stat-number {
            color: var(--dark-text-primary) !important;
        }

        .stat-box .stat-label {
            color: var(--dark-text-muted) !important;
        }

        /* Modals - Glassmorphism */
        .modal-overlay,
        .modal {
            background: rgba(0, 0, 0, 0.7) !important;
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background: var(--dark-bg-secondary) !important;
            border: 1px solid var(--dark-glass-border) !important;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
        }

        .modal-header {
            background: rgba(0, 0, 0, 0.3) !important;
            border-bottom-color: var(--dark-border-color) !important;
            color: var(--dark-text-primary) !important;
        }

        .modal-header h3 {
            color: var(--dark-text-primary) !important;
        }

        .modal-body {
            color: var(--dark-text-primary) !important;
        }

        .modal-footer {
            border-top-color: var(--dark-border-color) !important;
        }

        /* Form Elements */
        .form-group label {
            color: var(--dark-text-secondary) !important;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            background: #ffffff !important;
            border: 1px solid #ddd !important;
            color: #1a1a1a !important;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: #667eea !important;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2) !important;
            outline: none;
        }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: #999999 !important;
        }

        /* Property Modal Form - Force Light Theme */
        #property-modal .form-group input,
        #property-modal .form-group select,
        #property-modal .form-group textarea,
        #property-modal input,
        #property-modal select,
        #property-modal textarea {
            background: #ffffff !important;
            color: #1a1a1a !important;
            border: 1px solid #ccc !important;
        }

        #property-modal .form-group input::placeholder,
        #property-modal input::placeholder {
            color: #888 !important;
        }

        /* Booking & Event Modal Forms - Force Light Theme */
        #booking-modal .form-group input,
        #booking-modal .form-group select,
        #booking-modal .form-group textarea,
        #event-modal .form-group input,
        #event-modal .form-group select,
        #event-modal .form-group textarea,
        .modal-overlay .form-group input,
        .modal-overlay .form-group select,
        .modal-overlay .form-group textarea {
            background: #ffffff !important;
            color: #1a1a1a !important;
            border: 1px solid #ccc !important;
        }

        #booking-modal .form-group input::placeholder,
        #event-modal .form-group input::placeholder,
        .modal-overlay .form-group input::placeholder {
            color: #888 !important;
        }

        /* Settings Sections */
        .settings-section {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
        }

        .settings-section h3 {
            color: var(--dark-text-primary) !important;
        }

        .settings-sidebar {
            background: var(--dark-bg-secondary) !important;
            border-right-color: var(--dark-border-color) !important;
        }

        .settings-sidebar-header {
            background: rgba(0, 0, 0, 0.3) !important;
            border-bottom-color: var(--dark-border-color) !important;
        }

        .settings-sidebar-header h3 {
            color: var(--dark-text-primary) !important;
        }

        .settings-tab {
            color: var(--dark-text-secondary) !important;
        }

        .settings-tab:hover {
            background: rgba(102, 126, 234, 0.1) !important;
            color: #667eea !important;
        }

        .settings-tab.active {
            background: #3498db !important;
            color: white !important;
            border-radius: 8px !important;
        }

        .settings-content {
            background: var(--dark-bg-primary) !important;
        }

        /* Pillar Cards */
        .pillar-card {
            background: var(--dark-glass-bg) !important;
            border: 1px solid var(--dark-glass-border) !important;
        }

        .pillar-card h4 {
            color: var(--dark-text-primary) !important;
        }

        .pillar-card p {
            color: var(--dark-text-secondary) !important;
        }

        /* Audio Templates */
        .audio-template-item {
            background: var(--dark-glass-bg) !important;
            border-color: var(--dark-border-color) !important;
        }

        .audio-template-item:hover {
            background: rgba(255, 255, 255, 0.08) !important;
        }

        .template-text {
            color: var(--dark-text-primary) !important;
        }

        .template-expected {
            color: var(--dark-text-muted) !important;
        }

        /* Chat Panel */
        .chat-panel {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
        }

        .chat-messages {
            background: #ffffff !important;
        }

        .chat-message-bubble {
            background: var(--dark-glass-bg) !important;
            color: var(--dark-text-primary) !important;
        }

        .chat-message.user .chat-message-bubble {
            background: var(--accent-gradient) !important;
        }

        /* Email Parser */
        .email-input-section textarea {
            background: #ffffff !important;
            border-color: var(--dark-border-color) !important;
            color: var(--dark-text-primary) !important;
        }

        .email-input-section textarea:focus {
            border-color: #ff5a5f !important;
        }

        .email-preview-section {
            background: var(--dark-glass-bg) !important;
        }

        .email-preview-section h3 {
            color: #10b981 !important;
        }

        .parsed-booking-details {
            background: #ffffff !important;
        }

        .parsed-field {
            border-bottom-color: var(--dark-border-color) !important;
        }

        .parsed-field label {
            color: var(--dark-text-muted) !important;
        }

        .parsed-field span {
            color: var(--dark-text-primary) !important;
        }

        /* Booking Status Badges - Dark Theme */
        .booking-status.confirmed {
            background: rgba(16, 185, 129, 0.2) !important;
            color: #10b981 !important;
        }

        .booking-status.pending {
            background: rgba(245, 158, 11, 0.2) !important;
            color: #f59e0b !important;
        }

        .booking-status.cancelled {
            background: rgba(239, 68, 68, 0.2) !important;
            color: #ef4444 !important;
        }

        .booking-status.completed {
            background: rgba(156, 163, 175, 0.2) !important;
            color: #9ca3af !important;
        }

        /* Status Badges */
        .status-badge.completed {
            background: rgba(16, 185, 129, 0.2) !important;
            color: #10b981 !important;
        }

        .status-badge.failed {
            background: rgba(239, 68, 68, 0.2) !important;
            color: #ef4444 !important;
        }

        .status-badge.no_answer {
            background: rgba(245, 158, 11, 0.2) !important;
            color: #f59e0b !important;
        }

        /* Filters */
        .bookings-filters select,
        .bookings-filters input,
        .history-filters select,
        .history-filters input {
            background: #ffffff !important;
            border-color: var(--dark-border-color) !important;
            color: var(--dark-text-primary) !important;
        }

        /* Login Page */
        .login-container {
            background: var(--dark-bg-primary) !important;
            background-image:
                radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.2) 0%, transparent 50%) !important;
        }

        .login-box {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
        }

        .login-logo h1,
        .login-logo p {
            color: var(--dark-text-primary) !important;
        }

        .login-field label {
            color: var(--dark-text-secondary) !important;
        }

        .login-field input {
            background: #ffffff !important;
            border-color: var(--dark-border-color) !important;
            color: #333333 !important;
        }

        /* User Menu */
        .nav-user-dropdown {
            background: var(--dark-bg-secondary) !important;
            border: 1px solid var(--dark-glass-border) !important;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
        }

        .nav-user-dropdown a {
            color: var(--dark-text-secondary) !important;
        }

        .nav-user-dropdown a:hover {
            background: rgba(255, 255, 255, 0.1) !important;
            color: var(--dark-text-primary) !important;
        }

        /* Scrollbar - Dark Theme */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--dark-bg-tertiary);
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        /* Page Titles */
        h2, h3, h4 {
            color: var(--dark-text-primary) !important;
        }

        /* Generic Text Colors */
        p, span, div {
            color: #333 !important;
        }

        /* Cards generic */
        .card {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
        }

        /* Feature Item */
        .feature-item {
            background: #ffffff !important;
            color: var(--dark-text-primary) !important;
        }

        /* Prompt Box */
        .prompt-box {
            background: rgba(0, 0, 0, 0.4) !important;
            border: 1px solid var(--dark-border-color);
        }

        /* Audio Category */
        .audio-category {
            border-top-color: var(--dark-border-color) !important;
        }

        .audio-category h4 {
            color: var(--dark-text-secondary) !important;
        }

        /* Testnet Container */
        .testnet-header {
            color: var(--dark-text-primary) !important;
        }

        /* Call Info Panel */
        .call-info-panel {
            background: var(--dark-glass-bg) !important;
            border: 1px solid var(--dark-glass-border) !important;
        }

        /* Animations */
        @keyframes glowPulse {
            0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
            50% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.5); }
        }

        .tab-btn.active {
            animation: glowPulse 2s ease-in-out infinite;
        }

        /* =====================================================
           RECORDINGS TABLE FIX
           ===================================================== */

        /* Recordings container */
        #recordings-content,
        #tab-recordings,
        .recordings-container {
            background: transparent !important;
        }

        /* All tables in the app */
        table {
            background: var(--dark-glass-bg) !important;
            border-collapse: collapse;
        }

        table thead,
        table thead tr {
            background: rgba(0, 0, 0, 0.4) !important;
        }

        table th {
            background: rgba(0, 0, 0, 0.4) !important;
            color: var(--dark-text-secondary) !important;
            border-bottom: 1px solid var(--dark-border-color) !important;
            padding: 12px 15px !important;
        }

        table tbody {
            background: var(--dark-glass-bg) !important;
        }

        table tbody tr {
            background: transparent !important;
            border-bottom: 1px solid var(--dark-border-color) !important;
        }

        table tbody tr:nth-child(even) {
            background: rgba(255, 255, 255, 0.02) !important;
        }

        table tbody tr:hover {
            background: rgba(255, 255, 255, 0.08) !important;
        }

        table td {
            color: var(--dark-text-primary) !important;
            border-bottom: 1px solid var(--dark-border-color) !important;
            padding: 12px 15px !important;
        }

        /* Recordings specific table wrapper */
        .recordings-table-wrapper,
        .table-responsive,
        .table-container {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
            border-radius: 12px !important;
            overflow: hidden;
        }

        /* Recordings stats boxes - make sure they stay visible */
        .recordings-stats .stat-box,
        .stats-grid .stat-box,
        .stat-card {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
        }

        /* === Recordings Sub-tabs Dark Theme === */
        .rec-subtabs {
            border-bottom-color: var(--dark-glass-border) !important;
        }
        .rec-subtab {
            color: var(--dark-text-secondary) !important;
        }
        .rec-subtab:hover {
            color: var(--dark-text-primary) !important;
        }
        .rec-subtab.active {
            color: #667eea !important;
            border-bottom-color: #667eea !important;
        }

        /* Statistics Panel Dark Theme */
        .stats-summary-card {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
        }
        .stats-summary-card .stat-number {
            color: var(--dark-text-primary) !important;
        }
        .stats-summary-card .stat-desc {
            color: var(--dark-text-muted) !important;
        }
        .stats-period-btn {
            background: var(--dark-glass-bg) !important;
            border: 1px solid var(--dark-glass-border) !important;
            color: var(--dark-text-secondary) !important;
        }
        .stats-period-btn:hover {
            border-color: #667eea !important;
            color: #667eea !important;
        }
        .stats-period-btn.active {
            background: var(--accent-gradient) !important;
            color: white !important;
            border-color: transparent !important;
        }
        #recordings-stats-panel h2,
        #recordings-stats-panel h3 {
            color: var(--dark-text-primary) !important;
        }
        #recordings-stats-panel > div > div {
            /* Source + Chart boxes */
        }
        #recordings-stats-panel [style*="background:white"],
        #recordings-stats-panel [style*="background: white"] {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
        }
        .section-bar {
            background: var(--dark-bg-tertiary) !important;
        }
        .section-bar-label span {
            color: var(--dark-text-secondary) !important;
        }
        .daily-bars-container {
            border-bottom-color: var(--dark-glass-border) !important;
        }
        .daily-bar-label {
            color: var(--dark-text-muted) !important;
        }
        .daily-bar {
            background: linear-gradient(180deg, #667eea, #764ba2) !important;
        }
        #stats-source-breakdown > div {
            border-bottom-color: var(--dark-border-color) !important;
        }
        #stats-source-breakdown span {
            color: var(--dark-text-secondary) !important;
        }
        #stats-source-breakdown span:last-child {
            color: #667eea !important;
        }

        /* Recording card dark theme */
        .recording-card {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
        }
        .recording-card-name {
            color: var(--dark-text-primary) !important;
        }
        .recording-card-meta span {
            color: var(--dark-text-muted) !important;
        }

        
        .stats-panel-box {
            background: var(--dark-glass-bg) !important;
            backdrop-filter: blur(20px);
            border: 1px solid var(--dark-glass-border) !important;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
        }
        /* Recording action buttons */
        table .btn,
        table button {
            opacity: 0.9;
        }

        table .btn:hover,
        table button:hover {
            opacity: 1;
            transform: scale(1.1);
        }

        /* Links in tables */
        table a {
            color: #667eea !important;
        }

        table a:hover {
            color: #818cf8 !important;
        }

        /* Select and input in filters */
        select,
        input[type="text"],
        input[type="search"],
        input[type="date"] {
            background: var(--dark-bg-tertiary) !important;
            border: 1px solid var(--dark-glass-border) !important;
            color: var(--dark-text-primary) !important;
            border-radius: 8px;
            padding: 8px 12px;
        }

        select:focus,
        input:focus {
            border-color: #667eea !important;
            outline: none;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
        }

        /* Dropdown options */
        select option {
            background: var(--dark-bg-secondary) !important;
            color: #ffffff !important;
        }

        /* =====================================================
           TEAM CHAT - WHITE/LIGHT THEME (Exception)
           ===================================================== */

        /* Chat container - white background */
        #tab-chat,
        #chat-content,
        .chat-container,
        .team-chat-container {
            background: #f8f9fa !important;
            border-radius: 12px;
            padding: 15px;
        }

        /* Chat wrapper/box */
        .chat-box,
        .chat-wrapper,
        .messages-container {
            background: white !important;
            border: 1px solid #e0e0e0 !important;
            border-radius: 12px !important;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }

        /* Chat messages area */
        .chat-messages,
        .messages-list,
        #chat-messages {
            background: #f8f9fa !important;
            border-radius: 12px 12px 0 0;
        }

        /* Individual message items - EXCLUDE team-chat-container (uses Messenger style) */
        .message-item,
        .chat-item {
            background: white !important;
            border: 1px solid #eee !important;
            border-radius: 12px !important;
            margin-bottom: 10px !important;
            padding: 12px 15px !important;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .message-item:hover {
            background: #f5f5f5 !important;
            border-color: #667eea !important;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
        }

        /* Team Chat messages - Messenger style (no box) */
        .team-chat-container .chat-message {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            padding: 0 12px !important;
            margin-bottom: 1px !important;
        }

        .team-chat-container .chat-message:hover {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
        }

        /* Message sender name */
        .message-sender {
            color: #5b6af0 !important;
            font-weight: 600 !important;
        }

        /* Message text */
        .message-text,
        .message-content {
            color: #2c3e50 !important;
        }

        /* Message timestamp */
        .chat-message .time,
        .chat-message .timestamp,
        .chat-message .date,
        .message-time,
        .chat-message small {
            color: #95a5a6 !important;
            font-size: 11px !important;
        }

        /* Chat input area */
        .chat-input,
        .chat-input-container,
        .message-input-container,
        .chat-form {
            background: white !important;
            border-top: 1px solid #eee !important;
            padding: 15px !important;
            border-radius: 0 0 12px 12px;
        }

        /* Chat input field */
        .chat-input input,
        .chat-input textarea,
        .message-input,
        #chat-input,
        #tab-chat input[type="text"],
        #tab-chat textarea {
            background: #f5f7fa !important;
            border: 1px solid #ddd !important;
            color: #2c3e50 !important;
            border-radius: 25px !important;
            padding: 12px 20px !important;
        }

        .chat-input input:focus,
        .chat-input textarea:focus {
            border-color: #667eea !important;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
            outline: none;
            background: white !important;
        }

        .chat-input input::placeholder,
        .chat-input textarea::placeholder {
            color: #95a5a6 !important;
        }

        /* Send button */
        .chat-input button,
        .send-button,
        .btn-send,
        #tab-chat button[type="submit"] {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            border: none !important;
            border-radius: 50% !important;
            width: 45px !important;
            height: 45px !important;
            min-width: 45px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            cursor: pointer;
            transition: all 0.3s ease !important;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .chat-input button:hover,
        .send-button:hover {
            transform: scale(1.1) !important;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }

        .chat-input button i,
        .send-button i {
            color: white !important;
        }

        /* Online users indicator */
        #tab-chat .online-users,
        #tab-chat .users-online {
            color: #5d6d7e !important;
        }

        /* Chat header */
        #tab-chat .chat-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            color: white !important;
        }

        /* Hide connection status indicator - debug only in console */
        .connection-status,
        #connection-status {
            display: none !important;
        }

        /* =====================================================
           SMS SETTINGS - LIGHT THEME (Exception)
           ===================================================== */

        /* SMS Settings container - make it light */
        #subtab-sms-settings .sms-settings-container,
        #subtab-sms-settings .sms-template-section,
        #subtab-sms-settings .sms-preview-section {
            background: white !important;
        }

        /* Placeholders info box */
        #subtab-sms-settings .placeholders-info {
            background: #e8f4fc !important;
            border: 1px solid #3498db !important;
        }

        #subtab-sms-settings .placeholders-info p {
            color: #2c3e50 !important;
        }

        /* Placeholder CODE elements - make them blue with white text */
        #subtab-sms-settings .placeholders-info code {
            background: #3498db !important;
            color: white !important;
            padding: 6px 12px !important;
            border-radius: 15px !important;
            font-size: 12px !important;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-block;
            margin: 3px !important;
        }

        #subtab-sms-settings .placeholders-info code:hover {
            background: #2980b9 !important;
            transform: scale(1.05);
        }

        /* SMS Template textarea */
        #subtab-sms-settings textarea,
        #sms-template-text {
            background: white !important;
            color: #2c3e50 !important;
            border: 2px solid #ddd !important;
        }

        /* SMS Preview section */
        #subtab-sms-settings #sms-preview {
            background: #e5ddd5 !important;
        }

        #subtab-sms-settings #sms-preview-text {
            background: #dcf8c6 !important;
            color: #2c3e50 !important;
        }

        /* SMS section headings */
        #subtab-sms-settings h2,
        #subtab-sms-settings h3 {
            color: #2c3e50 !important;
        }

        #subtab-sms-settings .subtitle {
            color: #666 !important;
        }

        /* =====================================================
           VOICE DASHBOARD - CALLBACK ITEMS FIX
           Phone/SIP links should be blue on yellow background
           ===================================================== */

        /* Callback phone - make it blue */
        .callback-phone,
        .callback-item .callback-phone {
            color: #3498db !important;
            font-weight: bold !important;
        }

        .callback-phone a,
        .callback-item a {
            color: #3498db !important;
            text-decoration: none;
        }

        .callback-phone a:hover,
        .callback-item a:hover {
            color: #2980b9 !important;
            text-decoration: underline;
        }

        /* Callback code - orange */
        .callback-code {
            color: #e67e22 !important;
        }

        /* Callback pillar - teal/blue */
        .callback-pillar {
            color: #16a085 !important;
        }

        /* History phone - dark text */
        .history-phone {
            color: #2c3e50 !important;
        }

        /* Voice Pending Callbacks section */
        .voice-pending-callbacks {
            background: rgba(255, 255, 255, 0.95) !important;
            border-radius: 12px !important;
            padding: 20px !important;
            margin-bottom: 20px !important;
        }

        .voice-pending-callbacks h3 {
            color: #2c3e50 !important;
            margin-bottom: 15px !important;
            font-size: 18px !important;
        }

        .voice-pending-callbacks h3 i {
            color: #e67e22 !important;
            margin-right: 8px;
        }

        /* Voice Call History section */
        .voice-call-history {
            background: rgba(255, 255, 255, 0.95) !important;
            border-radius: 12px !important;
            padding: 20px !important;
        }

        .voice-call-history h3 {
            color: #2c3e50 !important;
            margin-bottom: 15px !important;
            font-size: 18px !important;
        }

        .voice-call-history h3 i {
            color: #3498db !important;
            margin-right: 8px;
        }

    
        .contact-type-badge {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 11px;
            background: #e8f4fd;
            color: #2980b9;
        }

       /* Recording Modal Animation */
        @keyframes blink {
            0%, 50% { opacity: 1; }
            51%, 100% { opacity: 0.3; }
        }

        /* Scraper Recording Modal styles */
        #scraper-recording-modal button:hover {
            transform: scale(1.05);
            filter: brightness(1.1);
        }
        #scraper-recording-modal,
        #scraper-recording-modal p,
        #scraper-recording-modal div,
        #scraper-recording-modal span,
        #scraper-rec-description-text {
            color: #ffffff !important;
        }
        #scraper-rec-description-text::-webkit-scrollbar {
            width: 8px;
        }
        #scraper-rec-description-text::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 4px;
        }
        #scraper-rec-description-text::-webkit-scrollbar-thumb {
            background: #9b59b6;
            border-radius: 4px;
        }

        
        #recording-modal button:hover {
            transform: scale(1.05);
            filter: brightness(1.1);
        }
        
        /* Recording modal - all text white */
        #recording-modal,
        #recording-modal p,
        #recording-modal div,
        #recording-modal span,
        #recording-description-text {
            color: #ffffff !important;
        }
        
        #recording-description-text::-webkit-scrollbar {
            width: 8px;
        }
        
        #recording-description-text::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 4px;
        }
        
        #recording-description-text::-webkit-scrollbar-thumb {
            background: #3498db;
            border-radius: 4px;
        }

        /* Toggle Switch (moved from inline style block) */
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }
        .toggle-switch input:checked + .toggle-slider { background-color: #27ae60; }
        .toggle-switch input:checked + .toggle-slider:before { transform: translateX(26px); }

        /* Fix Real Estate Modal Input Colors (moved from end of file) */
        #add-property-modal .modal-body input[type="text"],
        #add-property-modal .modal-body input[type="text"]:focus,
        #add-property-modal .modal-body input[type="number"],
        #add-property-modal .modal-body select {
            color: #333 !important;
            background: white !important;
        }
        #add-property-modal .modal-body input::placeholder {
            color: #999 !important;
        }

        /* ============================================ */
        /* BOOKING FORM SELECT FIXES (moved from Block 2) */
        /* ============================================ */
        #booking-property,
        #subtab-bookings select {
            background: #0f0f1a !important;
            color: #fff !important;
            -webkit-appearance: none !important;
            appearance: none !important;
        }
        #booking-property option,
        #subtab-bookings select option {
            background: #1a1a2e !important;
            color: #fff !important;
        }

        /* ============================================ */
        /* FLATPICKR OVERRIDES (moved from Block 2) */
        /* ============================================ */
        #subtab-bookings input.flatpickr-input,
        input.flatpickr-input ~ input {
            background: #0f0f1a !important;
            color: #fff !important;
            border: 2px solid #333 !important;
        }
        .flatpickr-calendar {
            background: #fff !important;
            border: 1px solid #e0e0e0 !important;
            border-radius: 12px !important;
            box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
            width: 320px !important;
            padding: 0 !important;
            overflow: hidden !important;
        }
        .flatpickr-months {
            background: #fff !important;
            padding: 15px 10px !important;
            align-items: center !important;
        }
        .flatpickr-current-month {
            padding: 0 !important;
            height: 30px !important;
            width: 100% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            position: relative !important;
            left: 0 !important;
            transform: none !important;
        }
        .flatpickr-month {
            height: 40px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            flex: 1 !important;
        }
        .flatpickr-current-month .flatpickr-monthDropdown-months {
            background: transparent !important;
            color: #2c3e50 !important;
            font-weight: 700 !important;
            font-size: 15px !important;
            appearance: none !important;
            -webkit-appearance: none !important;
            border: none !important;
            padding: 0 !important;
            margin: 0 !important;
        }
        .flatpickr-current-month span.cur-month {
            color: #2c3e50 !important;
            font-weight: 700 !important;
            font-size: 15px !important;
        }
        .flatpickr-current-month input.cur-year {
            background: #fff !important;
            color: #2c3e50 !important;
            font-weight: 700 !important;
            font-size: 14px !important;
        }
        .flatpickr-current-month .numInputWrapper span {
            display: none !important;
        }
        .flatpickr-prev-month,
        .flatpickr-next-month {
            background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
            border-radius: 50% !important;
            width: 30px !important;
            height: 30px !important;
            padding: 0 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            position: relative !important;
            top: 0 !important;
        }
        .flatpickr-prev-month:hover,
        .flatpickr-next-month:hover {
            background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
        }
        .flatpickr-prev-month svg,
        .flatpickr-next-month svg {
            fill: #fff !important;
        }
        .flatpickr-weekdays {
            background: #fff !important;
            padding: 5px 0 !important;
            border-top: 1px solid #f0f0f0 !important;
        }
        .flatpickr-weekday {
            color: #7f8c8d !important;
            font-weight: 600 !important;
            font-size: 11px !important;
        }
        .flatpickr-days {
            background: #fff !important;
            padding: 5px !important;
        }
        .dayContainer {
            background: #fff !important;
        }
        .flatpickr-day {
            color: #2c3e50 !important;
            font-weight: 500 !important;
            border-radius: 8px !important;
            border: 2px solid transparent !important;
            height: 36px !important;
            line-height: 32px !important;
        }
        .flatpickr-day:hover {
            background: #fff5e6 !important;
            border-color: #f39c12 !important;
        }
        .flatpickr-day.today {
            border-color: #f39c12 !important;
            background: #fff9f0 !important;
        }
        .flatpickr-day.selected {
            background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
            color: #fff !important;
            border-color: transparent !important;
        }
        .flatpickr-day.prevMonthDay,
        .flatpickr-day.nextMonthDay {
            color: #ccc !important;
        }
        .flatpickr-day.disabled {
            color: #ddd !important;
        }

        /* ============================================ */
        /* UNDO TOAST + DELETED BOOKINGS (moved from Block 2) */
        /* ============================================ */
        .undo-toast {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: #2d3436;
            color: white;
            padding: 16px 24px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 16px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3);
            z-index: 10000;
            animation: slideInUp 0.3s ease;
        }
        .undo-toast.hidden { display: none; }
        @keyframes slideInUp {
            from { transform: translateY(100px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .undo-toast .toast-message { display: flex; align-items: center; gap: 10px; }
        .undo-toast .toast-message i { color: #00b894; font-size: 18px; }
        .undo-toast .btn-undo {
            background: #fdcb6e; color: #2d3436; border: none;
            padding: 8px 16px; border-radius: 6px; font-weight: bold;
            cursor: pointer; transition: all 0.2s;
        }
        .undo-toast .btn-undo:hover { background: #ffeaa7; transform: scale(1.05); }
        .undo-toast .countdown {
            background: rgba(255,255,255,0.2); padding: 4px 10px;
            border-radius: 12px; font-size: 13px; min-width: 30px; text-align: center;
        }
        .deleted-badge {
            background: #e74c3c; color: white; padding: 2px 8px;
            border-radius: 12px; font-size: 12px; margin-left: 6px;
        }
        .btn-restore { background: #00b894 !important; color: white !important; }
        .btn-restore:hover { background: #00a383 !important; }
        .deleted-booking-row { background: rgba(231, 76, 60, 0.1); }
        .deleted-booking-row td { opacity: 0.8; }
        .days-remaining { font-size: 11px; color: #e74c3c; }

/* ============================================ */
/* CALL DETAILS + SYSTEM INFO + TOAST (moved from Block 4) */
.call-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.call-details-modal.show {
    display: flex;
}
.call-details-modal .modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 700px;
    width: 90%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
}
.call-details-modal .close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
}
.call-details-modal .close-btn:hover {
    color: #2c3e50;
}
.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.detail-label {
    font-weight: bold;
    color: #a29bfe;
    width: 140px;
    flex-shrink: 0;
}
.detail-value {
    color: #ffffff;
}
.answers-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}
.answer-item {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}
.answer-item:last-child {
    border-bottom: none;
}
.btn-details {
    padding: 6px 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}
.btn-details:hover {
    background: #2980b9;
}
.history-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.btn-delete-history {
    padding: 6px 10px;
    background: #ffebee;
    color: #c62828;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}
.btn-delete-history:hover {
    background: #ffcdd2;
}

/* Call Details Modal - Mobile Responsive */
@media (max-width: 768px) {
    .call-details-modal .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
    .detail-label {
        width: 100%;
    }
    .history-actions {
        flex-direction: column;
        gap: 5px;
    }
    .btn-details,
    .btn-delete-history {
        width: 100%;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .call-details-modal .modal-content {
        width: 98%;
        padding: 15px;
        margin: 10px;
    }
    .call-details-modal .close-btn {
        right: 10px;
        top: 5px;
        font-size: 24px;
    }
}

        /* ==================== SYSTEM INFO STYLES ==================== */
        .system-info-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        .sysinfo-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(52, 152, 219, 0.3);
        }

        .sysinfo-header h2 {
            color: #ecf0f1;
            font-size: 24px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .sysinfo-header h2 i {
            color: #3498db;
        }

        .sysinfo-actions {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .btn-refresh-sysinfo {
            padding: 10px 20px;
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
        }

        .btn-refresh-sysinfo:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
        }

        .sysinfo-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .sysinfo-card {
            background: linear-gradient(145deg, #2c3e50, #34495e);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }

        .sysinfo-card-header {
            background: rgba(52, 152, 219, 0.2);
            padding: 15px 20px;
            color: #3498db;
            font-weight: 600;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid rgba(52, 152, 219, 0.3);
        }

        .sysinfo-card-body {
            padding: 20px;
        }

        .disk-card .sysinfo-card-body {
            display: flex;
            align-items: center;
            gap: 25px;
        }

        .disk-chart-container {
            position: relative;
            width: 120px;
            height: 120px;
        }

        .disk-chart-center {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: #ecf0f1;
        }

        .disk-chart-center span {
            font-size: 24px;
            font-weight: bold;
            display: block;
        }

        .disk-chart-center small {
            color: #7f8c8d;
            font-size: 12px;
        }

        .disk-details {
            flex: 1;
        }

        .disk-stat {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            color: #bdc3c7;
        }

        .disk-stat:last-child {
            border-bottom: none;
        }

        .disk-stat strong {
            color: #ecf0f1;
        }

        .text-success {
            color: #2ecc71 !important;
        }

        .storage-bars {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .storage-bar-item {
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 12px 15px;
        }

        .storage-bar-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            color: #bdc3c7;
            font-size: 13px;
        }

        .storage-bar-label strong {
            color: #ecf0f1;
        }

        .storage-bar {
            height: 8px;
            background: rgba(255,255,255,0.1);
            border-radius: 4px;
            overflow: hidden;
        }

        .storage-bar-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .storage-bar-fill.recordings { background: linear-gradient(90deg, #e74c3c, #c0392b); }
        .storage-bar-fill.team-chat { background: linear-gradient(90deg, #9b59b6, #8e44ad); }
        .storage-bar-fill.live-support { background: linear-gradient(90deg, #3498db, #2980b9); }
        .storage-bar-fill.audio { background: linear-gradient(90deg, #f39c12, #d35400); }
        .storage-bar-fill.database { background: linear-gradient(90deg, #2ecc71, #27ae60); }

        .quick-stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .quick-stat {
            background: rgba(0,0,0,0.2);
            padding: 15px;
            border-radius: 8px;
            text-align: center;
        }

        .quick-stat-value {
            font-size: 28px;
            font-weight: bold;
            color: #3498db;
        }

        .quick-stat-label {
            font-size: 12px;
            color: #7f8c8d;
            margin-top: 5px;
        }

        .system-details {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .system-detail-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 12px;
            background: rgba(0,0,0,0.2);
            border-radius: 6px;
        }

        .system-detail-row span:first-child {
            color: #7f8c8d;
        }

        .system-detail-row span:last-child {
            color: #ecf0f1;
            font-family: monospace;
        }

        .sysinfo-features, .sysinfo-tables {
            background: linear-gradient(145deg, #2c3e50, #34495e);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .sysinfo-features h3, .sysinfo-tables h3 {
            color: #ecf0f1;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .sysinfo-features h3 i, .sysinfo-tables h3 i {
            color: #3498db;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
        }

        .feature-item {
            background: rgba(46, 204, 113, 0.15);
            border: 1px solid rgba(46, 204, 113, 0.3);
            border-radius: 8px;
            padding: 15px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .feature-item i {
            color: #2ecc71;
            font-size: 20px;
            width: 30px;
            text-align: center;
        }

        .feature-item-info {
            flex: 1;
        }

        .feature-item-name {
            color: #ecf0f1;
            font-weight: 500;
        }

        .feature-item-desc {
            color: #7f8c8d;
            font-size: 11px;
            margin-top: 2px;
        }

        .tables-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 10px;
        }

        .table-item {
            background: rgba(0,0,0,0.2);
            padding: 12px 15px;
            border-radius: 6px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .table-item-name {
            color: #ecf0f1;
            font-family: monospace;
            font-size: 13px;
        }

        .table-item-stats {
            display: flex;
            gap: 15px;
            font-size: 12px;
            color: #7f8c8d;
        }

        .table-item-stats span {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        /* Team Chat Input - Black text */
        #team-chat .chat-input-container #chat-message-input,
        #team-chat-input-container #chat-message-input,
        input#chat-message-input {
            color: #000 !important;
            -webkit-text-fill-color: #000 !important;
            font-size: 16px !important;
        }

        /* Calendar Selector - Dark gray background */
        #calendar-selector {
            background: #2c3e50 !important;
            color: #fff !important;
        }

        /* History Filters - Dark gray background */
        .history-filters select,
        .history-filters input {
            background: #2c3e50 !important;
            color: #fff !important;
        }

        /* Call Details Modal Inputs - Dark gray background */
        #edit-pillar,
        #edit-code,
        #edit-name,
        #edit-notes {
            background: #2c3e50 !important;
            color: #fff !important;
        }

        /* Toast Notifications */
        .toast {
            position: fixed;
            bottom: 30px;
            right: 30px;
            padding: 14px 24px;
            border-radius: 12px;
            color: #fff;
            font-size: 14px;
            font-weight: 500;
            z-index: 99999;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.3s, transform 0.3s;
            max-width: 400px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .toast.show {
            opacity: 1;
            transform: translateY(0);
        }
        .toast-error {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
        }
        .toast-success {
            background: linear-gradient(135deg, #27ae60, #229954);
        }
        .toast-warning {
            background: linear-gradient(135deg, #f39c12, #e67e22);
        }

        /* ══════════════════════════════════════════════ */
        /* PERFORMANCE TAB STYLES                         */
        /* ══════════════════════════════════════════════ */
        .performance-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 10px;
        }
        .perf-card {
            background: white;
            padding: 18px 16px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            text-align: center;
        }
        .perf-card .perf-value {
            font-size: 26px;
            font-weight: 700;
            color: #2c3e50;
        }
        .perf-card .perf-label {
            font-size: 12px;
            color: #95a5a6;
            margin-top: 4px;
        }
        .perf-card .perf-sub {
            font-size: 11px;
            color: #bdc3c7;
            margin-top: 2px;
        }
        .perf-card.perf-good .perf-value { color: #27ae60; }
        .perf-card.perf-warn .perf-value { color: #f39c12; }
        .perf-card.perf-bad .perf-value { color: #e74c3c; }

        .perf-subtab {
            padding: 8px 16px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            color: #666;
            transition: all 0.2s;
        }
        .perf-subtab.active {
            background: #3498db;
            color: white;
            border-color: #3498db;
        }
        .perf-subtab:hover:not(.active) {
            background: #ecf0f1;
        }

        /* Waterfall bar */
        .perf-waterfall {
            display: flex;
            height: 18px;
            border-radius: 4px;
            overflow: hidden;
            min-width: 150px;
            background: #f0f0f0;
        }
        .perf-wf-whisper { background: #3498db; }
        .perf-wf-gemini { background: #e74c3c; }
        .perf-wf-php { background: #2ecc71; }
        .perf-wf-session { background: #f39c12; }
        .perf-wf-noise { background: #9b59b6; }
        .perf-wf-other { background: #bdc3c7; }

        .perf-row-slow {
            background: #fff5f5 !important;
        }
        .perf-row-slow td:first-child {
            border-left: 3px solid #e74c3c;
        }

        #perf-recent-table tbody tr:hover,
        #perf-slow-table tbody tr:hover,
        #perf-hourly-table tbody tr:hover {
            background: #f5f9fc;
            cursor: pointer;
        }

        .perf-legend {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 8px;
            font-size: 11px;
            color: #666;
        }
        .perf-legend span {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .perf-legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 2px;
            display: inline-block;
        }

    
        /* === Recordings Sub-tabs === */
        .rec-subtabs {
            display: flex;
            gap: 4px;
            margin-bottom: 16px;
            border-bottom: 2px solid #e0e0e0;
            padding-bottom: 0;
        }
        .rec-subtab {
            padding: 10px 20px;
            border: none;
            background: none;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #666;
            border-bottom: 3px solid transparent;
            margin-bottom: -2px;
            transition: all 0.2s;
        }
        .rec-subtab:hover { color: #2c3e50; }
        .rec-subtab.active {
            color: #3498db;
            border-bottom-color: #3498db;
        }
        /* Section tag colors */
        .section-tag.detect { background: #f3e5f5; color: #7b1fa2; }
        .section-tag.hascode { background: #e8f5e9; color: #2e7d32; }
        .section-tag.searching { background: #fff3e0; color: #e65100; }
        .section-tag.onsite { background: #e3f2fd; color: #1565c0; }
        .section-tag.seller { background: #fce4ec; color: #c62828; }
        .section-tag.airbnbowner { background: #fff8e1; color: #f57f17; }
        .section-tag.airbnbguest { background: #e0f2f1; color: #00695c; }
        .section-tag.existingowner { background: #e8eaf6; color: #283593; }
        .section-tag.info { background: #eceff1; color: #37474f; }
        /* Statistics panel styles */
        .stats-summary-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }
        .stats-summary-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            text-align: center;
        }
        .stats-summary-card .stat-number {
            font-size: 28px;
            font-weight: 700;
            color: #2c3e50;
        }
        .stats-summary-card .stat-desc {
            font-size: 13px;
            color: #888;
            margin-top: 4px;
        }
        .stats-period-selector {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            align-items: center;
        }
        .stats-period-btn {
            padding: 8px 16px;
            border: 1px solid #ddd;
            border-radius: 8px;
            background: white;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
        }
        .stats-period-btn:hover { border-color: #3498db; color: #3498db; }
        .stats-period-btn.active { background: #3498db; color: white; border-color: #3498db; }
        .section-bar-container { margin-bottom: 12px; }
        .section-bar-label {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            margin-bottom: 4px;
        }
        .section-bar {
            height: 24px;
            border-radius: 6px;
            background: #f0f0f0;
            overflow: hidden;
        }
        .section-bar-fill {
            height: 100%;
            border-radius: 6px;
            transition: width 0.5s ease;
        }
        .daily-bars-container {
            display: flex;
            align-items: flex-end;
            gap: 4px;
            height: 150px;
            padding: 10px 0;
            border-bottom: 2px solid #eee;
            margin-bottom: 8px;
        }
        .daily-bar-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            height: 100%;
            justify-content: flex-end;
        }
        .daily-bar {
            width: 100%;
            max-width: 40px;
            background: #3498db;
            border-radius: 4px 4px 0 0;
            min-height: 2px;
            transition: height 0.3s;
        }
        .daily-bar-label {
            font-size: 10px;
            color: #999;
            margin-top: 4px;
            text-align: center;
        }

    
        /* Web Analysis Sub-tabs */
        .wa-subtabs { display:flex; gap:5px; margin-bottom:20px; border-bottom:2px solid #eee; padding-bottom:10px; }
        .wa-subtab-btn { padding:10px 20px; border:none; background:#f5f5f5; border-radius:8px 8px 0 0; cursor:pointer; font-size:14px; color:#666; transition:all 0.2s; display:flex; align-items:center; gap:8px; }
        .wa-subtab-btn.active { background:#667eea; color:white; }
        .wa-subtab-btn:hover:not(.active) { background:#e2e8f0; }
        .wa-subtab-content { display:none; }
        .wa-subtab-content.active { display:block; }
        .pc-period-btn { padding:6px 14px; border:1px solid #e2e8f0; background:white; border-radius:6px; cursor:pointer; font-size:13px; color:#64748b; transition:all 0.2s; }
        .pc-period-btn.active { background:#667eea; color:white; border-color:#667eea; }
        .pc-row { display:flex; align-items:center; padding:10px 14px; border-bottom:1px solid #f0f4f8; gap:10px; font-size:13px; transition:background 0.15s; }
        .pc-row:hover { background:#f8fafc; }

        /* Area Pricing Table */
        .ap-table { width:100%; border-collapse:collapse; font-size:13px; }
        .ap-table th { background:#f8fafc; padding:10px 12px; text-align:left; color:#64748b; font-weight:600; border-bottom:2px solid #e2e8f0; position:sticky; top:0; }
        .ap-table td { padding:8px 12px; border-bottom:1px solid #f0f4f8; }
        .ap-table tr:hover { background:#f8fafc; }
        .ap-bar { height:8px; border-radius:4px; min-width:4px; }

        /* Opportunities */
        .opp-row { display:flex; align-items:center; padding:12px 16px; border-bottom:1px solid #f0f4f8; gap:12px; font-size:13px; transition:background 0.15s; }
        .opp-row:hover { background:#f8fafc; }
        .opp-badge { padding:3px 8px; border-radius:6px; font-weight:700; font-size:12px; min-width:45px; text-align:center; }

        /* Chart Cards */
        .chart-card { background:white; border-radius:12px; border:1px solid #e2e8f0; padding:20px; }
        .chart-card h4 { margin:0 0 16px 0; color:#334155; font-size:14px; }
