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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: #050505;
            color: #EFEFEF;
            padding: 0;
            line-height: 1.6;
            min-height: 100vh;
            overflow-x: hidden;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
            overflow-x: hidden;
        }

        .settings-card {
            background-color: #050505;
            border: none;
            border-radius: 20px;
            padding: 22px;
            box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset, 0 10px 30px rgba(0,0,0,.35);
        }

        .agent-name-title {
            font-size: 28px;
            font-weight: 600;
            color: #EFEFEF;
            margin: 0;
            padding: 0;
            border: none;
        }

        .save-btn {
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 8px;
            padding: 10px 24px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s;
            width: auto;
            margin: 20px auto 0;
            display: block;
        }

        .save-btn:hover {
            background-color: #0056b3;
        }

        .save-btn:active {
            transform: scale(0.98);
        }

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

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

        .modal-content {
            background-color: #0b0b0b;
            border: 1px solid #333;
            border-radius: 12px;
            padding: 16px;
            width: 90%;
            max-width: 420px;
            position: relative;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        .modal-content.results-modal {
            max-width: 520px;
        }

        .modal-description {
            font-size: 14px;
            color: #bbb;
            margin-bottom: 12px;
        }

        .results-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 340px;
            overflow-y: auto;
            padding-right: 4px;
        }

        .result-item {
            background-color: #101010;
            border: 1px solid #2a2a2a;
            border-radius: 8px;
            padding: 12px 14px;
            color: #f5f5f5;
            font-size: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
        }

        .result-item span {
            font-family: 'Courier New', Courier, monospace;
            letter-spacing: 0.5px;
        }

        .result-item button {
            background-color: transparent;
            border: 1px solid #3a3a3a;
            color: #9ad1ff;
            padding: 6px 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s;
            font-size: 13px;
        }

        .result-item button:hover {
            background-color: rgba(0, 123, 255, 0.1);
            border-color: #007BFF;
        }

        .result-item button.loading {
            cursor: wait;
            background-color: #3a3a3a;
            color: #aaa;
        }

        .result-item button:disabled {
            cursor: not-allowed;
            opacity: 0.7;
        }

        .result-item button:disabled:not(.loading) {
            opacity: 1;
        }

        .results-empty {
            background-color: #101010;
            border: 1px solid #2a2a2a;
            border-radius: 8px;
            padding: 18px;
            color: #ccc;
            text-align: center;
            font-size: 14px;
        }

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

        .modal-title {
            font-size: 18px;
            font-weight: 600;
            color: #EFEFEF;
            margin: 0;
        }

        .modal-close {
            background: none;
            border: none;
            color: #888;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background-color 0.2s;
        }

        .modal-close:hover {
            background-color: #333;
        }

        .modal-form {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .form-row {
            display: flex;
            gap: 12px;
        }

        .form-group {
            flex: 1;
        }

        .form-label {
            display: block;
            font-size: 14px;
            color: #EFEFEF;
            margin-bottom: 6px;
        }

        .required {
            color: #ff4444;
        }

        .form-input {
            width: 100%;
            background-color: #0F0F0F;
            border: 1px solid #333;
            border-radius: 8px;
            padding: 10px 12px;
            color: #EFEFEF;
            font-size: 14px;
            transition: border-color 0.2s;
            font-family: inherit;
        }

        .form-input:focus {
            outline: none;
            border-color: #007BFF;
        }

        .form-input option {
            background-color: #0b0b0b;
            color: #EFEFEF;
        }

        .form-input#stateInput {
            width: auto;
            min-width: 180px;
            padding-right: 30px;
        }

        .modal-button {
            background-color: #4A4A4A;
            color: white;
            border: none;
            border-radius: 8px;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s;
            margin-top: 4px;
            width: auto;
            align-self: center;
        }

        .modal-button:disabled {
            background-color: #2A2A2A;
            color: #666;
            cursor: not-allowed;
            opacity: 0.5;
        }

        .modal-button.enabled {
            background-color: #007BFF;
            cursor: pointer;
        }

        .modal-button.enabled:hover {
            background-color: #0056b3;
        }

        .modal-button:hover {
            background-color: #5A5A5A;
        }

        /* No Agent Found Banner */
        .alert-banner {
            background-color: #0b0b0b;
            border: 1px solid #333;
            padding: 15px 20px;
            margin-bottom: 30px;
            border-radius: 8px;
            font-size: 14px;
            color: #EFEFEF;
        }

        /* Section Styling */
        .section {
            background-color: #0b0b0b;
            border: 1px solid #282828;
            border-radius: 8px;
            padding: 25px;
            margin-bottom: 20px;
            overflow: visible;
        }

        .section.compact {
            padding: 15px 20px;
        }

        .section h2 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 10px;
            color: #EFEFEF;
        }

        .section.compact h2 {
            font-size: 16px;
            margin-bottom: 5px;
        }

        .section p {
            font-size: 14px;
            color: #888;
            margin-bottom: 15px;
        }

        .section.compact p {
            font-size: 13px;
            margin-bottom: 0;
        }

        /* Phone Number Section */
        .phone-input-container {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .phone-input {
            flex: 1;
            background-color: #0F0F0F;
            border: 1px solid #333;
            border-radius: 6px;
            padding: 10px 15px;
            color: #EFEFEF;
            font-size: 14px;
        }

        .phone-input::placeholder {
            color: #666;
        }

        .assign-btn {
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;
            align-self: center;
        }

        .assign-btn:hover {
            background-color: #0056b3;
        }

        /* Connect Channels */
        .channel-options {
            display: flex;
            flex-direction: row;
            gap: 30px;
            flex-wrap: wrap;
            margin-top: 5px;
            margin-bottom: 0;
        }

        .channel-option {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }

        .channel-icon {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            flex-shrink: 0;
        }

        .channel-icon.whatsapp {
            background-color: #25D366;
            border-radius: 8px;
        }

        .channel-icon.facebook {
            background-color: #1877F2;
            border-radius: 8px;
            color: white;
            font-weight: bold;
            font-family: Arial, sans-serif;
        }

        .channel-icon.sms {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 8px;
            position: relative;
        }

        .radio-button {
            width: 20px;
            height: 20px;
            border: 2px solid #555;
            border-radius: 50%;
            position: relative;
            cursor: pointer;
        }

        .radio-button.selected {
            border-color: #007BFF;
        }

        .radio-button.selected::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 10px;
            height: 10px;
            background-color: #007BFF;
            border-radius: 50%;
        }

        /* First Message */
        .first-message-container {
            display: flex;
            gap: 10px;
        }

        .message-input {
            flex: 1;
            background-color: #0F0F0F;
            border: 1px solid #333;
            border-radius: 6px;
            padding: 12px 15px;
            color: #EFEFEF;
            font-size: 14px;
            resize: vertical;
            min-height: 100px;
            font-family: inherit;
        }

        /* Voice Dropdown */
        .voice-dropdown-container {
            position: relative;
            width: 260px;
            min-width: 260px;
            max-width: 260px;
            z-index: 1000;
            overflow: visible;
        }

        #voice-selected {
            background: #2a2a30;
            color: #e3e3ee;
            padding: 10px 14px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 15px;
            border: 1px solid #444;
            transition: border-color 0.2s;
        }

        #voice-selected:hover {
            border-color: #007BFF;
        }

        #voice-list-container {
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            min-width: 100%;
            background: #2a2a30;
            border: 1px solid #444;
            border-radius: 6px;
            margin-top: 4px;
            display: none !important;
            flex-direction: column;
            max-height: 160px;
            overflow-y: auto;
            overflow-x: hidden;
            z-index: 10000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        }

        #voice-list-container.show {
            display: flex !important;
        }

        .voice-item {
            display: grid;
            grid-template-columns: 28px 1fr auto;
            gap: 10px;
            align-items: center;
            padding: 10px;
            color: #e3e3e3;
            cursor: pointer;
            transition: background 0.2s;
            border-radius: 10px;
            width: 100%;
            box-sizing: border-box;
        }

        .voice-item:hover {
            background: #11151c;
        }

        .voice-name {
            flex-grow: 1;
            font-size: 14px;
            margin-left: 10px;
            font-weight: bold;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .play-button {
            width: 30px;
            height: 30px;
            border: none;
            background: linear-gradient(145deg, #3d3d3d, #2f2f2f);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease-in-out;
        }

        .voice-wrap {
            position: relative;
            display: flex;
            justify-content: flex-end;
            align-items: flex-start;
            overflow: visible;
        }

        .voice-trigger {
            display: flex;
            align-items: center;
            gap: 10px;
            background: #0F0F0F;
            border: 1px solid #333;
            border-radius: 12px;
            padding: 8px 12px;
            min-width: 160px;
            cursor: pointer;
            color: #EFEFEF;
            font-size: 14px;
            font-weight: 700;
            transition: border-color 0.2s;
        }

        .voice-trigger:focus {
            outline: none;
            box-shadow: 0 0 0 2px #007BFF inset;
        }

        .voice-trigger:hover {
            border-color: #007BFF;
        }

        .voice-avatar {
            width: 22px;
            height: 22px;
            border-radius: 999px;
            display: inline-grid;
            place-items: center;
            font-weight: 700;
            font-size: 12px;
            color: #fff;
            background: linear-gradient(135deg, #60a5fa, #8b5cf6);
            flex-shrink: 0;
        }

        .voice-chevron {
            margin-left: auto;
            opacity: 0.75;
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        .voice-pop {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 8px;
            width: min(560px, 92vw);
            background: #0b0b0b;
            border: 1px solid #282828;
            border-radius: 14px;
            box-shadow: 0 12px 40px rgba(0,0,0,.5);
            padding: 10px;
            z-index: 30;
            display: block;
        }

        .voice-pop[hidden] {
            display: none !important;
        }

        .voice-search {
            width: 100%;
            background: #0F0F0F;
            border: 1px solid #333;
            border-radius: 10px;
            padding: 10px 12px;
            color: #EFEFEF;
            font-size: 14px;
            margin-bottom: 10px;
        }

        .voice-list {
            max-height: 300px;
            overflow: auto;
            padding-right: 6px;
        }

        .voice-group {
            margin-top: 12px;
        }

        .voice-group h4 {
            margin: 8px 6px;
            font-size: 12px;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #888;
        }

        /* Old voice-item styles - commented out */
        /* These were from the old voice dropdown implementation */

        .lang-badge, .more-badge {
            font-size: 12px;
            padding: 4px 8px;
            border-radius: 999px;
            background: #2b323f;
            color: #cbd5e1;
        }

        .voice-footer {
            padding: 8px;
            display: flex;
            justify-content: center;
        }

        .footer-btn {
            width: 100%;
            background: transparent;
            border: 1px solid #333;
            color: #cbd5e1;
            border-radius: 10px;
            padding: 10px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.2s;
        }

        .footer-btn:hover {
            background: #11151c;
        }

        /* Knowledge Base */
        .knowledge-base-input {
            width: 100%;
            background-color: #0F0F0F;
            border: 1px solid #333;
            border-radius: 6px;
            padding: 10px 15px;
            color: #EFEFEF;
            font-size: 14px;
            margin-top: 10px;
        }

        .knowledge-base-input::placeholder {
            color: #666;
        }

        /* Integration Section */
        .integration-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .integration-icon {
            width: 40px;
            height: 40px;
            background-color: #1877F2;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: bold;
        }

        .connect-btn {
            background-color: #4A4A4A;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            margin-left: auto;
            transition: background-color 0.2s;
        }

        .connect-btn:hover {
            background-color: #007BFF;
        }

        .connect-btn:active {
            background-color: #0056b3;
        }

        .connect-btn:focus {
            outline: 2px solid #007BFF;
            outline-offset: 2px;
        }

        /* Disconnect button styling - red when calendar is connected */
        .connect-btn.disconnect-btn {
            background-color: #dc3545;
            color: white;
        }

        .connect-btn.disconnect-btn:hover {
            background-color: #c82333;
        }

        .connect-btn.disconnect-btn:active {
            background-color: #bd2130;
        }

        .connect-btn.disconnect-btn:focus {
            outline: 2px solid #dc3545;
            outline-offset: 2px;
        }

        .connect-btn.connected-btn {
            background-color: #28a745;
            color: white;
        }

        .connect-btn.connected-btn:hover {
            background-color: #218838;
        }

        .connect-btn.connected-btn:active {
            transform: scale(0.98);
        }

        .connect-btn.connected-btn:focus {
            outline: 2px solid #28a745;
            outline-offset: 2px;
        }

        .calendar-email-display {
            font-size: 13px;
            color: #888;
            font-style: italic;
            white-space: nowrap;
        }

        /* Call Forwarding */
        .call-forwarding-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .forwarding-input {
            flex: 1;
            background-color: #0F0F0F;
            border: 1px solid #333;
            border-radius: 6px;
            padding: 10px 15px;
            color: #EFEFEF;
            font-size: 14px;
        }

        .forwarding-input::placeholder {
            color: #666;
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }

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

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #333;
            transition: 0.3s;
            border-radius: 26px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: 0.3s;
            border-radius: 50%;
        }

        input:checked + .toggle-slider {
            background-color: #007BFF;
        }

        input:checked + .toggle-slider:before {
            transform: translateX(24px);
        }

        .toggle-status {
            font-size: 14px;
            color: #888;
            white-space: nowrap;
            min-width: 85px;
        }

        .toggle-status.enabled {
            color: #69E292;
        }

        /* Info Icon and Popover Styles */
        .info-icon-container {
            display: flex;
            align-items: center;
            gap: 8px; /* Space between the title and the icon */
            position: relative; /* Crucial for positioning the popover relative to the title */
        }
        
        /* Ensure h2 inside info-icon-container maintains its styling */
        .info-icon-container h2 {
            margin-bottom: 0; /* Remove bottom margin since container handles spacing */
            flex: 0 0 auto; /* Don't grow or shrink */
        }

        /* Style for the question mark icon */
        .info-icon {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background-color: #555; /* Dark gray circle */
            color: #fff; /* White question mark */
            font-size: 12px;
            font-weight: bold;
            cursor: help; /* Change cursor to indicate information is available */
            user-select: none;
            line-height: 1; /* Center the '?' vertically */
        }

        /* Style for the popover/tooltip container */
        .info-popover {
            /* Hidden by default */
            visibility: hidden;
            opacity: 0;
            
            /* Positioning */
            position: absolute;
            z-index: 1000; /* Ensure it is above other elements */
            top: 100%; /* Position below the icon/title */
            left: 0; /* Align with the start of the title */
            margin-top: 8px; /* Add space between icon and tooltip */
            
            /* Styling */
            min-width: 300px;
            max-width: 450px; /* Allow wider tooltip for longer content */
            padding: 14px;
            background-color: #1a1a1a; /* Darker background to match theme */
            border: 1px solid #007BFF; /* Border to stand out */
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            
            /* Transition for smooth appearance */
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        /* Styling for content inside the popover */
        .info-popover p {
            color: #EFEFEF;
            font-size: 13px;
            margin: 0;
            line-height: 1.5;
        }
        
        /* Mobile responsive tooltips */
        @media (max-width: 768px) {
            .info-popover {
                min-width: 280px;
                max-width: calc(100vw - 40px); /* Don't exceed viewport width */
                left: auto;
                right: 0; /* Align to right on mobile to prevent overflow */
            }
            
            .info-icon-container {
                position: relative;
            }
        }

        /* Show the popover on hover over the question mark icon only */
        .info-icon:hover + .info-popover,
        .info-popover:hover {
            visibility: visible;
            opacity: 1;
        }
        
        /* Mobile: Show tooltip on click/tap */
        @media (max-width: 768px) {
            .info-icon.active + .info-popover {
                visibility: visible;
                opacity: 1;
            }
        }

        /* Optional: Add a small arrow pointing up to the icon */
        .info-popover:before {
            content: "";
            position: absolute;
            bottom: 100%; /* Point up from the top of the popover */
            left: 15px; /* Adjust as needed */
            border-width: 6px;
            border-style: solid;
            border-color: transparent transparent #007BFF transparent;
        }
        
        /* Arrow inner fill to match background */
        .info-popover:after {
            content: "";
            position: absolute;
            bottom: 100%;
            left: 16px;
            border-width: 5px;
            border-style: solid;
            border-color: transparent transparent #1a1a1a transparent;
        }

        /* ==========================================================================
           BUSINESS HOURS - NEW CSS FROM SCRATCH
           ========================================================================== */
        
        .business-hours-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .day-row {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 12px 0;
            border-bottom: 1px solid #1a1a1a;
        }

        .day-row:last-child {
            border-bottom: none;
        }

        .day-label {
            min-width: 90px;
            font-size: 14px;
            color: #EFEFEF;
            font-weight: 500;
        }

        .day-row .toggle-switch.small {
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }

        .day-row .toggle-switch.small .toggle-slider:before {
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
        }

        .day-row .toggle-switch.small input:checked + .toggle-slider:before {
            transform: translateX(20px);
        }

        .time-inputs {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            visibility: hidden;
        }

        .day-row.open .time-inputs {
            opacity: 1;
            pointer-events: auto;
            visibility: visible;
        }

        .time-input {
            background-color: #0F0F0F;
            border: 1px solid #333;
            border-radius: 6px;
            padding: 8px 10px;
            color: #EFEFEF;
            font-size: 13px;
            font-family: inherit;
            cursor: pointer;
            min-width: 60px;
            transition: border-color 0.2s;
        }

        .time-input:hover {
            border-color: #444;
        }

        .time-input:focus {
            outline: none;
            border-color: #007BFF;
        }

        .time-colon {
            color: #888;
            font-size: 14px;
            margin: 0 4px;
        }

        .time-separator {
            color: #888;
            font-size: 13px;
            margin: 0 12px;
            font-weight: 500;
        }

        .closed-label {
            display: none; /* Hide "Closed" text completely when toggle is off */
        }

        /* Tablet/Mobile Styles for Business Hours */
        @media (max-width: 900px) {
            .business-hours-container {
                gap: 14px;
            }

            .day-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
                padding: 16px;
                background-color: #0f0f0f;
                border: 1px solid #222;
                border-radius: 12px;
                border-bottom: 1px solid #222;
            }

            .day-row:last-child {
                border-bottom: 1px solid #222;
            }

            .day-label {
                width: 100%;
                min-width: auto;
                font-size: 15px;
                font-weight: 600;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .day-row .toggle-switch.small {
                width: 48px;
                height: 26px;
            }

            .day-row .toggle-switch.small .toggle-slider:before {
                height: 20px;
                width: 20px;
            }

            .day-row .toggle-switch.small input:checked + .toggle-slider:before {
                transform: translateX(22px);
            }

            .time-inputs {
                width: 100%;
                display: none; /* Hide completely when closed on mobile */
            }
            
            .day-row.open .time-inputs {
                display: grid; /* Show as grid when open */
                grid-template-columns: repeat(3, 1fr);
                gap: 10px;
                grid-auto-flow: row; /* Force items to flow in rows */
            }
            
            /* Hide colons and "to" separator on mobile - only show selects */
            .day-row.open .time-inputs .time-colon,
            .day-row.open .time-inputs .time-separator {
                display: none;
            }
            
            /* Make only selects visible and arrange in grid */
            .day-row.open .time-inputs .time-input {
                width: 100%;
                min-width: 0;
            }

            .time-input {
                width: 100%;
                min-width: 0;
                padding: 10px;
                font-size: 14px;
            }

            .time-colon {
                display: none;
            }

            .time-separator {
                display: none;
            }

            }

        /* Mobile Styles for Business Hours */
        @media (max-width: 768px) {
            .business-hours-container {
                gap: 16px;
            }

            .day-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
                padding: 16px;
        background-color: #0f0f0f;
        border: 1px solid #222;
        border-radius: 12px;
                border-bottom: 1px solid #222;
    }

            .day-row:last-child {
                border-bottom: 1px solid #222;
            }

    .day-label {
        width: 100%;
                min-width: auto;
                font-size: 15px;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

            .day-row .toggle-switch.small {
                width: 48px;
                height: 26px;
            }

            .day-row .toggle-switch.small .toggle-slider:before {
                height: 20px;
                width: 20px;
            }

            .day-row .toggle-switch.small input:checked + .toggle-slider:before {
                transform: translateX(22px);
            }

            /* Hide time-inputs completely when closed on mobile */
            .day-row:not(.open) .time-inputs {
                display: none !important;
            }
            
            .day-row.open .time-inputs {
                display: grid !important; /* Show as grid when open - 3 columns = 2 rows of 3 */
                grid-template-columns: repeat(3, 1fr);
                gap: 10px;
                width: 100%;
                opacity: 1;
                visibility: visible;
                pointer-events: auto;
            }
            
            /* Hide colons and "to" separator on mobile - only show selects */
            .day-row.open .time-inputs .time-colon,
            .day-row.open .time-inputs .time-separator {
                display: none;
            }
            
            /* Make only selects visible and arrange in grid */
            .day-row.open .time-inputs .time-input {
                width: 100%;
                min-width: 0;
            }

            .time-input {
                width: 100%;
                min-width: 0;
                padding: 14px 8px !important;
                font-size: 16px !important; /* Large enough to be readable and prevent iOS zoom */
                height: 48px !important; /* Touch-friendly height */
                min-height: 48px !important;
            }

            .time-colon {
                display: none;
            }

            .time-separator {
                display: none;
            }

        }

        @media (max-width: 480px) {
            .day-row {
                padding: 16px;
            }

            .day-row.open .time-inputs {
                gap: 12px;
                padding: 12px;
            }

            .day-row.open .time-inputs .time-input {
                padding: 14px 8px !important;
                font-size: 16px !important; /* Large enough to be readable and prevent iOS zoom */
                height: 48px !important; /* Touch-friendly height */
                min-height: 48px !important;
            }
        }

        /* Mobile Responsive Styles */
        @media (max-width: 768px) {
            .container {
                padding: 12px;
            }

            .settings-card {
                padding: 16px;
                border-radius: 12px;
            }

            .agent-name-title {
                font-size: 22px;
                margin-bottom: 16px;
            }

            .section {
                padding: 12px 16px !important;
            }

            .section h2 {
                font-size: 18px;
            }

            .section p {
                font-size: 12px;
            }

            .assign-btn,
            .connect-btn,
            .save-btn {
                padding: 10px 18px;
                font-size: 13px;
                min-height: 44px; /* Touch-friendly */
            }

            .channel-options {
                margin-left: 0 !important;
                flex-direction: column;
                gap: 12px;
            }

            .channel-option {
                padding: 14px;
                min-height: 48px;
            }

            .message-input,
            .knowledge-base-input {
                width: 100% !important;
                font-size: 14px;
                padding: 10px 12px;
                min-height: 44px;
            }

            .voice-wrap {
                width: 100%;
                margin-top: 12px;
            }

            .voice-trigger {
        width: 100%;
                padding: 12px;
            }

            .voice-pop {
        width: 100%;
                max-width: 100%;
                left: 0;
                right: 0;
            }


            .call-forwarding-container {
                flex-direction: column;
                width: 100%;
                gap: 12px;
                align-items: flex-start;
            }

            .forwarding-input {
                width: 100% !important;
                flex: 1 1 100% !important;
            }

            .modal-content {
                width: 95%;
                max-width: 95%;
                margin: 10px;
                padding: 16px;
            }

            .form-row {
                flex-direction: column;
            }

            .form-group {
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 8px;
            }

            .settings-card {
                padding: 12px;
            }

            .agent-name-title {
                font-size: 20px;
            }

        }



/* ==========================================================================

   MOBILE FIX: Call Forwarding (Reorder & Resize)

   Paste this at the very bottom of agent-settings.css

   ========================================================================== */



@media (max-width: 768px) {

    /* 1. Container Layout: Use Flex Row with wrapping */

    .call-forwarding-container {

        display: flex !important;

        flex-direction: row !important; /* Align toggle & status horizontally */

        flex-wrap: wrap !important;     /* Allow input to drop to next line */

        align-items: center !important;

        gap: 10px !important;

    }



    /* 2. Toggle Switch: Move to First Position & Resize */

    .call-forwarding-container .toggle-switch {

        order: 1 !important;              /* Make it the first item */

        transform: scale(0.8) !important; /* Reduce size to 80% */

        transform-origin: left center !important;

        

        /* Reset any box/card styling from previous mobile styles */

        width: 50px !important; 

        height: 26px !important;

        min-height: 0 !important;

        padding: 0 !important;

        background: transparent !important;

        border: none !important;

        margin: 0 !important;

    }



    /* 3. Status Text (e.g., "Not Enabled"): Move to Second Position */

    #toggle-status {

        order: 2 !important;              /* Place right next to the toggle */

        width: auto !important;

        font-size: 14px !important;

        margin: 0 !important;

    }



    /* 4. Input Field: Move to Third Position (New Line) */

    .forwarding-input {

        order: 3 !important;              /* Place below toggle & status */

        width: 100% !important;           /* Force full width */

        flex-basis: 100% !important;

        margin-top: 8px !important;

    }

}

