/* ============================================================
   AutoWeb CMS — Design System
   ============================================================ */

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

:root {
  --bg-deep:       #07080d;
  --bg-surface:    #0e1018;
  --bg-card:       #141720;
  --bg-hover:      #1c2030;
  --border:        rgba(255,255,255,0.07);
  --border-light:  rgba(255,255,255,0.12);

  --text-primary:  #f0f2f8;
  --text-secondary:#8892a8;
  --text-muted:    #555e74;

  --accent:        #6366f1;
  --accent-hover:  #7c7ff5;
  --accent-glow:   rgba(99,102,241,0.25);
  --green:         #10b981;
  --yellow:        #f59e0b;
  --red:           #ef4444;
  --purple:        #8b5cf6;

  --radius-sm:     6px;
  --radius:        12px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --sidebar-w:     230px;
  --transition:    0.2s ease;

  --font:          'Outfit', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
}

html { font-size: 15px; }

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================ GLOW BG */
.glow-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 800px 600px at 20% 10%, rgba(99,102,241,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 80% 80%, rgba(139,92,246,0.05) 0%, transparent 70%);
}

/* ============================================================ LAYOUT */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ============================================================ SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  flex-shrink: 0;
}

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

.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.brand-name { font-size: 17px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.brand-sub  { font-size: 10px; font-weight: 500; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; }

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99,102,241,0.15);
  color: var(--text-primary);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-label { flex: 1; }

.nav-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

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

.sidebar-stats {
  display: flex;
  gap: 8px;
}

.mini-stat {
  flex: 1;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
}

.mini-stat-val { display: block; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.mini-stat-lbl { display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================ MAIN */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ============================================================ TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(14,16,24,0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 16px;
}

.topbar-left {}
.page-title { font-size: 22px; font-weight: 700; line-height: 1; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-search {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 9px 14px;
  border-radius: var(--radius);
  width: 240px;
  transition: all var(--transition);
}

.topbar-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ============================================================ TAB PANELS */
.tab-panel {
  display: none;
  padding: 28px 32px;
  flex: 1;
}

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

/* ============================================================ THEMES GRID */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.theme-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: default;
}

.theme-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px var(--border-light);
}

.theme-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
  background: var(--bg-hover);
}

.theme-card:hover .theme-thumbnail {
  transform: scale(1.02);
}

.theme-thumbnail-wrap {
  overflow: hidden;
  position: relative;
}

.theme-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7,8,13,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.theme-card:hover .theme-preview-overlay { opacity: 1; }

.btn-preview {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.btn-preview:hover {
  background: rgba(255,255,255,0.25);
}

.theme-info {
  padding: 18px 20px 20px;
}

.theme-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.theme-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.theme-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.theme-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.theme-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(99,102,241,0.12);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.25);
}

.theme-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.theme-site-count {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-create-from-theme {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border: none;
  color: white;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-create-from-theme:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* ============================================================ STATS ROW */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--border-light); }

.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.purple { background: rgba(139,92,246,0.15); }
.stat-icon.green  { background: rgba(16,185,129,0.15); }
.stat-icon.yellow { background: rgba(245,158,11,0.15); }
.stat-icon.red    { background: rgba(239,68,68,0.15); }

.stat-info { display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1; }

/* ============================================================ SITES GRID */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.site-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s ease;
  animation: fadeInUp 0.3s ease;
}

.site-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-card-header { display: flex; align-items: flex-start; justify-content: space-between; }
.site-name-block { display: flex; flex-direction: column; gap: 4px; }
.site-name { font-size: 16px; font-weight: 700; }

.site-template-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(99,102,241,0.12);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.2);
  width: fit-content;
}

.site-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-active    { background: rgba(16,185,129,0.15);  color: var(--green);  border: 1px solid rgba(16,185,129,0.3); }
.status-deploying { background: rgba(245,158,11,0.15);  color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.status-failed    { background: rgba(239,68,68,0.15);   color: var(--red);    border: 1px solid rgba(239,68,68,0.3); }

.site-url a {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  word-break: break-all;
}

.site-url a:hover { text-decoration: underline; }

.site-meta { font-size: 12px; color: var(--text-muted); }

.site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ============================================================ CF PROFILE CONFIG TAB */
.config-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.config-intro-icon { font-size: 36px; }
.config-intro h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.config-intro p  { font-size: 13px; color: var(--text-secondary); }

.cf-profiles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.cf-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
  animation: fadeInUp 0.3s ease;
}

.cf-profile-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.cf-profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cf-profile-name { font-size: 15px; font-weight: 700; }
.cf-profile-auth-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
  background: rgba(99,102,241,0.12);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.cf-profile-detail { font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); }
.cf-profile-detail span { color: var(--text-muted); font-family: var(--font); margin-right: 4px; }

.cf-profile-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.cf-profile-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.cf-profile-stat-lbl {
  font-size: 12px;
  color: var(--text-secondary);
}

.cf-profile-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ============================================================ SELECTOR in create modal */
.cf-profile-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.profile-radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: all var(--transition);
}

.profile-radio-item:hover {
  border-color: rgba(99,102,241,0.4);
  background: var(--bg-hover);
}

.profile-radio-item.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.1);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.3);
}

.profile-radio-item input[type="radio"] { display: none; }

.profile-radio-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.profile-radio-item.selected .profile-radio-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.profile-radio-item.selected .profile-radio-dot::after {
  content: '';
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
}

.profile-radio-info { flex: 1; }
.profile-radio-name { font-size: 14px; font-weight: 600; }
.profile-radio-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }
.profile-radio-count { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }

/* ============================================================ COMMON COMPONENTS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-success {
  background: linear-gradient(135deg, var(--green), #059669);
  color: white;
  box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}
.btn-success:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-success:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; justify-content: center; font-size: 14px; }

.btn-loader {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.d-none { display: none !important; }

/* ============================================================ EMPTY STATE */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
}

.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.empty-state p  { font-size: 14px; }

/* ============================================================ MODALS */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(7,8,13,0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.modal-backdrop.open { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: slideUp 0.2s ease;
}

.modal-create { max-width: 520px; }
.modal-large  { max-width: 760px; }
.modal-small  { max-width: 420px; }

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

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

.modal-header-info { display: flex; align-items: center; gap: 12px; }
.modal-theme-badge { font-size: 28px; }

.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.btn-close {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-close:hover { background: var(--bg-surface); color: var(--text-primary); }

.modal-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ============================================================ FORMS */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  width: 100%;
  transition: all var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

select option { background: var(--bg-card); }

.required { color: var(--red); margin-left: 2px; }
.helper-text { font-size: 12px; color: var(--text-muted); }

.divider {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.warning-box {
  display: flex;
  gap: 12px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
}

.warning-box > span { font-size: 18px; flex-shrink: 0; }
.warning-box p { color: var(--text-secondary); margin: 4px 0 8px; font-size: 12px; }

.form-checkbox-danger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 8px;
}

.form-checkbox-danger label { color: var(--text-secondary); font-weight: 400; font-size: 13px; cursor: pointer; }
.form-checkbox-danger input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--red); }

.warning-text {
  font-size: 13px;
  color: var(--yellow);
  margin-top: 8px;
}

/* ============================================================ TERMINAL */
.terminal-body { padding: 0; gap: 0; }

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #1a1a2e;
  border-bottom: 1px solid var(--border);
}

.terminal-dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.terminal-title { flex: 1; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }

.btn-clear-terminal {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 11px; padding: 3px 10px;
  border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font);
}
.btn-clear-terminal:hover { color: var(--text-primary); }

.terminal-content {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 16px;
  min-height: 300px;
  max-height: 450px;
  overflow-y: auto;
  background: #0c0c14;
  color: #a8b5cc;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.7;
}

.terminal-content .log-error { color: #ff6b6b; }
.terminal-content .log-success { color: #63e6be; }

.status-indicator { font-size: 13px; color: var(--text-secondary); flex: 1; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* ============================================================ TABS NAV (in modal) */
.tabs-nav {
  display: flex;
  gap: 4px;
  padding: 12px 24px 0;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content {}

/* ============================================================ API KEYS TABLE */
.section-intro { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.api-key-form-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.api-key-form-row .form-group.flex-2 { flex: 2; }
.api-key-form-row .form-group.flex-1 { flex: 1; }

.new-key-reveal-container { margin-top: 4px; }

.reveal-card {
  display: flex;
  gap: 14px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius);
  padding: 16px;
}

.reveal-icon { font-size: 24px; }
.reveal-info { flex: 1; }
.reveal-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.reveal-info p  { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }

.reveal-input-row { display: flex; gap: 8px; }
.reveal-input-row input { flex: 1; font-family: var(--font-mono); font-size: 13px; }

.table-container { overflow-x: auto; }

.api-keys-table { width: 100%; border-collapse: collapse; }
.api-keys-table th, .api-keys-table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.api-keys-table th { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; }
.api-keys-table tr:last-child td { border-bottom: none; }
.api-keys-table tr:hover td { background: var(--bg-hover); }

/* ============================================================ CODE EXAMPLES */
.example-selector-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.selector-label { font-size: 13px; color: var(--text-secondary); }

.selector-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.selector-btn:hover { color: var(--text-primary); }
.selector-btn.active {
  background: rgba(99,102,241,0.15);
  color: var(--accent);
  border-color: rgba(99,102,241,0.4);
}

.code-box-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.btn-copy-code {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}

.btn-copy-code:hover { color: var(--text-primary); }

.code-content {
  background: #0c0c14;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0;
}

.code-content code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a8d8a8;
  line-height: 1.8;
  white-space: pre;
}

/* ============================================================ SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================ PASSWORD TOGGLE */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 42px;
}

.btn-eye {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.btn-eye:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.btn-eye.active {
  color: var(--accent);
}

/* ============================================================ DEPLOY TYPE BADGE */
.deploy-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.deploy-type-badge.pages {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.deploy-type-badge.workers {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
