/* =============================================================================
   Akademia OVB Pomorze · Design System
   -----------------------------------------------------------------------------
   Spójny z marką OVB Pomorze i podręcznikiem "100 pierwszych dni".
   Wzorzec: akademia-ux-mockup.html (sekcja 6 spec).
   Paleta: granat / złoto / krem. Fonty: Fraunces (display) + Inter + JetBrains Mono.
   ============================================================================= */

:root {
  --navy:      #1a2b4a;
  --navy-deep: #0f1f36;
  --gold:      #c9a961;
  --gold-soft: #d9bf85;
  --cream:     #faf6ef;
  --cream-warm:#f3ebd9;
  --paper:     #ffffff;
  --ink:       #1f1d1a;
  --ink-soft:  #54514a;
  --line:      #ddd3bf;
  --terra:     #b8654c;
  --success:   #6b8e6a;

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Layout ---------- */
.container { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.container-wide { max-width: 1240px; margin: 0 auto; padding: 0 22px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin-bottom: 28px;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px;
  background: var(--navy); color: var(--gold);
  font-family: var(--serif); font-weight: 600; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
}
.brand-name b {
  font-family: var(--serif); font-size: 15px; color: var(--navy);
  letter-spacing: .04em; text-transform: uppercase; line-height: 1;
}
.brand-name small {
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  color: var(--ink-soft); text-transform: uppercase;
}
.who {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink-soft);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cream-warm); border: 1px solid var(--line);
  color: var(--navy); font-weight: 600; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Typografia ---------- */
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); font-weight: 500; }
h1 { font-size: 32px; letter-spacing: -.02em; }
h2 { font-size: 24px; letter-spacing: -.01em; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }

.kicker, .kick {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); filter: brightness(.82);
}
.label-cap {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-soft);
}
.muted { color: var(--ink-soft); }
.mono  { font-family: var(--mono); }

/* ---------- Progress bar ---------- */
.pbar { height: 10px; background: #e7ddc8; border-radius: 20px; overflow: hidden; }
.pbar > i { display: block; height: 100%; background: var(--gold); }
.pbar-mini { height: 6px; width: 90px; display: inline-block; vertical-align: middle; }

/* ---------- Chipy statusu ---------- */
.chip {
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px;
  font-weight: 500;
}
.chip-done { background: #e6efe1; color: #3f6b3d; }
.chip-prog { background: #f6ecd4; color: #8a6411; }
.chip-lock { background: #eee7d8; color: #8a7f63; }
.chip-lead { background: #f3e3dc; color: #8a3f24; }

/* ---------- Kafelki etapów (stage) ---------- */
.stage {
  display: flex; gap: 14px; align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: border-color .15s ease;
}
.stage:hover { border-color: var(--gold-soft); }
.stage.lock {
  background: #f4eee0;
  border-style: dashed;
  opacity: .92;
}
.stage.lock:hover { border-color: var(--line); }
.stage-num {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--navy);
  color: var(--navy);
  font-family: var(--serif); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.stage.done .stage-num { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.stage.lock .stage-num { border-color: #bdb295; color: #bdb295; }
.stage-body { flex: 1; }
.stage-title {
  font-family: var(--serif); font-size: 16px; color: var(--navy); font-weight: 600;
}
.stage-desc {
  font-size: 12.5px; color: var(--ink-soft); margin-top: 3px;
}

/* ---------- Przyciski ---------- */
.btn {
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  border-radius: 7px;
  padding: 9px 16px;
  border: 1px solid var(--navy);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .12s, color .12s;
}
.btn-primary { background: var(--navy); color: var(--gold); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--cream-warm); }
.btn-disabled, .btn[disabled] {
  background: #ece5d6; color: #a99e82; border-color: #cfc4a8;
  cursor: not-allowed;
}

/* ---------- Player (HLS) ---------- */
.player {
  aspect-ratio: 16/9;
  background: linear-gradient(150deg, #22365a, var(--navy-deep));
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.player video {
  width: 100%; height: 100%; display: block; background: #000;
}
.player-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); font-family: var(--mono); font-size: 12px;
  letter-spacing: .2em; text-transform: uppercase;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 24px;
  border-bottom: 1px solid var(--line);
  margin: 18px 0 14px;
}
.tab {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 0 0 10px 0;
  color: var(--ink-soft);
  background: none; border: none; cursor: pointer;
}
.tab.on { color: var(--navy); border-bottom: 2px solid var(--gold); margin-bottom: -1px; }

/* ---------- Lista materiałów ---------- */
.material {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 14px; margin-bottom: 8px;
  background: var(--paper);
  transition: border-color .12s;
}
.material:hover { border-color: var(--gold-soft); }
.material .ext {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  color: #fff; background: var(--navy);
  border-radius: 4px; padding: 4px 7px; letter-spacing: .05em;
}
.material .ext.mp4 { background: var(--terra); }
.material .ext.docx { background: #2b5784; }
.material .ext.xlsx { background: #3f6b3d; }
.material .name { flex: 1; font-size: 13.5px; color: var(--navy); }
.material .dl {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--gold); filter: brightness(.8);
  letter-spacing: .08em; text-decoration: none;
}
.material .dl:hover { filter: brightness(1); }

/* ---------- Sidebar / checklist ---------- */
.side-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.checklist { list-style: none; font-size: 13px; }
.checklist li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #efe7d6;
  color: var(--ink-soft);
}
.checklist li:last-child { border-bottom: none; }
.tick {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--gold);
  flex: none;
}
.tick.on { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ---------- Quiz ---------- */
.quiz-opt {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 15px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--navy);
  background: var(--paper);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.quiz-opt:hover { border-color: var(--gold-soft); }
.quiz-opt.sel { border-color: var(--gold); background: #fbf4e3; }
.quiz-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #c3b894; flex: none;
}
.quiz-opt.sel .quiz-radio {
  border-color: var(--gold);
  background: radial-gradient(var(--gold) 42%, transparent 46%);
}

/* ---------- Tabela panelu ---------- */
.table-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
table.panel {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
table.panel th {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  background: var(--cream);
}
table.panel td {
  padding: 13px;
  border-bottom: 1px solid #efe7d6;
  color: var(--navy);
  vertical-align: middle;
}
table.panel tr:last-child td { border-bottom: none; }
table.panel .person {
  display: flex; align-items: center; gap: 10px;
}

/* ---------- Formularze ---------- */
.field { margin-bottom: 14px; }
.field-label {
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 6px; display: block;
}
.field-input {
  width: 100%; border: 1px solid var(--line); border-radius: 7px;
  padding: 10px 12px;
  font-family: var(--sans); font-size: 14px; color: var(--navy);
  background: var(--paper);
}
.field-input:focus {
  outline: none; border-color: var(--gold);
}

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(15, 31, 54, .55);
  display: none; align-items: center; justify-content: center;
  padding: 24px; z-index: 100;
}
.overlay.open { display: flex; }
.modal {
  background: var(--cream);
  border-radius: 12px;
  width: 100%; max-width: 460px;
  padding: 24px;
  border-top: 4px solid var(--gold);
  max-height: 90vh; overflow-y: auto;
}

/* ---------- Certyfikat ---------- */
.cert-frame {
  background: var(--paper); border: 1px solid var(--gold);
  padding: 8px; border-radius: 6px;
}
.cert-inner {
  border: 1px solid var(--line);
  padding: 50px 38px; text-align: center;
}
.cert-seal {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--gold); color: var(--gold);
  font-family: var(--serif);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
}

/* ---------- Komunikaty ---------- */
.alert {
  padding: 12px 14px; border-radius: 8px;
  font-size: 13px; margin-bottom: 14px;
}
.alert-info { background: var(--cream-warm); border-left: 3px solid var(--gold); color: var(--ink); }
.alert-error { background: #f6e2dc; border-left: 3px solid var(--terra); color: #6e2818; }
.alert-success { background: #e6efe1; border-left: 3px solid var(--success); color: #2e4f2d; }

/* ---------- Utilities ---------- */
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.col-grow { flex: 1; min-width: 0; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-12 { margin-top: 12px; }
.mt-18 { margin-top: 18px; }
.mt-26 { margin-top: 26px; }
.mb-12 { margin-bottom: 12px; }
.mb-18 { margin-bottom: 18px; }
.mb-26 { margin-bottom: 26px; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .stage { flex-wrap: wrap; }
  .stage-body { min-width: 200px; }
  .topbar-inner { flex-direction: column; gap: 10px; align-items: flex-start; }
}
