/* OZZOMiPPS – aplikacja członkowska
   Paleta z identyfikacji: navy #17265D, red #D4202A, biel/szarości. */

:root {
  --navy: #17265D;
  --navy-700: #1E3170;
  --navy-900: #0F1B45;
  --red: #D4202A;
  --red-600: #B81922;
  --ink: #1B2333;
  --muted: #5B6577;
  --line: #E6E8EF;
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --ok: #1E9E5A;
  --warn: #C9861B;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(15, 27, 69, .08);
  --shadow-sm: 0 2px 8px rgba(15, 27, 69, .06);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { max-width: 100%; }
/* Zawijanie długich słów/linków (treści od użytkowników: wiadomości, aktualności) */
.card, .toast, .item__title, .item__body, .item__excerpt, .row__main, .event__info { overflow-wrap: anywhere; }

/* Rozmiary ikon SVG użytych „gołe" w tekście/przyciskach.
   (logo, kafelki, wiersze mają własne rozmiary o wyższej specyficzności) */
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.where svg { width: 15px; height: 15px; flex: 0 0 auto; }
.row__chev svg { width: 20px; height: 20px; }
.item__meta svg { width: 14px; height: 14px; flex: 0 0 auto; }
.chip svg { width: 13px; height: 13px; }
.toast svg { width: 18px; height: 18px; flex: 0 0 auto; }
.appbar__back svg, .appbar__bell svg { width: 22px; height: 22px; }
.pending__ring svg { width: 44px; height: 44px; }

/* Kontener aplikacji – imituje telefon na desktopie, pełny ekran na mobile */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(15, 27, 69, .10);
}

/* ---------- Nagłówek ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
  color: #fff;
  padding: calc(var(--safe-top) + 14px) 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(15, 27, 69, .18);
}
.appbar__back {
  width: 38px; height: 38px;
  border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.appbar__back:active { background: rgba(255, 255, 255, .22); }
.appbar__title { font-size: 18px; font-weight: 800; letter-spacing: .2px; }
.appbar__spacer { flex: 1; }
.appbar__bell {
  width: 38px; height: 38px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
  display: grid; place-items: center; position: relative;
}
.appbar__bell .dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 2px var(--navy);
}

/* ---------- Ekran domowy ---------- */
.home__brand {
  background: #fff;
  padding: 26px 20px 22px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.home__brand svg { height: 62px; }
.home__brand .name {
  margin-top: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--navy);
  font-size: 15px;
}
.home__hi {
  padding: 16px 18px 2px;
  color: var(--muted);
  font-size: 14px;
}
.home__hi b { color: var(--ink); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 14px 16px 22px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
  min-height: 122px;
  justify-content: center;
}
.tile:active { transform: scale(.97); box-shadow: var(--shadow); }
.tile__ico {
  width: 46px; height: 46px;
  color: var(--red);
  display: grid; place-items: center;
}
.tile__ico svg { width: 40px; height: 40px; }
.tile__label { font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.2; }

/* ---------- Widoki treści ---------- */
.view { padding: 16px 16px calc(28px + var(--safe-bottom)); flex: 1; }
.view__lead { color: var(--muted); font-size: 14px; margin: 2px 0 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.card--link { cursor: pointer; transition: transform .1s ease; }
.card--link:active { transform: scale(.99); }

.item__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(23, 38, 93, .08); color: var(--navy);
}
.chip--red { background: rgba(212, 32, 42, .10); color: var(--red-600); }
.chip--ok { background: rgba(30, 158, 90, .12); color: var(--ok); }
.chip--warn { background: rgba(201, 134, 27, .14); color: var(--warn); }
.item__title { font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.3; margin: 0 0 6px; }
.item__excerpt { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }
.item__body { font-size: 15px; color: var(--ink); line-height: 1.65; }
.item__body p { margin: 0 0 12px; }

/* Kalendarz / wydarzenia */
.event { display: flex; gap: 14px; align-items: flex-start; }
.event__date {
  flex: 0 0 58px; text-align: center;
  background: var(--navy); color: #fff; border-radius: 14px;
  padding: 8px 4px;
}
.event__date .d { font-size: 22px; font-weight: 900; line-height: 1; }
.event__date .m { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; opacity: .85; margin-top: 3px; }
.event__info { flex: 1; }
.event__info h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.event__info .where { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Dokumenty / listy z ikoną */
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.row:last-child { border-bottom: 0; }
.row__ico {
  flex: 0 0 42px; height: 42px; border-radius: 12px;
  background: rgba(212, 32, 42, .10); color: var(--red);
  display: grid; place-items: center;
}
.row__ico svg { width: 22px; height: 22px; }
.row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row__main .t { font-weight: 700; font-size: 15px; color: var(--ink); }
.row__main .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row__chev { color: var(--muted); flex: 0 0 auto; }

/* Benefity */
.benefit { display: flex; gap: 14px; }
.benefit__disc {
  flex: 0 0 60px; height: 60px; border-radius: 16px;
  background: var(--red); color: #fff;
  display: grid; place-items: center;
  font-weight: 900; font-size: 15px; text-align: center; line-height: 1.05;
}
.benefit__main h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.benefit__main p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Członkostwo */
.member-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%);
  color: #fff; border-radius: 22px; padding: 20px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.member-card::after {
  content: ""; position: absolute; right: -40px; bottom: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(212, 32, 42, .35);
}
.member-card__top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.member-card__top .lbl { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: .8; }
.member-card__name { font-size: 22px; font-weight: 900; margin: 14px 0 2px; position: relative; z-index: 1; }
.member-card__no { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 2px; position: relative; z-index: 1; opacity: .95; }
.member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.member-grid .cell { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.member-grid .cell .k { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.member-grid .cell .v { font-size: 15px; font-weight: 800; margin-top: 3px; color: var(--ink); }

/* Więcej – lista linków */
.linklist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.linklist .row { padding: 15px 16px; }

/* ---------- Formularze ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 14px; font-size: 15px; color: var(--ink); background: #fff;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: 0; border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(23, 38, 93, .12);
}
.textarea { min-height: 110px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* Szkolenia: odtwarzacz YouTube (16:9) + mapa Leaflet */
.yt-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; }
.yt-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.szk-map { height: 220px; width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; background: #eef1f5; }
.ozz-map-pin { width: 22px; height: 22px; background: #D4202A; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; border-radius: 14px; padding: 15px 18px;
  font-size: 15px; font-weight: 800; cursor: pointer;
  transition: transform .1s ease, filter .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:active { filter: brightness(.95); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn--sm { width: auto; padding: 11px 16px; font-size: 14px; border-radius: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn-row .btn { width: auto; flex: 1 1 auto; }

/* ---------- Ekrany logowania / rejestracji ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.auth__wave { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; }
.auth__inner { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 40px) 22px calc(30px + var(--safe-bottom)); }
.auth__brand { text-align: center; margin-bottom: 10px; }
.auth__brand svg { height: 66px; }
.auth__brand .name { font-weight: 900; letter-spacing: 1.5px; margin-top: 10px; font-size: 18px; }
.auth__sub { text-align: center; opacity: .85; font-size: 13.5px; line-height: 1.5; margin: 6px auto 26px; max-width: 300px; }
.auth__panel { background: #fff; color: var(--ink); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.auth__panel h2 { margin: 0 0 4px; font-size: 20px; color: var(--navy); }
.auth__panel .lead { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); }
.auth__switch { text-align: center; margin-top: 18px; font-size: 14px; }
.auth__switch a { color: #fff; font-weight: 800; text-decoration: underline; }
.auth__demo { text-align: center; margin-top: 14px; }
.auth__demo button { background: transparent; border: 0; color: rgba(255,255,255,.9); font-size: 13px; text-decoration: underline; cursor: pointer; }

/* Stan oczekujący */
.pending { min-height: 100dvh; display: grid; place-items: center; background: var(--navy); color: #fff; padding: 30px; text-align: center; }
.pending__box { max-width: 340px; }
.pending__ring {
  width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 50%;
  background: rgba(255,255,255,.10); display: grid; place-items: center; color: #fff;
}
.pending h2 { margin: 0 0 10px; font-size: 22px; }
.pending p { opacity: .85; line-height: 1.6; font-size: 14.5px; }

/* Puste stany */
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty svg { color: var(--line); width: 56px; height: 56px; margin-bottom: 10px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(18px + var(--safe-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; pointer-events: none; padding: 0 16px; }
.toast {
  max-width: 440px; width: 100%;
  background: var(--navy-900); color: #fff;
  padding: 13px 16px; border-radius: 14px; font-size: 14px;
  box-shadow: 0 12px 28px rgba(15,27,69,.35);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .22s ease;
}
.toast--ok { background: #16643C; }
.toast--red { background: var(--red-600); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Baner instalacji */
.install-banner {
  margin: 0 16px 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.install-banner .txt { flex: 1; font-size: 13px; }
.install-banner .txt b { color: var(--navy); }

.section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 18px 2px 10px; }

@media (min-width: 481px) {
  .app { margin-top: 18px; margin-bottom: 18px; border-radius: 28px; overflow: hidden; min-height: calc(100dvh - 36px); }
}
