/* Orbis Trades app UI — Blue #1786E8, Orange #F26A1B, Dark #0D1117, Light #F6F8FB, Poppins */
:root {
  --blue: #1786E8;
  --blue-dark: #106bbd;
  --orange: #F26A1B;
  --dark: #0D1117;
  --light: #F6F8FB;
  --border: #e3e8ef;
  --text: #1c2530;
  --muted: #64748b;
  --danger: #d64545;
  --ok: #1d9a5b;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--light);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, var(--dark) 0%, #14263c 60%, #113a63 100%); }
.auth-card { background: #fff; border-radius: 16px; padding: 36px 32px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-logo { font-weight: 700; font-size: 1.3rem; margin-bottom: 20px; color: var(--dark); }
.auth-logo span { color: var(--blue); }

/* App shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--dark); color: #cbd5e1; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar .brand { padding: 20px; font-weight: 700; color: #fff; font-size: 1.1rem; }
.sidebar .brand span { color: var(--blue); }
.sidebar nav { flex: 1; padding: 8px; }
.sidebar nav a { display: block; padding: 10px 14px; border-radius: 8px; color: #cbd5e1; margin-bottom: 2px; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.sidebar nav a.active { background: var(--blue); color: #fff; }
.sidebar .foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.main { flex: 1; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.content { padding: 24px; max-width: 1200px; }

/* Impersonation banner */
.impersonation-banner { background: var(--orange); color: #fff; padding: 10px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; }
.impersonation-banner form { margin: 0; }

/* Components */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.stat .num { font-size: 1.6rem; font-weight: 700; color: var(--dark); }
.stat .label { color: var(--muted); font-size: .85rem; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--border); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; }
.badge.blue { background: #e3f0fd; color: var(--blue-dark); }
.badge.orange { background: #fdeadd; color: #b34c10; }
.badge.green { background: #e0f5ea; color: var(--ok); }
.badge.red { background: #fbe4e4; color: var(--danger); }
.badge.grey { background: #eef1f5; color: var(--muted); }

label { display: block; font-weight: 500; margin-bottom: 4px; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: .95rem; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.field { margin-bottom: 14px; }
.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }

.btn { display: inline-block; border: 0; border-radius: 8px; padding: 10px 18px; font-family: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; background: var(--blue); color: #fff; }
.btn:hover { background: var(--blue-dark); }
.btn.secondary { background: #eef1f5; color: var(--text); }
.btn.secondary:hover { background: #e2e7ee; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.orange { background: var(--orange); }

.flash { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: .92rem; }
.flash.ok { background: #e0f5ea; color: #14603c; }
.flash.error { background: #fbe4e4; color: #8f2626; }

.muted { color: var(--muted); font-size: .87rem; }
.mb0 { margin-bottom: 0; }

/* Mobile */
@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar nav { display: flex; padding: 6px; }
  .sidebar nav a { white-space: nowrap; }
  .sidebar .foot { display: none; }
  .content { padding: 16px; }
}

/* ---------- Onboarding wizard (Phase B) ---------- */
.onboarding-body { background: linear-gradient(160deg, var(--dark) 0%, #14263c 60%, #113a63 100%); min-height: 100vh; }
.ob-wrap { max-width: 720px; margin: 0 auto; padding: 32px 16px 48px; }
.ob-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ob-header .auth-logo { color: #fff; margin: 0; }
.ob-stages { display: flex; gap: 6px; flex-wrap: wrap; }
.ob-stage { font-size: .78rem; font-weight: 600; color: #94a3b8; padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.06); }
.ob-stage.current { background: var(--blue); color: #fff; }
.ob-stage.done { color: #d7e7fa; }
.ob-card { background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.ob-foot { text-align: center; margin-top: 18px; color: #94a3b8 !important; }
.ob-foot a { color: #d7e7fa; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.choice-card { position: relative; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card label { display: block; border: 2px solid var(--border); border-radius: 10px; padding: 14px 12px; text-align: center; cursor: pointer; font-weight: 500; }
.choice-card input:checked + label { border-color: var(--blue); background: #e3f0fd; }
.choice-card .sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
.tick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 16px 0; }
.tick-list label { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.tick-list label:has(input:checked) { border-color: var(--blue); background: #e3f0fd; }
.mock-banner { background: var(--orange); color: #fff; font-weight: 600; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.price-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.price-line:last-child { border-bottom: 0; }
.ob-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; }

/* Admin ops console */
.sidebar .nav-group { padding: 14px 20px 4px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); font-weight: 600; }
.field-help { font-size: .82rem; color: var(--muted, #6b7280); margin: 2px 0 6px; line-height: 1.45; }
.badge-auto { background:#dcfce7; color:#166534; } .badge-manual { background:#fef3c7; color:#92400e; } .badge-hybrid { background:#dbeafe; color:#1e40af; }
.stage-card { border:1px solid #e5e7eb; border-radius:10px; padding:14px 16px; margin-bottom:10px; background:#fff; }
.checklist li { list-style:none; padding:4px 0; }
.tabs { display:flex; gap:6px; flex-wrap:wrap; border-bottom:1px solid #e5e7eb; margin-bottom:16px; }
.tabs a { padding:8px 14px; border-radius:8px 8px 0 0; text-decoration:none; color:#374151; font-weight:500; }
.tabs a.active { background:#111827; color:#fff; }
.page-intro { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:12px 16px; margin-bottom:16px; font-size:.9rem; color:#334155; }
