/* ==========================================================================
   SILKWEAVE — strefa klienta / panel admina
   ========================================================================== */

:root {
  --bg: #0b0b0e;
  --bg-2: #131318;
  --bg-3: #1a1a21;
  --bg-4: #22222b;
  --ink: #f3eee6;
  --ink-2: #d9d3c8;
  --muted: #a49f96;           /* jaśniejszy niż na stronie — lepsza czytelność */
  --line: rgba(243, 238, 230, 0.1);
  --line-2: rgba(243, 238, 230, 0.18);
  --accent: #ff5b2e;
  --accent-2: #ff7a52;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --silk: linear-gradient(100deg, #ff5b2e 0%, #ffb36b 25%, #f3e9ff 45%, #c9a7ff 65%, #7ee0ff 85%, #ff5b2e 100%);
  --f-display: "Unbounded", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --pad: clamp(16px, 3.5vw, 40px);
  --r: 18px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 15.5px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  font-variant-numeric: tabular-nums;
}
body.modal-open { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
em { font-style: normal; }
b, strong { font-weight: 700; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; } /* ukryte elementy zawsze ukryte (np. pole hasła przy resecie) */

.i { width: 18px; height: 18px; flex: none; }
.eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.silk-text {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  background: var(--silk); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}
.muted { color: var(--muted); }
.txt-warn { color: var(--warn) !important; }
.txt-bad { color: var(--bad) !important; }
.hide-sm { display: inline; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* ---------- ładowanie ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.loading-dots { display: flex; gap: 6px; justify-content: center; padding: 60px 0; }
.loading-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite ease-in-out; }
.loading-dots i:nth-child(2) { animation-delay: 0.15s; }
.loading-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
.fatal { padding: 40px var(--pad); color: var(--bad); }

/* ---------- przyciski ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 100px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; text-decoration: none; white-space: nowrap;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.2s var(--ease-out), opacity 0.2s, box-shadow 0.25s;
}
.btn .i { width: 17px; height: 17px; }
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); color: #160a05; box-shadow: 0 10px 30px -12px rgba(255, 91, 46, 0.7); }
.btn--accent:hover { background: var(--accent-2); }
.btn--ghost { border-color: var(--line-2); background: rgba(243, 238, 230, 0.02); }
.btn--ghost:hover { border-color: rgba(243, 238, 230, 0.45); background: rgba(243, 238, 230, 0.06); }
.btn--ok { border-color: rgba(74, 222, 128, 0.35); color: var(--ok); background: rgba(74, 222, 128, 0.06); }
.btn--ok:hover { background: rgba(74, 222, 128, 0.14); border-color: var(--ok); }
.btn--danger:hover { border-color: var(--bad); color: var(--bad); background: rgba(248, 113, 113, 0.08); }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }
.btn--block { width: 100%; padding: 15px 20px; font-size: 15px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.is-busy { color: transparent !important; }
.btn.is-busy .i { opacity: 0; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(22, 10, 5, 0.3); border-top-color: #160a05; animation: spin 0.7s linear infinite;
}
.btn--ghost.is-busy::after { border-color: var(--line-2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; padding: 5px 8px; border-radius: 8px; transition: background-color 0.2s, color 0.2s; }
.link-btn .i { width: 15px; height: 15px; }
.link-btn:hover { color: var(--ink); background: rgba(243, 238, 230, 0.06); }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--muted); transition: background-color 0.2s, color 0.2s; }
.icon-btn .i { width: 17px; height: 17px; }
.icon-btn:hover:not(:disabled) { background: rgba(243, 238, 230, 0.08); color: var(--ink); }
.icon-btn--danger:hover:not(:disabled) { color: var(--bad); background: rgba(248, 113, 113, 0.1); }
.icon-btn:disabled { opacity: 0.25; cursor: default; }

/* ---------- pola ---------- */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.field > span { font-weight: 700; }
.field small { color: var(--muted); font-size: 12.5px; }
.field input, .field select, .field textarea, .update-form textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--ink);
  font: inherit; font-size: 15.5px; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea, .update-form textarea { resize: vertical; min-height: 48px; }
.field input:focus, .field select:focus, .field textarea:focus, .update-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.16); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.field input[type="date"] { color-scheme: dark; }
.field--check { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; padding: 12px 0; font-size: 14.5px; }
.field--check input { width: 19px; height: 19px; accent-color: var(--accent); }
.range { display: flex; align-items: center; gap: 12px; }
.range input { flex: 1; accent-color: var(--accent); padding: 0; border: 0; background: none; }
.range output { min-width: 44px; text-align: right; font-weight: 700; color: var(--ink); }

/* ---------- logowanie ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth__art {
  position: relative; overflow: hidden;
  background: radial-gradient(80% 60% at 70% 30%, rgba(255, 91, 46, 0.16), transparent 70%), var(--bg-2);
  border-right: 1px solid var(--line);
  padding: var(--pad); display: flex; flex-direction: column; justify-content: space-between;
}
.auth__web { position: absolute; width: 130%; max-width: 900px; right: -30%; top: 50%; translate: 0 -50%; opacity: 0.5; animation: webspin 120s linear infinite; }
.auth__web line, .auth__web polygon { fill: none; stroke: var(--ink); stroke-width: 0.35; opacity: 0.55; }
.auth__spider { fill: var(--accent); }
@keyframes webspin { to { rotate: 360deg; } }
.auth__brand, .topbar__brand { position: relative; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 500; font-size: 18px; letter-spacing: -0.03em; }
.auth__brand em, .topbar__brand em, .dash__brand em { color: var(--accent); }
.logo-mark { width: 30px; height: 30px; }
.auth__art-copy { position: relative; }
.auth__art-copy h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(30px, 4vw, 58px); line-height: 1; letter-spacing: -0.05em; margin-top: 16px; }
.auth__art-copy h1 .silk-text { font-size: 1.12em; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px var(--pad); gap: 28px; }
.auth__form { width: 100%; max-width: 390px; display: flex; flex-direction: column; gap: 18px; }
.auth__form h2 { font-family: var(--f-display); font-weight: 500; font-size: 32px; letter-spacing: -0.04em; }
.auth__lead { color: var(--muted); margin-top: -8px; }
.auth__msg { font-size: 14.5px; padding: 12px 14px; border-radius: 12px; }
.auth__msg--bad { background: rgba(248, 113, 113, 0.1); color: var(--bad); }
.auth__msg--ok { background: rgba(74, 222, 128, 0.1); color: var(--ok); }
.auth__foot { max-width: 390px; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth--single { grid-template-columns: 1fr; }
.auth--single .auth__panel { gap: 40px; }
.auth__brand--dark { margin-bottom: 8px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth__art { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); gap: 40px; }
  .auth__web { width: 160%; right: -60%; }
}

/* ---------- górny pasek ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 13px var(--pad);
  background: rgba(11, 11, 14, 0.94);
  border-bottom: 1px solid var(--line);
}
.topbar__title { color: var(--muted); font-size: 13.5px; font-weight: 600; padding-left: 16px; border-left: 1px solid var(--line-2); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar__link { font-size: 13.5px; font-weight: 700; text-decoration: none; color: var(--ink-2); }
.topbar__link:hover { color: var(--accent); }
.topbar__phone { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 100px; background: rgba(255, 91, 46, 0.1); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; transition: background-color 0.2s; }
.topbar__phone .i { width: 16px; height: 16px; color: var(--accent); }
.topbar__phone:hover { background: rgba(255, 91, 46, 0.2); }
.topbar__user { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: linear-gradient(135deg, var(--a1, #ff5b2e), var(--a2, #c9a7ff)); color: #120a06; }
.avatar--lg { width: 64px; height: 64px; border-radius: 20px; font-size: 26px; font-family: var(--f-display); font-weight: 500; }
@media (max-width: 760px) {
  .topbar__title, .topbar__name { display: none; }
  .topbar__phone span { display: none; }
  .topbar__phone { padding: 9px; }
  .topbar { gap: 10px; }
}

/* ---------- pulpit klienta ---------- */
.dash { max-width: 1140px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--pad) 120px; }

.welcome { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: stretch; }
.welcome__main {
  position: relative; overflow: hidden;
  padding: clamp(24px, 3.5vw, 40px); border-radius: 24px;
  background: radial-gradient(70% 90% at 100% 0%, rgba(255, 91, 46, 0.14), transparent 60%), var(--bg-2);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.welcome__main h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.05em; line-height: 1; margin: 12px 0 16px; }
.welcome__main h1 .silk-text { font-size: 1.15em; }
.welcome__lead { color: var(--ink-2); font-size: 17px; max-width: 560px; margin-bottom: 22px; }
.welcome__lead b { color: var(--ink); }
.welcome__lead:last-child { margin-bottom: 0; }
.contact-card {
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 26px; border-radius: 24px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.contact-card__label { font-size: 14px; color: var(--muted); font-weight: 600; }
.contact-card__phone, .contact-card__mail { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.contact-card__phone { font-family: var(--f-display); font-weight: 500; font-size: clamp(18px, 1.75vw, 22px); letter-spacing: -0.03em; white-space: nowrap; }
.contact-card__phone .i { width: 42px; height: 42px; padding: 11px; border-radius: 14px; background: var(--accent); color: #160a05; }
.contact-card__phone:hover span { color: var(--accent); }
.contact-card__mail { color: var(--ink-2); font-size: 15px; font-weight: 600; }
.contact-card__mail .i { width: 42px; height: 42px; padding: 11px; border-radius: 14px; background: rgba(243, 238, 230, 0.07); color: var(--ink); }
.contact-card__mail:hover { color: var(--ink); }
@media (max-width: 900px) { .welcome { grid-template-columns: 1fr; } }

.alerts { display: grid; gap: 10px; margin-top: 18px; }
.alert { display: flex; gap: 14px; align-items: flex-start; padding: 15px 18px; border-radius: 14px; font-size: 15px; border: 1px solid; }
.alert .i { width: 20px; height: 20px; margin-top: 2px; }
.alert span { color: var(--muted); }
.alert--bad { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.35); }
.alert--bad .i { color: var(--bad); }
.alert--warn { background: rgba(251, 191, 36, 0.07); border-color: rgba(251, 191, 36, 0.3); }
.alert--warn .i { color: var(--warn); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 36px; }
.tile {
  position: relative; padding: 20px; border-radius: var(--r); background: var(--bg-2);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.tile__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(243, 238, 230, 0.07); color: var(--ink-2); margin-bottom: 10px; }
.tile__icon .i { width: 20px; height: 20px; }
.tile--ok .tile__icon { background: rgba(74, 222, 128, 0.12); color: var(--ok); }
.tile--warn .tile__icon { background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.tile--bad { border-color: rgba(248, 113, 113, 0.4); }
.tile--bad .tile__icon { background: rgba(248, 113, 113, 0.14); color: var(--bad); }
.tile--bad .tile__value { color: var(--bad); }
.tile__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile__value { font-family: var(--f-display); font-weight: 500; font-size: clamp(22px, 2.3vw, 28px); letter-spacing: -0.04em; line-height: 1.2; }
.tile__sub { font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .tile { padding: 16px; } .tile__icon { width: 34px; height: 34px; } }

.tabs {
  position: sticky; top: 62px; z-index: 20;
  display: flex; gap: 4px; padding: 5px; border-radius: 100px; background: rgba(19, 19, 24, 0.96); border: 1px solid var(--line);
  width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 26px; scrollbar-width: none;
}
.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 100px; font-size: 14.5px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: background-color 0.25s, color 0.25s; }
.tabs button .i { width: 17px; height: 17px; }
.tabs button:hover { color: var(--ink); }
.tabs button.is-active { background: var(--ink); color: var(--bg); }
.tabs__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: #160a05; font-size: 12px; font-weight: 800; }
.tabs__count--muted { background: rgba(243, 238, 230, 0.14); color: var(--ink); }
.tabs button.is-active .tabs__count--muted { background: rgba(11, 11, 14, 0.14); color: var(--bg); }
.tab-panel { display: none; animation: fadeUp 0.45s var(--ease-out); }
.tab-panel.is-active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { font-family: var(--f-display); font-weight: 500; font-size: 20px; letter-spacing: -0.03em; }
.section-head__sum { font-family: var(--f-display); font-size: 20px; letter-spacing: -0.03em; }
.section-head__meta { font-size: 14.5px; color: var(--muted); }
.section-head__meta b { color: var(--ink); }
.section-head--spaced { margin-top: 44px; }
.mini-title { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; font-weight: 700; }
.block-title { font-family: var(--f-display); font-weight: 500; font-size: 18px; letter-spacing: -0.03em; margin: 32px 0 14px; }

.empty { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); font-size: 14.5px; }
.empty > .i { width: 44px; height: 44px; padding: 11px; border-radius: 14px; background: rgba(243, 238, 230, 0.06); color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 15.5px; }
.empty a { color: var(--accent); }
p.empty { display: block; }

/* ---------- płatności ---------- */
.paylist { display: flex; flex-direction: column; gap: 10px; }
.payrow {
  display: grid; grid-template-columns: minmax(0, 1fr) 210px 160px auto; align-items: center; gap: 20px;
  padding: 18px 20px 18px 24px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.payrow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line-2); }
.payrow--warn::before { background: var(--warn); }
.payrow--bad { border-color: rgba(248, 113, 113, 0.4); background: linear-gradient(90deg, rgba(248, 113, 113, 0.07), transparent 50%), var(--bg-2); }
.payrow--bad::before { background: var(--bad); }
.payrow__title { font-weight: 700; font-size: 16px; }
.payrow__meta { font-size: 14px; color: var(--muted); }
.payrow__date { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.payrow__date .i { width: 16px; height: 16px; color: var(--muted); }
.payrow__when { font-size: 13.5px; color: var(--muted); padding-left: 24px; }
.payrow--warn .payrow__when { color: var(--warn); }
.payrow--bad .payrow__when { color: var(--bad); font-weight: 700; }
.payrow__amount { font-family: var(--f-display); font-weight: 500; font-size: 22px; letter-spacing: -0.03em; text-align: right; white-space: nowrap; }
@media (max-width: 900px) {
  .payrow { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .payrow__main { grid-column: 1 / -1; }
  .payrow__amount { grid-column: 2; grid-row: 2; }
  .payrow__copy { grid-column: 1 / -1; justify-self: start; }
}

.bank {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  margin-top: 16px; padding: 22px 24px; border-radius: var(--r);
  background: linear-gradient(135deg, rgba(126, 224, 255, 0.05), rgba(201, 167, 255, 0.05)), var(--bg-2);
  border: 1px solid var(--line);
}
.bank__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(126, 224, 255, 0.1); color: #7ee0ff; }
.bank__icon .i { width: 22px; height: 22px; }
.bank__label { font-size: 13px; font-weight: 700; color: var(--muted); }
.bank__acc { font-family: var(--f-display); font-size: clamp(17px, 2vw, 22px); letter-spacing: 0.02em; margin: 2px 0 4px; word-break: break-word; }
.bank__name { font-size: 14.5px; color: var(--ink-2); }
.bank__hint { font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 700px) { .bank { grid-template-columns: 1fr; } .bank__icon { display: none; } }

.year + .year { margin-top: 22px; }
.year__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 10px; }
.year__label { font-family: var(--f-display); font-size: 17px; letter-spacing: -0.02em; }
.year__sum { font-size: 14px; color: var(--muted); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(243, 238, 230, 0.02); }
.table td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color 0.2s; }
.table tbody tr:hover { background: rgba(243, 238, 230, 0.03); }
.table .num { text-align: right; white-space: nowrap; }
.table td:not(:first-child) { white-space: nowrap; }
.table td:first-child { min-width: 220px; }
.cell-note { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
/* tabela klienta na telefonie → karty */
@media (max-width: 700px) {
  .dash .table thead { display: none; }
  .dash .table, .dash .table tbody, .dash .table tr, .dash .table td { display: block; width: 100%; }
  .dash .table tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .dash .table tr:last-child { border-bottom: 0; }
  .dash .table td { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border: 0; text-align: right; }
  .dash .table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; flex: none; }
  .dash .table td:first-child { display: block; text-align: left; padding-bottom: 8px; }
  .dash .table td:first-child::before { display: none; }
}

.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 100px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--ok { background: rgba(74, 222, 128, 0.12); color: var(--ok); }
.badge--warn { background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.badge--bad { background: rgba(248, 113, 113, 0.14); color: var(--bad); }
.badge--muted { background: rgba(243, 238, 230, 0.08); color: var(--ink-2); }
.chip { padding: 5px 12px; border-radius: 100px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line-2); transition: border-color 0.2s, background-color 0.2s; }
.chip:hover { border-color: var(--ink); background: rgba(243, 238, 230, 0.05); }
.chip--gotowe { color: var(--ok); border-color: rgba(74, 222, 128, 0.4); }
.chip--w_toku { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); }

/* ---------- listy (domeny, usługi) ---------- */
.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--line); transition: background-color 0.2s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(243, 238, 230, 0.025); }
.row--off { opacity: 0.55; }
.row--bad { background: linear-gradient(90deg, rgba(248, 113, 113, 0.07), transparent 60%); }
.row__icon { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(243, 238, 230, 0.06); color: var(--ink-2); }
.row__icon .i { width: 20px; height: 20px; }
.row__main { flex: 1; min-width: 0; }
.row__title { font-weight: 700; font-size: 15.5px; }
.row__sub { font-size: 14px; color: var(--muted); }
.row__sub a { color: var(--ink-2); }
.row__side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.row__side--inline { flex-direction: row; align-items: center; gap: 14px; }
.row__date { font-size: 14px; color: var(--muted); }
.row__date b { color: var(--ink); font-weight: 600; }
.row__amount { font-family: var(--f-display); font-weight: 500; font-size: 16px; letter-spacing: -0.02em; }
@media (max-width: 600px) {
  .row { flex-wrap: wrap; }
  .row__side { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-left: 58px; }
  .row__side--inline { padding-left: 0; }
}

/* ---------- projekty ---------- */
.project { padding: clamp(20px, 3vw, 32px); border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 16px; box-shadow: var(--shadow); }
.project__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.project__head h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 2.4vw, 27px); letter-spacing: -0.04em; margin: 12px 0 6px; line-height: 1.15; }
.project__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.project__meta span, .project__meta a { display: inline-flex; align-items: center; gap: 6px; }
.project__meta .i { width: 15px; height: 15px; }
.project__meta a { color: var(--ink-2); }
.project__desc { color: var(--ink-2); max-width: 640px; }
.project__body { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 48px); margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .project__body { grid-template-columns: 1fr; } .project__head { flex-direction: column; } }

.stages { display: flex; flex-direction: column; }
.stage { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 22px; }
.stage::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: var(--line-2); }
.stage:last-child::before { display: none; }
.stage--gotowe::before { background: var(--accent); }
.stage__node { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); background: var(--bg-2); display: grid; place-items: center; }
.stage__node .i { width: 13px; height: 13px; stroke-width: 3; color: #160a05; }
.stage--gotowe .stage__node { background: var(--accent); border-color: var(--accent); }
.stage--w_toku .stage__node { border-color: var(--warn); background: radial-gradient(circle, var(--warn) 40%, transparent 45%); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(251, 191, 36, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); } }
.stage__title { font-weight: 700; }
.stage--oczekuje .stage__title { color: var(--ink-2); }
.stage__desc { font-size: 14.5px; color: var(--muted); }
.stage__status { font-size: 13px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.stage--w_toku .stage__status { color: var(--warn); }
.stage--gotowe .stage__status { color: var(--ok); }
.stages--admin .stage { grid-template-columns: 30px 1fr auto; align-items: start; }
.stage__tools { display: flex; align-items: center; gap: 2px; }

.feed { display: flex; flex-direction: column; }
.feed li { position: relative; padding: 12px 40px 12px 18px; border-left: 2px solid var(--line-2); }
.feed li::before { content: ""; position: absolute; left: -6px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--muted); }
.feed li:first-child::before { border-color: var(--accent); background: var(--accent); }
.feed time { font-size: 13px; color: var(--muted); font-weight: 600; }
.feed p { font-size: 15px; }
.feed__del { position: absolute; right: 0; top: 8px; opacity: 0; }
.feed li:hover .feed__del { opacity: 1; }

.dash__foot { margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); text-align: center; display: grid; gap: 8px; }
.dash__foot a { color: var(--ink); font-weight: 700; }
.dash__brand { font-family: var(--f-display); font-size: 13px; letter-spacing: -0.02em; }

/* ---------- panel admina ---------- */
.admin { display: grid; grid-template-columns: 290px 1fr; min-height: calc(100vh - 62px); }
.side { position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; border-right: 1px solid var(--line); padding: 18px 14px 90px; background: var(--bg-2); display: flex; flex-direction: column; gap: 12px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.side__nav button, .side__list button { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 700; color: var(--ink-2); transition: background-color 0.2s, color 0.2s; }
.side__nav button .i { color: var(--muted); }
.side__nav button:hover, .side__list button:hover { background: rgba(243, 238, 230, 0.05); color: var(--ink); }
.side__nav button.is-active, .side__list button.is-active { background: rgba(255, 91, 46, 0.13); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.side__nav button.is-active .i { color: var(--accent); }
.side__head { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 0; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.side__head > span { display: inline-flex; align-items: center; gap: 8px; }
.side__head .i { width: 16px; height: 16px; }
.side__count { color: var(--ink); }
.side__search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); transition: border-color 0.2s; }
.side__search:focus-within { border-color: var(--accent); }
.side__search .i { width: 16px; height: 16px; color: var(--muted); }
.side__search input { flex: 1; min-width: 0; padding: 11px 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 14.5px; outline: none; }
.side__list { display: flex; flex-direction: column; gap: 2px; }
.side__list button { font-weight: 500; }
.side__list button > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.side__list b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__list small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__empty { color: var(--muted); font-size: 14px; padding: 10px 12px; }
.admin__main { padding: clamp(24px, 3.5vw, 40px) var(--pad) 120px; min-width: 0; max-width: 1200px; }
.admin .tabs { top: 74px; }
.main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.main-head h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.05em; line-height: 1.05; margin: 10px 0 8px; }
.main-head h1 .silk-text { font-size: 1.15em; }
.main-head__sub { color: var(--ink-2); font-size: 15.5px; }
.main-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.client-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.client-head__main { flex: 1; min-width: 240px; }
.client-head h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.045em; line-height: 1.1; margin: 6px 0 8px; }
.client-head__contact { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; color: var(--ink-2); }
.client-head__contact a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.client-head__contact a:hover { color: var(--accent); }
.client-head__contact .i { width: 16px; height: 16px; color: var(--muted); }

.summary { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); margin-bottom: 18px; overflow: hidden; box-shadow: var(--shadow); }
.summary__item { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.summary__item:last-child { border-right: 0; }
.summary__item span { font-size: 13px; color: var(--muted); font-weight: 600; }
.summary__item b { font-family: var(--f-display); font-weight: 500; font-size: 21px; letter-spacing: -0.03em; }
.summary__item small { font-size: 13px; color: var(--muted); }
.summary__item.is-warn b { color: var(--warn); }
.summary__item.is-bad b, .summary__item.is-bad small { color: var(--bad); }
@media (max-width: 900px) { .summary { grid-template-columns: repeat(2, 1fr); } .summary__item:nth-child(2) { border-right: 0; } .summary__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; background: rgba(251, 191, 36, 0.06); border: 1px solid rgba(251, 191, 36, 0.22); font-size: 15px; margin-bottom: 20px; color: var(--ink-2); }
.note .i { color: var(--warn); margin-top: 2px; }
.card { padding: 22px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 18px; box-shadow: var(--shadow); }
.card .list { background: transparent; box-shadow: none; }
.card-title { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 500; font-size: 18px; letter-spacing: -0.03em; margin-bottom: 16px; }
.card-title .i { width: 20px; height: 20px; color: var(--accent); }
.card-title small { font-family: var(--f-body); font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 3px 9px; border-radius: 100px; background: rgba(243, 238, 230, 0.07); letter-spacing: 0; }
.card > .muted { margin: -6px 0 6px; }
.cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 12px 28px; margin: 20px 0 24px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { font-weight: 600; }
.tab-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.tab-head .btn:only-child { margin-left: auto; }
.tab-head .muted b { color: var(--ink); font-family: var(--f-display); font-weight: 500; }
.mini-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.mini-head .mini-title { margin-bottom: 10px; }
.row-actions { display: inline-flex; gap: 2px; vertical-align: middle; }
.update-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
.project--admin .project__head .row-actions { flex: none; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
  .side__list { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .side__list li { flex: none; max-width: 230px; }
  .side__nav { flex-direction: row; }
  .admin .tabs { top: 62px; }
  .stages--admin .stage { grid-template-columns: 30px 1fr; }
  .stages--admin .stage__tools { grid-column: 2; flex-wrap: wrap; }
}

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5, 5, 7, 0.75); opacity: 0; transition: opacity 0.25s; }
.modal__box {
  position: relative; width: 100%; max-width: 580px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 24px; padding: 26px;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.75);
  opacity: 0; transform: translateY(16px) scale(0.98); transition: opacity 0.25s, transform 0.35s var(--ease-out);
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__box { opacity: 1; transform: none; }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal__head h3 { font-family: var(--f-display); font-weight: 500; font-size: 23px; letter-spacing: -0.04em; }
.modal__intro { color: var(--ink-2); margin-bottom: 18px; font-size: 15px; }
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field--full { grid-column: 1 / -1; }
.modal__error { margin-top: 14px; padding: 11px 14px; border-radius: 10px; background: rgba(248, 113, 113, 0.1); color: var(--bad); font-size: 14.5px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
@media (max-width: 560px) { .modal__grid { grid-template-columns: 1fr; } .modal__box { padding: 20px; } }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { padding: 13px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14.5px; font-weight: 700; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6); opacity: 0; transform: translateY(10px); transition: opacity 0.3s, transform 0.4s var(--ease-out); }
.toast.is-in { opacity: 1; transform: none; }
.toast--bad { background: var(--bad); }

/* ---------- pasek demo ---------- */
.demo-bar {
  position: fixed; left: 50%; bottom: 16px; translate: -50% 0; z-index: 90;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100% - 32px); padding: 10px 12px 10px 18px; border-radius: 100px;
  background: var(--bg-4); border: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6);
}
.demo-bar b { color: var(--warn); }
.demo-bar code { color: var(--ink); font-size: 12px; background: rgba(243, 238, 230, 0.08); padding: 1px 6px; border-radius: 5px; }
.demo-bar button { padding: 6px 12px; border-radius: 100px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; }
.demo-bar button:hover { border-color: var(--ink); }
.demo-bar__short { display: none; }
@media (min-width: 861px) {
  body:has(.auth:not(.auth--single)) .demo-bar { left: auto; right: 16px; translate: none; max-width: calc(50% - 40px); border-radius: 16px; }
}
@media (max-width: 700px) {
  .demo-bar { bottom: 8px; gap: 8px; padding: 8px 8px 8px 14px; font-size: 12px; flex-wrap: nowrap; }
  .demo-bar__long { display: none; }
  .demo-bar__short { display: inline; }
  .toasts { bottom: 70px; }
}

.modal__box--wide { max-width: 760px; }
.modal__section { grid-column: 1 / -1; margin-top: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* ---------- ostrzeżenie przed wylogowaniem ---------- */
.idle-warn { position: fixed; inset: 0; z-index: 400; display: grid; place-items: end center; padding: 24px 16px; background: rgba(5, 5, 7, 0.55); opacity: 0; transition: opacity 0.3s; }
.idle-warn.is-in { opacity: 1; }
.idle-warn__box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 560px; padding: 18px 20px; border-radius: 20px; background: var(--bg-3); border: 1px solid rgba(251, 191, 36, 0.4); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7); transform: translateY(16px); transition: transform 0.4s var(--ease-out); }
.idle-warn.is-in .idle-warn__box { transform: none; }
.idle-warn__box > .i { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.idle-warn__box > div { flex: 1; min-width: 220px; }
.idle-warn__title { font-weight: 800; font-size: 16px; }
.idle-warn__text { font-size: 14.5px; color: var(--ink-2); }
.idle-warn__text b { color: var(--warn); font-variant-numeric: tabular-nums; }
.auth__msg--info { background: rgba(126, 224, 255, 0.08); color: #a5e9ff; border: 1px solid rgba(126, 224, 255, 0.2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.001s !important; }
}


.auth__foot a { color: var(--ink-2); }
.auth__foot a:hover { color: var(--accent); }

