/* Settings & Onboarding Wizard */

/* ═══════════ ONBOARDING WIZARD ═══════════ */

.onboarding-wizard {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0;
  flex-wrap: wrap;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  opacity: 0.4;
  transition: all 0.3s;
}

.wizard-step.active {
  opacity: 1;
  background: var(--card-bg, rgba(88, 166, 255, 0.1));
}

.wizard-step.completed {
  opacity: 0.7;
}

.wizard-step.completed .step-icon::after {
  content: '✓';
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 10px;
  color: #4caf50;
}

.step-icon {
  font-size: 1.5rem;
  position: relative;
}

.step-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #8b949e);
}

.step-connector {
  width: 30px;
  height: 2px;
  background: var(--border-color, #30363d);
}

/* ═══════════ WELCOME STEP ═══════════ */

.welcome-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.welcome-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

.welcome-hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.welcome-subtitle {
  color: var(--text-secondary, #8b949e);
  font-size: 1.1rem;
}

.welcome-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.welcome-card {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.welcome-card span {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.welcome-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.welcome-card p {
  color: var(--text-secondary, #8b949e);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.wizard-hint {
  text-align: center;
  color: var(--text-secondary, #8b949e);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ═══════════ WIZARD ACTIONS ═══════════ */

.wizard-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent, #58a6ff);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary.btn-large {
  padding: 14px 32px;
  font-size: 1.1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary, #8b949e);
  border: 1px solid var(--border-color, #30363d);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { color: var(--text-primary, #e6edf3); border-color: var(--text-secondary, #8b949e); }

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-color, #30363d);
  color: var(--text-secondary, #8b949e);
}

.btn-sm:hover { color: var(--text-primary, #e6edf3); border-color: var(--accent, #58a6ff); }

.btn-link { text-decoration: none; border: none; color: var(--accent, #58a6ff); }
.btn-link:hover { text-decoration: underline; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.btn-icon:hover { opacity: 1; }

.btn-danger {
  background: #da3633;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-danger:hover { background: #f85149; }

/* ═══════════ KEYS STEP ═══════════ */

.keys-step h2, .models-step h2, .agents-step h2, .channels-step h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.step-desc {
  text-align: center;
  color: var(--text-secondary, #8b949e);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.provider-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.provider-card {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1rem;
}

.provider-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

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

.provider-header h3 { margin: 0; font-size: 0.95rem; }
.provider-models { font-size: 0.75rem; color: var(--text-secondary, #8b949e); }

.provider-status {
  margin-left: auto;
  font-size: 1.2rem;
}

.provider-key-input {
  display: flex;
  gap: 6px;
  margin-bottom: 0.5rem;
}

.provider-key-input input {
  flex: 1;
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary, #e6edf3);
  font-family: monospace;
  font-size: 0.85rem;
}

.provider-key-input input:focus {
  outline: none;
  border-color: var(--accent, #58a6ff);
}

.provider-link {
  color: var(--accent, #58a6ff);
  font-size: 0.8rem;
  text-decoration: none;
}

.provider-link:hover { text-decoration: underline; }

.key-security-note {
  display: flex;
  gap: 10px;
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.85rem;
}

.key-security-note span { font-size: 1.2rem; }
.key-security-note a { color: var(--accent, #58a6ff); }

/* ═══════════ MODELS STEP ═══════════ */

.model-assignment {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.model-agent-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1rem;
  flex-wrap: wrap;
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.agent-icon { font-size: 1.5rem; }
.agent-info h3 { margin: 0; font-size: 1rem; }
.agent-role { font-size: 0.75rem; color: var(--text-secondary, #8b949e); }

.model-select {
  flex: 1;
  min-width: 200px;
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary, #e6edf3);
  font-size: 0.85rem;
}

.model-cost {
  font-size: 0.85rem;
  color: var(--text-secondary, #8b949e);
  min-width: 80px;
  text-align: right;
}

.model-cost-summary {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1rem;
}

.model-cost-summary h4 { margin: 0 0 0.75rem; }

.cost-bar {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color, #30363d);
  font-size: 0.85rem;
}

.cost-bar:last-child { border-bottom: none; }
.cost-label { color: var(--text-secondary, #8b949e); }
.cost-value { font-weight: 600; }

/* ═══════════ AGENTS STEP ═══════════ */

.agent-config-cards {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.agent-config-card {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1.25rem;
}

.agent-config-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.agent-big-icon { font-size: 2rem; }

.agent-name-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border-color, #30363d);
  color: var(--text-primary, #e6edf3);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 4px 0;
  width: 200px;
}

.agent-name-input:focus { outline: none; border-color: var(--accent, #58a6ff); }

.agent-default-role {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary, #8b949e);
}

.agent-persona-input {
  width: 100%;
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary, #e6edf3);
  font-size: 0.85rem;
  resize: vertical;
  margin-bottom: 0.75rem;
  font-family: inherit;
}

.agent-persona-input:focus { outline: none; border-color: var(--accent, #58a6ff); }

.agent-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.agent-capabilities label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary, #8b949e);
}

.agent-capabilities input:checked + * { color: var(--text-primary, #e6edf3); }

/* ═══════════ CHANNELS STEP ═══════════ */

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.channel-card {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.channel-card:hover { border-color: var(--accent, #58a6ff); transform: translateY(-2px); }
.channel-card.coming-soon { opacity: 0.5; cursor: default; }
.channel-card.coming-soon:hover { border-color: var(--border-color, #30363d); transform: none; }

.channel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.channel-icon { font-size: 1.5rem; }
.channel-header h3 { margin: 0; font-size: 1rem; flex: 1; }

.badge-popular {
  background: var(--accent, #58a6ff);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-soon {
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary, #8b949e);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
}

.channel-card p {
  color: var(--text-secondary, #8b949e);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.channel-setup-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary, #6e7681);
  display: block;
  margin-bottom: 0.75rem;
}

.btn-channel-connect {
  background: transparent;
  border: 1px solid var(--accent, #58a6ff);
  color: var(--accent, #58a6ff);
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-channel-connect:hover {
  background: var(--accent, #58a6ff);
  color: #fff;
}

/* ═══════════ DONE STEP ═══════════ */

.done-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.done-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
  animation: launch 0.5s ease-out;
}

@keyframes launch {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.done-summary {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.done-summary h3 { margin: 0 0 1rem; }

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color, #30363d);
  font-size: 0.9rem;
}

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

.done-tips {
  max-width: 500px;
  margin: 0 auto 2rem;
}

.tip {
  background: rgba(88, 166, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

/* ═══════════ SETTINGS PANEL ═══════════ */

.settings-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.settings-sidebar {
  width: 220px;
  min-width: 220px;
  border-right: 1px solid var(--border-color, #30363d);
  padding: 1.5rem 0;
  overflow-y: auto;
}

.settings-sidebar h3 {
  padding: 0 1rem;
  margin: 0 0 1rem;
  font-size: 1rem;
}

.settings-nav {
  display: flex;
  flex-direction: column;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 1rem;
  text-decoration: none;
  color: var(--text-secondary, #8b949e);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.settings-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary, #e6edf3);
}

.settings-nav-item.active {
  color: var(--accent, #58a6ff);
  border-left-color: var(--accent, #58a6ff);
  background: rgba(88, 166, 255, 0.08);
}

.settings-footer {
  padding: 1rem;
  margin-top: 2rem;
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
}

.settings-section h2 {
  margin: 0 0 0.5rem;
}

.section-desc {
  color: var(--text-secondary, #8b949e);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ═══════════ API KEYS SETTINGS ═══════════ */

.api-keys-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color, #30363d);
  flex-wrap: wrap;
}

.key-provider {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.key-provider strong { font-size: 0.9rem; }
.key-hint { font-size: 0.75rem; color: var(--text-secondary, #8b949e); display: block; }

.key-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary, #8b949e);
  min-width: 120px;
}

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

.status-dot.status-none { background: #6e7681; }
.status-dot.status-active { background: #4caf50; }
.status-dot.status-error { background: #f85149; }

.key-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* Key input modal */
.key-input-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-primary, #0d1117);
  border: 1px solid var(--border-color, #30363d);
  border-radius: 12px;
  padding: 1.5rem;
  width: 90%;
  max-width: 500px;
}

.modal-content h3 { margin: 0 0 1rem; }

.modal-content input {
  width: 100%;
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-primary, #e6edf3);
  font-family: monospace;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.modal-content input:focus { outline: none; border-color: var(--accent, #58a6ff); }

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.test-success { color: #4caf50; font-size: 0.85rem; }
.test-fail { color: #f85149; font-size: 0.85rem; }
.testing { color: var(--text-secondary, #8b949e); font-size: 0.85rem; }

/* ═══════════ MODEL CONFIG ═══════════ */

.model-config {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.model-config-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1rem;
  flex-wrap: wrap;
}

.model-agent {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.agent-role-tag {
  font-size: 0.7rem;
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent, #58a6ff);
  padding: 2px 8px;
  border-radius: 10px;
}

.model-selectors {
  display: flex;
  gap: 1rem;
  flex: 1;
  flex-wrap: wrap;
}

.model-selectors .form-group { flex: 1; min-width: 180px; }

.smart-routing-toggle {
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  background: rgba(88, 166, 255, 0.08);
  border-radius: 8px;
}

/* ═══════════ FORMS ═══════════ */

.settings-form {
  max-width: 500px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary, #e6edf3);
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent, #58a6ff);
}

.form-group input:disabled { opacity: 0.5; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text-secondary, #8b949e);
  margin-top: 4px;
  display: block;
}

.theme-options {
  display: flex;
  gap: 8px;
}

.theme-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #30363d);
  background: transparent;
  color: var(--text-secondary, #8b949e);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.theme-btn:hover { border-color: var(--accent, #58a6ff); }
.theme-btn.active { border-color: var(--accent, #58a6ff); color: var(--accent, #58a6ff); background: rgba(88, 166, 255, 0.1); }

/* ═══════════ TOGGLES ═══════════ */

.toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
}

.toggle-text {
  display: flex;
  flex-direction: column;
}

.toggle-text strong { font-size: 0.9rem; }
.toggle-text span { font-size: 0.8rem; color: var(--text-secondary, #8b949e); }

/* ═══════════ USAGE & BILLING ═══════════ */

.usage-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.usage-card {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}

.usage-card h4 { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--text-secondary, #8b949e); }
.usage-big-number { font-size: 2rem; font-weight: 700; color: var(--accent, #58a6ff); }
.usage-period { font-size: 0.75rem; color: var(--text-secondary, #8b949e); }

.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.usage-table th,
.usage-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #30363d);
}

.usage-table th { color: var(--text-secondary, #8b949e); font-weight: 600; }

.plan-card {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.plan-name { font-weight: 700; font-size: 1.1rem; }
.plan-price { color: var(--text-secondary, #8b949e); flex: 1; }

/* ═══════════ SECURITY ═══════════ */

.security-settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.security-item {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.security-item h3 { margin: 0; font-size: 0.95rem; min-width: 200px; }
.security-item p { margin: 0; color: var(--text-secondary, #8b949e); font-size: 0.85rem; flex: 1; }

.badge { padding: 4px 10px; border-radius: 10px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: rgba(76, 175, 80, 0.2); color: #4caf50; }

/* ═══════════ NOTIFICATION SETTINGS ═══════════ */

.notification-settings {
  max-width: 500px;
}

.notification-settings .form-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-settings .form-group input[type="number"] {
  width: 100px;
}

/* ═══════════ ADVANCED ═══════════ */

.advanced-settings {
  max-width: 500px;
}

/* ═══════════ CONSENT ═══════════ */

.consent-section {
  max-width: 500px;
  margin: 1.5rem auto;
  text-align: left;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.consent-check input { margin-top: 3px; }
.consent-check a { color: var(--accent, #58a6ff); }

/* ═══════════ CHANNEL MODALS ═══════════ */

.channel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.channel-modal {
  background: var(--bg-primary, #0d1117);
  border: 1px solid var(--border-color, #30363d);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.channel-setup { padding: 1.5rem; }

.channel-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.channel-setup-header h2 { margin: 0; }

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.setup-step {
  display: flex;
  gap: 1rem;
}

.step-number {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--accent, #58a6ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.step-content { flex: 1; }
.step-content h3 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.step-content ol { margin: 0.5rem 0; padding-left: 1.5rem; font-size: 0.85rem; line-height: 1.6; }
.step-content ol li { margin-bottom: 4px; }
.step-content p { font-size: 0.85rem; color: var(--text-secondary, #8b949e); margin: 0.25rem 0; }
.step-content code { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; }

.step-content input,
.step-content select {
  width: 100%;
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary, #e6edf3);
  font-size: 0.9rem;
  margin-top: 4px;
}

.step-content input:focus, .step-content select:focus {
  outline: none;
  border-color: var(--accent, #58a6ff);
}

.channel-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #30363d);
}

.agent-email-box, .webhook-url-box, .invite-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
}

.agent-email-box code, .webhook-url-box code, .invite-link-box code {
  flex: 1;
  word-break: break-all;
  background: none;
  padding: 0;
}

.code-example {
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 12px;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-primary, #e6edf3);
  font-family: monospace;
}

.badge-connected {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.channel-connected { border-color: rgba(76, 175, 80, 0.3) !important; }
.provider-connected { border-color: rgba(76, 175, 80, 0.3) !important; }
.btn-connected { background: rgba(76, 175, 80, 0.1); border-color: #4caf50; color: #4caf50; }

/* ═══════════ KEY INPUT INLINE ═══════════ */

.key-input-inline {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--accent, #58a6ff);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
}

.key-input-inline h3 { margin: 0 0 0.75rem; font-size: 0.95rem; }

.key-input-inline input {
  width: 100%;
  background: var(--input-bg, rgba(0,0,0,0.3));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary, #e6edf3);
  font-family: monospace;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.key-input-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.key-active { background: rgba(76, 175, 80, 0.03); }
.key-timestamp { font-size: 0.7rem; color: var(--text-tertiary, #6e7681); margin-left: 4px; }
.btn-danger-sm { color: #f85149; border-color: #f85149; }
.btn-danger-sm:hover { background: rgba(248, 81, 73, 0.1); }

/* ═══════════ DATA / IMPORT-EXPORT ═══════════ */

.data-actions {
  display: grid;
  gap: 1rem;
}

.data-card {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  padding: 1.25rem;
}

.data-card h3 { margin: 0 0 0.5rem; }
.data-card p { color: var(--text-secondary, #8b949e); font-size: 0.85rem; margin: 0 0 1rem; }

/* ═══════════ AUDIT LOG ═══════════ */

.audit-log-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color, #30363d);
  border-radius: 8px;
}

.audit-entry {
  display: flex;
  gap: 1rem;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color, #30363d);
  font-size: 0.8rem;
  align-items: center;
}

.audit-entry:last-child { border-bottom: none; }
.audit-time { color: var(--text-tertiary, #6e7681); min-width: 150px; font-family: monospace; font-size: 0.75rem; }
.audit-action { color: var(--accent, #58a6ff); font-weight: 600; min-width: 120px; }
.audit-detail { color: var(--text-secondary, #8b949e); }
.audit-empty { text-align: center; padding: 2rem; color: var(--text-secondary, #8b949e); }

/* ═══════════ AGENT BOUNDARIES ═══════════ */

.agent-boundaries {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, #30363d);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  align-items: center;
}

.boundaries-label { color: var(--text-secondary, #8b949e); font-weight: 600; }

.agent-boundaries label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary, #8b949e);
}

/* ═══════════ MODEL COST TAGS ═══════════ */

.model-cost-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.tier-premium { background: rgba(255, 166, 0, 0.15); color: #ffa600; }
.tier-balanced { background: rgba(88, 166, 255, 0.15); color: #58a6ff; }
.tier-fast { background: rgba(76, 175, 80, 0.15); color: #4caf50; }
.tier-ultra-fast { background: rgba(76, 175, 80, 0.25); color: #66bb6a; }
.tier-free { background: rgba(255, 255, 255, 0.1); color: #8b949e; }

.cost-note {
  font-size: 0.75rem;
  color: var(--text-tertiary, #6e7681);
  margin-top: 0.5rem;
  text-align: center;
}

.no-keys-warning {
  background: rgba(255, 166, 0, 0.1);
  border: 1px solid rgba(255, 166, 0, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
}

.no-keys-warning a { color: var(--accent, #58a6ff); }

/* ═══════════ TOAST ═══════════ */

.settings-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent, #58a6ff);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.settings-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════ DANGER ZONE ═══════════ */

.security-danger {
  border-top: 2px solid #f85149;
  padding-top: 1rem;
}

.security-item.danger {
  border-color: rgba(248, 81, 73, 0.3);
}

.security-item.danger h3 { color: #f85149; }

/* ═══════════ PROFILE STEP ═══════════ */

.profile-form {
  max-width: 450px;
  margin: 0 auto;
}

.provider-key-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 768px) {
  .settings-layout { flex-direction: column; }
  .settings-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-color, #30363d);
    padding: 1rem 0;
  }
  .settings-nav { flex-direction: row; overflow-x: auto; padding: 0 1rem; gap: 4px; }
  .settings-nav-item {
    padding: 8px 12px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    font-size: 0.8rem;
  }
  .settings-nav-item.active { border-left-color: transparent; border-bottom-color: var(--accent, #58a6ff); }
  .settings-content { padding: 1rem; }
  .settings-footer { display: none; }
  
  .wizard-progress { gap: 4px; }
  .step-connector { width: 15px; }
  .step-label { display: none; }
  
  .welcome-cards { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .model-agent-row { flex-direction: column; align-items: flex-start; }
  
  .api-key-row { flex-direction: column; align-items: flex-start; }
  .key-actions { margin-left: 0; }
}
