/* Settings page styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f3f4f6;
    color: #1e293b;
    min-height: 100vh;
}

/* Header chrome lives in base.css now (.lm-topnav). */

/* Layout */
.settings-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards */
.settings-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.settings-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

/* Form elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.3rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    font-size: 0.875rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s;
}

.form-input:focus { border-color: #3b82f6; }

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    font-size: 0.875rem;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
    outline: none;
}

.form-select:focus { border-color: #3b82f6; }

.form-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

.form-hint.success { color: #10b981; }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }

.btn-secondary { background: #334155; color: #e2e8f0; border: 1px solid #475569; }
.btn-secondary:hover { background: #475569; }

.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }

.btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.btn-ghost:hover { background: #f1f5f9; }

.btn-danger-light {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}
.btn-danger-light:hover { background: #fecaca; }

.btn-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
}

/* Provider list */
.provider-list {
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    overflow: hidden;
}

.provider-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
}

.provider-row:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

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

.provider-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.provider-name.enabled { color: #1e293b; }
.provider-name.disabled { color: #94a3b8; }

.provider-badge {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 3px;
    padding: 1px 5px;
}

.provider-warning {
    margin-left: 0.4rem;
    font-size: 0.7rem;
    color: #f59e0b;
}


/* Active label in provider form */
.provider-active-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.provider-active-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* Provider form */
.provider-form {
    border: 1px solid #cbd5e1;
    border-radius: 0.4rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: #f8fafc;
}

.provider-form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.form-status {
    font-size: 0.78rem;
    color: #94a3b8;
}

.form-status.error { color: #ef4444; }
.form-status.success { color: #10b981; }

/* Action row */
.action-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.status-msg {
    font-size: 0.8rem;
    font-weight: 500;
}

.status-msg.success { color: #10b981; }
.status-msg.error { color: #ef4444; }

/* Customer mapping table */
.cm-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    overflow-x: auto;
    margin-bottom: 0.75rem;
}

.cm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.cm-table th {
    text-align: left;
    font-weight: 600;
    color: #374151;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cm-table td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.cm-table tr:last-child td {
    border-bottom: none;
}

/* Domain chips */
.domain-chip {
    display: inline-block;
    font-size: 0.7rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 3px;
    padding: 1px 6px;
    margin: 1px 2px;
}

/* Separator */
.settings-separator {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 0.75rem 0;
}
