/* ============================================================
   ALVARADO RECUPERACIÓN - DASHBOARD STYLES
   ============================================================ */

:root {
    --primary: #00529F;
    --primary-light: #3b82f6;
    --primary-dark: #00386F;
    --background: #111315;
    --surface: #1a1d20;
    --surface-light: #262a2e;
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #2e3338;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

/* App Container Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.logo-circle {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 82, 159, 0.3);
}

.brand-info h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text);
}

.brand-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.sidebar-nav li:hover {
    background-color: var(--surface-light);
    color: var(--text);
}

.sidebar-nav li.active {
    background-color: rgba(0, 82, 159, 0.15);
    color: var(--primary-light);
    font-weight: 600;
}

.sidebar-nav li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    background-color: var(--primary-light);
    border-radius: 0 4px 4px 0;
}

.sidebar-nav li i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.badge {
    background-color: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.pulse.green {
    background-color: var(--success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulsing 1.6s infinite;
}

.pulse.red {
    background-color: var(--danger);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulsing 1.6s infinite;
}

@keyframes pulsing {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Main Content Styling */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.content-header {
    height: 70px;
    padding: 0 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--surface);
}

.content-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.notification-icon:hover {
    color: var(--text);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-light);
}

/* Tab Panes */
.tab-pane {
    display: none;
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

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

/* Resumen/Dashboard Tab Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon.blue { background-color: rgba(0, 82, 159, 0.15); color: var(--primary-light); }
.stat-icon.purple { background-color: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.stat-icon.orange { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stat-icon.green { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-icon.red { background-color: rgba(239, 68, 68, 0.15); color: #f87171; }
.stat-icon.gray { background-color: rgba(107, 114, 128, 0.15); color: #9ca3af; }

.stat-details h3 {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-details p {
    font-size: 1.5rem;
    font-weight: 700;
}

.dashboard-details-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
}

.detail-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-header {
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.health-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.health-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.service-name {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge.online {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-badge.online .dot {
    background-color: var(--success);
}

.status-badge.offline {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.status-badge.offline .dot {
    background-color: var(--danger);
}

.status-badge.error {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.status-badge.error .dot {
    background-color: #f59e0b;
}

.info-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.campaign-quick-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.campaign-quick-controls span {
    font-weight: 500;
    font-size: 0.9rem;
}

.badge-status-active {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
}

.badge-status-inactive {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Contacts Tab Bar & Actions */
.action-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px 12px 48px;
    color: var(--text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-group select {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}

.btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--surface-light);
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background-color: var(--border);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* Tables */
.table-container {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 16px 20px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background-color: var(--surface-light);
    font-weight: 600;
    color: var(--text-muted);
}

.data-table tbody tr:hover {
    background-color: var(--surface-light);
}

.badge-state {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-state.nuevo { background-color: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-state.validado { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-state.enviado { background-color: rgba(139, 92, 246, 0.15); color: #c084fc; }
.badge-state.respondio { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-state.interesado { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-state.no-interesado { background-color: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-state.invalido { background-color: rgba(107, 114, 128, 0.15); color: #9ca3af; }
.badge-state.derivado { background-color: rgba(6, 182, 212, 0.15); color: #22d3ee; }

.badge-category {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}
.badge-category.ex-socio { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-category.socio-activo { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-category.desconocido { background-color: rgba(107, 114, 128, 0.15); color: #9ca3af; }


.action-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.action-icon-btn:hover {
    background-color: var(--border);
    color: var(--text);
}

.action-icon-btn.danger {
    color: #f87171;
}

.action-icon-btn.danger:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.action-icon-btn.start-ai {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.3);
}

.action-icon-btn.start-ai:hover {
    background: rgba(167, 139, 250, 0.15);
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.6);
}

.action-icon-btn.warning {
    color: #fcd34d;
}

.action-icon-btn.warning:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}


.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

/* CRM/Conversations Section */
.crm-container {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 12px;
    height: calc(100vh - 170px);
    overflow: hidden;
    background-color: var(--surface);
    box-shadow: var(--shadow);
}

.crm-list-column {
    width: 320px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.crm-list-column .column-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background-color: var(--surface-light);
}

.crm-list {
    flex: 1;
    overflow-y: auto;
}

.crm-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.crm-item:hover {
    background-color: var(--surface-light);
}

.crm-item.active {
    background-color: rgba(0, 82, 159, 0.12);
    border-left: 4px solid var(--primary-light);
    padding-left: 16px;
}

.crm-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.crm-item-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.crm-item-header span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.crm-item-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.crm-item-badges {
    display: flex;
    gap: 6px;
}

.crm-chat-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 16px;
}

.chat-empty-state i {
    font-size: 3rem;
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background-color: var(--surface-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-user-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.status-indicator-inline {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-controls {
    display: flex;
    align-items: center;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

.switch-container input {
    display: none;
}

.slider {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    background-color: var(--border);
    border-radius: 20px;
    transition: var(--transition);
}

.slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
}

input:checked + .slider {
    background-color: var(--success);
}

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

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #131619;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-bubble.incoming {
    align-self: flex-start;
    background-color: var(--surface-light);
    border-bottom-left-radius: 2px;
    color: var(--text);
}

.message-bubble.outgoing {
    align-self: flex-end;
    background-color: var(--primary);
    border-bottom-right-radius: 2px;
    color: white;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border);
    background-color: var(--surface-light);
    display: flex;
    gap: 12px;
}

.chat-input-area textarea {
    flex: 1;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    height: 50px;
    outline: none;
    transition: var(--transition);
}

.chat-input-area textarea:focus {
    border-color: var(--primary-light);
}

/* Campaign Management */
.campaign-management-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.campaign-management-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.campaign-management-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 30px;
}

.campaign-status-display {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 30px;
}

.status-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.status-circle.active {
    background-color: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.status-circle.inactive {
    background-color: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.status-text .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.status-text .value {
    font-size: 1.2rem;
    font-weight: 700;
}

.campaign-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
}

.btn-large {
    flex: 1;
    padding: 16px 24px;
    font-size: 1rem;
    justify-content: center;
}

.campaign-warning {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Config card styling */
.config-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.config-card h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.config-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-group textarea {
    height: 90px;
    font-family: inherit;
    resize: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-light);
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Logs Panel Styling */
.logs-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    height: calc(100vh - 170px);
    display: flex;
    flex-direction: column;
}

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

.logs-output {
    flex: 1;
    background-color: #0c0e10;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    overflow-y: auto;
    line-height: 1.5;
    color: #e5e7eb;
}

.log-entry {
    margin-bottom: 8px;
}

.log-entry.error { color: #f87171; }
.log-entry.info { color: #34d399; }
.log-entry.warn { color: #fbbf24; }

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--text);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --- WhatsApp de Campaña & Google Sheets Sync Styles --- */
.whatsapp-management-card, .google-sheets-sync-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.whatsapp-management-card h2, .google-sheets-sync-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-management-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.whatsapp-status-display {
    padding: 15px;
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 20px;
}

.whatsapp-status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.whatsapp-actions-box {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
}

.pairing-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.pairing-input-group input {
    flex: 1;
    padding: 10px 14px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
}

.qr-code-container {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.qr-code-container img {
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pairing-code-display {
    text-align: center;
    background-color: var(--surface);
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.pairing-code-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-top: 5px;
    letter-spacing: 2px;
}

/* --- Google Sheets Sync Card --- */
.sync-input-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}

.flex-input {
    flex: 1;
}

.flex-input input {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}

.sync-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.metric-item {
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* --- Info Only Fields --- */
.info-only-group {
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 15px;
}

.info-only-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 5px 0;
    letter-spacing: 0.5px;
}
