/* * ================================================================================================
 * [SECTOR 21] SETTINGS VIEW STYLES
 * ================================================================================================
 */

/* ═══════════════════════════════════════════════════════════════════════════════════════════════ */
/* SETTINGS OVERLAY - Fullscreen overlay outside main (uses main header) */
/* ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 20px) + 90px); /* Leave space for dock */
    z-index: 5000; /* Above main content, below popups */
    background: transparent; /* Transparent to show fog effect */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.35s ease;
    border-radius: 0 0 24px 24px;
}

.settings-overlay.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.settings-overlay .unified-settings {
    padding: 0 !important;
    margin: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════ */

/* 0. SCROLL-SAFE INPUTS - Prevent keyboard opening during scroll */
/* Inputs with this attribute have pointer-events disabled until tapped */
input[data-scroll-safe="true"]:not(:focus),
textarea[data-scroll-safe="true"]:not(:focus),
select[data-scroll-safe="true"]:not(:focus) {
    /* Allow touch events to pass through for scrolling */
    /* Focus will be handled by JavaScript on tap detection */
}

/* 1. ANIMATION */
@keyframes settingsEntry {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. MAIN CONTAINER */
.settings-container {
    width: 90%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 1;
}

#view-settings.active-view .settings-container {
    animation: settingsEntry 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 3. SETTINGS PANELS */
.settings-panel {
    background: rgba(18, 18, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.settings-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent);
    text-transform: uppercase;
}

.settings-panel-header svg {
    stroke: var(--accent);
    opacity: 0.9;
}

/* 4. SETTINGS ITEMS */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.settings-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.settings-item-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.settings-item-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* 5. TOGGLE SWITCH */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: rgba(255, 255, 255, 0.9);
    transition: 0.3s;
    border-radius: 50%;
}

.settings-toggle input:checked + .toggle-slider {
    background-color: var(--accent);
}

.settings-toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background-color: #000;
}

/* 6. THEME SELECTOR */
.settings-theme-selector {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 10px;
}

.theme-btn {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.theme-btn.active {
    background: var(--accent);
    color: #000;
}

/* 7. COLOR PICKER */
.settings-color-picker {
    display: flex;
    gap: 8px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--text);
    box-shadow: 0 0 12px currentColor;
}

.color-swatch.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
}

/* 8. ACTION BUTTONS */
.settings-action-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-align: left;
}

.settings-action-btn:last-child {
    border-bottom: none;
}

.settings-action-btn:hover {
    background: rgba(255, 255, 255, 0.03);
}

.settings-action-btn:active {
    background: rgba(255, 255, 255, 0.05);
}

.settings-action-btn svg {
    stroke: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.settings-action-btn.danger .settings-item-label {
    color: #ff6666;
}

.settings-action-btn.danger .settings-item-desc {
    color: rgba(255, 100, 100, 0.5);
}

.settings-action-btn.danger:hover {
    background: rgba(255, 50, 50, 0.08);
}

/* 9. MINI BUTTON */
.settings-mini-btn {
    padding: 8px 16px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-mini-btn:hover {
    background: var(--accent);
    color: #000;
}

/* 10. BUSINESS HOURS SELECTOR */
.settings-item-hours {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

/* Agenda settings with toggle aligned to title */
.settings-item-agenda .settings-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.settings-item-agenda .settings-item-header .settings-item-info {
    flex: 1;
}

.settings-item-agenda .settings-item-header .settings-toggle {
    margin-left: 12px;
    flex-shrink: 0;
}

/* Sub-item for default availability toggle */
.settings-item-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    margin-top: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
}

.settings-item-sub .settings-item-info {
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}

.settings-item-label-small {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.settings-item-desc-small {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.settings-toggle-small {
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.settings-toggle-small .toggle-slider:before {
    height: 16px;
    width: 16px;
}

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

/* Weekday hours list - compact card layout */
.weekday-hours-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 6px 0;
    width: 100%;
}

.weekday-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s ease;
}

.weekday-row:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.1);
}

.weekday-row.disabled {
    opacity: 0.45;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.03);
}

.weekday-row.disabled .weekday-hours {
    pointer-events: none;
}

/* Weekday toggle - compact */
.weekday-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    width: 36px;
    height: 20px;
}

.weekday-toggle input,
.weekday-toggle input[type="checkbox"] {
    /* Override global hidden checkbox rule */
    position: relative !important;
    opacity: 1 !important;
    width: 36px !important;
    height: 20px !important;
    min-width: 36px;
    min-height: 20px;
    pointer-events: auto !important;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
    border: none;
    outline: none;
}

.weekday-toggle input::before {
    content: '';
    display: block;
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.weekday-toggle input:checked {
    background: var(--accent, #ff6b35);
    box-shadow: 0 0 10px rgba(var(--accent-rgb, 255, 107, 53), 0.3);
}

.weekday-toggle input:checked::before {
    transform: translateX(16px);
    background: #fff;
}

.weekday-name {
    width: 32px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.weekday-row.disabled .weekday-name {
    color: rgba(255, 255, 255, 0.35);
}

/* Weekday hours selectors - compact style */
.weekday-hours {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    gap: 0;
}

.weekday-hours .hour-select {
    width: 54px;
    padding: 6px 0;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: none;
    text-align: center;
    text-align-last: center;
    -moz-text-align-last: center;
}

.weekday-hours .hour-select:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background-color: rgba(0, 0, 0, 0.35);
}

.weekday-hours .hour-select:focus {
    outline: none;
    border-color: var(--accent, #ff6b35);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 255, 107, 53), 0.15);
}

.weekday-hours .hour-select option {
    background: #1a1a1e;
    color: #fff;
    padding: 8px;
}

.weekday-row.disabled .hour-select {
    opacity: 0.35;
    color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

.hour-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    font-weight: 300;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 28px;
    text-align: center;
}

.business-hours-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
    padding: 8px 0;
}

/* Buffer time selector */
.settings-item-buffer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.buffer-time-selector {
    flex-shrink: 0;
}

.buffer-time-selector .hour-select {
    min-width: 110px;
    padding: 8px 12px;
    padding-right: 28px;
    font-size: 0.85rem;
}

.hour-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hour-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hour-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px 16px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    min-width: 90px;
    text-align: center;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.hour-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

.hour-select:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.hour-select option {
    background: #1a1a1e;
    color: var(--text);
    padding: 8px;
}

.hour-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* 11. RESPONSIVE */
@media (max-width: 400px) {
    .settings-container {
        width: 95%;
    }

    .settings-item {
        padding: 14px 16px;
    }

    .settings-panel-header {
        padding: 14px 16px;
    }

    .theme-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .color-swatch {
        width: 24px;
        height: 24px;
    }

    /* Weekday responsive */
    .weekday-row {
        padding: 8px 10px;
        gap: 6px;
    }

    .weekday-name {
        width: 28px;
        font-size: 0.75rem;
    }

    .weekday-toggle input {
        width: 32px;
        height: 18px;
    }

    .weekday-toggle input::before {
        width: 12px;
        height: 12px;
    }

    .weekday-toggle input:checked::before {
        transform: translateX(14px);
    }

    .weekday-hours .hour-select {
        width: 50px;
        padding: 5px 0;
        font-size: 0.72rem;
    }

    .weekday-hours {
        gap: 5px;
    }

    .hour-sep {
        font-size: 0.6rem;
    }

    .hour-select {
        min-width: 75px;
        padding: 8px 12px;
        padding-right: 28px;
        font-size: 0.85rem;
    }

    .business-hours-selector {
        gap: 8px;
    }
}

/* 11. PASSWORD CHANGE MODAL */
.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.settings-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-modal {
    width: 90%;
    max-width: 400px;
    background: rgba(25, 25, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 28px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.settings-modal-overlay.active .settings-modal {
    transform: scale(1) translateY(0);
}

.settings-modal-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

.settings-modal-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s ease;
}

.settings-modal-input:focus {
    border-color: var(--accent);
}

.settings-modal-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.settings-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.settings-modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.settings-modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-modal-btn.confirm {
    background: var(--accent);
    border: none;
    color: #000;
}

.settings-modal-btn.confirm:hover {
    box-shadow: 0 0 20px var(--accent);
}

.settings-modal-btn.danger {
    background: rgba(255, 50, 50, 0.2);
    border: 1px solid #ff6666;
    color: #ff6666;
}

.settings-modal-btn.danger:hover {
    background: #ff6666;
    color: #000;
}

/* 12. SLIDER CONTROLS */
.settings-item-column {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.settings-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.settings-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px;
}

.settings-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--accent);
}

.settings-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--accent);
}

.settings-slider-value {
    min-width: 50px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.settings-toggle-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================================================================================
 * 13. WHATSAPP INTEGRATION STYLES
 * ================================================================================================
 */

/* WhatsApp Status Badge (header) */
.whatsapp-status-badge {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    margin-right: 8px;
    flex-shrink: 0;
}

.whatsapp-status-badge.connected {
    background: rgba(37, 211, 102, 0.2);
    color: #25D366;
}

.whatsapp-status-badge.connecting {
    background: rgba(255, 149, 0, 0.2);
    color: #FF9500;
}

/* Connection Area */
.whatsapp-connection-area {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Status Card */
.wa-status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.wa-status-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-status-icon svg {
    stroke: rgba(255, 255, 255, 0.4);
}

.wa-status-icon.connected {
    background: rgba(37, 211, 102, 0.15);
}

.wa-status-icon.connected svg {
    stroke: #25D366;
}

.wa-status-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wa-status-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.wa-status-phone {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
}

/* QR Code Area */
.wa-qr-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.wa-qr-instruction {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

.wa-qr-container {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-qr-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wa-qr-tip {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    max-width: 250px;
}

/* Connect Button */
.wa-connect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wa-connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.wa-connect-btn:active {
    transform: translateY(0);
}

.wa-connect-btn svg {
    stroke: white;
}

.wa-connect-btn.disconnect {
    background: linear-gradient(135deg, #FF3B30, #FF2D55);
}

.wa-connect-btn.disconnect:hover {
    box-shadow: 0 8px 24px rgba(255, 59, 48, 0.3);
}

.wa-connect-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Sync Contacts Button */
.wa-sync-contacts-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.wa-sync-contacts-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.wa-sync-contacts-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.wa-sync-contacts-btn svg {
    stroke: currentColor;
}

.wa-contacts-count {
    font-size: 0.7rem;
    background: var(--accent);
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    margin-left: 4px;
}

.wa-contacts-count:empty {
    display: none;
}

/* Schedule Section */
.wa-schedule-section {
    padding: 0 20px 20px;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.wa-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.wa-schedule-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Fix para inputs não ultrapassarem o container */
.wa-schedule-form,
.wa-ai-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.wa-schedule-form .kinetic-group,
.wa-ai-section .kinetic-group {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.wa-schedule-form .kinetic-input,
.wa-ai-section .kinetic-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0;
}

/* Custom datetime picker */
.wa-datetime-picker {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.wa-datetime-select {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    text-align-last: center;
}

.wa-datetime-select:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.1);
}

.wa-datetime-select option {
    background: #1a1a1a;
    color: var(--text);
    padding: 10px;
}

.wa-schedule-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent);
    border-radius: 12px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.wa-schedule-btn:hover {
    background: var(--accent);
    color: #000;
}

.wa-schedule-btn svg {
    stroke: currentColor;
}

/* Scheduled Messages List */
.wa-scheduled-list-section {
    padding: 0 20px 20px;
}

.wa-scheduled-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wa-no-scheduled {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    padding: 20px;
}

.wa-scheduled-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.wa-scheduled-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wa-scheduled-item-phone {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

.wa-scheduled-item-message {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-scheduled-item-time {
    font-size: 0.7rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.wa-scheduled-item-cancel {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wa-scheduled-item-cancel:hover {
    background: rgba(255, 59, 48, 0.2);
}

.wa-scheduled-item-cancel svg {
    width: 16px;
    height: 16px;
    stroke: #FF3B30;
}

/* Responsive WhatsApp */
@media (max-width: 400px) {
    .whatsapp-connection-area {
        padding: 16px;
    }

    .wa-status-card {
        padding: 12px;
    }

    .wa-status-icon {
        width: 48px;
        height: 48px;
    }

    .wa-qr-container {
        width: 180px;
        height: 180px;
    }

    .wa-schedule-section,
    .wa-scheduled-list-section {
        padding: 0 16px 16px;
    }
}


/* ==========================================================================
   [AI AUTO-REPLY SECTION] WhatsApp AI Settings
   ========================================================================== */

.wa-ai-section {
    padding: 0 20px 20px;
}

.wa-ai-section .wa-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-ai-section .wa-section-title svg {
    color: var(--accent);
}

/* Toggle Row */
.wa-ai-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wa-ai-toggle-row:last-of-type {
    border-bottom: none;
}

.wa-ai-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wa-ai-toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.wa-ai-toggle-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* AI Settings Panel */
.wa-ai-settings {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
}

.wa-ai-settings.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* AI Level Selector */
.wa-ai-level-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.wa-ai-level-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wa-ai-level-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.wa-ai-level-btn.active {
    background: rgba(var(--accent-rgb, 74, 144, 164), 0.2);
    border-color: var(--accent);
}

.wa-ai-level-btn .level-icon {
    font-size: 1.2rem;
}

.wa-ai-level-btn .level-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wa-ai-level-btn.active .level-name {
    color: var(--accent);
}

/* Save Button */
.wa-ai-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: linear-gradient(135deg, var(--accent), #25D366);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wa-ai-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.wa-ai-save-btn:active {
    transform: translateY(0);
}

.wa-ai-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* AI Status Indicator */
.wa-ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.wa-ai-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.wa-ai-status.active .wa-ai-status-dot {
    background: #25D366;
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.5);
    animation: pulse 2s infinite;
}

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

.wa-ai-status-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.wa-ai-status.active .wa-ai-status-text {
    color: #25D366;
}

/* Kinetic Toggle - styled toggle switch */
.kinetic-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.kinetic-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.kinetic-toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.kinetic-toggle input:checked + .kinetic-toggle-slider {
    background: var(--accent, #4a90a4);
    box-shadow: 0 0 10px rgba(var(--accent-rgb, 74, 144, 164), 0.3);
}

.kinetic-toggle input:checked + .kinetic-toggle-slider:before {
    transform: translateX(20px);
    background: #fff;
}

.kinetic-toggle input:focus + .kinetic-toggle-slider {
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 74, 144, 164), 0.2);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .wa-ai-section {
        padding: 0 16px 16px;
    }

    .wa-ai-level-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .wa-ai-toggle-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .wa-ai-toggle-info {
        flex: 1;
        min-width: 200px;
    }
}


/* ==========================================================================
   [SERVICES SECTION] Gestão de Serviços para Agendamentos
   ========================================================================== */

.settings-section-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    margin: 0 0 16px 0;
    padding: 0;
}

/* Lista de serviços */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.services-list:empty::before {
    content: "Nenhum serviço configurado";
    display: block;
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Item de serviço */
.service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.service-item-color {
    width: 8px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.service-item-info {
    flex: 1;
    min-width: 0;
}

.service-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-item-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.service-item-duration,
.service-item-price {
    display: flex;
    align-items: center;
    gap: 4px;
}

.service-item-duration svg,
.service-item-price svg {
    width: 14px;
    height: 14px;
    stroke: rgba(255, 255, 255, 0.4);
}

.service-item-price {
    color: #66bb6a;
}

.service-item-price svg {
    stroke: #66bb6a;
}

/* Botões de ação do serviço */
.service-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.service-item-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.service-item-btn svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.5);
}

.service-item-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.service-item-btn:hover svg {
    stroke: rgba(255, 255, 255, 0.8);
}

.service-item-btn.delete-btn:hover {
    background: rgba(255, 59, 48, 0.15);
}

.service-item-btn.delete-btn:hover svg {
    stroke: #FF3B30;
}

/* Modal de edição/criação de serviço */
#service-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    animation: serviceOverlayFadeIn 0.2s ease-out;
}

#service-modal-overlay.closing {
    animation: serviceOverlayFadeOut 0.2s ease-in forwards;
}

@keyframes serviceOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes serviceOverlayFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#service-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    max-width: 360px;
    background: #1a1a1a;
    border-radius: 20px;
    z-index: 100001;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: serviceModalScaleIn 0.25s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

#service-modal.closing {
    animation: serviceModalScaleOut 0.2s ease-in forwards;
}

@keyframes serviceModalScaleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes serviceModalScaleOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

#service-modal .service-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
    background: #1e1e1e;
}

#service-modal .service-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    flex: 1;
    text-align: center;
}

#service-modal .service-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

#service-modal .service-modal-close:active {
    background: #2a2a2a;
    color: #fff;
}

#service-modal .service-modal-close svg {
    width: 20px;
    height: 20px;
}

#service-modal .service-modal-body {
    padding: 20px;
}

#service-modal .service-modal-field {
    margin-bottom: 16px;
}

#service-modal .service-modal-field:last-child {
    margin-bottom: 0;
}

#service-modal .service-modal-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 8px;
}

#service-modal .service-modal-input {
    width: 100%;
    padding: 12px 16px;
    background: #121212;
    border: 2px solid #333;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#service-modal .service-modal-input:focus {
    outline: none;
    border-color: #7c4dff;
}

#service-modal .service-modal-input::placeholder {
    color: #555;
}

#service-modal .service-modal-row {
    display: flex;
    gap: 12px;
}

#service-modal .service-modal-row .service-modal-field {
    flex: 1;
}

#service-modal .service-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #2a2a2a;
    background: #1e1e1e;
}

#service-modal .service-modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

#service-modal .service-modal-btn.cancel-btn {
    background: #2a2a2a;
    color: #fff;
}

#service-modal .service-modal-btn.cancel-btn:active {
    background: #333;
}

#service-modal .service-modal-btn.save-btn {
    background: linear-gradient(135deg, #7c4dff 0%, #651fff 100%);
    color: #fff;
}

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

#service-modal .service-modal-btn.delete-btn {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
}

#service-modal .service-modal-btn.delete-btn:active {
    background: rgba(255, 59, 48, 0.25);
}



/* Service Color Picker */
.service-color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.service-color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.service-color-option:hover {
    transform: scale(1.1);
}

.service-color-option.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}


/* ==========================================================================
   [GOOGLE CALENDAR SECTION] Integração Google Calendar
   ========================================================================== */

.gc-status-badge {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    margin-right: 8px;
    flex-shrink: 0;
}

.gc-status-badge.connected {
    background: rgba(37, 211, 102, 0.2);
    color: #25D366;
}

.gc-connection-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.gc-status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gc-status-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gc-status-icon svg {
    stroke: rgba(255, 255, 255, 0.4);
}

.gc-status-icon.connected {
    background: rgba(66, 133, 244, 0.15);
}

.gc-status-icon.connected svg {
    stroke: #4285F4;
}

.gc-status-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gc-status-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.gc-status-email {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
}

/* Connect Button */
.gc-connect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #4285F4, #1a73e8);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

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

.gc-connect-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.gc-connect-btn.disconnect {
    background: linear-gradient(135deg, #EA4335, #d33426);
}

/* Sync Button */
.gc-sync-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(66, 133, 244, 0.1);
    border: 1px solid rgba(66, 133, 244, 0.3);
    border-radius: 12px;
    color: #4285F4;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.gc-sync-btn:active {
    background: rgba(66, 133, 244, 0.2);
}

/* Events Section */
.gc-events-section {
    padding: 0 16px 16px;
}

.gc-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.gc-events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gc-no-events {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    padding: 20px;
}

.gc-event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gc-event-color {
    width: 4px;
    height: 36px;
    background: #4285F4;
    border-radius: 2px;
    flex-shrink: 0;
}

.gc-event-info {
    flex: 1;
    min-width: 0;
}

.gc-event-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-event-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 480px) {
    .gc-status-card {
        padding: 12px;
    }

    .gc-status-icon {
        width: 48px;
        height: 48px;
    }
}

/* ============================================
   AI STUDIO SECTION STYLES
   ============================================ */

.ai-studio-intro {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    line-height: 1.5;
    padding: 0 4px;
}

/* Prompt Section Card */
.ai-prompt-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.ai-prompt-section:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.ai-prompt-section:focus-within {
    border-color: var(--accent, #8B5CF6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Prompt Header */
.ai-prompt-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.ai-prompt-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-prompt-title {
    flex: 1;
}

.ai-prompt-title h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2px 0;
}

.ai-prompt-title span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Prompt Textarea */
.ai-prompt-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    resize: vertical;
    min-height: 80px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.ai-prompt-textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.ai-prompt-textarea:focus {
    outline: none;
    border-color: var(--accent, #8B5CF6);
    background: rgba(0, 0, 0, 0.4);
}

.ai-prompt-textarea::-webkit-scrollbar {
    width: 6px;
}

.ai-prompt-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.ai-prompt-textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Action Buttons */
.ai-studio-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-studio-reset-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-studio-reset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.ai-studio-reset-btn:active {
    transform: scale(0.98);
}

.ai-studio-save-btn {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.ai-studio-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

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

.ai-studio-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Status Message */
.ai-studio-status {
    text-align: center;
    padding: 12px;
    margin-top: 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
}

.ai-studio-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ai-studio-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.ai-studio-status.loading {
    display: block;
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
    .ai-prompt-section {
        padding: 14px;
    }

    .ai-prompt-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .ai-prompt-icon svg {
        width: 14px;
        height: 14px;
    }

    .ai-prompt-title h4 {
        font-size: 0.9rem;
    }

    .ai-prompt-textarea {
        font-size: 0.85rem;
        padding: 12px;
    }

    .ai-studio-actions {
        flex-direction: column;
    }

    .ai-studio-reset-btn,
    .ai-studio-save-btn {
        flex: none;
        width: 100%;
    }
}

/* * ================================================================================================
 * [SECTOR 30] UNIFIED SETTINGS - iOS STYLE
 * ================================================================================================
 */

/* ===== MAIN CONTAINER ===== */
.unified-settings {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background: var(--bg-color);
    touch-action: pan-y;
}

/* ===== SETTINGS PAGES CONTAINER ===== */
.ios-settings-pages {
    position: relative;
    width: 100%;
    height: 100%;
    touch-action: pan-y;
}

/* ===== INDIVIDUAL PAGE ===== */
.ios-settings-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 12px;
    /* FULLSCREEN - com padding-top para header */
    padding-top: 170px;
    padding-bottom: 120px;
    background: transparent; /* Transparent to show fog effect */
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    /* iOS spring-like easing */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.3s ease-out,
                filter 0.4s ease-out,
                visibility 0s linear 0.4s;
}

.ios-settings-page.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    z-index: 2;
    filter: brightness(1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
    /* Premium iOS-style easing for smooth, luxurious feel */
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                filter 0.35s ease-out,
                box-shadow 0.35s ease-out,
                visibility 0s linear 0s;
    /* Force scroll to work */
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Main page doesn't need shadow */
.ios-settings-page[data-page="main"].active {
    box-shadow: none;
}

/* Sub-pages - solid opaque background to cover main page */
.ios-settings-page:not([data-page="main"]) {
    background: var(--bg-color) !important;
}

/* When drilling INTO a sub-page, main exits to the left with dimming */
.ios-settings-page.exiting-left {
    transform: translateX(-25%) !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1;
    filter: brightness(0.6);
    /* Premium iOS-style easing */
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1),
                filter 0.35s ease-out,
                visibility 0s linear 0s;
}

/* When going BACK, sub-page exits to the right */
.ios-settings-page.exiting-right {
    transform: translateX(100%);
    opacity: 0;
    visibility: visible;
    z-index: 3;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
    /* Premium iOS-style easing */
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                visibility 0s linear 0.38s;
}

/* Prepare main page to come from left when returning */
.ios-settings-page.from-left {
    transform: translateX(-25%);
    opacity: 1;
    visibility: visible;
    filter: brightness(0.5);
    transition: none;
}

/* ===== PAGE HEADER (for sub-pages) - HIDDEN, navigation via smart-btn ===== */
.ios-page-header {
    display: none;
}

/* ===== SETTINGS LIST CONTAINER ===== */
.ios-settings-list {
    padding: 0 16px;
    min-height: calc(100vh - 200px);
    max-width: 387px;
    margin: 0 auto;
}

/* Extra space at bottom to ensure scroll works */
.ios-settings-list::after {
    content: '';
    display: block;
    height: 100px;
}

/* ===== SECTION GROUP - CHAT STYLE ===== */
.ios-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 20px;
    margin: 0 auto 16px auto;
    max-width: 323px;
    width: calc(100% - 80px);
    /* Sombra inset para profundidade sem ultrapassar bordas */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04),
                inset 0 -2px 8px rgba(0, 0, 0, 0.2);
    isolation: isolate;
    overflow: hidden;
}

/* Hover only on devices with mouse */
@media (hover: hover) and (pointer: fine) {
    .ios-section {
        transition: border-color 0.3s ease;
    }
    .ios-section:hover {
        border-color: rgba(var(--accent-rgb), 0.2);
    }
}

.ios-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
}

/* Remove border from specific section headers */
#advanced-weekday-section .ios-section-header,
#buffer-time-section .ios-section-header {
    border-bottom: none;
}

.ios-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ios-section:hover .ios-section-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.ios-section-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.ios-section-footer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    padding: 12px 0 0;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.5;
    font-style: italic;
    opacity: 0.8;
}

/* ===== GROUPED LIST ===== */
.ios-group {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

/* ===== LIST ROW - CHAT STYLE ===== */
.ios-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    min-height: auto;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, opacity 0.15s ease;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    -webkit-tap-highlight-color: transparent;
}

.ios-row:first-child {
    padding-top: 0;
}

.ios-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ios-row:not(:last-child)::after {
    display: none;
}

/* Hover state for rows with navigation - only on desktop with mouse */
@media (hover: hover) and (pointer: fine) {
    .ios-row[data-navigate]:hover {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Press feedback - only on devices with hover (prevents scroll interference on touch) */
@media (hover: hover) and (pointer: fine) {
    .ios-row:active:not(.no-tap) {
        background: rgba(255, 255, 255, 0.06);
        transform: scale(0.99);
    }
}

.ios-row.no-tap {
    cursor: default;
}

.ios-row.no-tap:active {
    transform: none;
    background: transparent;
}

/* Row with icon */
.ios-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.ios-row-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Row content */
.ios-row-content {
    flex: 1;
    min-width: 0;
    padding-right: 16px;
}

.ios-row-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.ios-row-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

/* Row value (right side text) */
.ios-row-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

/* Chevron - subtle indicator for navigable rows */
.ios-chevron {
    display: none;
}

.ios-row-chevron {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 2.5;
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .ios-row:active .ios-row-chevron {
        transform: translateX(3px);
        stroke: var(--accent);
    }
}

/* Inline icon for rows */
.ios-row-icon-inline {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2;
}

/* Badges */
.ios-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: auto;
    margin-right: 8px;
    flex-shrink: 0;
}

.ios-badge-red {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.ios-badge-green {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.ios-badge-orange {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
    border: 1px solid rgba(255, 149, 0, 0.3);
}

/* Destructive row */
.ios-row.destructive {
    justify-content: center;
}

.ios-row.destructive .ios-row-title {
    color: #fff7f6;
    text-align: center;
}

@media (hover: hover) and (pointer: fine) {
    .ios-row.destructive:active {
        background: rgba(168, 87, 81, 0.1);
    }
}

/* Danger section */
.ios-section-danger {
    border-color: rgba(168, 87, 81, 0.15);
}

@media (hover: hover) and (pointer: fine) {
    .ios-section-danger:hover {
        border-color: rgba(168, 87, 81, 0.25);
    }
}

/* Empty state */
.ios-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.ios-empty-state svg {
    width: 48px;
    height: 48px;
    stroke: rgba(255, 255, 255, 0.2);
    margin-bottom: 16px;
}

.ios-empty-state p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin: 0;
}

/* Service color indicator for ios-row */
.ios-service-color {
    width: 4px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-right: 12px;
}

.ios-service-row {
    gap: 0;
}

.ios-service-row .ios-row-content {
    flex: 1;
}

/* Service item in list */
.ios-service-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.ios-service-info {
    flex: 1;
    min-width: 0;
}

.ios-service-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.ios-service-details {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.ios-service-price {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-weight: 600;
}

.ios-service-actions {
    display: flex;
    gap: 8px;
}

.ios-service-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ios-service-btn svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.6);
}

.ios-service-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ios-service-btn.delete:hover {
    background: rgba(255, 59, 48, 0.15);
}

.ios-service-btn.delete:hover svg {
    stroke: #FF3B30;
}

/* ===== TOGGLE SWITCH - CHAT STYLE ===== */
.ios-toggle {
    position: relative;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

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

.ios-toggle-track {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.ios-toggle-track::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ios-toggle input:checked + .ios-toggle-track {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.4);
}

.ios-toggle input:checked + .ios-toggle-track::before {
    transform: translateX(22px);
    background: #000;
}

/* Toggle animation with spring effect */
.ios-toggle-track::before {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease;
}

.ios-toggle-track {
    transition: background 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.35s ease;
}

/* ===== DOCK ORDER LIST ===== */
.dock-order-group {
    padding: 0 !important;
}

.dock-order-list {
    display: flex;
    flex-direction: column;
}

.dock-order-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.dock-order-item:active {
    cursor: grabbing;
}

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

.dock-order-item.dragging {
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.9;
    z-index: 10;
}

.dock-order-item.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}

.dock-order-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dock-order-item-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--text);
    stroke-width: 2;
    fill: none;
}

.dock-order-item-name {
    flex: 1;
    font-size: 15px;
    color: var(--text);
    text-align: left;
}

.dock-order-item-handle {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    opacity: 0.4;
}

.dock-order-item-handle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

.dock-order-item.disabled .dock-order-item-handle {
    opacity: 0.15;
}

.dock-order-reset {
    margin-top: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ===== STEPPER CONTROL - CHAT STYLE ===== */
.ios-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
}

.ios-stepper-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.15s cubic-bezier(0.25, 1, 0.5, 1);
    -webkit-tap-highlight-color: transparent;
}

.ios-stepper-btn:hover {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
    transform: scale(1.05);
}

.ios-stepper-btn:active {
    transform: scale(0.92);
    background: rgba(var(--accent-rgb), 0.3);
}

.ios-stepper-btn:active {
    transform: scale(0.95);
}

.ios-stepper-btn:disabled {
    color: rgba(255, 255, 255, 0.2);
}

.ios-stepper-value {
    min-width: 40px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ios-stepper-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
}

/* ===== SELECT DROPDOWN ===== */
.ios-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    text-align: right;
    padding: 8px 24px 8px 12px;
    margin: -8px 0;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* When a value is selected */
.ios-select.has-value {
    color: var(--text);
}

/* Buffer time select always shows value */
#buffer-time-select {
    color: var(--text);
}

.ios-select:hover {
    background-color: transparent;
}

.ios-select:focus {
    outline: none;
    background-color: transparent;
}

/* ===== TEXT INPUT ===== */
.ios-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    text-align: right;
    padding: 8px 0;
    margin: -8px 0;
    transition: all 0.2s ease;
    border-radius: 6px;
}

/* Email input - completely invisible (readonly) */
#inp-email {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* Industry dropdown - adapts to content, max 65% */
#inp-industry {
    width: auto;
    max-width: 65%;
    flex: 0 1 auto;
}

/* Classic agenda hour selectors - compact width */
#classic-hour-open,
#classic-hour-close {
    width: auto;
    min-width: 70px;
    max-width: 85px;
}

.ios-input:hover:not(:focus) {
    background: transparent;
}

.ios-input:focus {
    outline: none;
    background: transparent;
    padding-right: 8px;
    color: var(--accent);
}

.ios-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    transition: opacity 0.2s ease;
}

.ios-input:focus::placeholder {
    opacity: 0.6;
}

/* Full width input - standalone - igual ao perfil */
.ios-input-full {
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.2s ease;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.ios-input-full:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: -1px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    color: #fff;
}

.ios-input-full::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Full width input row */
.ios-row.input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.ios-row.input-row .ios-input,
.ios-row.input-row .ios-textarea {
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
}

.ios-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
}

.ios-textarea:focus {
    outline: none;
}

.ios-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* ===== BUTTONS ===== */
.ios-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.ios-btn:active {
    transform: scale(0.97);
    opacity: 0.85;
}

.ios-btn-primary {
    background: var(--accent);
    color: #000;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.25);
}

.ios-btn-primary:hover {
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.35);
}

.ios-btn-primary:active {
    box-shadow: 0 1px 4px rgba(var(--accent-rgb), 0.2);
}

.ios-btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.ios-btn-whatsapp:hover {
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.ios-btn-whatsapp:active {
    box-shadow: 0 1px 4px rgba(37, 211, 102, 0.2);
}

.ios-btn-whatsapp.disconnect {
    background: linear-gradient(135deg, #FF3B30, #FF2D55);
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.25);
}

.ios-btn-whatsapp.disconnect:hover {
    box-shadow: 0 4px 16px rgba(255, 59, 48, 0.35);
}

.ios-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.ios-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.ios-btn-danger {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.ios-btn-danger:hover {
    background: rgba(255, 59, 48, 0.22);
}

.ios-btn-text {
    background: transparent;
    color: var(--accent);
    padding: 12px;
}

.ios-btn-text:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ios-btn-text:active {
    background: rgba(255, 255, 255, 0.06);
}

/* Destructive row */
.ios-row.destructive .ios-row-title {
    color: #A85751;
}

/* ===== AI MODEL GRID ===== */
.ios-model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
}

.ios-model-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    -webkit-tap-highlight-color: transparent;
}

/* Hover only on devices with mouse - prevents animation during scroll on touch */
@media (hover: hover) and (pointer: fine) {
    .ios-model-card:hover {
        background: rgba(255, 255, 255, 0.08);
        transform: translateY(-2px);
    }

    .ios-model-card.active:hover {
        background: rgba(var(--accent-rgb), 0.15);
    }
}

.ios-model-card:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.97);
}

.ios-model-card.active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.12);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}

.ios-model-icon {
    font-size: 1.3rem;
}

.ios-model-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.ios-model-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== STATUS BADGE ===== */
.ios-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.ios-badge-red {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
}

.ios-badge-green {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
}

.ios-badge-orange {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
}

/* ===== CONNECTION STATUS ===== */
.ios-connection-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin: 0 16px 16px;
    transition: all 0.3s ease;
}

.ios-connection-card.connected {
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.ios-connection-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.ios-connection-icon svg {
    width: 24px;
    height: 24px;
    transition: stroke 0.3s ease;
}

.ios-connection-card.connected .ios-connection-icon {
    background: rgba(52, 199, 89, 0.15) !important;
}

.ios-connection-card.connected .ios-connection-icon svg {
    stroke: #34C759 !important;
}

.ios-connection-info {
    flex: 1;
}

.ios-connection-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    transition: color 0.3s ease;
}

.ios-connection-card.connected .ios-connection-label {
    color: #34C759;
}

.ios-connection-detail {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

/* ===== WEEKDAY GRID ===== */
.ios-weekday-grid {
    padding: 12px 2px;
}

.ios-weekday-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
}

/* Reorder: Day name first, hours middle, toggle last (right side) */
.ios-weekday-row .ios-weekday-name {
    order: 1;
}

.ios-weekday-row .ios-weekday-hours {
    order: 2;
}

.ios-weekday-row .ios-weekday-toggle {
    order: 3;
}

.ios-weekday-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ios-weekday-toggle {
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}

.ios-weekday-toggle .ios-toggle-track {
    width: 44px;
    height: 26px;
}

.ios-weekday-toggle .ios-toggle-track::before {
    height: 22px;
    width: 22px;
}

.ios-weekday-toggle input:checked + .ios-toggle-track::before {
    transform: translateX(18px);
}

.ios-weekday-name {
    width: 36px;
    min-width: 36px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
    text-align: center;
}

.ios-weekday-hours {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.ios-weekday-select {
    width: 68px;
    min-width: 68px;
    padding: 8px 6px;
    background: rgba(0, 0, 0, 0.25);
    border: none;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
}

.ios-weekday-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

/* Disabled weekday row */
.ios-weekday-row.disabled .ios-weekday-name,
.ios-weekday-row.disabled .ios-weekday-hours {
    opacity: 0.35;
    pointer-events: none;
}

.ios-weekday-row.disabled .ios-weekday-select {
    background: rgba(0, 0, 0, 0.15);
}

/* ===== QR AREA ===== */
.ios-qr-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    margin: 0 16px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.ios-qr-instruction {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.ios-qr-container {
    background: white;
    padding: 12px;
    border-radius: 12px;
}

.ios-qr-container img {
    width: 180px;
    height: 180px;
}

/* ===== VERSION INFO ===== */
.ios-version-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    user-select: none;
}

.ios-version-logo {
    font-size: 1.2rem;
    opacity: 0.6;
    animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.ios-version-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ios-version-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    opacity: 0.6;
}

/* ===== LOADING STATE ===== */
.ios-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.ios-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: iosSpinner 0.8s linear infinite;
}

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

/* ===== SAVE FEEDBACK ===== */
.ios-btn.saving {
    pointer-events: none;
    opacity: 0.7;
}

.ios-btn.saved {
    background: #34C759 !important;
    color: #fff !important;
}

.ios-btn.error {
    background: #FF3B30 !important;
    color: #fff !important;
}

/* ===== ACCESSIBILITY ===== */

/* Focus visible states for keyboard navigation */
.ios-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 8px;
}

.ios-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ios-model-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ios-stepper-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.ios-toggle:focus-within .ios-toggle-track {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ios-select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .ios-settings-page,
    .ios-section,
    .ios-row,
    .ios-btn,
    .ios-model-card,
    .ios-toggle-track,
    .ios-toggle-track::before,
    .ios-stepper-btn,
    .ios-version-logo {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .ios-section {
        border-color: rgba(255, 255, 255, 0.3);
    }

    .ios-row {
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    .ios-row-subtitle {
        color: rgba(255, 255, 255, 0.7);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
    .ios-settings-list {
        padding: 16px;
    }

    .ios-section {
        margin-bottom: 28px;
    }

    .ios-model-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ios-row {
        padding: 11px 14px;
    }

    .ios-row-icon {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }

    .ios-row-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ===== HIDE OLD ELEMENTS ===== */
.settings-segments {
    display: none !important;
}

.segment-btn {
    display: none !important;
}

.settings-content {
    display: none !important;
}

.segment-panel {
    display: none !important;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
    white-space: nowrap;
}

.segment-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    opacity: 0.65;
    transition: all 0.2s ease;
}

.segment-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.segment-btn.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}

.segment-btn.active svg {
    stroke: #000;
    opacity: 1;
}

/* Settings Content */
.settings-content {
    padding: 8px 20px 20px;
    max-width: 520px;
    margin: 0 auto;
}

/* Segment Panels */
.segment-panel {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: segmentFadeIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.segment-panel.active {
    display: flex;
}

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

/* Settings Cards */
.settings-card {
    background: rgba(28, 28, 32, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.card-header.expandable {
    cursor: pointer;
}

.card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon svg {
    width: 16px;
    height: 16px;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.compact {
    gap: 6px;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-label.small {
    font-size: 0.72rem;
}

.form-input {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.35);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-textarea {
    min-height: 90px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.form-textarea.tall {
    min-height: 130px;
}

.form-select {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-select.compact {
    padding: 10px 12px;
    font-size: 0.8rem;
    padding-right: 30px;
}

.form-select.mini {
    padding: 8px 10px;
    font-size: 0.75rem;
    padding-right: 26px;
    border-radius: 8px;
    width: 72px;
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #000;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-primary:hover {
    filter: brightness(1.08);
    transform: scale(1.01);
}

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

.btn-primary svg {
    stroke: #000;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

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

.btn-secondary svg {
    stroke: currentColor;
}

.btn-mini {
    padding: 7px 14px;
    border: 1px solid rgba(var(--accent-rgb), 0.6);
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-mini:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: #FF3B30;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    filter: brightness(1.08);
}

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

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 22px;
    border: 1px solid rgba(255, 100, 100, 0.25);
    border-radius: 12px;
    background: rgba(255, 50, 50, 0.08);
    color: #ff6666;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(255, 50, 50, 0.14);
    border-color: rgba(255, 100, 100, 0.4);
}

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

.btn-logout svg {
    stroke: #ff6666;
}

/* Action Rows */
.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.action-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.action-row:active {
    transform: scale(0.99);
}

.action-row svg {
    stroke: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.action-row:hover svg {
    transform: translateX(2px);
}

.action-row.danger {
    color: #ff6666;
}

.action-row.danger:hover {
    background: rgba(255, 50, 50, 0.08);
}

/* Setting Rows */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.setting-row.compact {
    padding: 8px 0;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    padding-right: 16px;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.setting-label.small {
    font-size: 0.82rem;
}

.setting-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.35;
}

.sub-setting {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-top: 6px;
}

.sub-settings {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-top: 10px;
}

/* Toggle Switch (New Design) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch.small {
    width: 42px;
    height: 24px;
}

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

.toggle-track {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 28px;
}

.toggle-track:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: rgba(255, 255, 255, 0.95);
    transition: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.toggle-switch.small .toggle-track:before {
    height: 18px;
    width: 18px;
}

.toggle-switch input:checked + .toggle-track {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-track:before {
    transform: translateX(20px);
    background-color: #000;
}

.toggle-switch.small input:checked + .toggle-track:before {
    transform: translateX(18px);
}

/* Stepper Control */
.stepper-control {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 3px;
}

.stepper-control.small {
    gap: 2px;
    padding: 2px;
}

.stepper-btn {
    width: 34px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stepper-control.small .stepper-btn {
    width: 28px;
    height: 26px;
    font-size: 0.9rem;
}

.stepper-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.stepper-btn:active {
    background: var(--accent);
    color: #000;
    transform: scale(0.95);
}

.stepper-value {
    min-width: 40px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.stepper-control.small .stepper-value {
    min-width: 30px;
    font-size: 0.8rem;
}

/* Range Row */
.range-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.range-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Stat Row */
.stat-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.stat-label {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
    flex: 1;
}

.stat-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

/* AI Model Grid */
.ai-model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ai-model-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ai-model-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.ai-model-card:active {
    transform: scale(0.97);
}

.ai-model-card.active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.12);
}

.model-icon {
    font-size: 1.5rem;
}

.model-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
}

.model-desc {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
}

/* AI Level Selector */
.ai-level-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.level-btn {
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.level-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.level-btn.active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
}

/* Mode Toggle Group */
.mode-toggle-group {
    display: flex;
    gap: 10px;
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.mode-btn.active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--text);
}

.mode-icon {
    font-size: 1.15rem;
}

/* Hours Picker */
.hours-picker {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.hours-separator {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
}

/* Weekday Grid */
.weekday-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weekday-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.weekday-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 65px;
}

.weekday-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.weekday-check span {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
}

.weekday-item .sep {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.25);
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.status-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.status-icon svg {
    stroke: rgba(255, 255, 255, 0.45);
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.status-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}

.status-phone,
.status-email {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.45);
}

.status-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(255, 100, 100, 0.15);
    color: #ff6666;
    margin-left: auto;
    flex-shrink: 0;
}

.status-badge.connected {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
}

/* QR Area */
.qr-area {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 14px;
}

.qr-instruction {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 14px;
}

.qr-container {
    background: white;
    padding: 14px;
    border-radius: 12px;
    display: inline-block;
}

.qr-container img {
    width: 180px;
    height: 180px;
}

/* Events Preview */
.events-preview {
    margin-top: 14px;
}

.preview-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    display: block;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Badge */
.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--accent);
    color: #000;
    margin-left: 8px;
}

/* Divider */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 10px 0;
}

/* Help Text */
.help-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 6px;
    text-align: center;
    line-height: 1.4;
}

/* Version Info */
.version-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 14px;
}

.version-number {
    color: rgba(255, 255, 255, 0.25);
}

/* Responsive */
@media (max-width: 400px) {
    .settings-segments {
        padding: 14px 16px;
        gap: 6px;
    }

    .segment-btn {
        padding: 8px 14px;
        font-size: 0.72rem;
    }

    .segment-btn svg {
        width: 14px;
        height: 14px;
    }

    .settings-content {
        padding: 6px 16px 16px;
    }

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

    .card-header {
        padding: 14px 16px 12px;
    }

    .card-body {
        padding: 14px 16px 16px;
    }

    .ai-model-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-level-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hover effects are now wrapped in @media (hover: hover) and (pointer: fine)
   throughout the file instead of being reset here */


/* ═══════════════════════════════════════════════════════════════════════════
   CHAT SETTINGS SUB-PAGE - Estilos específicos
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sub-settings que aparecem/desaparecem */
.ios-sub-setting {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ios-sub-setting.visible {
    display: flex;
}

/* Chat Mode Toggle */
.ios-chat-mode-toggle {
    display: flex;
    width: 100%;
    gap: 8px;
}

.ios-chat-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ios-chat-mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ios-chat-mode-btn.active {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: rgba(var(--accent-rgb), 0.3);
    color: var(--accent);
}

.ios-chat-mode-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.ios-chat-mode-btn.active svg {
    opacity: 1;
}

/* Cost Input Wrapper */
.ios-cost-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 10px;
}

.ios-cost-input {
    width: 60px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    padding: 8px 0;
    -moz-appearance: textfield;
}

.ios-cost-input::-webkit-outer-spin-button,
.ios-cost-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ios-cost-suffix {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* Cost Result */
.ios-cost-result {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    padding: 16px !important;
    background: rgba(var(--accent-rgb), 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ios-cost-model-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ios-cost-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.ios-cost-breakdown {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PERSONALIDADE & CAPACIDADES - Estilos para as sub-páginas do assistente
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container principal */
.assistant-page .ios-settings-list {
    padding: 0 12px 100px;
}

/* Seções como cards - mesmo estilo que definições principais */
.assistant-page .ios-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 16px;
}

/* Header das seções */
.assistant-page .ios-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 4px;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
}

.assistant-page .ios-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.assistant-page .ios-section-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Grupos sem background */
.assistant-page .ios-group {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

/* Linhas de definições */
.assistant-page .ios-row {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 14px 0;
}

.assistant-page .ios-row:last-child {
    padding-bottom: 0;
}

/* Títulos das linhas - verde accent */
.assistant-page .ios-row-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

/* Subtítulos */
.assistant-page .ios-row-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

/* Textarea do prompt - igual ao perfil, com auto-expand */
.assistant-page .ios-textarea {
    width: 100%;
    min-height: 60px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: none;
    overflow: hidden;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, height 0.15s ease;
    box-sizing: border-box;
    /* Sombra inset sempre visível - como no perfil */
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.assistant-page .ios-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.assistant-page .ios-textarea:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: -1px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    color: #fff;
}

/* Stepper com estilo original */
.assistant-page .ios-stepper {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
}

.assistant-page .ios-stepper-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.assistant-page .ios-stepper-btn:hover {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
}

.assistant-page .ios-stepper-value {
    min-width: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

/* Row containing model grid - no padding for alignment */
.assistant-page .ios-row:has(.ios-model-grid) {
    padding: 0 !important;
}

/* Model Grid - 2x2 grid */
.assistant-page .ios-model-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

/* Model Cards */
.assistant-page .ios-model-card {
    position: relative;
    padding: 10px 8px;
    aspect-ratio: 1 / 1;
    max-height: 110px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
}

/* Hover only on devices with mouse */
@media (hover: hover) and (pointer: fine) {
    .assistant-page .ios-model-card:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }
}

.assistant-page .ios-model-card.active {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}

.assistant-page .ios-model-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.assistant-page .ios-model-icon svg {
    width: 20px;
    height: 20px;
}

.assistant-page .ios-model-icon.ios-model-emoji {
    background: rgba(255, 255, 255, 0.08);
    font-size: 18px;
    line-height: 1;
}


.assistant-page .ios-model-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
}

.assistant-page .ios-model-desc {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Model List - Vertical rows */
.assistant-page .ios-model-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.assistant-page .ios-model-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.assistant-page .ios-model-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (hover: hover) and (pointer: fine) {
    .assistant-page .ios-model-row:hover {
        background: rgba(255, 255, 255, 0.04);
    }
}

.assistant-page .ios-model-row .ios-row-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.5px;
}

.assistant-page .ios-model-row .ios-model-checkmark {
    display: none;
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.assistant-page .ios-model-row .ios-model-checkmark::after {
    content: '✓';
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.assistant-page .ios-model-row.active {
    background: transparent;
}

.assistant-page .ios-model-row.active .ios-row-title {
    color: var(--accent);
    font-weight: 700;
}

.assistant-page .ios-model-row.active .ios-model-checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cost Estimator */
.assistant-page .ios-cost-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 10px;
}

.assistant-page .ios-cost-input {
    width: 60px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    padding: 8px 0;
    -moz-appearance: textfield;
}

.assistant-page .ios-cost-input::-webkit-outer-spin-button,
.assistant-page .ios-cost-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.assistant-page .ios-cost-suffix {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.assistant-page .ios-cost-result {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    width: 100%;
    padding: 20px 0 !important;
    background: rgba(var(--accent-rgb), 0.05);
    border-radius: 12px;
    margin-top: 12px;
}

.assistant-page .ios-cost-model-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.assistant-page .ios-cost-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.assistant-page .ios-cost-breakdown {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Chat Mode Toggle - Parent row centered */
.ios-row:has(#ios-chat-mode-toggle),
.assistant-page .ios-row:has(.ios-chat-mode-toggle) {
    justify-content: center !important;
}

/* Toggle container centered globally */
#ios-chat-mode-toggle {
    margin: 0 auto;
}

/* Chat Mode Toggle - Segmented Control */
.assistant-page .ios-chat-mode-toggle {
    display: flex;
    width: fit-content;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
}

.assistant-page .ios-chat-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    min-width: 100px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.assistant-page .ios-chat-mode-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.assistant-page .ios-chat-mode-btn.active {
    background: var(--accent);
    color: #000;
}

.assistant-page .ios-chat-mode-btn svg {
    width: 14px;
    height: 14px;
}

/* Responsive - 2 colunas em telas pequenas */
@media (max-width: 380px) {
    .assistant-page .ios-model-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   [WHATSAPP AI SECTION] Estilos da secção AI Auto-Reply - Design JS copy 103
   ========================================================================== */

/* AI Section Container */
.wa-ai-section {
    padding: 0 16px 16px;
}

.wa-ai-section .wa-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.wa-ai-section .wa-section-title svg {
    width: 18px;
    height: 18px;
}

/* Toggle Row */
.wa-ai-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wa-ai-toggle-row:last-of-type {
    border-bottom: none;
}

.wa-ai-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wa-ai-toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.wa-ai-toggle-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* AI Settings Panel */
.wa-ai-settings {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.wa-ai-settings.visible {
    max-height: 800px;
    opacity: 1;
    padding-top: 16px;
    animation: slideDown 0.3s ease forwards;
}

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

/* AI Level Selector - Grid 2x2 */
.wa-ai-level-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.wa-ai-level-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wa-ai-level-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.wa-ai-level-btn.active {
    background: rgba(var(--accent-rgb, 74, 144, 164), 0.2);
    border-color: var(--accent);
}

.wa-ai-level-btn .level-icon {
    font-size: 1.5rem;
}

.wa-ai-level-btn .level-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wa-ai-level-btn.active .level-name {
    color: var(--accent);
}

/* Save Button */
.wa-ai-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: linear-gradient(135deg, var(--accent), #25D366);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wa-ai-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.wa-ai-save-btn:active {
    transform: translateY(0);
}

.wa-ai-save-btn svg {
    width: 16px;
    height: 16px;
}

/* AI Status Indicator */
.wa-ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.wa-ai-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.wa-ai-status.active .wa-ai-status-dot {
    background: #25D366;
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.5);
    animation: aipulse 2s infinite;
}

@keyframes aipulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wa-ai-status-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.wa-ai-status.active .wa-ai-status-text {
    color: #25D366;
}

/* ==========================================================================
   [KINETIC TOGGLE] Toggle switch style - Design JS copy 103
   ========================================================================== */

.kinetic-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

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

.kinetic-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.kinetic-toggle-slider:before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.kinetic-toggle input:checked + .kinetic-toggle-slider {
    background: var(--accent, #4a90a4);
    box-shadow: 0 0 10px rgba(var(--accent-rgb, 74, 144, 164), 0.3);
}

.kinetic-toggle input:checked + .kinetic-toggle-slider:before {
    transform: translateX(20px);
    background: #fff;
}

/* ==========================================================================
   [KINETIC INPUT/TEXTAREA] Form inputs - Design JS copy 103
   ========================================================================== */

.kinetic-group {
    margin-bottom: 16px;
}

.kinetic-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kinetic-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.kinetic-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.kinetic-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

textarea.kinetic-input {
    resize: vertical;
    min-height: 80px;
}

/* ==========================================================================
   [SETTINGS DIVIDER] Linha divisória - Design JS copy 103
   ========================================================================== */

.settings-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 16px 0;
}

/* ==========================================================================
   [AI LEVEL SELECTOR] Grid 2x2 para modelos - Design JS copy 103
   ========================================================================== */

.ai-level-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
}

.ai-level-selector .level-btn,
.level-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.ai-level-selector .level-btn:hover,
.level-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.ai-level-selector .level-btn.active,
.level-btn.active {
    background: rgba(var(--accent-rgb, 74, 144, 164), 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================================
   [TOGGLE SWITCH] Style para toggles existentes - Design JS copy 103
   ========================================================================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch.small {
    width: 40px;
    height: 24px;
}

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

.toggle-switch .toggle-track {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.toggle-switch .toggle-track:before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-switch.small .toggle-track:before {
    height: 18px;
    width: 18px;
}

.toggle-switch input:checked + .toggle-track {
    background: var(--accent, #4a90a4);
    box-shadow: 0 0 10px rgba(var(--accent-rgb, 74, 144, 164), 0.3);
}

.toggle-switch input:checked + .toggle-track:before {
    transform: translateX(20px);
    background: #fff;
}

.toggle-switch.small input:checked + .toggle-track:before {
    transform: translateX(16px);
}

/* ==========================================================================
   [SUB-SETTINGS] Painel de sub-definições - Design JS copy 103
   ========================================================================== */

.sub-settings {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.sub-settings.visible,
.sub-settings:not(:empty):not([style*="display: none"]) {
    max-height: 600px;
    opacity: 1;
    padding: 16px 0 0 0;
}

/* Mostrar sub-settings quando o toggle está checked */
#wa-ai-toggle:checked ~ .sub-settings,
.setting-row:has(input:checked) + .sub-settings {
    max-height: 600px;
    opacity: 1;
    padding: 16px 0 0 0;
}

/* ==========================================================================
   [SETTING ROW] Linhas de definições - Design JS copy 103
   ========================================================================== */

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-row:last-of-type {
    border-bottom: none;
}

.setting-row.compact {
    padding: 10px 0;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.setting-label.small {
    font-size: 0.8rem;
}

.setting-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════ */
/* TOKEN TOTAL - Chat Settings */
/* ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.ios-context-group {
    padding: 0 !important;
}

.ios-context-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.ios-context-row .context-label {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.ios-context-row .context-value {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

.ios-context-row .context-value.accent {
    color: var(--accent, #00D4FF);
}

.ios-context-row .context-value.subtle {
    font-weight: 400;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════ */
/* COST DETAILS MODAL - Long Press Panel */
/* ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.cost-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cost-details-modal.visible {
    pointer-events: auto;
    opacity: 1;
}

.cost-details-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cost-details-panel {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    background: rgba(28, 28, 30, 0.98);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.cost-details-modal.visible .cost-details-panel {
    transform: translateY(0);
}

.cost-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(38, 38, 40, 0.9);
}

.cost-details-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
}

.cost-details-close {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cost-details-body {
    padding: 16px;
    padding-bottom: 120px; /* Espaço para dock + safe area */
    overflow-y: auto;
    max-height: calc(85vh - 60px);
    -webkit-overflow-scrolling: touch;
}

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

.cost-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    padding-left: 4px;
}

.cost-current-model {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent, #00D4FF);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.cost-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cost-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.cost-breakdown-item.total {
    grid-column: 1 / -1;
    background: rgba(var(--accent-rgb, 0, 212, 255), 0.15);
    border: 1px solid rgba(var(--accent-rgb, 0, 212, 255), 0.3);
}

.cost-breakdown-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.cost-breakdown-value {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
}

.cost-breakdown-item.total .cost-breakdown-value {
    color: var(--accent, #00D4FF);
}

/* Pricing Table */
.cost-pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.cost-pricing-table thead {
    background: rgba(255, 255, 255, 0.08);
}

.cost-pricing-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
}

.cost-pricing-table td {
    padding: 12px 8px;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cost-pricing-table td small {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.cost-pricing-table .cost-per-msg {
    font-weight: 600;
    color: var(--accent, #00D4FF);
}

.cost-pricing-table tr.model-lite {
    background: rgba(0, 212, 255, 0.08);
}

/* Monthly Grid */
.cost-monthly-grid {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.cost-monthly-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.cost-monthly-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.cost-monthly-row .lite {
    color: #4CD964;
    font-weight: 600;
}

.cost-monthly-row .pro {
    color: #FF9500;
    font-weight: 500;
}

/* Tip */
.cost-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: rgba(76, 217, 100, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(76, 217, 100, 0.2);
}

.cost-tip-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.cost-tip span:last-child {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Long press indicator */
.long-press-hint {
    position: relative;
}

.long-press-hint::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(var(--accent-rgb, 0, 212, 255), 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
}

.long-press-hint.pressing::after {
    width: 100%;
    height: 100%;
}


/* ===== WHATSAPP SCHEDULE MESSAGE ===== */
.ios-settings-page[data-page="whatsapp"] .ios-textarea {
    width: 100%;
    min-height: 70px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    color: var(--text);
    font-size: 14px;
    resize: none;
}

.ios-settings-page[data-page="whatsapp"] .ios-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
}

.ios-settings-page[data-page="whatsapp"] input[type="datetime-local"] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
}

.ios-settings-page[data-page="whatsapp"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
}

#scheduled-messages-container .ios-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#scheduled-messages-container .ios-row:last-child {
    border-bottom: none;
}

