/* ============================================================
   RALLYGUARD E-LEARNING — STYLE GLOBALNE (v2)
   ============================================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
}

.shell { max-width: 800px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* ── TOPBAR ── */
.topbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 1.5rem;
  background: #fff; border-radius: 12px; padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.logo-wrap { display: flex; align-items: center; gap: 8px; }
.logo-img  { height: 28px; width: auto; object-fit: contain; }
.logo-text {
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 11px; border-radius: 6px; letter-spacing: .06em; white-space: nowrap;
}
.mod-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #999; white-space: nowrap;
}
.prog-wrap { flex: 1; }
.prog-bg   { height: 5px; background: #e8e8e8; border-radius: 3px; }
.prog-fill { height: 5px; border-radius: 3px; transition: width .4s ease; }
.pct-label { font-size: 12px; color: #999; min-width: 34px; text-align: right; }

/* ── KARTA ── */
.card-shell {
  background: #fff; border-radius: 14px;
  padding: 1.75rem; box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.step { display: none; }
.step.active { display: block; }

/* ── TYPOGRAFIA ── */
.big-title  { font-size: 22px; font-weight: 700; color: #111; margin-bottom: 6px; }
.sub-title  { font-size: 14px; color: #666; margin-bottom: 1.25rem; line-height: 1.65; }
.section-h  { font-size: 15px; font-weight: 700; color: #222; margin: 1.25rem 0 8px; }

/* ── INFO CARDS ── */
.icard { background: #f7f8fa; border-radius: 10px; padding: 1rem 1.125rem; margin-bottom: 10px; }
.icard h3 { font-size: 14px; font-weight: 700; margin-bottom: 5px; color: #222; }
.icard p  { font-size: 13px; color: #555; line-height: 1.6; }

.icard-img { margin-bottom: 10px; border-radius: 10px; overflow: hidden; border: 1px solid #eee; }
.icard-img img { width: 100%; height: auto; display: block; }
.icard-img .img-caption { font-size: 12px; color: #888; padding: 6px 10px; background: #f7f8fa; }

/* ── ALERT BOXES ── */
.wbox {
  border-left: 3px solid #f39c12; border-radius: 0 8px 8px 0;
  padding: 10px 14px; margin: 12px 0;
  font-size: 13px; color: #7d4e00; line-height: 1.6; background: #fef9ee;
}
.dbox {
  border-left: 3px solid #e74c3c; border-radius: 0 8px 8px 0;
  padding: 10px 14px; margin: 12px 0;
  font-size: 13px; color: #7b1a1a; line-height: 1.6; background: #fdf2f2;
}
.sbox-info {
  border-left: 3px solid #2980b9; border-radius: 0 8px 8px 0;
  padding: 10px 14px; margin: 12px 0;
  font-size: 13px; color: #1a4a6e; line-height: 1.6; background: #eaf3fb;
}

/* ── STEP LIST ── */
.slist { list-style: none; margin: .75rem 0; }
.sitem { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.snum {
  min-width: 28px; height: 28px; border-radius: 50%;
  background: #dbeeff; color: #0c4480;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stxt        { font-size: 14px; color: #444; line-height: 1.6; }
.stxt strong { font-weight: 700; color: #222; }

/* ── BUTTON BADGES ── */
.bb {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 5px;
  font-size: 12px; font-weight: 700; color: #fff;
  vertical-align: middle; margin: 1px;
}
.bb-sos  { background: #c0392b; }
.bb-pass { background: #2980b9; }
.bb-haz  { background: #d35400; }
.bb-no   { background: #e67e22; }
.bb-ok   { background: #27ae60; }
.bb-red  { background: #c0392b; }

/* ── FLOW DIAGRAM ── */
.flow { display: flex; flex-direction: column; gap: 6px; margin: 1rem 0; }
.frow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  background: #f7f8fa; font-size: 14px; color: #333;
}
.farr { text-align: center; color: #bbb; font-size: 20px; }
.fn {
  min-width: 24px; height: 24px; border-radius: 50%;
  color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── SIGNAL GRID ── */
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 1rem 0; }
@media(max-width:480px){ .sgrid { grid-template-columns: 1fr; } }
.sc      { border-radius: 8px; padding: 12px 14px; border: 1px solid #e8e8e8; background: #fff; }
.sc-lbl  { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 6px; }
.sc-d    { font-size: 13px; color: #555; line-height: 1.5; }
.scok  .sc-lbl { color: #1a7a4e; }
.scsos .sc-lbl { color: #a52828; }

/* ── SUMMARY ROWS ── */
.sumrow {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px;
  background: #f7f8fa; margin-bottom: 8px;
}
.srb { flex-shrink: 0; min-width: 80px; }
.srt { font-size: 14px; color: #555; line-height: 1.55; }
.srt strong { font-weight: 700; color: #222; }

/* ── CHECKLIST ── */
.cl { display: flex; flex-direction: column; gap: 9px; margin-bottom: 1.25rem; }
.ci {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1.5px solid #e0e0e0;
  border-radius: 8px; padding: 12px 14px; cursor: pointer;
  transition: border-color .15s, background .15s; user-select: none;
}
.ci:hover  { border-color: #185FA5; }
.ci.checked { border-color: #27ae60; background: #edfaf3; }
.cb {
  min-width: 20px; height: 20px; border: 1.5px solid #ccc;
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px; transition: background .15s, border-color .15s;
}
.ci.checked .cb    { background: #27ae60; border-color: #27ae60; }
.ctick             { display: none; color: #fff; font-size: 13px; font-weight: 700; }
.ci.checked .ctick { display: block; }
.ct                { font-size: 14px; color: #555; line-height: 1.55; }
.ci.checked .ct    { color: #145c32; }
.cprog             { font-size: 13px; color: #888; text-align: center; margin-bottom: 10px; }

/* ── FORM ── */
.fsec        { background: #f7f8fa; border-radius: 12px; padding: 1.25rem; margin-top: 1rem; }
.fsec-title  { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 1rem; }
.fgrid       { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media(max-width:500px){ .fgrid { grid-template-columns: 1fr; } }
.ff          { display: flex; flex-direction: column; gap: 5px; }
.ff.full     { grid-column: 1 / -1; }
.fl          { font-size: 12px; font-weight: 700; color: #666; }
.ff input    {
  font-size: 14px; font-family: inherit;
  padding: 9px 12px; border: 1.5px solid #d0d0d0;
  border-radius: 8px; background: #fff; color: #111; outline: none;
  transition: border-color .15s;
}
.ff input:focus { border-color: #185FA5; box-shadow: 0 0 0 3px rgba(24,95,165,.12); }
.ff input.err   { border-color: #e74c3c; }
.em             { font-size: 12px; color: #c0392b; display: none; }
.em.show        { display: block; }
.ferr           {
  font-size: 13px; color: #c0392b; margin-top: 10px; display: none;
  padding: 8px 12px; background: #fdf2f2; border-radius: 6px;
}
.subrow { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ── NAWIGACJA ── */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #f0f0f0;
}
.btn {
  background: #fff; border: 1.5px solid #d0d0d0; border-radius: 8px;
  padding: 9px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  color: #333; font-family: inherit; transition: background .15s, border-color .15s;
}
.btn:hover  { background: #f5f5f5; border-color: #bbb; }
.btn-p      { color: #fff; border-color: transparent; }
.btn-p:hover { filter: brightness(0.9); }
.ni { font-size: 13px; color: #999; }

/* ── CERTYFIKAT / SUKCES ── */
.success-wrap { text-align: center; padding: 2rem 1rem; }
.success-icon {
  width: 68px; height: 68px; background: #edfaf3; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem; font-size: 30px;
}
.success-title { font-size: 22px; font-weight: 700; color: #111; margin-bottom: 6px; }
.success-sub   { font-size: 14px; color: #666; margin-bottom: 1.5rem; }
.cert {
  background: #f7f8fa; border: 1.5px solid #27ae60; border-radius: 12px;
  padding: 1.25rem; max-width: 480px; margin: 0 auto; text-align: left;
}
.cr {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid #eee; font-size: 13px;
}
.cr:last-child { border-bottom: none; }
.ck  { color: #777; flex-shrink: 0; margin-right: 12px; }
.cv  { font-weight: 700; color: #222; text-align: right; word-break: break-all; }
.cbadge {
  display: inline-block; background: #edfaf3; color: #145c32;
  font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 20px; margin-top: 1rem;
}

/* ── IMAGE PLACEHOLDER ── */
.img-placeholder {
  background: linear-gradient(135deg, rgba(0,229,255,0.06), rgba(0,145,234,0.06));
  border: 2px dashed rgba(24,95,165,0.25);
  border-radius: 8px;
}
