:root {
  --primary: #3D7BF5;
  --primary-dark: #1E3A8A;
  --ink: #0A1F44;
  --ink-hover: #16386E;
  --bg: #F6F8FC;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --line: #E5EAF2;
  --ok: #16A34A;
  --warn: #D97706;
  --danger: #DC2626;
  /* Tokeny ze strony somple.io — żeby panel i landing były jednym systemem. */
  --accent: #1F6FD8;
  --accent-light: #7EAEF0;
  --accent-tint: #E8F0FE;
  --site-ink: #101F38;
  --site-body: #44526C;
  --site-muted: #74809A;
  --r-lg: 24px;
  --shadow-card: 0 1px 2px rgba(11,27,51,.04), 0 16px 40px -24px rgba(11,27,51,.14);
  --ease: cubic-bezier(.22,.61,.21,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hidden { display: none !important; }

/* ── Marka ── */
.brand-lg { font-size: 34px; font-weight: 600; letter-spacing: 6px; color: var(--ink); }
.brand-sm { font-size: 20px; font-weight: 600; letter-spacing: 3px; color: var(--ink); }
/* Znak Somple przy nazwie (2026-11-03), jak w nagłówku somple.io */
.brand-lg, .brand-sm { display: inline-flex; align-items: center; }
.brand-lg img { width: auto; height: 46px; display: block; }
.brand-sm img { width: auto; height: 26px; display: block; }
.brand-sub { color: var(--muted); margin: 6px 0 22px; }

/* ── Logowanie ── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap; padding: 24px 16px;
  background: linear-gradient(180deg, #F2F6FD 0%, #F4F8FD 30%, #F8FAFE 60%, var(--bg) 100%);
}
.login-card {
  background: var(--card); border-radius: 18px; padding: 40px 34px;
  width: 360px; box-shadow: 0 12px 40px rgba(30,58,138,.10);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.login-card input {
  width: 100%; padding: 13px 14px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--text);
  background: #fff;
}
.login-card input:focus { outline: none; border-color: var(--primary); }
.login-card button {
  width: 100%; padding: 13px; margin-top: 6px; border: none; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(10,31,68,.55);
}
.login-card button:hover { background: var(--ink-hover); }
.login-card button:disabled { opacity: .6; cursor: default; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; align-self: stretch; }
.info { color: var(--ok); font-size: 13px; margin-top: 12px; align-self: stretch; line-height: 1.5; }
.reset-link { color: var(--primary); font-size: 13px; margin-top: 14px; cursor: pointer; }
.reset-link:hover { text-decoration: underline; }
.divider { display: flex; align-items: center; width: 100%; margin: 16px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider span { padding: 0 12px; }
.login-card button.btn-google {
  width: 100%; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 0;
}
.login-card button.btn-google:hover { background: #F8FAFF; border-color: var(--primary); }

/* ── Topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar-left { display: flex; align-items: baseline; gap: 14px; }
.topbar-title { color: var(--muted); font-size: 14px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-email { color: var(--muted); font-size: 13px; }
.btn-ghost {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 9px; font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ── Okruszki ── */
.crumbs { padding: 16px 28px 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--primary); text-decoration: none; cursor: pointer; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin: 0 8px; color: var(--line); }

/* ── Treść ── */
.content { padding: 20px 28px 60px; max-width: 1120px; margin: 0 auto; }
/* 2026-11-01: operator usługi i dokumenty, jak na somple.io */
.panel-stopka { max-width: 1120px; margin: 0 auto; padding: 18px 28px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.panel-stopka a, .login-prawne a { color: var(--muted); text-decoration: underline; }
.login-prawne { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 16px; text-align: center; align-self: stretch; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

.section-title { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; margin: 26px 0 12px; }

/* Statystyki na górze */
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 20px; min-width: 150px; flex: 1;
}
.stat .num { font-size: 26px; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Siatka pracowników */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.emp-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; cursor: pointer; transition: transform .08s, box-shadow .12s, border-color .12s;
}
.emp-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,58,138,.08); border-color: var(--primary); }
.emp-name { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.emp-meta { display: flex; gap: 18px; margin-top: 14px; }
.emp-meta .k { font-size: 20px; font-weight: 800; }
.emp-meta .kl { font-size: 12px; color: var(--muted); }
.emp-last { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* Lista rozmów */
.conv-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.conv-row {
  display: grid; grid-template-columns: 120px 1fr 90px 110px; gap: 14px; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.conv-row:last-child { border-bottom: none; }
.conv-row:hover { background: #F8FAFF; }
.conv-date { color: var(--muted); font-size: 13px; }
.conv-title { font-weight: 600; }
.conv-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.conv-dur { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.ok { background: #DCFCE7; color: var(--ok); }
.badge.open { background: #FEF3C7; color: var(--warn); }
.badge.err { background: #FEE2E2; color: var(--danger); }

/* Szczegół rozmowy */
.detail-head { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.detail-head h2 { margin: 0 0 6px; font-size: 22px; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.detail-facts b { color: var(--text); font-weight: 600; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; margin-top: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.panel p { line-height: 1.6; margin: 0; white-space: pre-wrap; }
.list-item { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.list-item:last-child { border-bottom: none; }
.list-item .dot { color: var(--primary); }
.list-item.done { color: var(--muted); text-decoration: line-through; }
.transcript { max-height: 340px; overflow-y: auto; color: var(--muted); font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* Zarządzanie zespołem */
.invite-row { display: flex; gap: 10px; }
.invite-row input { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--text); }
.invite-row input:focus { outline: none; border-color: var(--primary); }
.invite-row button { padding: 11px 18px; border: none; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; cursor: pointer; }
.invite-row button:hover { background: var(--ink-hover); }
.invite-msg { font-size: 13px; margin-top: 10px; min-height: 16px; }
.invite-msg.ok { color: var(--ok); }
.invite-msg.err { color: var(--danger); }
.member-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: none; }

/* Brak dostępu */
.denied { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.denied-card { text-align: center; background: #fff; padding: 40px; border-radius: 18px; box-shadow: 0 12px 40px rgba(30,58,138,.10); }
.denied-card p { color: var(--muted); margin: 18px 0 22px; }

/* ── Statystyki wyników (chipy + kafelki analizy) ── */
.emp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: #EEF1F6; color: #55617A; }
.chip b { font-weight: 700; }
.chip.ok { background: #E3F4E8; color: #1F7A3D; }
.chip.info { background: #E6EEFC; color: #2457C5; }
.chip.bad { background: #FBE7E7; color: #B3261E; }
.chip.muted { background: #EEF1F6; color: #8A94A8; }
.ana-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ana-tile { background: #F7F8FB; border-radius: 10px; padding: 10px 12px; }
.ana-tile small { display: block; font-size: 11px; color: #8A94A8; margin-bottom: 2px; }
.ana-tile b { font-size: 15px; }
.ana-tile b.ok { color: #1F7A3D; } .ana-tile b.bad { color: #B3261E; } .ana-tile b.muted { color: #55617A; } .ana-tile b.info { color: #2457C5; }
.ana-sub { font-weight: 700; font-size: 13px; margin: 12px 0 6px; color: #2A3247; }

/* ── Widok Statystyki ── */
.period-row { display: flex; gap: 18px; margin-bottom: 14px; }
.period { font-size: 14px; color: #8A94A8; cursor: pointer; padding: 4px 0; }
.period.on { color: #2457C5; font-weight: 700; border-bottom: 2px solid #2457C5; }
.dbars { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 16px; }
.dbar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.dbar { width: 100%; max-width: 42px; border-radius: 5px 5px 0 0; background: #3D7BF5; }
.dbar.dim { background: #E4E8F0; }
.dbar-n { font-size: 11px; color: #8A94A8; }
.dbar-l { font-size: 11px; color: #8A94A8; }
.hbar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.hbar-l { width: 84px; }
.hbar-track { display: block; flex: 1; height: 9px; border-radius: 99px; background: #EEF1F6; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 99px; }
.hbar-n { width: 24px; text-align: right; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stats-table th { text-align: left; color: #8A94A8; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid #EEF1F6; }
.stats-table td { padding: 8px; border-bottom: 1px solid #F4F6FA; }
.stats-table tr.emp-link { cursor: pointer; }
.stats-table tr.emp-link:hover td { background: #F7F9FD; }

.pending-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.dot-red { width: 8px; height: 8px; border-radius: 50%; background: #B3261E; flex-shrink: 0; }
.pending-emp { color: #8A94A8; font-size: 12px; }
.pending-when { margin-left: auto; color: #8A94A8; font-size: 12px; white-space: nowrap; }

/* ── Wykresy panelu (SVG, bez bibliotek) ─────────────────────────────── */
.viz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 860px) { .viz-grid { grid-template-columns: 1fr; } }
.viz-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px; }

/* Pierścień + legenda obok (etykiety zawsze widoczne — kolor nie niesie
   znaczenia sam, a kontrast wycinków bywa poniżej 3:1). */
.viz-donut { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.viz-c-num { font-size: 26px; font-weight: 700; fill: var(--text); }
.viz-c-lbl { font-size: 11px; fill: var(--muted); }
.viz-legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 7px; }
.lg-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lg-lbl { color: var(--text); flex: 1; }
.lg-val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.lg-pct { color: var(--muted); font-weight: 400; }

/* Ranking poziomy — jedna seria, jeden odcień; wartość zawsze przy słupku. */
.viz-rank { display: flex; flex-direction: column; gap: 9px; }
.rank-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; align-items: center; gap: 10px; }
.rank-lbl { font-size: 12.5px; color: var(--text); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.rank-track { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.rank-fill { display: block; height: 100%; background: #2a78d6; border-radius: 4px; }
.rank-val { font-size: 12.5px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }

/* ── Plan / abonament ─────────────────────────────────────────────────────────
   Typografia i karty 1:1 z sekcją „Cennik" na somple.io (Inter, ciasny tracking,
   pigułkowe przyciski, checkmarki w akcencie) — panel ma być tą samą stroną. */
.plan-baner {
  background: var(--accent-tint); border-radius: 14px; padding: 14px 18px;
  margin-bottom: 20px; font-size: .9rem; color: var(--site-ink); letter-spacing: -.01em;
}
.plan-baner.ok { background: #DCFCE7; color: #14532D; }

.plan-teraz {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.plan-teraz-l { font-size: .84rem; color: var(--site-muted); letter-spacing: -.005em; }
.plan-teraz-n {
  font-size: 2.3rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  color: var(--site-ink); margin-top: 2px;
}
.plan-teraz-do { font-size: .84rem; color: var(--site-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

.plan-naglowek { margin: 34px 0 20px; }
.plan-naglowek .kicker { font-size: .84rem; font-weight: 600; color: var(--site-ink); }
.plan-naglowek h2 {
  font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.12;
  color: var(--site-ink); margin: 8px 0 0;
}

.plan-siatka { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1200px) { .plan-siatka { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .plan-siatka { grid-template-columns: 1fr; max-width: 420px; } }

/* ── Kredyty (2026-10-31): pierścień puli planu, kredyty dodatkowe, paczki ── */
.kredyty {
  margin-top: 16px; background: linear-gradient(135deg, #E7EEFE, var(--card) 60%);
  border: 1px solid #C9DAFB; border-radius: var(--r-lg); padding: 24px 28px;
  display: grid; gap: 18px;
}
.kredyty-plan, .kredyty-dodatkowe { display: flex; align-items: center; gap: 18px; }
.kredyty-pierscien {
  --p: 0; width: 108px; height: 108px; border-radius: 50%; flex: none;
  --q: 0;
  background: conic-gradient(#3D7BF5 0 calc(var(--p) * 1%), #8FD8F5 0 calc(var(--q) * 1%), #E3EAF7 0);
  display: grid; place-items: center;
}
.kredyty-pierscien > div {
  width: 84px; height: 84px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; align-content: center; text-align: center;
}
.kredyty-pierscien b { font-size: 1.35rem; letter-spacing: -.02em; color: var(--site-ink); }
.kredyty-pierscien span { font-size: .72rem; color: var(--site-muted); }
.kredyty-t { font-size: 1.02rem; font-weight: 600; color: var(--site-ink); }
.kredyty-t b { color: #3D7BF5; }
.kredyty-s { font-size: .84rem; color: var(--site-muted); margin-top: 3px; }
.kredyty .monety { width: 56px; height: 56px; flex: none; }
.kredyty-leg { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--site-ink); margin-top: 6px; }
.kredyty-leg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.kredyty-leg .kp { background: #3D7BF5; }
.kredyty-leg .kd { background: #8FD8F5; }
.kredyty-zasady { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 12px; }
.kredyty-zasady > div { background: rgba(127,174,245,.14); border-radius: 16px; padding: 12px 16px; font-size: .86rem; color: #1E3A8A; }
.kredyty-zasady b { font-size: 1.5rem; color: #3D7BF5; margin-right: 4px; }
.kredyty-zasady span { display: block; color: var(--site-muted); font-size: .8rem; margin-top: 2px; }
@media (max-width: 560px) { .kredyty-zasady { grid-template-columns: 1fr; } }
.paczki { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; }
.paczka {
  display: grid; gap: 2px; text-align: left; cursor: pointer; font: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
}
.paczka:hover { border-color: #3D7BF5; }
.paczka:disabled { opacity: .6; cursor: wait; }
.paczka-n { font-size: 1.4rem; font-weight: 700; color: #3D7BF5; letter-spacing: -.02em; }
.paczka-l { font-size: .8rem; color: var(--site-muted); }
.paczka-c { font-size: 1rem; font-weight: 700; color: var(--site-ink); margin-top: 4px; }
@media (max-width: 560px) { .paczki { grid-template-columns: 1fr; } .kredyty { padding: 20px; } }

.plan-karta {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px 32px; display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.plan-karta:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.plan-karta.biezacy { border: 2px solid var(--accent-light); }
.plan-nazwa { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; color: var(--site-ink); }
.plan-kto { font-size: .84rem; color: var(--site-muted); margin: 2px 0 20px; }
.plan-cena {
  font-size: 2.3rem; font-weight: 700; letter-spacing: -.03em; color: var(--site-ink);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.plan-per { font-size: .78rem; color: var(--site-muted); margin-bottom: 24px; }
.plan-cechy { list-style: none; display: grid; gap: 11px; margin: 0 0 28px; padding: 0; }
.plan-cechy li { display: flex; gap: 9px; align-items: flex-start; font-size: .89rem; color: var(--site-body); }
.plan-cechy svg {
  flex: none; width: 16px; height: 16px; margin-top: 3px;
  stroke: var(--accent); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}

/* Przyciski jak .btn na stronie: pigułka, 600, ciasny tracking. */
.plan-cta { margin-top: auto; }
.plan-kup, .plan-portal {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  border: 0; cursor: pointer; border-radius: 999px; padding: 14px 28px;
  font-size: .95rem; font-weight: 600; letter-spacing: -.005em; font-family: inherit;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s;
}
.plan-kup { background: transparent; color: var(--site-ink); box-shadow: inset 0 0 0 1px var(--line); }
.plan-kup:hover { background: #F7F9FC; transform: translateY(-1px); }
.plan-karta.polecany .plan-kup { background: var(--accent); color: #fff; box-shadow: none; }
.plan-karta.polecany .plan-kup:hover { background: #1655AE; }
.plan-kup:disabled { opacity: .6; cursor: default; transform: none; }
.plan-portal { width: auto; background: var(--site-ink); color: #fff; white-space: nowrap; }
.plan-portal:hover { background: #1E3252; }

.plan-akt {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent); font-size: .82rem; font-weight: 600;
}
.plan-info { font-size: .84rem; color: var(--site-muted); }
.plan-stopka { color: var(--site-muted); font-size: .86rem; margin-top: 26px; line-height: 1.7; }
.plan-baner.err { background: #FEE2E2; color: #7F1D1D; }

/* Przełącznik okresu płatności (2026-10-28) */
.plan-okres { display:flex; gap:8px; justify-content:center; margin-top:12px; }
.plan-okres .aktywny { background:#3D7BF5; color:#fff; border-color:#3D7BF5; }

/* ── Karta planu z kołem kredytów (2026-10-31): ta sama co w aplikacji ───────── */
.karta-planu {
  background: linear-gradient(135deg, #1E3A8A, #3D7BF5 55%, #7FAEF5);
  color: #fff; border-radius: var(--r-lg); padding: 26px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.karta-planu.kompakt { padding: 20px 24px; margin-bottom: 18px; }
.karta-planu-l { font-size: .72rem; letter-spacing: .16em; font-weight: 600; opacity: .8; }
.karta-planu-n { font-size: 2.3rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 2px; }
.karta-planu.kompakt .karta-planu-n { font-size: 1.7rem; }
.karta-planu-o { font-size: .92rem; opacity: .9; margin-top: 4px; max-width: 30em; }
.karta-planu-btn {
  margin-top: 14px; background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer;
}
.karta-planu-btn:hover { background: rgba(255,255,255,.28); }
.karta-planu-prawa { display: flex; align-items: center; gap: 20px; }
.karta-planu-t { font-size: 1.02rem; font-weight: 600; }
.karta-planu-s { font-size: .86rem; opacity: .85; margin-bottom: 8px; }
.karta-planu-pusto { font-size: .95rem; max-width: 22em; }
.karta-planu .leg { display: flex; align-items: center; gap: 7px; font-size: .82rem; margin-top: 5px; }
.karta-planu .leg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.karta-planu .leg .kp { background: #fff; }
.karta-planu .leg .kd { background: #B9F0FF; }
.karta-planu .leg.malo { color: #FFE08A; font-weight: 600; }
.kolo { --p: 0; --q: 0; --g: 13px; position: relative; width: 132px; height: 132px; flex: none; }
.kolo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#fff 0 calc(var(--p) * 1%), #B9F0FF 0 calc(var(--q) * 1%), rgba(255,255,255,.2) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--g)), #000 calc(100% - var(--g) + 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - var(--g)), #000 calc(100% - var(--g) + 1px));
}
.kolo-maly { width: 92px; height: 92px; --g: 10px; }
.kolo-srodek { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.kolo-srodek b { font-size: 1.55rem; letter-spacing: -.02em; line-height: 1.1; }
.kolo-maly .kolo-srodek b { font-size: 1.15rem; }
.kolo-srodek span { font-size: .72rem; opacity: .85; }
.karta-planu-prawa { position: relative; }
.sekcja-k { margin-top: 22px; }
.sekcja-k-t { font-size: 1.05rem; font-weight: 600; color: var(--site-ink); margin-bottom: 8px; }
.sekcja-k .paczki { margin-top: 12px; }
.plan-teraz-do { margin-top: 8px; }

/* Pigułka planu w górnym pasku */
.pigulka { display: inline-flex; align-items: center; gap: 7px; background: rgba(61,123,245,.1) !important;
  color: #1E3A8A !important; border-radius: 999px !important; font-weight: 600; }
.pigulka .pig-kropka { width: 8px; height: 8px; border-radius: 50%; background: #3D7BF5; }
.pigulka.malo { background: #FEF3C7 !important; color: #92400E !important; }
.pigulka.malo .pig-kropka { background: #F59E0B; }

/* ── Akcje na notatce i Kosz (2026-10-31) ─────────────────────────────── */
.akcje-notatki { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn-ghost.niebezp { color: #B91C1C; }
.edycja-notatki { display: grid; gap: 10px; margin-top: 14px; max-width: 520px; }
.edycja-notatki label { display: grid; gap: 4px; font-size: .84rem; color: var(--site-muted); }
.edycja-notatki input { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; }
.kosz-wiersz { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); }
.kosz-akcje { display: flex; gap: 8px; flex: none; }
.edycja-notatki .btn-primary { background: #3D7BF5; color: #fff; border: 0; border-radius: 999px;
  padding: 8px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.historia-k { margin-top: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
.historia-k summary { cursor: pointer; font-weight: 600; color: var(--site-ink); }
.historia-w { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.historia-w:last-child { border-bottom: 0; }
.historia-ik { width: 18px; color: #3D7BF5; font-weight: 700; text-align: center; }
.historia-o { flex: 1; min-width: 0; font-size: .9rem; color: var(--site-ink); }
.historia-o small { display: block; color: var(--site-muted); font-size: .76rem; }
.historia-w b { font-size: .9rem; }
.historia-w b.plus { color: #15803D; }


/* ── Logowanie kodem QR (2026-11-06) ───────────────────────────────────── */
.qr-card { justify-content: flex-start; }
.qr-tytul { margin: 0 0 16px; font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.qr-ramka {
  position: relative; display: inline-flex; padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; line-height: 0;
}
.qr-ramka canvas { display: block; max-width: 100%; height: auto !important; border-radius: 8px; }
.qr-ramka.nieaktywny canvas { opacity: .12; filter: blur(2px); }
.qr-nakladka {
  position: absolute; inset: 10px; display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center; line-height: 1.4; font-size: 14px; font-weight: 600; color: var(--ink);
}
.qr-status { min-height: 40px; margin: 14px 0 0; font-size: 14px; line-height: 1.4; color: var(--site-body); align-self: stretch; }
.qr-status.blad { color: var(--danger); }
.qr-status.ok { color: var(--ok); }
.qr-odliczanie { min-height: 18px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.login-card button.qr-nowy {
  width: auto; padding: 8px 18px; margin-top: 10px; background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: none;
}
.login-card button.qr-nowy:hover { background: #F8FAFF; border-color: var(--primary); color: var(--primary); }
.qr-kroki {
  align-self: stretch; text-align: left; margin: 20px 0 0; padding: 14px 16px 14px 36px;
  background: var(--accent-tint); border-radius: 12px; color: var(--site-ink); font-size: 13px; line-height: 1.7;
}
@media (max-width: 520px) { .qr-card { display: none; } }  /* na telefonie kod do zeskanowania telefonem nie ma sensu */

/* ── Karty z danych dokumentów: mail, pytania, udostępnianie, tydzień, playbook ── */
.panel.karta-ak { border-left: 3px solid var(--primary); }
.mail-temat { font-weight: 600; color: var(--site-ink); margin-bottom: 8px; }
.mail-tresc { white-space: pre-wrap; line-height: 1.6; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font-size: 14px; overflow-wrap: anywhere; }
.karta-akcje { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.karta-akcje a.btn-ghost { text-decoration: none; display: inline-block; }
.karta-info { font-size: 12.5px; color: var(--muted); }
.karta-info.blad { color: var(--danger); }
.link-pole { flex: 1; min-width: 200px; font: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); }
.tydzien-kafle { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.tydzien-kafle .stat { min-width: 120px; }
.tydzien-lista .pending-row { align-items: baseline; }
.playbook-poz { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); line-height: 1.55; }
.playbook-poz:last-child { border-bottom: 0; }
.playbook-nr { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-tint);
  color: var(--accent); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.konto-wiersz { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.konto-wiersz:last-child { border-bottom: 0; }
.konto-wiersz span:first-child { color: var(--muted); }

/* 2026-11-12: plan opłacany przez firmę, jak w aplikacji */
.pill-firma{display:inline-block;margin-left:8px;padding:2px 9px;border-radius:999px;background:rgba(19,40,74,.08);color:#13284A;font-size:11px;font-weight:600;letter-spacing:0;text-transform:none;vertical-align:1px}
