/* ========================================
   CRM SETTINGS - Admin Configuration
   ======================================== */

.crm-settings-grid {
    display: grid;
    gap: 20px;
    max-width: 800px;
}

/* Card */
.crm-settings-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.crm-settings-card.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.crm-settings-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.crm-settings-card-header .card-icon {
    font-size: 18px;
    line-height: 1;
}

.crm-settings-card-header .card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.crm-settings-badge-soon {
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.crm-settings-card-body {
    padding: 20px;
    display: grid;
    gap: 20px;
}

/* Field */
.crm-settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crm-settings-field .field-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.crm-settings-field .field-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: -4px;
}

/* Range field (2 selects with dash) */
.crm-settings-range {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crm-settings-range select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
    min-width: 90px;
}

.crm-settings-range select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.crm-settings-range .range-dash {
    color: #94a3b8;
    font-weight: 500;
}

/* Radio group (pill style) */
.crm-settings-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.crm-settings-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    background: #fff;
    transition: all 0.15s ease;
    user-select: none;
}

.crm-settings-radio:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.crm-settings-radio.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    font-weight: 500;
}

.crm-settings-radio input[type='radio'] {
    display: none;
}

/* Preview */
.crm-settings-preview {
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #fafbfc;
    overflow: hidden;
}

.crm-settings-preview .preview-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.preview-timeline {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.preview-hour-row {
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
}

.preview-hour-label {
    width: 32px;
    font-size: 10px;
    color: #94a3b8;
    text-align: right;
    padding-right: 6px;
    flex-shrink: 0;
    line-height: 1;
    transform: translateY(-5px);
}

.preview-hour-cell {
    flex: 1;
    border-left: 1px solid #e2e8f0;
}

.preview-meeting {
    position: absolute;
    left: 38px;
    right: 4px;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
    border-left: 2px solid #f59e0b;
}

/* Placeholder content */
.crm-settings-placeholder {
    padding: 8px 0;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
}

/* Actions bar */
.crm-settings-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    max-width: 800px;
}

.crm-settings-actions .btn-reset {
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.crm-settings-actions .btn-reset:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.crm-settings-actions .btn-save {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.crm-settings-actions .btn-save:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.crm-settings-actions .btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading */
.crm-settings-loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* Radio group wrap (for many options) */
.crm-settings-radio-group--wrap {
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 640px) {
    .crm-settings-radio-group {
        flex-direction: column;
    }

    .crm-settings-radio {
        justify-content: center;
    }

    .crm-settings-actions {
        flex-direction: column;
        gap: 12px;
    }

    .crm-settings-actions .btn-reset,
    .crm-settings-actions .btn-save {
        width: 100%;
        text-align: center;
    }
}
