/* ─── Design system ─── */
:root {
  --bg:       #0a0a0a;
  --surface:  #141414;
  --raised:   #1a1a1a;
  --border:   #222;
  --border-l: #2a2a2a;
  --text:     #ececec;
  --text-2:   #a0a0a0;
  --text-3:   #666;
  --accent:   #7c6cf0;
  --accent-2: #6958d9;
  --green:    #3ecf8e;
  --red:      #e5484d;
  --yellow:   #f5a623;
  --radius:   6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(124, 108, 240, 0.3); }

/* ─── Layout ─── */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }
.hidden { display: none !important; }

/* ─── Top bars ─── */
.admin-banner,
.customer-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-banner-content,
.customer-banner-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-banner h1,
.customer-banner h1 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.customer-banner-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.customer-name {
  color: var(--text-2);
  font-size: 0.85rem;
}

/* ─── Buttons ─── */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-l);
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
button:hover, .btn:hover {
  background: var(--border-l);
  border-color: #333;
}
button:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-l);
  color: var(--text-2);
}
.btn-secondary:hover {
  background: var(--raised);
  color: var(--text);
}

button.danger, .btn-danger {
  background: transparent;
  border-color: var(--red);
  color: var(--red);
}
button.danger:hover, .btn-danger:hover {
  background: rgba(229, 72, 77, 0.1);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-l);
  color: var(--text-2);
  height: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
}
.btn-logout:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(229, 72, 77, 0.08);
}

button.compact-btn { height: 30px; padding: 0 10px; font-size: 0.75rem; }

.btn-small {
  height: 26px;
  padding: 0 8px;
  font-size: 0.72rem;
  border-radius: 4px;
}

.btn-provision {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-provision:hover { background: var(--accent-2); }

.btn-loading { opacity: 0.5; pointer-events: none; }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.card.hidden { display: none; }

/* ─── Hero (guest login page) ─── */
.hero {
  padding: 3rem 0 1rem;
  text-align: center;
}
.hero h1 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.tagline {
  color: var(--text-3);
  font-size: 0.95rem;
}

/* ─── Auth / Forms ─── */
form { display: flex; flex-direction: column; gap: 0.85rem; }
form.compact { gap: 0.7rem; }

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
}
label.inline {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 400;
}

input, textarea, select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-l);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  transition: border-color 0.15s;
}
textarea { height: auto; padding: 8px 10px; min-height: 60px; resize: vertical; }
select { cursor: pointer; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 108, 240, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-3);
}

label small, .help-text {
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 400;
}

h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1rem; }
h3 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.75rem; }
h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }

/* ─── Text utilities ─── */
.muted-text { color: var(--text-3); font-size: 0.85rem; }
.text-link { color: var(--accent); font-size: 0.85rem; }
.text-link:hover { color: var(--accent-2); text-decoration: underline; }
.required { color: var(--red); }
.note { color: var(--text-3); font-size: 0.85rem; }

/* ─── Layout utilities ─── */
.grid { display: grid; gap: 1rem; }
.two-col { grid-template-columns: 1fr 1fr; }
.row { display: flex; gap: 0.75rem; align-items: center; }
.spread { justify-content: space-between; }
.row.gap-small { gap: 0.35rem; flex-wrap: wrap; }
.top-divider { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--border); }

/* ─── Badges ─── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 50px;
  background: rgba(124, 108, 240, 0.12);
  color: var(--accent);
  border: 1px solid rgba(124, 108, 240, 0.2);
}
.primary-badge {
  background: rgba(62, 207, 142, 0.12);
  color: var(--green);
  border-color: rgba(62, 207, 142, 0.2);
}
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-running  { background: rgba(62,207,142,0.12); color: var(--green); }
.status-paused   { background: rgba(245,166,35,0.12); color: var(--yellow); }
.status-stopped, .status-exited { background: rgba(229,72,77,0.12); color: var(--red); }
.status-dry-run  { background: rgba(160,160,160,0.1); color: var(--text-3); }
.status-none     { background: rgba(160,160,160,0.08); color: var(--text-3); }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.table-wrap table th,
.table-wrap table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-wrap table th {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-l);
}
.table-wrap table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ─── Toast ─── */
.toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 500;
  max-width: 380px;
  transform: translateX(120%);
  transition: transform 0.25s ease;
  word-break: break-word;
}
.toast.visible { transform: translateX(0); }
.toast-success { background: var(--surface); color: var(--green); border: 1px solid rgba(62,207,142,0.3); }
.toast-error   { background: var(--surface); color: var(--red); border: 1px solid rgba(229,72,77,0.3); }

/* ─── Log levels ─── */
.log-level {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.log-info  { background: rgba(124,108,240,0.12); color: var(--accent); }
.log-warn  { background: rgba(245,166,35,0.12); color: var(--yellow); }
.log-error { background: rgba(229,72,77,0.12); color: var(--red); }
.log-details {
  font-size: 0.72rem;
  color: var(--text-3);
  background: var(--bg);
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  word-break: break-all;
}
.logs-table table { font-size: 0.78rem; }
.logs-table table td { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

/* ─── Admin layout ─── */
.admin-container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.admin-layout { display: flex; gap: 1.5rem; min-height: 600px; }

.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  padding-top: 0.5rem;
  position: sticky;
  top: 64px;
  height: fit-content;
}
.admin-sidebar-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.admin-sidebar-header h2 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}

.admin-menu { display: flex; flex-direction: column; gap: 2px; }
.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 450;
  transition: background 0.12s, color 0.12s;
}
.admin-menu-item:hover {
  background: var(--raised);
  color: var(--text);
  text-decoration: none;
}
.admin-menu-item.active {
  background: rgba(124,108,240,0.1);
  color: var(--accent);
  font-weight: 500;
}
.admin-menu-item span { font-size: 0.85rem; width: 1.2rem; text-align: center; }

.admin-content { flex: 1; min-width: 0; }
.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.admin-section-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.admin-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.form-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.form-checkboxes { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.75rem 0; }

/* ─── Customer top nav ─── */
.customer-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.customer-nav-item {
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.customer-nav-item:hover {
  color: var(--text);
  text-decoration: none;
}
.customer-nav-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Customer tab panels ─── */
.customer-tab { display: none; }
.customer-tab.active { display: block; }

/* ─── Customer dashboard ─── */
.customer-dashboard { background: var(--surface); }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.dashboard-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.dashboard-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 600;
}
.dashboard-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-transform: capitalize;
}
.plan-badge { color: var(--accent); }

/* ─── Skills list ─── */
.skills-list { display: flex; flex-direction: column; gap: 0; }
.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.skill-row:last-child { border-bottom: none; }
.skill-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.skill-name { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.skill-desc { font-size: 0.78rem; color: var(--text-3); }
.skill-right { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.skill-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  text-transform: capitalize;
}
.skill-ready  { background: rgba(62,207,142,0.12); color: var(--green); }
.skill-pending { background: rgba(245,166,35,0.12); color: var(--yellow); }
.skill-setup  { background: rgba(160,160,160,0.1); color: var(--text-3); }

/* Skill row wrapping — allow accounts list below */
.skill-row { flex-wrap: wrap; }
.skill-accounts {
  width: 100%;
  margin-top: 0.3rem;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.skill-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.6rem;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
}
.skill-account-email {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-account-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.badge-preferred {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 50px;
  background: rgba(62,207,142,0.15);
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.btn-link:hover { color: var(--accent-hover, var(--accent)); }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover { opacity: 0.8; }

/* ─── Provider picker modal ─── */
.provider-picker { max-width: 380px; }
.provider-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.provider-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
  color: var(--text);
}
.provider-option:hover {
  border-color: var(--accent);
}
.provider-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 6px;
  background: var(--border);
  color: var(--text);
  flex-shrink: 0;
}
.provider-detail { display: flex; flex-direction: column; gap: 0.1rem; }
.provider-name { font-size: 0.88rem; font-weight: 500; }
.provider-desc { font-size: 0.72rem; color: var(--text-3); }

/* ─── Billing grid ─── */
.billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}
.billing-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.billing-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 600;
}
.billing-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-transform: capitalize;
}
.billing-value.accent { color: var(--accent); }

/* ─── Chat ─── */
.chat-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.chat-messages {
  min-height: 180px;
  max-height: 380px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg);
}
.chat-form {
  display: flex;
  flex-direction: row;
  gap: 0;
  border-top: 1px solid var(--border);
}
.chat-form input {
  flex: 1;
  border: none;
  border-radius: 0;
  background: var(--surface);
  height: 42px;
}
.chat-form button {
  border: none;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  height: 42px;
  padding: 0 1.25rem;
}
.chat-form button:hover { background: var(--accent-2); }

.chat-message {
  margin-bottom: 0.6rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  max-width: 82%;
  font-size: 0.85rem;
  line-height: 1.5;
}
.chat-message.user {
  background: rgba(124,108,240,0.12);
  margin-left: auto;
  text-align: right;
}
.chat-message.assistant {
  background: var(--raised);
}

/* ─── Files ─── */
.file-list { margin-top: 0.75rem; }
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.file-name { font-weight: 500; }
.file-meta { font-size: 0.75rem; color: var(--text-3); }
.file-actions { display: flex; gap: 0.35rem; }

/* ─── Output pre ─── */
.output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-size: 0.78rem;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
  color: var(--text-2);
}

/* ─── Modal ─── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-l);
  padding: 1.5rem;
  border-radius: var(--radius);
  max-width: 460px;
  width: 90%;
}
.modal-content h2 { margin-top: 0; }

.setup-intro { margin-bottom: 1rem; color: var(--text-2); font-size: 0.88rem; line-height: 1.6; }

#agent-name-display { font-weight: 400; color: var(--text-3); font-size: 0.85em; margin-left: 0.4rem; }

.setup-progress { margin-bottom: 1rem; }
.setup-progress #setup-progress-text { display: block; margin-bottom: 0.4rem; color: var(--text-3); font-size: 0.8rem; }
.progress-bar { width: 100%; height: 4px; background: var(--border-l); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.3s; width: 0%; }

.setup-step { display: block; }
.setup-step.hidden { display: none; }
.setup-buttons { display: flex; gap: 0.75rem; margin-top: 1rem; justify-content: space-between; }
.secondary-btn { background: var(--raised); border-color: var(--border-l); color: var(--text-2); }
.secondary-btn:hover { background: var(--border-l); color: var(--text); }

#question-content { margin-bottom: 0.75rem; }
.question-help { font-size: 0.8rem; color: var(--text-3); margin-top: 0.4rem; font-style: italic; }
.question-options { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.question-option {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border-l);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.12s;
}
.question-option:hover { background: var(--raised); }
.question-option input[type="checkbox"],
.question-option input[type="radio"] { margin-right: 0.5rem; height: auto; }

/* ─── Custom checkboxes (setup wizard) ─── */
.setup-checkbox {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border-l);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  position: relative;
}
.setup-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.setup-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.setup-checkbox:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.setup-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.12s;
}
.setup-toggle:hover { background: var(--surface); }
.setup-toggle .toggle-label {
  color: var(--text-2);
  font-size: 0.9rem;
}

.question-option .setup-checkbox { margin-right: 0.5rem; }

/* ─── WhatsApp QR code modal ─── */
.wa-qr-modal { max-width: 420px; text-align: center; }
.wa-qr-modal h2 { margin-bottom: 0.5rem; }
.wa-qr-modal p.muted-text { text-align: left; margin-bottom: 1rem; font-size: 0.85rem; }
.wa-qr-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
}
.wa-qr-image img {
  max-width: 260px;
  max-height: 260px;
  image-rendering: pixelated;
}
.skill-phone {
  font-size: 0.82rem;
  color: var(--text-2);
  background: var(--raised);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* ─── Admin Settings ─── */
.setting-status { margin-top: 0.5rem; font-size: 0.82rem; }
#admin-section-settings code {
  background: var(--raised);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  word-break: break-all;
}
#admin-section-settings .admin-card + .admin-card { margin-top: 1rem; }

/* ─── Agent Zero Config Tabs (admin) ─── */
.a0-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.a0-tab {
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.a0-tab:hover { color: var(--text); text-decoration: none; }
.a0-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.a0-panel { display: none; }
.a0-panel.active { display: block; }

.monospace, textarea.monospace {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 0.8rem;
}

/* ─── Agent Zero UI embed (customer) ─── */
.a0-ui-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1rem;
}
.a0-ui-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.a0-ui-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
}
.a0-ui-frame {
  width: 100%;
  height: 75vh;
  min-height: 500px;
  border: none;
  background: var(--bg);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .billing-grid { grid-template-columns: repeat(2, 1fr); }
  .customer-banner-content { flex-wrap: wrap; gap: 0.4rem; }
  .customer-nav { gap: 0; }
  .customer-nav-item { padding: 0.6rem 0.7rem; font-size: 0.78rem; }
  .skill-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .skill-right { width: 100%; justify-content: space-between; }
  .form-grid { grid-template-columns: 1fr; }
}
