/* ═══════════════════════════════════════════════════════════════
   PFK DESIGN SYSTEM — pełny arkusz CSS
   Polska Federacja Kynologiczna · Moje PFK
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   1. DESIGN TOKENS
───────────────────────────────────────── */
:root {
  /* Kolory główne */
  --navy:           #002147;
  --navy-dark:      #001530;
  --navy-mid:       #0d2a52;
  --navy-light:     #163660;
  --gold:           #FDC800;
  --gold-dark:      #e8b500;
  --gold-pale:      #fff8e0;

  /* Tła */
  --bg:             #eef1f7;
  --bg-subtle:      #f4f6fa;
  --card:           #ffffff;
  --surface-hover:  #f7f9fc;

  /* Bordering */
  --border:         #e2e8f0;
  --border-2:       #eaedf2;
  --border-strong:  #c8d0dc;

  /* Tekst */
  --text:           #1a2940;
  --text-2:         #5a6472;
  --text-3:         #9aa3b0;
  --text-disabled:  #b8bec8;

  /* Semantic — sukces */
  --green:          #1e6b35;
  --green-mid:      #2d9a4e;
  --green-bg:       #e6f4ea;
  --green-border:   #b7dfbf;

  /* Semantic — ostrzeżenie */
  --orange:         #8a5000;
  --orange-mid:     #c47a00;
  --orange-bg:      #fff3e0;
  --orange-border:  #f5d18a;

  /* Semantic — błąd */
  --red:            #c0272d;
  --red-mid:        #e03535;
  --red-bg:         #fce8e8;
  --red-border:     #f0b8b8;

  /* Semantic — info */
  --blue:           #1a3a6b;
  --blue-mid:       #2451a8;
  --blue-bg:        #e8f0fe;
  --blue-border:    #b0c8f8;

  /* Semantic — neutral */
  --gray:           #6a7585;
  --gray-bg:        #f0f2f4;
  --gray-border:    #d4d9e0;

  /* Fiolet — admin */
  --admin:          #7c3aed;
  --admin-bg:       #f5f3ff;
  --admin-border:   #ddd6fe;

  /* Typografia */
  --font:           'Montserrat', -apple-system, sans-serif;
  --font-serif:     'Cormorant Garamond', Georgia, serif;
  --fs-xs:          10px;
  --fs-sm:          11px;
  --fs-body:        13px;
  --fs-md:          14px;
  --fs-lg:          16px;
  --fs-xl:          20px;
  --fs-2xl:         24px;
  --fs-3xl:         32px;
  --fw-normal:      400;
  --fw-medium:      500;
  --fw-semi:        600;
  --fw-bold:        700;
  --fw-black:       800;
  --lh-tight:       1.2;
  --lh-normal:      1.55;
  --lh-loose:       1.75;

  /* Przestrzeń */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:   12px;
  --sp-4:   16px;
  --sp-5:   20px;
  --sp-6:   24px;
  --sp-8:   32px;
  --sp-10:  40px;
  --sp-12:  48px;

  /* Zaokrąglenia */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 100px;

  /* Cienie */
  --shadow-xs:  0 1px 4px rgba(0,33,71,.06);
  --shadow-sm:  0 1px 8px rgba(0,33,71,.08);
  --shadow-md:  0 4px 20px rgba(0,33,71,.11);
  --shadow-lg:  0 8px 32px rgba(0,33,71,.15);
  --shadow-xl:  0 16px 48px rgba(0,33,71,.20);

  /* Przejścia */
  --t-fast:   120ms ease;
  --t-normal: 200ms ease;
  --t-slow:   300ms ease;

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(0,33,71,.12);
}


/* ─────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }


/* ─────────────────────────────────────────
   3. TYPOGRAFIA
───────────────────────────────────────── */

/* Nagłówki */
h1, .h1 { font-size: var(--fs-3xl); font-weight: var(--fw-black); line-height: var(--lh-tight); color: var(--navy); }
h2, .h2 { font-size: var(--fs-2xl); font-weight: var(--fw-black); line-height: var(--lh-tight); color: var(--navy); }
h3, .h3 { font-size: var(--fs-xl);  font-weight: var(--fw-bold);  line-height: var(--lh-tight); color: var(--navy); }
h4, .h4 { font-size: var(--fs-lg);  font-weight: var(--fw-bold);  line-height: var(--lh-normal); color: var(--navy); }
h5, .h5 { font-size: var(--fs-md);  font-weight: var(--fw-semi);  line-height: var(--lh-normal); color: var(--navy); }
h6, .h6 { font-size: var(--fs-body);font-weight: var(--fw-semi);  line-height: var(--lh-normal); color: var(--navy); }

/* Użytkowe */
.text-xs      { font-size: var(--fs-xs); }
.text-sm      { font-size: var(--fs-sm); }
.text-body    { font-size: var(--fs-body); }
.text-md      { font-size: var(--fs-md); }
.text-lg      { font-size: var(--fs-lg); }
.text-muted   { color: var(--text-2); }
.text-subtle  { color: var(--text-3); }
.text-navy    { color: var(--navy); }
.text-gold    { color: var(--gold-dark); }
.text-success { color: var(--green); }
.text-warning { color: var(--orange); }
.text-danger  { color: var(--red); }
.text-info    { color: var(--blue); }
.font-medium  { font-weight: var(--fw-medium); }
.font-semi    { font-weight: var(--fw-semi); }
.font-bold    { font-weight: var(--fw-bold); }
.font-black   { font-weight: var(--fw-black); }
.uppercase    { text-transform: uppercase; letter-spacing: .1em; }
.serif        { font-family: var(--font-serif); }

/* Section label (zlatym podkreśleniem jak w dokumentach) */
.section-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-black);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: var(--sp-1);
  margin-bottom: var(--sp-3);
  display: block;
}

/* Card title (z golden bar) */
.card-title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-body); font-weight: var(--fw-bold); color: var(--navy);
}
.card-title::before {
  content: ''; width: 4px; height: 16px;
  background: var(--gold); border-radius: 2px; flex-shrink: 0;
}


/* ─────────────────────────────────────────
   4. KARTY (CARDS)
───────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card + .card { margin-top: var(--sp-4); }

/* Warianty */
.card--flat        { box-shadow: none; }
.card--raised      { box-shadow: var(--shadow-md); }
.card--interactive { transition: box-shadow var(--t-fast), transform var(--t-fast); cursor: pointer; }
.card--interactive:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card--navy        { background: var(--navy); border-color: var(--navy); color: #fff; }
.card--gold        { background: var(--gold-pale); border-color: var(--gold); }
.card--success     { border-left: 4px solid var(--green); }
.card--warning     { border-left: 4px solid var(--orange-mid); }
.card--danger      { border-left: 4px solid var(--red); }
.card--info        { border-left: 4px solid var(--blue-mid); }
.card--accent      { border-left: 4px solid var(--gold); }

/* Card sections */
.card__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-2);
}
.card__body   { padding: var(--sp-5); }
.card__footer {
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--border-2);
  background: var(--bg-subtle);
  display: flex; align-items: center; gap: var(--sp-3);
}

/* Stat card */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  border-left: 3px solid var(--gold);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card__label { font-size: var(--fs-xs); font-weight: var(--fw-black); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--sp-2); }
.stat-card__value { font-size: var(--fs-3xl); font-weight: var(--fw-black); color: var(--navy); line-height: 1; margin-bottom: var(--sp-1); }
.stat-card__hint  { font-size: var(--fs-sm); color: var(--text-2); }

/* Welcome hero */
.welcome-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--r-md);
  padding: var(--sp-6) var(--sp-8);
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.welcome-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(253,200,0,.06); pointer-events: none;
}


/* ─────────────────────────────────────────
   5. PRZYCISKI (BUTTONS)
───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 40px; padding: 0 var(--sp-5);
  font-family: var(--font); font-size: var(--fs-body); font-weight: var(--fw-bold);
  border-radius: var(--r-sm); border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  text-decoration: none; user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }

/* Warianty */
.btn-primary  { background: var(--navy);  border-color: var(--navy);  color: #fff; }
.btn-primary:hover  { background: var(--navy-light); border-color: var(--navy-light); }

.btn-gold     { background: var(--gold);  border-color: var(--gold);  color: var(--navy); }
.btn-gold:hover     { background: var(--gold-dark); border-color: var(--gold-dark); }

.btn-outline  { background: #fff; border-color: var(--border-strong); color: var(--text-2); }
.btn-outline:hover  { border-color: var(--navy); color: var(--navy); }

.btn-ghost    { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover    { background: var(--surface-hover); color: var(--text); }

.btn-danger   { background: var(--red);   border-color: var(--red);   color: #fff; }
.btn-danger:hover   { background: #a01e23; border-color: #a01e23; }

.btn-success  { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover  { background: #165228; border-color: #165228; }

.btn-admin    { background: var(--admin); border-color: var(--admin); color: #fff; border-radius: var(--r-pill); }
.btn-admin:hover    { background: #6d28d9; border-color: #6d28d9; }

/* Rozmiary */
.btn-xs { height: 24px; padding: 0 var(--sp-3);  font-size: var(--fs-xs);   border-radius: var(--r-xs); }
.btn-sm { height: 32px; padding: 0 var(--sp-4);  font-size: var(--fs-sm);   border-radius: var(--r-xs); }
.btn-lg { height: 48px; padding: 0 var(--sp-8);  font-size: var(--fs-md);   border-radius: var(--r-md); }
.btn-xl { height: 56px; padding: 0 var(--sp-10); font-size: var(--fs-lg);   border-radius: var(--r-md); }
.btn-full  { width: 100%; }
.btn-pill  { border-radius: var(--r-pill); }
.btn-icon  { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-xs { width: 24px; }

/* Stany */
.btn[disabled], .btn.disabled {
  opacity: .45; pointer-events: none;
}
.btn.loading { opacity: .7; pointer-events: none; }

/* Icon button (round) */
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text-2); cursor: pointer; flex-shrink: 0;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.icon-btn:hover { border-color: var(--navy); color: var(--navy); }
.icon-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.icon-btn--navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.icon-btn--navy:hover { background: var(--navy-light); }
.icon-btn--sm { width: 30px; height: 30px; }
.icon-btn--sm svg { width: 13px; height: 13px; }


/* ─────────────────────────────────────────
   6. BADGES / TAGS / PILLS
───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap;
  line-height: 1;
}
.badge svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.5; fill: none; }

/* Warianty kolorystyczne */
.badge-green   { background: var(--green-bg);   color: var(--green);  border: 1px solid var(--green-border); }
.badge-orange  { background: var(--orange-bg);  color: var(--orange); border: 1px solid var(--orange-border); }
.badge-red     { background: var(--red-bg);     color: var(--red);    border: 1px solid var(--red-border); }
.badge-blue    { background: var(--blue-bg);    color: var(--blue);   border: 1px solid var(--blue-border); }
.badge-gold    { background: var(--gold-pale);  color: #7a5a00;       border: 1px solid var(--gold); }
.badge-navy    { background: var(--navy);       color: #fff;          border: 1px solid var(--navy); }
.badge-gray    { background: var(--gray-bg);    color: var(--gray);   border: 1px solid var(--gray-border); }
.badge-admin   { background: var(--admin-bg);   color: var(--admin);  border: 1px solid var(--admin-border); }

/* Dot badge */
.badge::before { content: none; }
.badge-dot::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
  flex-shrink: 0;
}

/* Tag (removable) */
.tag {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 3px 8px 3px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-semi);
  background: var(--blue-bg); color: var(--blue);
  border: 1px solid var(--blue-border);
}
.tag__remove {
  width: 16px; height: 16px; border-radius: 50%;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: currentColor; opacity: .6; padding: 0;
  font-size: 14px; line-height: 1;
}
.tag__remove:hover { opacity: 1; }

/* Status pill (radio style) */
.status-pill {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--text-2);
  cursor: pointer; transition: all var(--t-fast);
}
.status-pill.active-green  { background: var(--green-bg);  color: var(--green);  border-color: var(--green); }
.status-pill.active-orange { background: var(--orange-bg); color: var(--orange); border-color: var(--orange-mid); }
.status-pill.active-red    { background: var(--red-bg);    color: var(--red);    border-color: var(--red); }
.status-pill.active-navy   { background: var(--navy);      color: #fff;          border-color: var(--navy); }


/* ─────────────────────────────────────────
   7. FORMULARZE
───────────────────────────────────────── */

/* Field wrapper */
.field { display: flex; flex-direction: column; gap: var(--sp-1); }
.field + .field { margin-top: var(--sp-4); }
/* W siatce kolumny ustawia grid — nie stackujemy margin-top (psuł wyrównanie pól obok siebie). */
.grid-2 .field + .field, .grid-3 .field + .field, .grid-4 .field + .field { margin-top: 0; }
/* Siatka pól zachowuje się w przepływie formularza jak zwykłe pole (równe odstępy). */
.field + .grid-2, .grid-2 + .field, .grid-2 + .grid-2 { margin-top: var(--sp-4); }

/* Label */
.label {
  font-size: var(--fs-xs); font-weight: var(--fw-black);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); display: block;
}
.label--required::after { content: ' *'; color: var(--red); }
.label--optional::after { content: ' (opcjonalne)'; color: var(--text-3); font-weight: var(--fw-normal); letter-spacing: 0; text-transform: none; }

/* Input base */
.input {
  width: 100%; height: 42px;
  padding: 0 var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card);
  font-family: var(--font); font-size: var(--fs-body); color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none; appearance: none;
}
.input::placeholder { color: var(--text-3); }
.input:hover  { border-color: var(--border-strong); }
.input:focus  { border-color: var(--navy); box-shadow: var(--focus-ring); }
.input:disabled { background: var(--bg-subtle); color: var(--text-disabled); border-color: var(--border); cursor: not-allowed; }
.input.error  { border-color: var(--red); }
.input.error:focus { box-shadow: 0 0 0 3px rgba(192,39,45,.12); }
.input.success { border-color: var(--green); }

/* Input rozmiary */
.input-sm { height: 34px; font-size: var(--fs-sm); border-radius: var(--r-xs); padding: 0 var(--sp-3); }
.input-lg { height: 50px; font-size: var(--fs-md); border-radius: var(--r-md); padding: 0 var(--sp-5); }

/* Read-only / static */
.input-static {
  width: 100%; height: 42px;
  padding: 0 var(--sp-4);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--bg-subtle); color: var(--text-2);
  font-family: var(--font); font-size: var(--fs-body);
  display: flex; align-items: center;
}

/* Input z ikoną */
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-left: 40px; }
.input-group__icon {
  position: absolute; left: 12px; color: var(--text-3); pointer-events: none;
}
.input-group__icon svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.input-group--right .input { padding-left: var(--sp-4); padding-right: 40px; }
.input-group--right .input-group__icon { left: auto; right: 12px; }

/* Textarea */
.textarea {
  width: 100%; min-height: 100px;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card);
  font-family: var(--font); font-size: var(--fs-body); color: var(--text);
  resize: vertical; line-height: var(--lh-normal);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.textarea::placeholder { color: var(--text-3); }
.textarea:hover  { border-color: var(--border-strong); }
.textarea:focus  { border-color: var(--navy); box-shadow: var(--focus-ring); }
.textarea:disabled { background: var(--bg-subtle); color: var(--text-disabled); cursor: not-allowed; }
.textarea.error  { border-color: var(--red); }

/* Select */
.select {
  width: 100%; height: 42px;
  padding: 0 36px 0 var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%239aa3b0' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-family: var(--font); font-size: var(--fs-body); color: var(--text);
  appearance: none; outline: none; cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.select:hover  { border-color: var(--border-strong); }
.select:focus  { border-color: var(--navy); box-shadow: var(--focus-ring); }
.select:disabled { background-color: var(--bg-subtle); color: var(--text-disabled); cursor: not-allowed; }
.select.error  { border-color: var(--red); }
.select-sm { height: 34px; font-size: var(--fs-sm); }

/* Date input */
.input-date {
  width: 100%; height: 42px;
  padding: 0 var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card);
  font-family: var(--font); font-size: var(--fs-body); color: var(--text);
  outline: none; appearance: none; cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input-date:hover { border-color: var(--border-strong); }
.input-date:focus { border-color: var(--navy); box-shadow: var(--focus-ring); }

/* Checkbox */
.checkbox-wrap { display: flex; align-items: flex-start; gap: var(--sp-3); cursor: pointer; }
.checkbox-wrap input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-xs);
  appearance: none; cursor: pointer;
  background: var(--card);
  transition: background var(--t-fast), border-color var(--t-fast);
  position: relative;
}
.checkbox-wrap input[type="checkbox"]:checked {
  background: var(--navy); border-color: var(--navy);
}
.checkbox-wrap input[type="checkbox"]:checked::after {
  content: '';
  position: absolute; top: 1px; left: 5px;
  width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg);
}
.checkbox-wrap input[type="checkbox"]:focus { box-shadow: var(--focus-ring); outline: none; }
.checkbox-wrap input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.checkbox-label { font-size: var(--fs-body); color: var(--text); line-height: 1.5; }

/* Radio */
.radio-wrap { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.radio-wrap input[type="radio"] {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  appearance: none; cursor: pointer;
  background: var(--card);
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  position: relative;
}
.radio-wrap input[type="radio"]:checked {
  background: var(--navy); border-color: var(--navy);
}
.radio-wrap input[type="radio"]:checked::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 8px; height: 8px;
  border-radius: 50%; background: #fff;
}
.radio-wrap input[type="radio"]:focus { box-shadow: var(--focus-ring); outline: none; }

/* Radio pill group */
.radio-pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.radio-pill {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--text-2);
  font-size: var(--fs-sm); font-weight: var(--fw-semi);
  cursor: pointer; transition: all var(--t-fast);
  user-select: none;
}
.radio-pill input { display: none; }
.radio-pill:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
.radio-pill:hover:not(:has(input:checked)) { border-color: var(--navy); color: var(--navy); }

/* Toggle / Switch */
.toggle-wrap { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.toggle {
  position: relative; width: 44px; height: 24px;
  background: var(--border-strong); border-radius: var(--r-pill);
  transition: background var(--t-normal);
  flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform var(--t-normal);
}
.toggle-wrap input { display: none; }
.toggle-wrap input:checked + .toggle { background: var(--navy); }
.toggle-wrap input:checked + .toggle::after { transform: translateX(20px); }
.toggle-label { font-size: var(--fs-body); color: var(--text); }

/* Helper / hint text */
.field-hint  { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
.field-error { font-size: var(--fs-xs); color: var(--red); margin-top: 2px; font-weight: var(--fw-semi); }

/* Strefa wgrywania plików (dropzone) — spójny komponent uploadu */
.pfk-upload-area {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 6px; text-align: center; cursor: pointer;
	border: 2px dashed var(--border, #cbd5e1); border-radius: 10px;
	padding: 22px 16px; background: var(--bg-subtle, #f8fafc);
	color: var(--text-2, #475569); transition: border-color .15s, background .15s;
}
.pfk-upload-area:hover { border-color: var(--navy, #002147); background: #eef2f7; }
.pfk-upload-area.has-file { border-style: solid; border-color: #059669; background: #f0fdf4; color: #065f46; }
.pfk-upload-area__icon { font-size: 24px; line-height: 1; }
.pfk-upload-area__title { font-weight: 600; font-size: var(--fs-sm, 14px); }
.pfk-upload-area__name { font-size: var(--fs-xs, 12px); color: var(--text-3, #64748b); word-break: break-all; }

/* Fieldset */
.fieldset {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
.fieldset legend {
  font-size: var(--fs-xs); font-weight: var(--fw-black);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy); padding: 0 var(--sp-2);
}


/* ─────────────────────────────────────────
   8. TABELE
───────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
.table {
  width: 100%; border-collapse: collapse;
  font-size: var(--fs-body);
}
.table thead tr { background: var(--bg-subtle); }
.table th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-size: var(--fs-xs); font-weight: var(--fw-black);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-2);
  color: var(--text); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--surface-hover); }
.table--striped tbody tr:nth-child(even) td { background: var(--bg-subtle); }
.table--compact th, .table--compact td { padding: var(--sp-2) var(--sp-3); }

/* Table filter input */
.table-filter {
  height: 28px; padding: 0 var(--sp-2);
  border: 1px solid var(--border); border-radius: var(--r-xs);
  font-family: var(--font); font-size: var(--fs-xs); color: var(--text);
  background: var(--card); outline: none; width: 100%;
}
.table-filter:focus { border-color: var(--navy); }


/* ─────────────────────────────────────────
   9. LISTY ELEMENTÓW
───────────────────────────────────────── */
.list-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-2);
  transition: background var(--t-fast); cursor: pointer;
}
.list-item:last-child  { border-bottom: none; }
.list-item:hover       { background: var(--surface-hover); }
.list-item__icon       { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-2); }
.list-item__icon svg   { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.list-item__body       { flex: 1; min-width: 0; }
.list-item__title      { font-size: var(--fs-body); font-weight: var(--fw-bold); color: var(--text); }
.list-item__sub        { font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }
.list-item__meta       { text-align: right; flex-shrink: 0; font-size: var(--fs-sm); color: var(--text-3); }
.list-item__chevron    { flex-shrink: 0; color: var(--text-3); }
.list-item__chevron svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }


/* ─────────────────────────────────────────
   10. ALERTY / KOMUNIKATY
───────────────────────────────────────── */
.alert {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-sm);
  border: 1px solid;
  font-size: var(--fs-body); line-height: var(--lh-normal);
}
.alert svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; margin-top: 1px; }
.alert__body { flex: 1; }
.alert__title { font-weight: var(--fw-bold); margin-bottom: 2px; }
.alert__text  { color: inherit; opacity: .85; }

.alert-success { background: var(--green-bg); border-color: var(--green-border); color: var(--green); }
.alert-warning { background: var(--orange-bg); border-color: var(--orange-border); color: var(--orange); }
.alert-danger  { background: var(--red-bg);    border-color: var(--red-border);    color: var(--red); }
.alert-info    { background: var(--blue-bg);   border-color: var(--blue-border);   color: var(--blue); }
.alert-gold    { background: var(--gold-pale); border-color: var(--gold);          color: #7a5a00; }
.alert-navy    { background: var(--navy);      border-color: var(--navy);          color: #fff; }

/* Notice item (komunikaty) */
.notice-item {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-2);
  transition: background var(--t-fast); position: relative;
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--surface-hover); }
.notice-item.unread { border-left: 3px solid var(--navy); }
.notice-item.unread-gold { border-left: 3px solid var(--gold); }
.notice-item__icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notice-item__icon svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.notice-item__icon--info    { background: var(--blue-bg);   color: var(--blue); }
.notice-item__icon--warning { background: var(--orange-bg); color: var(--orange); }
.notice-item__icon--success { background: var(--green-bg);  color: var(--green); }
.notice-item__body  { flex: 1; min-width: 0; }
.notice-item__title { font-size: var(--fs-body); font-weight: var(--fw-bold); color: var(--text); margin-bottom: 3px; }
.notice-item__text  { font-size: var(--fs-sm); color: var(--text-2); line-height: var(--lh-normal); }
.notice-item__meta  { font-size: var(--fs-xs); color: var(--text-3); margin-top: var(--sp-1); }
.notice-item__dot   { position: absolute; top: var(--sp-4); right: var(--sp-4); width: 7px; height: 7px; border-radius: 50%; background: var(--navy); }


/* ─────────────────────────────────────────
   11. MODALS / POPUPS
───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px var(--sp-4) var(--sp-4);
  overflow-y: auto;
}
.modal {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 560px;
  overflow: hidden;
}
.modal--lg  { max-width: 860px; }
.modal--sm  { max-width: 420px; }

.modal__header {
  background: var(--navy);
  padding: var(--sp-4) var(--sp-6);
  display: flex; align-items: center; justify-content: space-between;
}
.modal__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: #fff; }
.modal__close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.8); font-size: 18px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--t-fast);
}
.modal__close:hover { background: rgba(255,255,255,.2); }
.modal__body   { padding: var(--sp-6); }
.modal__footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border-2);
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.modal__footer-meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--text-3); }
.modal__footer-actions { display: flex; gap: var(--sp-2); margin-left: auto; }


/* ─────────────────────────────────────────
   12. NAWIGACJA
───────────────────────────────────────── */

/* Topbar */
.topbar {
  height: 64px; background: var(--navy);
  display: flex; align-items: center; padding: 0 var(--sp-8); gap: var(--sp-6);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 16px rgba(0,0,0,.18);
}
.topbar__nav { display: flex; align-items: stretch; gap: 2px; flex: 1; height: 100%; }
.topbar__link {
  display: inline-flex; align-items: center;
  padding: 0 var(--sp-4); height: 100%;
  color: rgba(255,255,255,.65); font-size: var(--fs-body); font-weight: var(--fw-medium);
  position: relative; white-space: nowrap; transition: color var(--t-fast);
}
.topbar__link:hover { color: rgba(255,255,255,.92); }
.topbar__link.active { color: #fff; font-weight: var(--fw-semi); }
.topbar__link.active::after {
  content: ''; position: absolute; bottom: 0; left: var(--sp-4); right: var(--sp-4);
  height: 3px; background: var(--gold); border-radius: 3px 3px 0 0;
}

/* Sidebar nav */
.sidebar-nav { width: 240px; background: var(--navy); display: flex; flex-direction: column; }
.sidebar-nav__link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-5);
  color: rgba(255,255,255,.55); font-size: var(--fs-body); font-weight: var(--fw-semi);
  transition: all var(--t-fast); border-left: 3px solid transparent;
}
.sidebar-nav__link:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.sidebar-nav__link.active { border-left-color: var(--gold); color: #fff; background: rgba(255,255,255,.07); }
.sidebar-nav__link svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; fill: none; flex-shrink: 0; }
.sidebar-nav__group-label {
  font-size: var(--fs-xs); font-weight: var(--fw-black);
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.25); padding: var(--sp-3) var(--sp-5) var(--sp-1);
}


/* ─────────────────────────────────────────
   13. WIZARD STEPS
───────────────────────────────────────── */
.wizard-steps { display: flex; align-items: center; gap: 0; }
.wizard-step { display: flex; align-items: center; gap: var(--sp-2); flex: 1; position: relative; }
.wizard-step:not(:last-child)::after {
  content: ''; position: absolute;
  top: 15px; left: calc(50% + 14px);
  width: calc(100% - 28px); height: 2px;
  background: var(--border-2); z-index: 0;
}
.wizard-step.done::after  { background: var(--gold); }
.wizard-step__circle {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: var(--fw-black);
  border: 2px solid var(--border); background: var(--card);
  color: var(--text-3); position: relative; z-index: 1;
  transition: all var(--t-fast);
}
.wizard-step.active .wizard-step__circle { background: var(--navy); border-color: var(--navy); color: #fff; }
.wizard-step.done   .wizard-step__circle { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.wizard-step__label { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-3); text-align: center; }
.wizard-step.active .wizard-step__label { color: var(--navy); }
.wizard-step.done   .wizard-step__label { color: var(--text-2); }


/* ─────────────────────────────────────────
   14. DOKUMENTY / INFO ROWS
───────────────────────────────────────── */
.info-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--sp-3); padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-2);
}
.info-row:last-child { border-bottom: none; }
.info-row:nth-child(even) { background: var(--bg-subtle); }
.info-row__label { font-size: var(--fs-xs); font-weight: var(--fw-black); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); flex-shrink: 0; padding-top: 2px; }
.info-row__value { font-size: var(--fs-body); font-weight: var(--fw-semi); color: var(--text); text-align: right; }

/* Doc row */
.doc-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-2);
  transition: background var(--t-fast);
}
.doc-row:last-child { border-bottom: none; }
.doc-row:hover { background: var(--surface-hover); }
.doc-row__icon { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-row__icon svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.doc-row__body  { flex: 1; }
.doc-row__title { font-size: var(--fs-body); font-weight: var(--fw-bold); color: var(--text); }
.doc-row__hint  { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }


/* ─────────────────────────────────────────
   15. UTILITIES
───────────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1  { gap: var(--sp-1); }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-6  { gap: var(--sp-6); }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-auto { margin-top: auto; }
.p-4  { padding: var(--sp-4); }
.p-5  { padding: var(--sp-5); }
.px-5 { padding-left: var(--sp-5); padding-right: var(--sp-5); }
.py-4 { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.divider { height: 1px; background: var(--border-2); margin: var(--sp-4) 0; }
.divider-gold { height: 2px; background: var(--gold); }


/* ─────────────────────────────────────────
   16. RESPONSYWNOŚĆ
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar__nav { display: none; }
  .sidebar-nav { width: 100%; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; max-width: 100%; }
}


/* ═══════════════════════════════════════════════════════════════
   17. DASHBOARD-SPECIFIC LAYOUT
   (przeniesione z mockupu dashboard.html — używane przez
   [pfk_members_dashboard] i potencjalnie kolejne widoki panelu)
   ═══════════════════════════════════════════════════════════════ */

/* Główny wrapper renderowany przez shortcode */
.pfk-members-main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 28px 48px;
}

/* ── WELCOME HERO ── */
.pfk-members-main .welcome {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--r-md);
  padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.pfk-members-main .welcome::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(253,200,0,.06); pointer-events: none;
}
.pfk-members-main .welcome::after {
  content: ''; position: absolute; bottom: -50px; right: 120px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(253,200,0,.04); pointer-events: none;
}
.pfk-members-main .welcome-left { z-index: 1; position: relative; }
.pfk-members-main .welcome-greeting {
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.5);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 4px;
}
.pfk-members-main .welcome-name {
  font-size: 26px; font-weight: 800; color: #fff;
  margin-bottom: 8px; line-height: 1.1;
}
.pfk-members-main .welcome-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
}
.pfk-members-main .welcome-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,.65);
}
.pfk-members-main .welcome-chip strong { color: rgba(255,255,255,.92); }
.pfk-members-main .welcome-chip::before {
  content: '·'; color: rgba(255,255,255,.25); margin-right: 2px;
}
.pfk-members-main .welcome-chip:first-child::before { display: none; }
.pfk-members-main .welcome-right { display: flex; gap: 8px; flex-shrink: 0; z-index: 1; }

/* ── STATS ROW ── */
.pfk-members-main .stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.pfk-members-main .stats-row .stat-card { padding: 18px 20px; }

/* ── GRID 2-KOLUMNOWY ── */
.pfk-members-main .grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.pfk-members-main .grid-main > div { min-width: 0; }

/* ── CARD HEADER (rozszerzenie .card) ── */
.pfk-members-main .card-link {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 3px;
  transition: color var(--t-fast);
}
.pfk-members-main .card-link:hover { color: var(--navy); }
.pfk-members-main .card-link svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2; fill: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .pfk-members-main .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .pfk-members-main .grid-main { grid-template-columns: 1fr; }
  .pfk-members-main { padding: 16px 16px 40px; }
  .pfk-members-main .welcome { padding: 18px 20px; }
  .pfk-members-main .welcome-name { font-size: 22px; }
  .pfk-members-main .welcome-right { display: none; }
}
@media (max-width: 600px) {
  .pfk-members-main .stats-row { gap: 8px; }
  .pfk-members-main .stats-row .stat-card { padding: 14px 16px; }
  .pfk-members-main .stat-card__value { font-size: 24px; }
  .pfk-members-main .welcome-meta { gap: 4px 10px; }
}


/* ═══════════════════════════════════════════════════════════════
   18. INLINE EDIT FORM (karta "Twoje dane" w dashboardzie)
   ═══════════════════════════════════════════════════════════════ */
.pfk-edit-form .field + .field { margin-top: 12px; }
.pfk-edit-form .label { margin-bottom: 6px; }

/* Wiersz: kod pocztowy + miejscowość obok siebie.
   Wzmocnione selektory + !important bo motyw może rozjechać flex layout. */
body[class*="elementor-kit"] .pfk-members-main .pfk-edit-row,
body .pfk-members-main .pfk-edit-row,
.pfk-members-main .pfk-edit-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
  margin-top: 12px !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
}
body[class*="elementor-kit"] .pfk-members-main .pfk-edit-row > .field,
.pfk-members-main .pfk-edit-row > .field {
  margin-top: 0 !important;
  min-width: 0 !important;  /* kluczowe: bez tego flex item nie shrinkuje */
}
.pfk-members-main .pfk-edit-row__col--postal {
  flex: 0 0 130px !important;
  width: 130px !important;
}
.pfk-members-main .pfk-edit-row__col--city {
  flex: 1 1 auto !important;
  width: auto !important;
}

/* Mobile fallback gdy karta jest naprawdę wąska (<360px) — stack */
@media (max-width: 360px) {
  .pfk-members-main .pfk-edit-row {
    flex-direction: column !important;
  }
  .pfk-members-main .pfk-edit-row__col--postal,
  .pfk-members-main .pfk-edit-row__col--city {
    flex: 1 1 auto !important;
    width: 100% !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   19. TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.pfk-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}

.pfk-toast {
  pointer-events: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 33, 71, 0.15), 0 1px 3px rgba(0, 33, 71, 0.08);
  padding: 14px 16px 14px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
  min-width: 280px;
  animation: pfk-toast-in 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.pfk-toast::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
}
.pfk-toast--success::before { background: var(--green); }
.pfk-toast--error::before   { background: var(--red); }
.pfk-toast--info::before    { background: var(--blue); }

.pfk-toast__icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.pfk-toast__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pfk-toast__body strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.pfk-toast__body span {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.pfk-toast__close {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  font-family: inherit;
}
.pfk-toast__close:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.pfk-toast.is-hiding {
  animation: pfk-toast-out 280ms ease forwards;
}

@keyframes pfk-toast-in {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes pfk-toast-out {
  from { transform: translateX(0); opacity: 1; max-height: 80px; margin-bottom: 10px; }
  to   { transform: translateX(24px); opacity: 0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
}

@media (max-width: 480px) {
  .pfk-toast-container { left: 12px; right: 12px; max-width: none; }
  .pfk-toast { min-width: 0; }
}


/* ═══════════════════════════════════════════════════════════════
   20. BUTTONS — wymuszone style w panelu (override motywu WP)
   Motywy WP często stylują <button> globalnie; tutaj wymuszamy
   nasze warianty TYLKO w obrębie .pfk-members-main.
   ═══════════════════════════════════════════════════════════════ */

/* Inline display:none MUSI wygrywać z poniższym !important (np. ukryte przyciski Anuluj/Edytuj). */
.pfk-members-main .btn[style*="display:none"],
.pfk-members-main .btn[style*="display: none"],
.pfk-members-main .btn[hidden] { display: none !important; }
.pfk-members-main .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--sp-2) !important;
  height: 40px !important;
  padding: 0 var(--sp-5) !important;
  font-family: var(--font) !important;
  font-size: var(--fs-body) !important;
  font-weight: var(--fw-bold) !important;
  border-radius: var(--r-sm) !important;
  border: 1.5px solid transparent !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast) !important;
}

/* PRIMARY — granat */
body[class*="elementor-kit"] .pfk-members-main button.btn-primary,
body .pfk-members-main button.btn-primary,
.pfk-members-main button.btn-primary,
.pfk-members-main .btn-primary {
  background: var(--navy) !important;
  background-color: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #fff !important;
}
body[class*="elementor-kit"] .pfk-members-main button.btn-primary:hover,
.pfk-members-main button.btn-primary:hover,
.pfk-members-main .btn-primary:hover {
  background: var(--navy-light) !important;
  background-color: var(--navy-light) !important;
  border-color: var(--navy-light) !important;
  color: #fff !important;
}

/* GOLD — złoto */
body[class*="elementor-kit"] .pfk-members-main button.btn-gold,
body .pfk-members-main button.btn-gold,
.pfk-members-main button.btn-gold,
.pfk-members-main .btn-gold {
  background: var(--gold) !important;
  background-color: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--navy) !important;
}
body[class*="elementor-kit"] .pfk-members-main button.btn-gold:hover,
.pfk-members-main .btn-gold:hover {
  background: var(--gold-dark) !important;
  background-color: var(--gold-dark) !important;
  border-color: var(--gold-dark) !important;
  color: var(--navy) !important;
}

/* OUTLINE — biały z borderem */
body[class*="elementor-kit"] .pfk-members-main button.btn-outline,
body .pfk-members-main button.btn-outline,
.pfk-members-main button.btn-outline,
.pfk-members-main .btn-outline {
  background: #fff !important;
  background-color: #fff !important;
  border-color: var(--border-strong) !important;
  color: var(--text-2) !important;
}
body[class*="elementor-kit"] .pfk-members-main button.btn-outline:hover,
.pfk-members-main button.btn-outline:hover,
.pfk-members-main .btn-outline:hover {
  background: #fff !important;
  background-color: #fff !important;
  border-color: var(--navy) !important;
  color: var(--navy) !important;
}

/* GHOST — przezroczysty */
.pfk-members-main .btn-ghost {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--text-2) !important;
}
.pfk-members-main .btn-ghost:hover {
  background: var(--surface-hover) !important;
  color: var(--text) !important;
}

/* DANGER — czerwony */
.pfk-members-main .btn-danger {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: #fff !important;
}
.pfk-members-main .btn-danger:hover {
  background: #a01e23 !important;
  border-color: #a01e23 !important;
}

/* Rozmiary */
.pfk-members-main .btn-xs { height: 24px !important; padding: 0 var(--sp-3) !important; font-size: var(--fs-xs) !important; border-radius: var(--r-xs) !important; }
.pfk-members-main .btn-sm { height: 32px !important; padding: 0 var(--sp-4) !important; font-size: var(--fs-sm) !important; border-radius: var(--r-xs) !important; }
.pfk-members-main .btn-lg { height: 48px !important; padding: 0 var(--sp-8) !important; font-size: var(--fs-md) !important; border-radius: var(--r-md) !important; }
.pfk-members-main .btn-xl { height: 56px !important; padding: 0 var(--sp-10) !important; font-size: var(--fs-lg) !important; border-radius: var(--r-md) !important; }
.pfk-members-main .btn-full { width: 100% !important; }

/* Disabled state */
.pfk-members-main .btn:disabled,
.pfk-members-main .btn.disabled,
.pfk-members-main .btn[disabled] {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}


/* ═══════════════════════════════════════════════════════════════
   21. DOC-ROW DISABLED STATE
   ═══════════════════════════════════════════════════════════════ */
.pfk-members-main .doc-row.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.pfk-members-main .doc-row.is-disabled .doc-row__icon {
  background: var(--bg) !important;
  color: var(--text-3) !important;
}
.pfk-members-main .doc-row.is-disabled .doc-row__title {
  color: var(--text-2);
}


/* ═══════════════════════════════════════════════════════════════
   22. MODAL — równa wysokość pól + mobile bottom-sheet 90vh
   ═══════════════════════════════════════════════════════════════ */

/* Pola w .grid-2 wewnątrz modala wyrównane wysokością.
   Zasada: nie rozciągamy fieldów — zamiast tego normalizujemy etykietę
   do jednej linii (truncate gdy się nie mieści) i pozwalamy input-static
   zachować naturalną wysokość. Wtedy obie kolumny mają identyczny
   rytm pionowy. */
.modal .grid-2 { align-items: start; }
.modal .grid-2 > .field > .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.modal .grid-2 > .field > .input-static {
  height: 42px !important;
  min-height: 42px;
}
/* Bazowa reguła `.field + .field { margin-top: var(--sp-4); }` (linia 418)
   przeznaczona jest dla układu pionowego — w gridzie powoduje, że druga
   i kolejne kolumny są niżej od pierwszej. Zerujemy margin w KAŻDYM gridzie
   (zarówno modale jak i strony /panel/hodowla/ z .grid-3 itp.). */
.grid-2 > .field + .field,
.grid-3 > .field + .field,
.grid-4 > .field + .field { margin-top: 0; }

/* Mobile: modal = bottom sheet 90vh, body przewijany wewnątrz,
   nagłówek i stopka przyklejone (sticky w obrębie modala) */
@media (max-width: 768px) {
  .modal-overlay { padding: 0; align-items: flex-end; overflow: hidden; }
  .modal {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-width: 100%;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .modal__header { flex-shrink: 0; }
  .modal__footer { flex-shrink: 0; }
  .modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* ═══════════════════════════════════════════════════════════════
   23. SHORTCODE: pfk_members_dogs  (/panel/psy/)
   Tylko nowe klasy potrzebne dla tej podstrony. Reszta — z
   istniejących sekcji (.card, .btn*, .stat-card, .modal*, .badge*,
   .list-item*, .field/.label/.input-static, .alert*, .grid-2).
   ═══════════════════════════════════════════════════════════════ */

/* ── Header strony ──────────────────────────────────────── */
.pfk-dogs-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6);
}
.pfk-dogs-head__actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }

.pfk-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--text-3); margin-bottom: var(--sp-1); }
.pfk-breadcrumb a { color: var(--navy); opacity: .7; text-decoration: none; }
.pfk-breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.pfk-breadcrumb__sep { color: var(--border); }

.pfk-page-title { font-size: 22px; font-weight: var(--fw-black); color: var(--navy); margin-bottom: 3px; line-height: 1.15; }
.pfk-page-sub   { font-size: 12px; color: var(--text-3); }

/* ── Filter bar ─────────────────────────────────────────── */
.pfk-filter-bar { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); flex-wrap: wrap; }

.pfk-search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 0 12px; height: 40px; flex: 1; min-width: 200px; max-width: 300px; transition: border-color .13s; }
.pfk-search:focus-within { border-color: var(--navy); }
.pfk-search svg { width: 15px; height: 15px; stroke: var(--text-3); stroke-width: 2; fill: none; flex-shrink: 0; }
.pfk-search input { flex: 1; border: none; background: none; font-family: inherit; font-size: var(--fs-body); color: var(--text); outline: none; min-width: 0; }
.pfk-search input::placeholder { color: var(--text-3); }

.pfk-fsel { height: 40px; padding: 0 32px 0 12px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--card); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 5 4.5-5' stroke='%239aa3b0' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; font-family: inherit; font-size: 12px; color: var(--text); cursor: pointer; outline: none; appearance: none; transition: border-color .13s; }
.pfk-fsel:focus { border-color: var(--navy); }

.pfk-view-toggle { display: flex; border: 1.5px solid var(--border); border-radius: var(--r-sm); overflow: hidden; background: var(--card); margin-left: auto; }
.pfk-vbtn { width: 36px; height: 38px; border: none; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-3); transition: background .12s, color .12s; }
.pfk-vbtn svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.pfk-vbtn:hover { background: var(--bg); color: var(--text-2); }
.pfk-vbtn.is-active { background: var(--navy); color: #fff; }
.pfk-vbtn + .pfk-vbtn { border-left: 1px solid var(--border); }

/* ── Safe Animal row ────────────────────────────────────── */
.pfk-safe-row { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.pfk-safe-row__label { font-size: 11px; font-weight: var(--fw-semi); color: var(--text-3); }
.pfk-safe-row__form  { display: flex; align-items: center; gap: var(--sp-2); flex: 1; min-width: 220px; max-width: 460px; }
.pfk-safe-row__input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--card); font-family: inherit; font-size: 12px; color: var(--text); outline: none; transition: border-color .13s; }
.pfk-safe-row__input:focus { border-color: var(--navy); }

/* ── Dogs grid ──────────────────────────────────────────── */
.dogs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.dog-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; transition: box-shadow .15s, transform .15s;
}
.dog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.dog-card__head { display: flex; align-items: flex-start; gap: 12px; }
.dog-card__name { font-size: var(--fs-body); font-weight: var(--fw-black); color: var(--navy); line-height: 1.25; margin-bottom: 2px; }
.dog-card__kkr  { font-size: 10px; color: var(--text-3); }

.dog-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

.dog-card__rows { border-top: 1px solid var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.dog-row { display: flex; align-items: center; gap: 8px; }
.dog-row__lbl { font-size: 8.5px; font-weight: var(--fw-bold); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); width: 40px; flex-shrink: 0; }
.dog-row__val { font-size: 12px; font-weight: var(--fw-semi); color: var(--text); }

/* ── Add card ───────────────────────────────────────────── */
.dog-card--add {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  background: var(--bg); min-height: 152px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer; text-decoration: none; color: inherit;
  transition: border-color .15s, background .15s, transform .15s;
}
.dog-card--add:hover { border-color: var(--navy); background: #eef2f8; transform: translateY(-2px); }
.dog-card--add__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: border-color .15s, color .15s; }
.dog-card--add:hover .dog-card--add__icon { border-color: var(--navy); color: var(--navy); }
.dog-card--add__icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.dog-card--add__label { font-size: 12px; font-weight: var(--fw-bold); color: var(--text-2); }
.dog-card--add__sub   { font-size: 10px; color: var(--text-3); text-align: center; max-width: 120px; line-height: 1.5; }
.dog-card--add--row   { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 0 20px; min-height: 60px; }

/* ── Badge pink (suka) — uzupełnienie istniejących badge ── */
.badge-pink { background: #fde8f0; color: #b03060; border: 1px solid #f7c4d6; }

/* ── FAB (mobile) ───────────────────────────────────────── */
.pfk-fab { display: none; position: fixed; bottom: 20px; right: 20px; z-index: 100; }
.pfk-fab button { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff; border: none; box-shadow: 0 4px 20px rgba(0,33,71,.4); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .13s, transform .13s; }
.pfk-fab button:hover { background: var(--navy-mid); transform: scale(1.06); }

/* ── Empty state ────────────────────────────────────────── */
.pfk-dogs-empty {
  grid-column: 1 / -1;
  text-align: center; padding: var(--sp-8) var(--sp-4);
  color: var(--text-3); font-size: var(--fs-body);
  background: var(--card); border: 1px dashed var(--border);
  border-radius: var(--r-lg);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) { .dogs-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .dogs-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pfk-btn-hide { display: none; }
  .pfk-fab { display: block; }
  .pfk-filter-bar .pfk-fsel { display: none; }
  .pfk-filter-bar .pfk-view-toggle { display: none; }
  .pfk-search { max-width: none; }
  .pfk-dogs-head { flex-direction: column; }
}
@media (max-width: 480px) {
  .dogs-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   24. SHORTCODE: pfk_members_breeding  (/panel/hodowla/)
   Tylko nowe klasy potrzebne dla tej podstrony. Reszta — z
   istniejących sekcji (.card, .btn*, .stat-card, .input, .input.error,
   .field/.label, .alert*, .badge*, .grid-2/.grid-3, .doc-row*).
   ═══════════════════════════════════════════════════════════════ */

/* ── Tabela hodowanych ras (kompaktowa, z inline-input) ── */
.breed-table { width: 100%; border-collapse: collapse; }
.breed-table thead tr { background: var(--bg); }
.breed-table th {
  font-size: 9px; font-weight: var(--fw-bold);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); padding: 8px 12px;
  border-bottom: 1px solid var(--border); text-align: left;
}
.breed-table td {
  padding: 8px 12px; border-bottom: 1px solid var(--border-2);
  vertical-align: middle; font-size: var(--fs-body); color: var(--text);
}
.breed-table tr:last-child td { border-bottom: none; }
.breed-table .lp { width: 36px; color: var(--text-3); font-size: 12px; font-weight: var(--fw-semi); }

/* ── Mały ikona-button do usuwania (rasy) ── */
.icon-btn-del {
  width: 28px; height: 28px; border-radius: var(--r-xs);
  background: var(--red-bg); border: 1px solid var(--red-border);
  color: var(--red); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
  padding: 0; flex-shrink: 0;
}
.icon-btn-del:hover { background: var(--red); color: #fff; }
.icon-btn-del svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.5; fill: none; }

/* ── Autocomplete (lista podpowiedzi pod inputem) ── */
.pfk-ac-wrap { position: relative; }
.pfk-ac-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-sm); box-shadow: var(--shadow-md);
  max-height: 220px; overflow-y: auto; z-index: 999;
  display: none;
}
/* Karta która zawiera autocomplete musi mieć overflow:visible,
   inaczej `.card { overflow: hidden }` przycina rozwijaną listę
   na styku z następną sekcją. `:has()` wspierane od Safari 15.4
   (>96% globalnego użycia). */
.card:has(.pfk-ac-list) { overflow: visible; }
.pfk-ac-list.is-open { display: block; }
.pfk-ac-item {
  padding: 8px 12px; font-size: var(--fs-body); cursor: pointer;
  border-bottom: 1px solid var(--border-2);
}
.pfk-ac-item:last-child { border-bottom: none; }
.pfk-ac-item:hover { background: var(--surface-hover); }

/* ── Wiersz „checkbox + label" inline ── */
.pfk-check-row { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pfk-check-row input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--border); border-radius: 4px;
  appearance: none; cursor: pointer;
  background: var(--card); position: relative;
  transition: background .12s, border-color .12s;
}
.pfk-check-row input[type="checkbox"]:checked { background: var(--navy); border-color: var(--navy); }
.pfk-check-row input[type="checkbox"]:checked::after {
  content: ''; position: absolute; top: 2px; left: 5px;
  width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg);
}
.pfk-check-row label { font-size: var(--fs-body); color: var(--text); cursor: pointer; white-space: nowrap; }

/* ── Empty state (gdy brak hodowli) ── */
.pfk-breed-empty {
  background: var(--card); border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
  margin-bottom: var(--sp-5);
}
.pfk-breed-empty__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gold-pale); color: #7a5a00;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-4); font-size: 32px;
}
.pfk-breed-empty__title { font-size: 18px; font-weight: var(--fw-black); color: var(--navy); margin-bottom: var(--sp-2); }
.pfk-breed-empty__text  { font-size: var(--fs-body); color: var(--text-2); margin-bottom: var(--sp-5); line-height: 1.6; max-width: 480px; margin-left: auto; margin-right: auto; }


/* ═══════════════════════════════════════════════════════════════
   25. GLOBAL HEADER & FOOTER — [pfk_members_header] / [pfk_members_footer]
   Dostępne wszędzie na online.pfk.org.pl po zalogowaniu.
   ═══════════════════════════════════════════════════════════════ */

/* ── TOPBAR ─────────────────────────────────────────────── */
.pfk-mb-header { font-family: var(--font); }
.pfk-mb-topbar {
  position: sticky; top: 0; z-index: 200;
  height: 64px;
  background: var(--navy);
  display: flex; align-items: center;
  padding: 0 28px; gap: 24px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 16px rgba(0,0,0,.18);
}
.pfk-mb-topbar__logo {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0; color: #fff; text-decoration: none;
}
.pfk-mb-topbar__logo img { height: 38px; width: auto; }
.pfk-mb-topbar__logo-label { line-height: 1.2; }
.pfk-mb-topbar__logo-name {
  font-size: 15px; font-weight: var(--fw-bold); color: #fff;
  letter-spacing: -.01em;
}
.pfk-mb-topbar__logo-sub {
  font-size: 9.5px; font-weight: var(--fw-medium);
  color: rgba(255,255,255,.45);
  letter-spacing: .14em; text-transform: uppercase;
  margin-top: 2px;
}

.pfk-mb-topbar__sep {
  width: 1px; height: 28px;
  background: rgba(255,255,255,.12);
  flex-shrink: 0;
}

.pfk-mb-topbar__nav {
  display: flex; align-items: stretch; gap: 2px;
  flex: 1; min-width: 0; height: 100%;
}
.pfk-mb-topbar__link {
  display: inline-flex; align-items: center;
  padding: 0 14px; height: 100%;
  color: rgba(255,255,255,.65);
  font-size: var(--fs-body); font-weight: var(--fw-medium);
  position: relative; white-space: nowrap;
  text-decoration: none;
  transition: color var(--t-fast);
}
.pfk-mb-topbar__link:hover { color: rgba(255,255,255,.92); }
.pfk-mb-topbar__link.is-active {
  color: #fff; font-weight: var(--fw-semi);
}
.pfk-mb-topbar__link.is-active::after {
  content: '';
  position: absolute; bottom: 0; left: 14px; right: 14px;
  height: 3px; background: var(--gold);
  border-radius: 3px 3px 0 0;
}

.pfk-mb-topbar__right {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; margin-left: auto;
}

/* Ikona w nawigacji top — np. „Centrum", „Powiadomienia" */
.pfk-mb-icon-btn {
  position: relative;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: none;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  transition: background var(--t-fast);
}
.pfk-mb-icon-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.pfk-mb-icon-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.pfk-mb-icon-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pfk-mb-icon-btn--disabled:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.55); }
.pfk-mb-notif-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--navy);
}

/* User pill */
.pfk-mb-user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--r-pill);
  color: #fff; text-decoration: none;
  transition: background var(--t-fast);
}
.pfk-mb-user-pill:hover { background: rgba(255,255,255,.08); }
.pfk-mb-user-pill__info {}
.pfk-mb-user-pill__name {
  font-size: var(--fs-body); font-weight: var(--fw-semi);
  color: #fff; line-height: 1.2;
}
.pfk-mb-user-pill__sub {
  font-size: 10px;
  color: rgba(255,255,255,.45);
  margin-top: 1px;
  letter-spacing: .02em;
  transition: color var(--t-fast);
}
.pfk-mb-user-pill:hover .pfk-mb-user-pill__sub { color: var(--gold); }

.pfk-mb-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: var(--fw-black);
  flex-shrink: 0;
}

/* Burger (mobile) */
.pfk-mb-burger {
  display: none;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.08); border: none;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,.8);
  cursor: pointer;
}
.pfk-mb-burger svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ── MOBILE DRAWER ──────────────────────────────────────── */
.pfk-mb-drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 300;
  opacity: 0; transition: opacity .2s;
}
.pfk-mb-drawer-overlay.is-open { opacity: 1; }

.pfk-mb-drawer {
  position: fixed; top: 0; left: -300px; bottom: 0;
  width: 280px;
  background: var(--navy); z-index: 400;
  transition: left .25s ease;
  display: flex; flex-direction: column;
  padding: 24px 0;
}
.pfk-mb-drawer.is-open { left: 0; }

.pfk-mb-drawer__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.8); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.pfk-mb-drawer__logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 12px;
}
.pfk-mb-drawer__logo img { height: 36px; }
.pfk-mb-drawer__logo span { font-size: var(--fs-md); font-weight: var(--fw-bold); color: #fff; }

.pfk-mb-drawer__nav { flex: 1; overflow-y: auto; }
.pfk-mb-drawer__link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,.6);
  font-size: var(--fs-body); font-weight: var(--fw-semi);
  text-decoration: none;
  transition: all var(--t-fast);
  border-left: 3px solid transparent;
}
.pfk-mb-drawer__link:hover {
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.9);
}
.pfk-mb-drawer__link.is-active {
  border-left-color: var(--gold);
  color: #fff;
  background: rgba(255,255,255,.06);
}
.pfk-mb-drawer__link svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; flex-shrink: 0; }
/* Centrala — wyróżniony link (złoty akcent) */
.pfk-mb-drawer__link--centrala {
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--gold);
}
.pfk-mb-drawer__link--centrala:hover { color: var(--gold); background: rgba(212,175,55,.10); }

.pfk-mb-drawer__user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.pfk-mb-drawer__user-name {
  font-size: var(--fs-body); font-weight: var(--fw-semi); color: #fff;
}
.pfk-mb-drawer__logout {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.55);
  margin-top: 2px;
  text-decoration: none;
}
.pfk-mb-drawer__logout:hover { color: var(--gold); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .pfk-mb-topbar { padding: 0 16px; gap: 12px; }
  .pfk-mb-topbar__nav,
  .pfk-mb-topbar__sep { display: none; }
  .pfk-mb-burger { display: flex; }
  .pfk-mb-user-pill__info { display: none; }
}
@media (max-width: 600px) {
  .pfk-mb-topbar__logo-label { display: none; }
  .pfk-mb-icon-btn[data-pfk-mb-centrum] { display: none; }
}

/* ── FOOTER ─────────────────────────────────────────────── */
.pfk-mb-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 16px 28px;
  font-family: var(--font);
}
.pfk-mb-footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.pfk-mb-footer__left {
  display: flex; align-items: center; gap: 12px;
}
.pfk-mb-footer__left img { height: 22px; opacity: .55; }
.pfk-mb-footer__text { font-size: var(--fs-sm); color: var(--text-3); }

.pfk-mb-footer__right {
  display: flex; align-items: center; gap: 16px;
  font-size: var(--fs-sm); color: var(--text-3);
  flex-wrap: wrap;
}
.pfk-mb-footer__legal a {
  color: var(--text-2); font-weight: var(--fw-semi); text-decoration: none;
}
.pfk-mb-footer__legal a:hover { color: var(--navy); text-decoration: underline; }
.pfk-mb-footer__credit {
  padding-left: 16px;
  border-left: 1px solid var(--border);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}
.pfk-mb-footer__credit a {
  color: var(--text-2); font-weight: var(--fw-bold); text-decoration: none;
}
.pfk-mb-footer__credit a:hover { color: var(--gold-dark); }

@media (max-width: 768px) {
  .pfk-mb-footer { padding: 14px 16px; }
  .pfk-mb-footer__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pfk-mb-footer__right { gap: 10px; }
  .pfk-mb-footer__credit { padding-left: 0; border-left: none; }
}

/* iOS anti-zoom: pola formularzy muszą mieć min. 16px na mobile,
   inaczej Safari/iPhone robi auto-zoom przy focusie. */
@media (max-width: 768px) {
  .input, .input-sm, .input-lg, .input-date,
  .select, .select-sm, .textarea, .table-filter { font-size: 16px !important; }
}

/* -------------------------------------------------------------------------
 * Paginacja — spójny komponent (ten sam wzór co tabele w /centrala/).
 * « pierwsza · ‹ poprzednia · [nr strony] z N · następna › · ostatnia »
 * ---------------------------------------------------------------------- */
.pfk-pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-top: var(--sp-4, 16px);
  padding: var(--sp-3, 12px) var(--sp-4, 16px);
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  background: var(--bg-subtle, #f4f6fa);
}
.pfk-pager__info { font-size: var(--fs-sm, 12px); color: var(--text-2, #5a6472); white-space: nowrap; }
.pfk-pager__ctrls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pfk-pager__btn { min-width: 32px; padding: 4px 8px; line-height: 1; font-size: 14px; font-weight: 700; }
.pfk-pager__btn[disabled] { opacity: .4; cursor: not-allowed; }
.pfk-pager__jump {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm, 12px); color: var(--text-2, #5a6472);
  white-space: nowrap; padding: 0 4px;
}
.pfk-pager__input {
  width: 52px; height: 30px; padding: 2px 6px; text-align: center;
  border: 1px solid var(--border, #cbd5e1); border-radius: var(--r-sm, 6px);
  font-size: 13px; background: #fff; color: var(--navy, #002147);
  -moz-appearance: textfield;
}
.pfk-pager__input::-webkit-outer-spin-button,
.pfk-pager__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 560px) { .pfk-pager__input { font-size: 16px; } }

/* -------------------------------------------------------------------------
 * Autouzupełnianie rasy / umaszczenia — spójny komponent z CENTRALA (.pfk-ac).
 * Zastępuje natywny <datalist> własnym dropdownem podpowiedzi.
 * ---------------------------------------------------------------------- */
.mb-ac { position: relative; }
.pfk-ac-box {
  position: absolute; z-index: 999; left: 0; right: 0;
  background: #fff; border: 1px solid var(--border, #d1d5db);
  border-radius: 8px; max-height: 240px; overflow: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,.14); margin-top: 2px;
}
.pfk-ac-opt {
  padding: 8px 12px; font-size: 14px; cursor: pointer;
  border-bottom: 1px solid var(--border-2, #f1f1f4);
}
.pfk-ac-opt:last-child { border-bottom: none; }
.pfk-ac-opt:hover { background: var(--gold-pale, #fff8e0); color: var(--navy, #002147); }
.pfk-ac-empty { padding: 8px 12px; font-size: 13px; color: var(--text-3, #6b7280); }
@media (max-width: 768px) { .pfk-ac-box .pfk-ac-opt { font-size: 16px; } } /* iOS anti-zoom spójnie z input */

/* -------------------------------------------------------------------------
 * Autocomplete (.pfk-ac) — dropdown NIE może być przycięty przez nadrzędną
 * kartę/sekcję (które mają overflow:hidden dla zaokrągleń). Każdy przodek
 * zawierający .mb-ac przestaje przycinać. Rozwiązuje nawracający bug
 * „lista podpowiedzi ucięta na końcu pola" (rodzice w nostryfikacji itd.).
 * ---------------------------------------------------------------------- */
.card:has(.mb-ac),
.card__body:has(.mb-ac),
.field:has(.mb-ac),
.pfk-nostr-row:has(.mb-ac),
section:has(.mb-ac) { overflow: visible; }
