/* ==========================================================================
   myFlow – QuickCheck UI (Bootstrap 5 compatible)
   - "Quiet Header" (durchgängig)
   - Form-Layout (Wizard Step 1/2)
   - Traffic (Ampel) UI
   ========================================================================== */

/* ---------- Brand tokens ---------- */
:root{
  /* Neutrals */
  --mf-bg: #f6f8fb;
  --mf-surface: #ffffff;
  --mf-text: #0f172a;        /* slate-900 */
  --mf-muted: #64748b;       /* slate-500 */
  --mf-border: rgba(15,23,42,.12);
  --mf-border-strong: rgba(15,23,42,.18);

  /* Brand-ish accents (dezent) */
  --mf-accent: #2f6f8f;
  --mf-accent-2: #1f4e66;

  /* Traffic (soft) */
  --mf-green: #27ae60;
  --mf-yellow:#f2c94c;
  --mf-red:   #eb5757;

  /* Radius & shadow */
  --mf-radius: 14px;
  --mf-radius-sm: 10px;
  --mf-shadow: 0 10px 30px rgba(2, 6, 23, .06);
  --mf-shadow-sm: 0 6px 18px rgba(2, 6, 23, .06);

  /* Typography */
  --mf-h1: 28px;
  --mf-h2: 16px;
  --mf-body: 14px;

  /* Spacing */
  --mf-gap: 16px;
}

/* ---------- Global base ---------- */
html, body{
  height: 100%;
}

body{
  background: var(--mf-bg);
  color: var(--mf-text);
  font-size: var(--mf-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Responsive Container (max 1400px) ---------- */
.container, .container-fluid{
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 768px){
  .container, .container-fluid{
    padding-left: 15px;
    padding-right: 15px;
  }
}

a{
  color: var(--mf-accent);
}
a:hover{
  color: var(--mf-accent-2);
}

/* Make Bootstrap cards slightly more "product" */
.card{
  border-radius: var(--mf-radius);
  border-color: var(--mf-border);
  box-shadow: var(--mf-shadow-sm);
}

.card .card-body{
  padding: 18px;
}

/* Quiet separators */
hr{
  border-top: 1px solid var(--mf-border);
  opacity: 1;
}

/* ---------- Quiet Header (durchgängig) ---------- */
header{
  background: var(--mf-surface);
}

header .border-bottom{
  border-bottom: 1px solid var(--mf-border) !important;
}

.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--mf-accent);
  display: inline-block;
}

/* Center brand logos in header */
.brand-logo{
  height: 34px;
  width: auto;
  display: block;
  max-width: 220px;
}

.brand-logo--secondary{
  height: 28px;
  width: auto;
  opacity: .95;
  max-width: 220px;
}

.brand-divider{
  width: 1px;
  height: 26px;
  background: var(--mf-border);
  display: inline-block;
}

/* Make header text quiet */
header .fw-semibold{
  letter-spacing: .2px;
}

/* ---------- Page framing ---------- */
.page-title{
  font-size: var(--mf-h1);
  font-weight: 700;
  letter-spacing: .2px;
}

.page-subtitle{
  color: var(--mf-muted);
}

.section-title{
  font-size: var(--mf-h2);
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0;
}

.section-hint{
  color: var(--mf-muted);
  font-size: 13px;
  line-height: 1.25;
}

/* Section blocks (optional helper) */
.mf-block{
  background: var(--mf-surface);
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius);
  box-shadow: var(--mf-shadow-sm);
}

.mf-block__head{
  padding: 12px 14px;
  border-bottom: 1px solid var(--mf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mf-block__body{
  padding: 14px;
}

/* ---------- Forms (Bootstrap + polish) ---------- */
.form-label, label{
  color: var(--mf-muted);
  font-weight: 600;
  font-size: 12.5px;
  margin-bottom: 6px;
}

.form-control, .form-select{
  border-radius: 12px;
  border-color: var(--mf-border-strong);
  box-shadow: none;
}

.form-control:focus, .form-select:focus{
  border-color: rgba(47,111,143,.55);
  box-shadow: 0 0 0 .2rem rgba(47,111,143,.12);
}

/* All multi-line fields: align text at top + allow resizing */
textarea.form-control{
  vertical-align: top;
  resize: vertical;
}

/* Make checkbox/radio labels more readable */
.form-check-label{
  color: var(--mf-text);
  font-weight: 500;
  font-size: 14px;
}

/* ---------- Buttons (keep Bootstrap, just slightly tuned) ---------- */
.btn{
  border-radius: 12px;
  font-weight: 600;
}

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

.btn-outline-secondary{
  border-color: var(--mf-border-strong);
}

/* ---------- "Grey blocks" for Top Systems / Step boxes ---------- */
.mf-graybox{
  background: #f2f4f7;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-sm);
  padding: 12px;
}

.mf-graybox .form-label{
  margin-top: 6px;
}

/* ---------- Traffic (Ampel) UI ---------- */
.traffic-group{
  background: #ffffff;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-sm);
  padding: 12px;
  height: 100%;
}

.traffic-options{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.traffic-pill{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--mf-border);
  border-radius: 12px;
  background: #fff;
}

.traffic-pill input[type="radio"]{
  margin: 0;
}

.dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.dot--green{ background: var(--mf-green); }
.dot--yellow{ background: var(--mf-yellow); }
.dot--red{ background: var(--mf-red); }

/* Optional: if you want selected option to look active */
.traffic-pill:has(input[type="radio"]:checked){
  border-color: rgba(47,111,143,.35);
  box-shadow: 0 0 0 .15rem rgba(47,111,143,.10);
}

/* ---------- Tables / formset rows (Step2 process steps) ---------- */
.mf-steps-row{
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 1fr;
  gap: 10px;
  align-items: start;
}

@media (max-width: 992px){
  .mf-steps-row{
    grid-template-columns: 1fr;
  }
}

/* ---------- Small UX helpers ---------- */
.mf-info{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mf-muted);
  font-size: 13px;
}

.mf-info .bi{
  font-size: 14px;
  color: rgba(47,111,143,.9);
}

/* Avoid giant spacing on small screens */
@media (max-width: 768px){
  .page-title{ font-size: 22px; }
  .card .card-body{ padding: 14px; }
  .brand-logo{ height: 30px; }
}

/* ---------- Fix: keep layout tidy in review pages ---------- */
.mf-kv{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px 14px;
  align-items: start;
}

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

