/* ==========================================================================
   pdfmt940 — classic fintech
   Navy + zieleń akcentowa, białe karty z miękkimi cieniami. Sans w treści,
   monospace tylko w tabelach i liczbach (kwoty, daty, numery kont).
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Powierzchnie */
  --bg:           #F5F7FB;
  --card:         #FFFFFF;
  --card-2:       #F8FAFD;

  /* Tekst */
  --fg:           #0F1F3A;
  --fg-mid:       #445168;
  --muted:        #6E7A90;
  --line:         #E4E9F1;
  --line-strong:  #C9D2E0;

  /* Marka */
  --navy:         #0F2A4A;
  --navy-hover:   #0A1F38;
  --navy-ink:     #23406A;
  --navy-fg:      #FFFFFF;

  /* Akcent — zieleń kwit / potwierdzenie / CTA.
     `--accent` musi trzymać kontrast >= 4.5:1 z `--accent-fg` (WCAG AA
     na normalnym tekście). `#0B6E4C` na białym daje 6.5:1. */
  --accent:       #0B6E4C;
  --accent-hover: #08553A;
  --accent-tint:  #E6F4EE;
  --accent-ink:   #075A3C;
  --accent-fg:    #FFFFFF;

  /* Semantyka */
  --ok:           #0F8A5F;
  --ok-bg:        #E6F4EE;
  --warn:         #B0781F;
  --warn-bg:      #FCF3E0;
  --err:          #B42B22;
  --err-bg:       #FCE7E4;
  --info:         #1F4C8A;
  --info-bg:      #E4EDFA;

  /* Fonty */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Cienie — subtelne, do budowania głębi kart bez ciężaru */
  --shadow-sm:  0 1px 2px rgba(15, 42, 74, 0.04);
  --shadow-md:  0 1px 3px rgba(15, 42, 74, 0.06), 0 1px 2px rgba(15, 42, 74, 0.04);
  --shadow-lg:  0 4px 12px rgba(15, 42, 74, 0.08), 0 2px 4px rgba(15, 42, 74, 0.04);
  --shadow-xl:  0 12px 32px rgba(15, 42, 74, 0.10), 0 4px 8px rgba(15, 42, 74, 0.04);

  /* Focus ring */
  --ring:       0 0 0 3px rgba(15, 138, 95, 0.28);

  /* Layout */
  --col:        760px;
  --col-narrow: 480px;
  --radius:     8px;
  --radius-lg:  10px;
  --tap:        44px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0A1220;
    --card:        #111B2E;
    --card-2:      #172439;

    --fg:          #E6ECF6;
    --fg-mid:      #A8B4C6;
    --muted:       #7C8AA0;
    --line:        #223047;
    --line-strong: #33445F;

    --navy:        #4C7DC0;
    --navy-hover:  #6193D2;
    --navy-ink:    #6B96CF;
    /* W dark navy jest jasnoniebieski - biały tekst daje ok 4.2:1
       (fail AA), więc CTA piszemy ciemnym granatem. */
    --navy-fg:     #0A1220;

    --accent:      #2FB37F;
    --accent-hover:#48C594;
    --accent-tint: #16382A;
    --accent-ink:  #7AD3AC;
    /* W dark akcent (jasny zielony) jest za jasny na biały tekst
       (2.9:1) - pisze się na nim ciemnym granatem. Kontrast ~11:1. */
    --accent-fg:   #0A1220;

    --ok:          #2FB37F;
    --ok-bg:       #16382A;
    --warn:        #E1B65E;
    --warn-bg:     #2E2413;
    --err:         #E58879;
    --err-bg:      #2D1815;
    --info:        #7AABE6;
    --info-bg:     #14243B;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.3);
    --ring:       0 0 0 3px rgba(47, 179, 127, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg:          #0A1220;
  --card:        #111B2E;
  --card-2:      #172439;

  --fg:          #E6ECF6;
  --fg-mid:      #A8B4C6;
  --muted:       #7C8AA0;
  --line:        #223047;
  --line-strong: #33445F;

  --navy:        #4C7DC0;
  --navy-hover:  #6193D2;
  --navy-ink:    #6B96CF;

  --accent:      #2FB37F;
  --accent-hover:#48C594;
  --accent-tint: #16382A;
  --accent-ink:  #7AD3AC;

  --ok:          #2FB37F;
  --ok-bg:       #16382A;
  --warn:        #E1B65E;
  --warn-bg:     #2E2413;
  --err:         #E58879;
  --err-bg:      #2D1815;
  --info:        #7AABE6;
  --info-bg:     #14243B;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.3);
  --ring:       0 0 0 3px rgba(47, 179, 127, 0.35);
}

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
svg { display: inline-block; vertical-align: middle; }

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  color: var(--fg);
  margin: 0 0 12px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  font-weight: 700;
}
h1 { font-size: 34px; letter-spacing: -0.025em; }
h2 { font-size: 22px; letter-spacing: -0.018em; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; }

p { margin: 0 0 14px; }

a {
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent-ink) 30%, transparent);
  transition: color 0.12s ease, border-color 0.12s ease;
}
a:hover {
  color: var(--accent-hover);
  border-bottom-color: currentColor;
}

.lead {
  font-size: 17px;
  color: var(--fg-mid);
  line-height: 1.55;
  margin-bottom: 24px;
  text-wrap: pretty;
}
.muted { color: var(--muted); font-size: 13px; }
.mid   { color: var(--fg-mid); font-size: 14px; }
strong { font-weight: 600; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--card-2);
  color: var(--fg);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   3. Header
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: calc(var(--col) + 80px);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.brand {
  font-weight: 700;
  font-size: 17px;
  color: var(--fg);
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  border-bottom: none;
}
.brand::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--accent) 100%);
  box-shadow: var(--shadow-sm);
}
.brand:hover { color: var(--fg); border-bottom: none; }
.brand-sub {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav a,
.nav-logout-btn {
  color: var(--fg-mid);
  border-bottom: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  border: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover,
.nav-logout-btn:hover {
  color: var(--fg);
  background: var(--card-2);
  border-bottom: none;
}
.site-nav a.is-cta {
  color: var(--navy-fg);
  background: var(--navy);
  padding: 8px 14px;
  margin-left: 4px;
}
.site-nav a.is-cta:hover {
  background: var(--navy-hover);
  color: var(--navy-fg);
}

.theme-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin-left: 6px;
  background: var(--card);
}
.theme-toggle button {
  background: transparent;
  border: none;
  padding: 5px 9px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  border-radius: 0;
  min-width: 30px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.theme-toggle button:hover { color: var(--fg); background: var(--card-2); }
.theme-toggle button[aria-pressed="true"] {
  color: var(--navy);
  background: var(--accent-tint);
}
.theme-toggle button + button { border-left: 1px solid var(--line); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--fg);
  min-height: 36px;
  align-items: center;
  gap: 3px;
  flex-direction: column;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle--open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; }
.nav-toggle--open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   4. Main + footer
   -------------------------------------------------------------------------- */

main {
  max-width: var(--col);
  margin: 40px auto 64px;
  padding: 0 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  margin-top: 64px;
  padding: 20px 0 28px;
}
.footer-inner {
  max-width: calc(var(--col) + 80px);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner a { color: var(--muted); border-bottom: none; }
.footer-inner a:hover { color: var(--fg); }
.footer-links { display: flex; gap: 12px; }
.footer-sep { color: var(--line-strong); }
.footer-version { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

/* --------------------------------------------------------------------------
   5. Panels / cards
   -------------------------------------------------------------------------- */

.panel,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.panel--flush { padding: 0; overflow: hidden; }
.panel--flush > .panel-body { padding: 20px 24px; }
.panel--flush > .panel-head,
.panel--flush > .panel-foot {
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel--flush > .panel-foot {
  border-bottom: none;
  border-top: 1px solid var(--line);
}
.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}
.panel-title-hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   6. Messages
   -------------------------------------------------------------------------- */

.msg {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.msg.success { border-left-color: var(--ok);   color: var(--ok);   background: var(--ok-bg); border-color: color-mix(in oklab, var(--ok) 20%, var(--line)); }
.msg.error   { border-left-color: var(--err);  color: var(--err);  background: var(--err-bg); border-color: color-mix(in oklab, var(--err) 20%, var(--line)); }
.msg.info    { border-left-color: var(--info); color: var(--info); background: var(--info-bg); border-color: color-mix(in oklab, var(--info) 20%, var(--line)); }
.msg.warning { border-left-color: var(--warn); color: var(--warn); background: var(--warn-bg); border-color: color-mix(in oklab, var(--warn) 20%, var(--line)); }
.msg a { color: inherit; font-weight: 600; border-bottom-color: currentColor; }
.msg-sm { font-size: 13px; padding: 8px 12px; margin-top: 6px; }

.error-report-hint { margin-top: 6px; font-size: 13px; opacity: 0.9; }

/* --------------------------------------------------------------------------
   7. Forms
   -------------------------------------------------------------------------- */

form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 6px;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
  min-height: var(--tap);
}
form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
form input[type="checkbox"],
form input[type="radio"] {
  width: auto;
  min-height: 0;
  margin-right: 6px;
  vertical-align: middle;
  accent-color: var(--accent);
}
form textarea { resize: vertical; min-height: 96px; }
form select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%236E7A90' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group { margin-bottom: 18px; }
.form-group--checkbox { margin: 6px 0 18px; }

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--fg);
  padding: 4px 0;
  font-weight: 400;
}
.checkbox-option input { margin-top: 3px; }
.checkbox-option strong { display: block; font-size: 14px; margin-bottom: 2px; font-weight: 600; }
.checkbox-hint { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--muted); }

.field-error {
  color: var(--err);
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}
.field-highlight { animation: fieldPulse 1.2s ease; }
@keyframes fieldPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 30%, transparent); }
  30%  { box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 30%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.form--submitting input,
.form--submitting select,
.form--submitting .dropzone {
  pointer-events: none;
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--navy);
  color: var(--navy-fg);
  border: 1px solid var(--navy);
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  line-height: 1.2;
  min-height: var(--tap);
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  box-shadow: var(--shadow-sm);
}
button:hover, .btn:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
  color: var(--navy-fg);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
button:focus-visible, .btn:focus-visible {
  outline: none;
  box-shadow: var(--ring), var(--shadow-md);
}
button:active, .btn:active { transform: translateY(0.5px); box-shadow: var(--shadow-sm); }

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

.btn-secondary,
.btn.secondary,
button.secondary {
  background: var(--card);
  color: var(--navy);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn-secondary:hover,
.btn.secondary:hover,
button.secondary:hover {
  background: var(--card-2);
  color: var(--navy);
  border-color: var(--navy-ink);
  box-shadow: var(--shadow-sm);
}

.btn-danger,
.btn.danger,
button.danger {
  background: var(--card);
  color: var(--err);
  border: 1px solid color-mix(in oklab, var(--err) 40%, transparent);
  box-shadow: none;
}
.btn-danger:hover,
.btn.danger:hover,
button.danger:hover {
  background: var(--err-bg);
  color: var(--err);
  border-color: var(--err);
  box-shadow: var(--shadow-sm);
}

.btn-sm, .btn.sm, button.sm {
  font-size: 13px;
  padding: 7px 14px;
  min-height: 34px;
}
.btn-lg {
  font-size: 15px;
  padding: 14px 24px;
  min-height: 50px;
}
.btn-block { display: flex; width: 100%; }

button:disabled,
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn--loading {
  position: relative;
  padding-left: 44px;
  pointer-events: none;
  opacity: 0.9;
}
.btn--loading::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid color-mix(in oklab, currentColor 25%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btnSpin 0.65s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   9. Tables
   -------------------------------------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--card-2);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--fg-mid);
  border-bottom: 1px solid var(--line-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr:hover { background: var(--card-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --------------------------------------------------------------------------
   10. Badges
   -------------------------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.6;
  vertical-align: middle;
  border: 1px solid transparent;
}
.badge.pro   { color: var(--accent-fg); background: var(--accent); }
.badge.free  { color: var(--fg-mid); background: var(--card-2); border-color: var(--line-strong); }

/* --------------------------------------------------------------------------
   11. Hero + landing
   -------------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 24px 0 8px;
  margin-bottom: 24px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-tint);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 16px;
  text-transform: none;
  letter-spacing: 0.01em;
}
.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
}
.hero h1 {
  font-size: 38px;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  color: var(--navy);
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
}
.hero-lead {
  font-size: 17px;
  color: var(--fg-mid);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 auto;
  text-wrap: pretty;
}

/* Metryki pod hero — bez monospace w etykietach, mono tylko przy liczbach */
.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: center;
  padding: 20px 0 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
}
.spec-row dl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  text-align: center;
}
.spec-row dt {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.spec-row dd {
  margin: 0;
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

/* Kroki 1-2-3 — czytelna siatka trzech kolumn */
.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 20px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
.step-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--navy);
}
.step-desc {
  font-size: 13.5px;
  color: var(--fg-mid);
  margin: 0;
  line-height: 1.5;
}

.banks {
  margin: 40px 0 0;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.banks-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 0 0 16px;
}
.banks-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.banks-list span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy-ink);
  background: var(--card-2);
  font-size: 13px;
  font-weight: 500;
}
.banks-list span.is-xml,
.banks-list span.is-mt940 { color: var(--fg-mid); background: var(--card); }
.banks-list span.is-xml::after { content: " · XML"; color: var(--muted); font-weight: 400; }
.banks-list span.is-mt940::after { content: " · MT940"; color: var(--muted); font-weight: 400; }

/* Karty zaufania — 3 sekcje z ikonami */
.assurance {
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.assurance-item {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.assurance-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  color: var(--accent-ink);
  margin-bottom: 10px;
}
.assurance-item strong {
  display: block;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 4px;
  font-weight: 600;
}
.assurance-item p {
  font-size: 13.5px;
  color: var(--fg-mid);
  margin: 0;
  line-height: 1.5;
}

.cta-note {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  font-size: 14.5px;
  color: var(--fg-mid);
  box-shadow: var(--shadow-sm);
}
.cta-note strong { color: var(--navy); }

/* --------------------------------------------------------------------------
   12. Dropzone
   -------------------------------------------------------------------------- */

.dropzone {
  position: relative;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  color: var(--fg-mid);
  background: var(--card-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.dropzone--active,
.dropzone.dragover,
.dropzone.active {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: var(--ring);
}
.dropzone-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dropzone-icon {
  color: var(--accent);
  opacity: 0.9;
  margin-bottom: 4px;
}
.dropzone-text {
  font-size: 15px;
  color: var(--fg);
  font-weight: 500;
}
.dropzone-link {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dropzone-hint {
  font-size: 12.5px;
  color: var(--muted);
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  background: var(--accent-tint);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, var(--line));
  border-radius: var(--radius);
  font-size: 14px;
}
.file-preview::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 24px;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 2px;
  position: relative;
}
.file-preview-name {
  font-weight: 600;
  word-break: break-all;
  font-size: 14px;
  color: var(--navy);
}
.file-preview-size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  padding-right: 8px;
}
.file-preview-remove {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 4px;
  min-height: 30px;
  box-shadow: none;
}
.file-preview-remove:hover {
  color: var(--err);
  border-color: var(--err);
  background: transparent;
  box-shadow: none;
}

.bank-suggestion {
  font-size: 13.5px;
  color: var(--accent-ink);
  background: var(--accent-tint);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, var(--line));
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bank-suggestion::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.bank-suggestion-link {
  color: inherit;
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}
.bank-suggestion--auto { color: var(--ok); }
.bank-suggestion--auto::before { background: var(--ok); }

/* --------------------------------------------------------------------------
   13. Toasts
   -------------------------------------------------------------------------- */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  max-width: 380px;
}
.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 36px 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-left-width: 4px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--success { border-left-color: var(--ok); }
.toast--error   { border-left-color: var(--err); }
.toast--info    { border-left-color: var(--info); }
.toast--warning { border-left-color: var(--warn); }
.toast-close {
  position: absolute;
  top: 6px; right: 6px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--muted);
  min-height: 28px;
  padding: 0 8px;
  box-shadow: none;
}
.toast-close:hover { color: var(--fg); background: transparent; box-shadow: none; }

/* --------------------------------------------------------------------------
   14. Pricing
   -------------------------------------------------------------------------- */

.pricing-section { text-align: center; }
.pricing-section h1 { margin-bottom: 8px; color: var(--navy); }
.pricing-section .lead { margin-bottom: 28px; }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}
.pricing-card--featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.pricing-plan-name {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pricing-price { margin: 4px 0 18px; }
.pricing-amount {
  font-size: 44px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  line-height: 1;
}
.pricing-amount-old {
  font-size: 22px;
  text-decoration: line-through;
  color: var(--muted);
  margin-right: 8px;
  font-weight: 500;
}
.pricing-currency {
  font-size: 14px;
  color: var(--muted);
  margin-left: 8px;
  font-weight: 500;
}
.pricing-coupon-info {
  font-size: 13px;
  color: var(--accent-ink);
  margin-top: 6px;
  font-weight: 500;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 12px 0 24px;
  border-top: 1px solid var(--line);
}
.pricing-feature {
  padding: 10px 0;
  font-size: 14px;
  color: var(--fg-mid);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pricing-feature:last-child { border-bottom: none; }
.feature-icon {
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  min-width: 12px;
}
.feature-yes   { color: var(--ok); }
.feature-limit { color: var(--warn); }
.feature-no    { color: var(--muted); }

.pricing-card > form,
.pricing-card > .btn { margin-top: auto; }

.coupon-card { padding: 20px 24px; margin-top: 16px; }
.coupon-row { display: flex; gap: 10px; }
.coupon-row input { flex: 1; }
.coupon-row button { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   15. Dashboard
   -------------------------------------------------------------------------- */

.dashboard-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.dashboard-header h1 { margin: 0; font-size: 26px; color: var(--navy); }
.dashboard-header .email {
  font-size: 13px;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-value {
  font-size: 22px;
  color: var(--navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.1;
}
.stat-value small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.usage-section { margin: 6px 0 16px; }
.usage-block + .usage-block { margin-top: 12px; }
.usage-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
}
.usage-label { color: var(--muted); }
.usage-count { color: var(--fg); font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-weight: 500; }
.usage-bar {
  width: 100%;
  height: 6px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.usage-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}
.usage-fill.warning  { background: var(--warn); }
.usage-fill.critical { background: var(--err); }
.usage-warn {
  font-size: 13px;
  color: var(--err);
  margin: 8px 0 0;
}
.usage-unlimited {
  font-size: 13.5px;
  color: var(--accent-ink);
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.usage-unlimited::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

.status-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.status-ok   { color: var(--ok);  font-weight: 600; font-size: 13px; }
.status-fail { color: var(--err); font-weight: 600; font-size: 13px; text-decoration: underline dotted; cursor: help; }

.text-ellipsis { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   16. Auth
   -------------------------------------------------------------------------- */

.auth-card {
  max-width: 440px;
  margin: 32px auto;
}
.auth-card h1 {
  font-size: 26px;
  text-align: left;
  margin-bottom: 6px;
  color: var(--navy);
}
.auth-card .lead { font-size: 14px; margin-bottom: 20px; }
.auth-links {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}
.auth-links p { margin: 6px 0; }
.checkbox-label {
  font-weight: 400;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  color: var(--fg-mid);
}

/* --------------------------------------------------------------------------
   17. Utility classes
   -------------------------------------------------------------------------- */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   18. Focus visible
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 720px) {
  main { margin: 24px auto 48px; padding: 0 16px; }
  .header-inner { padding: 0 16px; min-height: 56px; }
  .footer-inner { padding: 0 16px; flex-direction: column; align-items: flex-start; gap: 6px; }

  .hero h1 { font-size: 30px; }
  .hero-lead { font-size: 15.5px; }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 14px;
    gap: 2px;
    box-shadow: var(--shadow-md);
  }
  .site-nav--open { display: flex; }
  .site-nav a,
  .nav-logout-btn {
    padding: 12px 8px;
    font-size: 15px;
    min-height: var(--tap);
    text-align: left;
    justify-content: flex-start;
    border-radius: 4px;
  }
  .site-nav a.is-cta { margin-left: 0; text-align: center; justify-content: center; }
  .theme-toggle { align-self: flex-start; margin: 8px 4px 2px; }

  .panel, .card, .pricing-card { padding: 20px; border-radius: var(--radius); }
  .panel--flush { padding: 0; }
  .panel--flush > .panel-body { padding: 16px 18px; }
  .panel--flush > .panel-head,
  .panel--flush > .panel-foot { padding: 12px 18px; }

  .pricing-grid,
  .stat-grid,
  .assurance,
  .steps { grid-template-columns: 1fr; }

  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 4px; }

  .spec-row { gap: 12px 24px; }

  #toast-container { right: 12px; left: 12px; max-width: none; bottom: 12px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 26px; }
  .hero-lead { font-size: 15px; }
  .btn-lg { padding: 12px 20px; font-size: 14px; }
  .pricing-amount { font-size: 34px; }
  .stat-value { font-size: 19px; }
  .dropzone { padding: 24px 16px; }
}

/* --------------------------------------------------------------------------
   20. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .nav-toggle, .toast,
  .dropzone, .steps, .banks, .assurance, .cta-note,
  .theme-toggle {
    display: none !important;
  }
  body { background: #FFF; color: #000; font-size: 12pt; }
  main { max-width: none; margin: 0; padding: 0; }
  .panel, .card, .pricing-card { border: 1px solid #CCC; box-shadow: none; page-break-inside: avoid; }
  a { color: #000; text-decoration: underline; border-bottom: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
  a[href^="/"]::after, a[href^="#"]::after { content: ""; }
  .msg { border: 1px solid currentColor; background: none !important; box-shadow: none; }
  table { font-size: 10pt; }
  th { background: #EEE !important; }
}
