/* ================================================================
   admin.css — Shared stylesheet for all Concept LB admin pages
   Light theme only
   ================================================================ */

:root {
  --bg:       #F5F7FA;
  --bg2:      #EBEEF4;
  --panel:    #FFFFFF;
  --panel2:   #F8F9FC;
  --surface:  rgba(0, 0, 0, 0.02);
  --stroke:   rgba(0, 0, 0, 0.10);
  --stroke2:  rgba(0, 0, 0, 0.16);
  --input-bg: #FFFFFF;
  --text:     #1A2030;
  --text2:    #2C3650;
  --label:    #3D4A65;
  --muted:    #6B7A9A;
  --muted2:   #8B99B8;
  --brand:    #6366F1;
  --brand2:   #4F46E5;
  --brand-bg: rgba(99, 102, 241, 0.08);
  --brand-border: rgba(99, 102, 241, 0.20);
  --ok:       #16A34A;
  --ok-bg:    rgba(22, 163, 74, 0.06);
  --warn:     #D97706;
  --bad:      #DC2626;
  --bad-bg:   rgba(220, 38, 38, 0.06);
  --shadow:   0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow2:  0 2px 8px rgba(0, 0, 0, 0.06);
  --focus:    0 0 0 3px rgba(99, 102, 241, 0.20);
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ────────────────────────────────────────────────────── */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ── Topbar ────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

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

.logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 6px 16px rgba(78, 125, 255, 0.20);
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.brand .sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--stroke);
  background: var(--surface);
}

.card-header .card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-header .card-title {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.card-body {
  padding: 20px;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(78, 125, 255, 0.20);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(78, 125, 255, 0.25); }

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--stroke);
  color: var(--text);
}

.btn-secondary:hover { border-color: var(--stroke2); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text);
  padding: 8px 14px;
}

.btn-ghost:hover { border-color: var(--stroke2); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Form Fields ───────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 14px 16px;
}

.field.wide {
  grid-column: 1 / -1;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.field-label label {
  font-size: 13px;
  font-weight: 600;
  color: var(--label);
  letter-spacing: 0.1px;
}

.field-label .badge-required {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-bg);
  border: 1px solid var(--brand-border);
  padding: 2px 8px;
  border-radius: 999px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--stroke2);
  background: var(--input-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
  min-height: 44px;
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: var(--focus);
}

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

.hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* ── Chips (multi-select) ──────────────────────────────────────── */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
}

.chip:hover {
  border-color: var(--brand-border);
  background: var(--brand-bg);
}

.chip.on {
  border-color: var(--brand-border);
  background: var(--brand-bg);
  color: var(--brand);
  font-weight: 600;
}

/* ── Tags (competitor input) ───────────────────────────────────── */
.tag-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke2);
  background: var(--input-bg);
  min-height: 44px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  font-size: 13px;
  color: var(--text);
}

.tag button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.tag button:hover { color: var(--bad); }

.tag-input {
  flex: 1;
  min-width: 160px;
  border: 0 !important;
  background: transparent !important;
  padding: 6px !important;
  min-height: auto !important;
  box-shadow: none !important;
}

/* ── Stepper (wizard sidebar) ──────────────────────────────────── */
.steps {
  padding: 12px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.step:hover { background: var(--surface); }

.step.active {
  background: var(--brand-bg);
  border-color: var(--brand-border);
}

.step.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.step.active .step-dot {
  background: var(--brand-bg);
  border-color: var(--brand-border);
  color: var(--brand);
}

.step.done .step-dot {
  background: var(--ok-bg);
  border-color: rgba(74, 222, 128, 0.25);
  color: var(--ok);
}

.step-meta .step-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.step-meta .step-desc {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Progress Bar ──────────────────────────────────────────────── */
.progress-bar {
  height: 4px;
  background: var(--stroke);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ── Wizard Grid ───────────────────────────────────────────────── */
.wizard-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 980px) {
  .wizard-grid { grid-template-columns: 1fr; }
}

/* ── Panel (right side of wizard) ──────────────────────────────── */
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.panel-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.panel-header .desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  max-width: 56ch;
  line-height: 1.5;
}

/* ── Footer Nav ────────────────────────────────────────────────── */
.nav-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
  position: sticky;
  bottom: 0;
  background: var(--panel);
  z-index: 10;
  padding-bottom: 4px;
}

/* ── Warning Box ───────────────────────────────────────────────── */
.warn-box {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 107, 107, 0.25);
  background: var(--bad-bg);
  color: var(--text);
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
  display: none;
}

/* ── Review Box ────────────────────────────────────────────────── */
.review-box {
  background: var(--panel2);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 500px;
  overflow: auto;
}

/* ── Tables (plans list, etc.) ─────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
}

.data-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface);
}

.data-table tr:hover {
  background: var(--surface);
}

.data-table a {
  color: var(--brand);
  text-decoration: none;
}

.data-table a:hover {
  text-decoration: underline;
}

/* ── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--muted);
}

.badge-complete { border-color: rgba(74, 222, 128, 0.25); color: var(--ok); background: var(--ok-bg); }
.badge-failed { border-color: rgba(255, 107, 107, 0.25); color: var(--bad); background: var(--bad-bg); }

/* ── Tabs ──────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 6px;
  margin: 20px 0 16px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 16px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  transition: all 0.12s ease;
}

.tab:hover { border-color: var(--stroke2); color: var(--text); }

.tab.active {
  background: var(--brand-bg);
  border-color: var(--brand-border);
  color: var(--brand);
  font-weight: 600;
}

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

/* ── Job Status ────────────────────────────────────────────────── */
.job-bar {
  height: 12px;
  background: var(--stroke);
  border-radius: 999px;
  overflow: hidden;
}

.job-bar .job-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  transition: width 0.3s ease;
}

.job-log {
  margin-top: 12px;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 13px;
  background: var(--panel2);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}

.job-error {
  color: var(--bad);
  margin-top: 12px;
  font-size: 14px;
  white-space: pre-wrap;
}

/* ── Section Divider ───────────────────────────────────────────── */
.section-divider {
  margin: 24px 0 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--brand-bg);
  border: 1px solid var(--brand-border);
}

.section-divider h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}

.section-divider p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ── Pill ──────────────────────────────────────────────────────── */
.pill {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--stroke);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
}

/* ── Utility ───────────────────────────────────────────────────── */
.text-muted { color: var(--muted); }
.text-small { font-size: 13px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.ml-auto { margin-left: auto; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

