/* Variant C — BHD-ERP harmony shared styles
   Used by every page in variant-c-bhd/ except landing/wizard-step-4/operator-live
   which carry their own inline styles for design-shotgun atomicity. */

:root {
  --brand: #009bc1;
  --brand-hover: #0082a4;
  --brand-50: #eff8fb;
  --brand-100: #d6eff5;
  --brand-700: #00627a;
  --brand-900: #0a2c38;
  --ink: #0f1928;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #6b7280;
  --muted-soft: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --bg: #f9fafb;
  --bg-2: #f4f6f9;
  --white: #ffffff;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--white);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.display { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; }
.mono { font-family: 'IBM Plex Mono', monospace; }

/* mobile wizard frame */
.frame {
  max-width: 440px; margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  padding-bottom: 132px;
  box-shadow: 0 0 0 1px var(--line);
  position: relative;
}
.top {
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 30;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 14px;
  color: var(--ink);
}
.brand-mark {
  width: 26px; height: 26px;
  background: var(--brand);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 1px 0 rgba(0,155,193,0.20), 0 2px 4px rgba(0,155,193,0.18);
}
.brand-mark::before {
  content: '';
  position: absolute; inset: 4px;
  border: 1.5px solid var(--white);
  border-radius: 3px;
  clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 30% 100%, 0 70%);
}
.session {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  display: flex; gap: 6px; align-items: center;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 999px;
}
.session .dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
.stepper {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.stepper-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.step-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.04em;
}
.step-of {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
}
.step-of strong { color: var(--brand); font-weight: 700; }
.progress {
  display: flex; gap: 3px; height: 5px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress > div { flex: 1; transition: background-color .3s; }
.progress > div.done { background: var(--brand); }
.progress > div.cur { background: var(--brand); position: relative; }
.progress > div.cur::after {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, var(--brand), transparent);
}
.title-block { padding: 24px 20px 18px; }
.title-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px; font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
h1.wizh {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 10px;
}
h1.wizh .brand-tint { color: var(--brand); }
.lead { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.bottom {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 12px 20px 20px;
  display: flex; gap: 8px;
  box-shadow: 0 -4px 20px rgba(15,25,40,0.06);
  z-index: 25;
}
.btn {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  padding: 12px 18px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white); color: var(--text);
  cursor: pointer; flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  transition: color .12s, background-color .12s, border-color .12s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary {
  background: var(--brand); color: var(--white); border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(0,155,193,0.20);
  flex: 2;
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }

/* form fields */
.field { padding: 0 20px 18px; }
.field label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600; font-size: 12.5px;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field label .hint { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.field input, .field textarea, .field select {
  width: 100%;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14.5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field .hint-row {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  display: flex; justify-content: space-between;
}
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 20px 18px; }
.field-2 > div .lbl {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600; font-size: 12.5px;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}
.field-2 > div input {
  width: 100%;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14.5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  outline: none;
}
.field-2 > div input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }

/* generic card */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin: 0 20px 12px;
}

/* group heading */
.group-h {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 13px;
  color: var(--ink);
  letter-spacing: -0.005em;
  padding: 16px 20px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.group-h .ct {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 600;
  color: var(--brand);
  background: var(--brand-50);
  padding: 2px 7px;
  border-radius: 999px;
}

/* tag pills */
.tag {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 10px 4px 10px;
  background: var(--brand-50);
  color: var(--brand);
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.tag .x {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.tag .x:hover { color: var(--danger); }

/* save pill (floats above bottom bar) */
.save-pill {
  position: fixed;
  bottom: 90px; left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--success);
  display: flex; gap: 6px; align-items: center;
  z-index: 24;
  box-shadow: 0 4px 12px rgba(15,25,40,0.10);
}
.save-pill .dot { width: 5px; height: 5px; background: var(--success); border-radius: 50%; }

/* RESPONSIVE — turn the mobile-first frame into a centered card on tablet/desktop.
   At 720px+ we put the frame on a page-background, give it shadow + rounded top,
   and constrain the sticky bottom bar to match the form width. */

@media (min-width: 720px) {
  body {
    background:
      radial-gradient(ellipse 80% 40% at 50% -10%, rgba(0,155,193,0.06), transparent 60%),
      var(--bg);
    padding: 32px 24px 0;
  }
  .frame {
    max-width: 580px;
    margin: 0 auto;
    min-height: auto;
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 12px 40px rgba(15,25,40,0.06), 0 2px 8px rgba(15,25,40,0.04);
    overflow: hidden;
  }
  .top {
    border-radius: 14px 14px 0 0;
    background: rgba(255,255,255,0.98);
  }
  .bottom {
    max-width: 580px;
    border-radius: 0 0 14px 14px;
    border: 1px solid var(--line);
    border-top: 1px solid var(--line);
    bottom: 32px;
    box-shadow: 0 12px 40px rgba(15,25,40,0.06), 0 2px 8px rgba(15,25,40,0.04);
  }
  .save-pill {
    bottom: 110px;
  }
}

@media (min-width: 1100px) {
  .frame { max-width: 680px; }
  .bottom { max-width: 680px; }
}

/* hint card visible on desktop only — appears as a sibling sidebar via fixed positioning */
.desk-hint {
  display: none;
}
@media (min-width: 1280px) {
  body { padding-bottom: 100px; }
  .desk-hint {
    display: block;
    position: fixed;
    top: 120px;
    left: calc(50% + 360px);
    width: 280px;
    padding: 18px 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15,25,40,0.06);
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.55;
  }
  .desk-hint .h {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.005em;
  }
  .desk-hint .h::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--brand);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
  }
  .desk-hint .row {
    display: flex; justify-content: space-between;
    padding: 4px 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
  }
  .desk-hint .row .k { color: var(--muted); }
  .desk-hint .row .v { color: var(--text); font-weight: 600; }
  .desk-hint .meta {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .desk-hint .meta a { color: var(--brand); text-decoration: none; font-weight: 600; }
}
