/* ==========================================================================
   4BestObywatel - nowy panel
   Uklad: zmienne, tlo, strony logowania, panel, modale, responsywnosc.
   ========================================================================== */

:root {
  --bg: #07070a;
  --surface: #101016;
  --surface-2: #16161f;
  --surface-3: #1d1d28;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-2: #a8aebc;
  --text-3: #6b7280;
  --accent: #ff3b4a;
  --accent-hover: #ff5c68;
  --accent-soft: rgba(255, 59, 74, 0.14);
  --accent-line: rgba(255, 59, 74, 0.45);
  --ok: #2ecc71;
  --ok-soft: rgba(46, 204, 113, 0.14);
  --warn: #f5b544;
  --warn-soft: rgba(245, 181, 68, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  --tap: 44px;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent-soft); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- Warstwy tla ------------------------------------------------------- */

/* Tlo strony trzymamy na <html>, a canvas i poswiate dajemy na ujemnym
   z-index. Dzieki temu cala tresc rysuje sie nad nimi bez zadnych hackow. */

#dots {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/*
 * Tlo zywych swiatel.
 *
 * Trzy warstwy: czerwona od lewego dolnego rogu, niebieska od prawego gornego
 * i slaba biala poswiata na srodku. Kazda plynie i oddycha w swoim tempie,
 * wiec tlo nigdy nie stoi w miejscu, a jednoczesnie nie rozprasza.
 *
 * Animujemy tylko transform i opacity - obie rzeczy ida na GPU, wiec nie ma
 * tu ani jednego przemalowania strony przy przewijaniu.
 */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(44% 36% at 50% 50%, rgba(255, 255, 255, 0.055), transparent 74%);
  animation: glow-breathe 15s ease-in-out infinite alternate;
  will-change: opacity;
}

.bg-glow::before,
.bg-glow::after {
  content: '';
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  will-change: transform, opacity;
}

/* Czerwonosc od lewego dolnego rogu. */
.bg-glow::before {
  background: radial-gradient(
    closest-side,
    rgba(255, 59, 74, 0.28),
    rgba(255, 59, 74, 0.08) 46%,
    transparent 74%
  );
  animation: glow-drift-a 26s ease-in-out infinite alternate;
}

/* Chlod od prawego gornego rogu. */
.bg-glow::after {
  background: radial-gradient(
    closest-side,
    rgba(120, 170, 255, 0.24),
    rgba(120, 170, 255, 0.07) 46%,
    transparent 74%
  );
  animation: glow-drift-b 33s ease-in-out infinite alternate;
}

/* Oddychanie srodkowej poswiaty. */
@keyframes glow-breathe {
  from { opacity: 0.68; }
  to   { opacity: 1; }
}

@keyframes glow-drift-a {
  0%   { transform: translate3d(-30%, 28%, 0) scale(1.00); opacity: 0.80; }
  50%  { opacity: 1; }
  100% { transform: translate3d(-6%, 6%, 0) scale(1.16); opacity: 0.62; }
}

@keyframes glow-drift-b {
  0%   { transform: translate3d(30%, -26%, 0) scale(1.04); opacity: 0.74; }
  50%  { opacity: 1; }
  100% { transform: translate3d(8%, -4%, 0) scale(1.18); opacity: 0.58; }
}

@media (max-width: 720px) {
  .bg-glow { animation-duration: 22s; }
  .bg-glow::before { animation-duration: 34s; }
  .bg-glow::after { animation-duration: 42s; }
}

/* --- Tekst pomocniczy -------------------------------------------------- */

.muted { color: var(--text-3); }
.text-ok { color: var(--ok); }
.text-danger { color: var(--accent); }
.text-warn { color: var(--warn); }
.small { font-size: 12.5px; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: 0.2px;
}

/* ==========================================================================
   Strony logowania / rejestracji / rate limitu
   ========================================================================== */

.auth-topleft {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  left: calc(22px + env(safe-area-inset-left));
  z-index: 3;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
  max-width: 300px;
  animation: fadeDown 0.7s var(--ease) both;
}

.auth-topleft b { color: #fff; font-weight: 600; }

.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 84px 20px 96px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #101017;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px 30px 28px;
  box-shadow: var(--shadow);
  animation: cardIn 0.6s var(--ease) both;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  text-align: center;
}

.brand-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(255, 59, 74, 0.3));
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.brand-sub {
  font-size: 13px;
  color: var(--text-3);
  margin-top: -4px;
}

/* --- Pola formularza z ikonkami --------------------------------------- */

.field { margin-bottom: 16px; position: relative; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

.field-control { position: relative; display: block; }

.field-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-3);
  pointer-events: none;
  transition: color 0.2s var(--ease);
  z-index: 2;
}

.field-control input,
.field-control textarea,
.field-control select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px 13px 44px;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
  min-height: var(--tap);
}

.field-control textarea {
  padding-left: 44px;
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.field-control select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 13px;
}

.field-control select option { background: #16161f; color: #fff; }

.field-control.no-icon input,
.field-control.no-icon textarea,
.field-control.no-icon select { padding-left: 15px; }

.field-control input::placeholder,
.field-control textarea::placeholder { color: var(--text-3); }

.field-control input:hover,
.field-control textarea:hover { border-color: var(--border-2); }

.field-control input:focus,
.field-control textarea:focus,
.field-control select:focus {
  outline: none;
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field-control:focus-within .field-icon { color: var(--accent); }

/* Stan bledny / poprawny - obramowanie pola */
.field.is-error .field-control input,
.field.is-error .field-control textarea {
  border-color: var(--accent);
  background: rgba(255, 59, 74, 0.07);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field.is-error .field-icon { color: var(--accent); }

.field.is-ok .field-control input,
.field.is-ok .field-control textarea {
  border-color: var(--ok);
  background: rgba(46, 204, 113, 0.07);
  box-shadow: 0 0 0 4px var(--ok-soft);
}

.field.is-ok .field-icon { color: var(--ok); }

.field.is-error { animation: shake 0.42s var(--ease); }

.field-msg {
  font-size: 12px;
  margin-top: 6px;
  min-height: 15px;
  color: var(--accent);
}

.field.is-ok .field-msg { color: var(--ok); }

/* Przycisk pokazania hasla */
.field-reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s, background 0.2s;
}

.field-reveal:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.field.has-reveal input { padding-right: 48px; }

/* --- Zgoda (checkbox) -------------------------------------------------- */

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 18px;
}

.check {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.check-mark {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--border-2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s var(--ease);
}

.check input:checked + .check-mark {
  background: var(--accent);
  border-color: var(--accent);
}

.check-mark::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s var(--ease);
}

.check input:checked + .check-mark::after { transform: rotate(45deg) scale(1); }

.consent-text {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-3);
}

/* --- Zgoda na warunki (wyrozniona) ------------------------------------- */

.terms-box {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(255, 59, 74, 0.13), rgba(255, 59, 74, 0.04));
  border: 1.5px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  margin-bottom: 18px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.terms-box:focus-within { border-color: var(--accent); }

.terms-box.is-error {
  animation: shake 0.42s var(--ease);
  border-color: var(--accent);
}

.terms-box .check-mark { border-color: var(--accent); background: rgba(255, 255, 255, 0.08); }

.terms-main { min-width: 0; }

.terms-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.45;
}

.terms-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.terms-link:hover { color: var(--accent-hover); }

.terms-hint {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
}

.terms-body { font-size: 13.5px; line-height: 1.65; color: var(--text-2); }

.terms-body h3 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin: 18px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.terms-body h3:first-child { margin-top: 0; }

.terms-body p { margin-bottom: 8px; }

.terms-body ul { margin: 6px 0 10px 20px; }

.terms-body li { margin-bottom: 4px; }

/* --- Przyciski --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--tap);
  transition: transform 0.16s var(--ease), background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.975); }

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #e0212f);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 59, 74, 0.28);
}

.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--accent-hover), #ef2b39); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); border-color: var(--border-2); }

.btn-ok {
  background: var(--ok-soft);
  border-color: rgba(46, 204, 113, 0.4);
  color: var(--ok);
}

.btn-danger {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 12.5px; min-height: 38px; border-radius: var(--radius-xs); }

.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* --- Stopka stron logowania -------------------------------------------- */

.auth-foot {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 20px;
}

.auth-foot a { font-weight: 600; }

.auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  flex-wrap: wrap;
}

.auth-links .sep { color: var(--text-3); }

.site-foot {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  pointer-events: none;
}

.site-foot a {
  pointer-events: auto;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #101016;
  border: 1px solid var(--border);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-foot a:hover { color: #fff; border-color: var(--border-2); }

.site-foot .foot-admin {
  color: var(--accent);
  border-color: var(--accent-line);
  background: #1a0d10;
  font-weight: 600;
}

.site-foot .foot-admin:hover { color: #fff; background: var(--accent); border-color: var(--accent); }

.site-foot .foot-beta {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.28);
  background: #0c1620;
  font-weight: 600;
}

.site-foot .foot-beta:hover { color: #fff; background: #0ea5e9; border-color: #0ea5e9; }

/* Na logowaniu/rejestracji link do Discorda jest juz wyzej w .auth-links,
   wiec dolny duplikat wjezdza z animacja i zjezdza w dol. */
.site-foot-auth .foot-discord-auth {
  position: relative;
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px) scale(0.92);
  animation: footDiscordOut 0.45s var(--ease) 0.9s forwards;
}

@keyframes footDiscordOut {
  from { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }
  to   { opacity: 0; transform: translateY(24px) scale(0.92); visibility: hidden; }
}

/* Krotki "błysk" zanim zniknie - uzytkownik widzi, ze przycisk tam byl. */
.site-foot-auth .foot-discord-auth::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  animation: footDiscordPulse 0.9s var(--ease) forwards;
  pointer-events: none;
}

@keyframes footDiscordPulse {
  0%   { box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.42); opacity: 1; }
  100% { box-shadow: 0 0 0 12px rgba(88, 101, 242, 0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-foot-auth .foot-discord-auth {
    animation: none;
    opacity: 0;
    visibility: hidden;
  }
  .site-foot-auth .foot-discord-auth::before { animation: none; content: none; }
}

/* --- Animacja przejscia do panelu -------------------------------------- */

.transition-veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(255, 255, 255, 0.14), transparent 70%),
    var(--bg);
  transition: opacity 0.5s var(--ease);
}

body.is-leaving .transition-veil { opacity: 1; }

body.is-leaving .auth-card {
  animation: cardOut 0.62s var(--ease) forwards;
}

body.is-leaving .auth-topright { opacity: 0; transition: opacity 0.3s; }

/* ==========================================================================
   Panel (dashboard, admin)
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: calc(11px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) 11px calc(20px + env(safe-area-inset-left));
  background: rgba(11, 11, 17, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--border);
}

/* Bez wsparcia backdrop-filter pasek musi byc nieprzezroczysty,
   inaczej tresc pod nim przebija i tekst staje sie nieczytelny. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar { background: #0b0b11; }
}

.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-title .panel-title-dim { color: var(--text-3); font-weight: 400; }

/* Powrot do panelu glownego (admin). */
.topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #14141b;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.topbar-back:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.topbar-back i { font-size: 11px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  min-height: 40px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.pill i { font-size: 13px; }

.pill:hover {
  color: #fff;
  border-color: var(--border-2);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.pill-accent {
  color: #fff;
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.pill-accent:hover { background: rgba(255, 59, 74, 0.2); border-color: var(--accent); }

.pill-ok {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: rgba(46, 204, 113, 0.38);
}

.pill-admin {
  color: var(--accent);
  background: rgba(255, 59, 74, 0.1);
  border-color: var(--accent-line);
  font-weight: 600;
}

.pill-admin:hover { color: #fff; background: var(--accent); border-color: var(--accent); }

.pill-limit {
  background: rgba(245, 181, 68, 0.12);
  border-color: rgba(245, 181, 68, 0.38);
  color: #ffd88a;
}

.pill-limit b { color: #fff; font-weight: 700; }

.pill-limit:hover { background: rgba(245, 181, 68, 0.2); color: #ffd88a; }

.pill-count {
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 59, 74, 0.6);
  animation: pulse 2s infinite;
}

/* --- Profil i rozwijane menu ------------------------------------------- */

.profile { position: relative; }

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  min-height: 40px;
  transition: all 0.2s var(--ease);
}

.profile-btn:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--border-2); }

.profile-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-caret { font-size: 10px; color: var(--text-3); transition: transform 0.25s var(--ease); }

.profile.is-open .profile-caret { transform: rotate(180deg); }

.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 350), 65%, 52%), hsl(calc(var(--h, 350) + 40), 65%, 40%));
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-sm { width: 30px; height: 30px; font-size: 12.5px; }
.avatar-md { width: 40px; height: 40px; font-size: 16px; }
.avatar-lg { width: 64px; height: 64px; font-size: 25px; }

.dropdown {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  min-width: 258px;
  background: #14141c;
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 7px;
  box-shadow: var(--shadow);
  z-index: 40;
  animation: dropIn 0.2s var(--ease) both;
}

.dropdown[hidden] { display: none; }

/* Menu profilu siedzi na koncu paska, wiec musi sie rozwijac w LEWO.
   Przy left:0 wychodzilo poza prawa krawedz strony na komputerze. */
.profile .dropdown {
  left: auto;
  right: 0;
  min-width: min(280px, calc(100vw - 28px));
}

.dropdown-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.dropdown-head strong { font-size: 14px; }

.dropdown-note {
  font-size: 11.5px;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 7px;
  padding: 5px 9px;
  margin-top: 7px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s var(--ease);
  min-height: var(--tap);
}

.dropdown-item i { width: 17px; font-size: 13.5px; text-align: center; }

.dropdown-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }

.dropdown-danger { color: var(--accent); }
.dropdown-danger:hover { background: var(--accent-soft); color: var(--accent); }

/* Pozycje, ktore w menu pokazuja sie tylko na telefonie */
.dropdown-mobile-only { display: none; }

.dropdown-mobile-only .dropdown-item { border-bottom: 0; }

.dropdown-static {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  color: var(--text-2);
  font-size: 13px;
}

.dropdown-static i { width: 17px; text-align: center; font-size: 13.5px; }

.dropdown-static b { color: #fff; }

/* --- Uklad strony panelu ----------------------------------------------- */

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 90px;
  animation: fadeUp 0.45s var(--ease) both;
}

.page-head { margin-bottom: 22px; }

.page-head h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.page-head p { color: var(--text-3); font-size: 13.5px; }

/* Karty sa nieprzezroczyste celowo. backdrop-filter na wielu kartach
   to najdrozsza rzecz przy przewijaniu, a efekt i tak jest tu niewidoczny. */
.card {
  background: #101016;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  contain: layout style;
}

.card h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }

.card p { color: var(--text-2); font-size: 13.5px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-head h2 { margin-bottom: 0; }

.grid { display: grid; gap: 16px; }

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }

.stat {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.stat-n { font-size: 25px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.2; }

.stat-l {
  font-size: 11.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 3px;
}

.stat-accent .stat-n { color: var(--accent); }
.stat-warn .stat-n { color: var(--warn); }
.stat-ok .stat-n { color: var(--ok); }

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background:
    linear-gradient(135deg, rgba(255, 59, 74, 0.13), rgba(120, 170, 255, 0.07)),
    rgba(16, 16, 22, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
}

.hero h2 { font-size: 21px; margin-bottom: 5px; }

.list { display: flex; flex-direction: column; gap: 9px; }

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.18s var(--ease);
  flex-wrap: wrap;
}

.list-item:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--border-2); }

.list-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.list-title { font-size: 13.5px; font-weight: 600; word-break: break-word; }

.list-meta { font-size: 11.5px; color: var(--text-3); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}

.tag-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(46, 204, 113, 0.35); }
.tag-warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(245, 181, 68, 0.35); }
.tag-danger { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.tag-admin { color: #fff; background: var(--accent); border-color: var(--accent); }

/* Rola Owner - zloty, wyraznie ponad admina. */
.tag-owner {
  color: #ffd76e;
  background: rgba(245, 181, 68, 0.16);
  border-color: rgba(245, 181, 68, 0.55);
  font-weight: 600;
}

/* Rola System - konto techniczne, stalowy kolor. */
.tag-system {
  color: #cfe4ff;
  background: rgba(120, 170, 255, 0.16);
  border-color: rgba(120, 170, 255, 0.55);
  font-weight: 600;
}

.empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-3);
  font-size: 13.5px;
}

.empty i { display: block; font-size: 26px; margin-bottom: 12px; opacity: 0.5; }

/* --- Tabele ------------------------------------------------------------ */

.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* --- Klucze ------------------------------------------------------------ */

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 9px 11px;
  flex-wrap: wrap;
}

.key-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #fff;
  word-break: break-all;
  flex: 1 1 auto;
  min-width: 0;
}

.key-actions { display: flex; gap: 7px; flex-shrink: 0; }

/* Rozwinięte szczegóły zaproszenia (przycisk Info) */
.invite-info {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 14px;
  animation: fadeIn 0.22s var(--ease) both;
}

.invite-info[hidden] { display: none; }

.invite-info .stat-l { margin-bottom: 2px; }

/* --- Zakladki ---------------------------------------------------------- */

/* Zakladki w panelu admina jest duzo, wiec pasek przewija sie w poziomie
   zamiast sie lamac albo sciskac napisy. */
.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.tabs::-webkit-scrollbar { height: 5px; }
.tabs::-webkit-scrollbar-track { background: transparent; }
.tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}
.tabs::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.32); }

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
  min-height: 42px;
}

.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.tab.on {
  color: #fff;
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.tab-count {
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

/* --- Alerty ------------------------------------------------------------ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 14px;
  border: 1px solid;
  line-height: 1.5;
}

.alert i { margin-top: 3px; flex-shrink: 0; }

.alert-ok { background: var(--ok-soft); border-color: rgba(46, 204, 113, 0.35); color: #9ff0c1; }
.alert-err { background: var(--accent-soft); border-color: var(--accent-line); color: #ffb3b9; }
.alert-info { background: rgba(120, 170, 255, 0.12); border-color: rgba(120, 170, 255, 0.35); color: #bcd8ff; }
.alert-warn { background: var(--warn-soft); border-color: rgba(245, 181, 68, 0.35); color: #ffd88a; }

.alert strong { color: #fff; }

/* --- Modale ------------------------------------------------------------ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(3, 3, 6, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s var(--ease) both;
}

.modal-backdrop[hidden] { display: none; }

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  background: #101017;
  border: 1px solid var(--border-2);
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation: modalIn 0.3s var(--ease) both;
  -webkit-overflow-scrolling: touch;
}

.modal-wide { max-width: 720px; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #101017;
  z-index: 2;
  border-radius: 22px 22px 0 0;
}

.modal-head h2 { font-size: 17px; margin-bottom: 3px; }
.modal-head p { font-size: 12.5px; color: var(--text-3); }

.modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s var(--ease);
}

.modal-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.modal-body { padding: 20px 22px 24px; }

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* --- Toasty ------------------------------------------------------------ */

.toast {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--border-2);
  background: rgba(24, 24, 32, 0.97);
  box-shadow: var(--shadow);
  animation: toastIn 0.35s var(--ease) both;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast-ok { border-color: rgba(46, 204, 113, 0.45); color: #9ff0c1; }
.toast-error { border-color: var(--accent-line); color: #ffb3b9; }

/* --- Szukanie / filtry -------------------------------------------------- */

.search-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  min-height: 40px;
  min-width: 190px;
  transition: all 0.2s var(--ease);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }

/* --- Klucze: grupy, zaznaczanie, przelacznik ---------------------------- */

.key-group { margin-bottom: 18px; }

.key-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.key-group-head h3 { margin-bottom: 0; }

.key-group-head .muted { font-size: 12.5px; }

/* Suwak-przelacznik: wszystkie <-> tylko niezuzyte.
   Kolejnosc: NAJPIERW napis, potem tor - napis po lewej stronie suwaka. */
.nw-switch {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
  padding: 4px 6px 4px 2px;
  border-radius: 999px;
  transition: background 0.2s var(--ease);
}

.nw-switch:hover { background: rgba(255, 255, 255, 0.04); }

.nw-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.nw-switch-label {
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.24s var(--ease);
  white-space: nowrap;
}

.nw-switch:hover .nw-switch-label { color: var(--text); }

/* Etykieta stoi PRZED torem, wiec "~" (a nie "+") - inaczej strzalka nigdy sie nie ruszy. */
.nw-switch input:checked ~ .nw-switch-label { color: var(--text); }

.nw-switch .nw-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.nw-switch .nw-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.nw-switch input:checked ~ .nw-switch-track {
  background: var(--ok-soft);
  border-color: rgba(46, 204, 113, 0.5);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(46, 204, 113, 0.1);
}

.nw-switch input:checked ~ .nw-switch-track .nw-switch-thumb {
  transform: translateX(22px);
  background: var(--ok);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(46, 204, 113, 0.45);
}

.nw-switch input:focus-visible ~ .nw-switch-track {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Krotki "oddech" toru przy przelaczeniu - zwraca uwage bez halasu. */
.nw-switch input:checked ~ .nw-switch-track { animation: nw-switch-pop 0.34s var(--ease); }

@keyframes nw-switch-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.055); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .nw-switch .nw-switch-thumb,
  .nw-switch .nw-switch-track,
  .nw-switch-label { transition: none; animation: none; }
  .nw-switch input:checked ~ .nw-switch-track { animation: none; }
}

/* Pasek eksportu nad tabela kluczy. */
.export-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.export-bar .export-hint {
  font-size: 12.5px;
  color: var(--text-3);
  margin-right: auto;
}

@media (max-width: 640px) {
  .export-bar { flex-direction: column; align-items: stretch; }
  .export-bar .btn { width: 100%; }
  .export-bar .export-hint { margin-right: 0; }
}

.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* Wiersz listy z licznikiem i przyciskiem. Licznik trzyma swoja szerokosc,
   przycisk dostaje stala kolumne, wiec wszystkie przyciski w liscie stoja
   dokladnie w jednej linii i nic nie skacze. */
.row-actions-even {
  display: grid;
  grid-template-columns: auto 104px;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

/* Formularz nie ma wlasnego pudelka, jego przycisk wchodzi wprost do siatki. */
.row-actions-even > form { display: contents; }

.row-actions-even .btn {
  width: 100%;
  justify-content: center;
}

/* Rowna siatka przyciskow akcji. Kazdy przycisk tej samej szerokosci,
   rowne odstepy, nic sie nie rozjezdza przy dluzszych etykietach.
   Uzywana w admin panelu, zeby opcje w tabelach wygladaly schludnie. */
.btn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  align-items: stretch;
}

.btn-grid > * { margin: 0; min-width: 0; }

.btn-grid .btn,
.btn-grid button.btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Szerokie przyciski (np. "Daj admina") dostaja cala szerokosc. */
.btn-grid > .btn-grid-wide { grid-column: 1 / -1; }

.btn-grid-single { grid-template-columns: minmax(0, 1fr); }

/* Przycisk na cala szerokosc swojego kontenera. */
.btn-full { width: 100%; justify-content: center; }

/* Uklad opcji w komorce tabeli admina. */
.admin-opts { display: flex; flex-direction: column; gap: 7px; min-width: 210px; }
.admin-opts .inline-form { margin-top: 0 !important; }
.admin-opts .inline-form .btn { flex: 0 0 auto; }

.tag-center { justify-content: center; }

/* Akcje nad prosba w adminie: osobny wiersz na zatwierdzenie i na odrzucenie,
   w kazdym pole na powod decyzji plus przycisk. */
.req-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.req-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.req-action .req-note { flex: 1 1 200px; min-width: 0; }

/* Maly rownomierny rzad przyciskow z samymi ikonami. */
.btn-grid-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, 34px);
  gap: 6px;
  justify-content: start;
}

.btn-grid-icons .btn {
  width: 34px;
  height: 32px;
  padding: 0;
  justify-content: center;
}

/* ==========================================================================
   Tabele kluczy - przewijanie i szerokosci kolumn
   ========================================================================== */

/* Gdy kolumn jest duzo (klucz + status + kto + daty), tabela nie miesci sie na
   ekranie. Poziomy pasek zamiast rozjechanego ukladu. */
.table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.table-scroll::-webkit-scrollbar { height: 9px; }
.table-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); border-radius: 999px; }
.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.table-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* Minimalna szerokosc, od ktorej kolumny przestaja sie zgniatac. */
.table-scroll > .data-table { min-width: 880px; }

.data-table .col-key { min-width: 230px; }
.data-table .col-opts { width: 80px; }
.data-table .nowrap { white-space: nowrap; }

/* Kolor ostrzegawczy dla wygasnietych dat. */
.text-warn { color: var(--warn); }

/* Wiersz "ostatnio wygenerowane": kod + metadane obok siebie. */
.key-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.key-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Podpowiedz pod polem formularza (np. "Puste = bezterminowo"). */
.field-hint { margin-top: 6px; line-height: 1.4; }

@media (max-width: 1100px) {
  .btn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Na wezszym ekranie etykiety w pasku sa krotsze. Bez tego dlugi napis
     "Limit instancji: bez limitu" wypycha konto poza ekran. */
  .pill { padding: 8px 12px; }
  .pill-text { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ==========================================================================
   Animacje
   ========================================================================== */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  35% { opacity: 1; transform: translateY(0) scale(1.02); }
  100% { opacity: 0; transform: translateY(-26px) scale(1.06); filter: blur(6px); }
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-14px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 74, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 59, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 74, 0); }
}

/* ==========================================================================
   Telefony i male ekrany
   ========================================================================== */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }

  /* Gorny pasek na telefonie: tytul po lewej, samo konto po prawej.
     Zaproszenia, Discord i limit przenosza sie do menu przy koncie. */
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding-left: calc(14px + env(safe-area-inset-left));
    padding-right: calc(14px + env(safe-area-inset-right));
  }

  .topbar-brand .panel-title { white-space: normal; line-height: 1.3; display: block; }

  .topbar-nav { justify-content: flex-end; }

  .topbar-hide-mobile { display: none !important; }

  /* Na telefonie przycisk powrotu zostaje sam jako strzalka. Napis "Panel
     glowny" zjadalby polowe paska, a strzalka i tak mowi wszystko. */
  .topbar-back-label { display: none; }
  .topbar-back { padding: 8px 10px; }
  .topbar-back i { font-size: 13px; }

  .dropdown-mobile-only { display: block; }

  .dropdown-mobile-only .dropdown-item { color: var(--text); }

  .dropdown-static {
    color: var(--text-2);
    cursor: default;
    font-size: 13px;
  }

  .dropdown-static:hover { background: transparent; color: var(--text-2); }

  .dropdown-count {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 5px;
  }

  .panel-title { font-size: 13px; }

  .dropdown {
    left: auto;
    right: 0;
    min-width: min(280px, calc(100vw - 28px));
  }

  .page { padding: 20px 14px 84px; }

  .page-head h1 { font-size: 21px; }

  .card { padding: 17px; border-radius: 16px; }

  .hero h2 { font-size: 18px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .stat { padding: 13px 14px; }
  .stat-n { font-size: 21px; }

  .auth-wrap { padding: 88px 16px 100px; }

  .auth-card { padding: 26px 20px 22px; border-radius: 20px; }

  /* Napis zostaje w lewym gornym rogu, tylko zweza sie do szerokosci ekranu */
  .auth-topleft {
    right: 0;
    max-width: none;
    padding: 0 18px;
    font-size: 12.5px;
  }

  .brand-logo { width: 54px; height: 54px; }
  .brand-name { font-size: 20px; }

  /* Modale jako panel od dolu */
  .modal-backdrop { padding: 0; align-items: flex-end; }

  .modal {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    animation: sheetIn 0.32s var(--ease) both;
  }

  .modal-head { border-radius: 22px 22px 0 0; padding: 18px 18px 14px; }
  .modal-body { padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); }
  .modal-foot { padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1 1 auto; }

  /* Tabele zamienione na karty */
  .data-table thead { display: none; }

  /* Na telefonie tabela staje sie lista kart, wiec poziome przewijanie
     i wymuszona szerokosc kolumn sa zbedne - inaczej wartosci uciekaja
     poza ekran i zostaje pusta przestrzen. */
  .table-scroll { overflow-x: visible; }
  .table-scroll > .data-table { min-width: 0; }
  .data-table .col-key,
  .data-table .col-opts { width: auto; min-width: 0; }

  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }

  .data-table tr {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
  }

  .data-table td {
    border: 0;
    padding: 5px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    text-align: right;
  }

  .data-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    text-align: left;
    flex-shrink: 0;
  }

  .data-table td:empty { display: none; }

  .key-row { flex-direction: column; align-items: stretch; }
  .key-actions { justify-content: stretch; }
  .key-actions .btn { flex: 1; }

  .section-head { align-items: stretch; }
  .section-head .search-input { width: 100%; }

  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form .field { width: 100%; }
  .inline-form .btn { width: 100%; }
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
  .pill { font-size: 12px; padding: 8px 12px; }
  .profile-name { max-width: 84px; }
}

@keyframes sheetIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Karty jako lista przewijana na malych ekranach - bez tego sa za wysokie */
@media (max-height: 620px) and (max-width: 720px) {
  .modal { max-height: 96dvh; }
}

/* --- Dostepnosc -------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Na ekranach dotykowych nie zostawiamy efektu hover */
@media (hover: none) {
  .pill:hover, .btn:hover, .list-item:hover { transform: none; }
}

/* ==========================================================================
   Strony statusu: 404, blokada, ban
   Osobny uklad, nie karta logowania. Duzy znak, krotki tekst, jasne akcje.
   ========================================================================== */

.status-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px 56px;
}

.status-inner {
  width: 100%;
  max-width: 540px;
  text-align: center;
}

.status-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 26px;
  margin-bottom: 20px;
  font-size: 32px;
  color: var(--accent);
  background: radial-gradient(circle at 50% 25%, rgba(255, 59, 74, 0.26), rgba(255, 59, 74, 0.03) 72%);
  border: 1px solid var(--accent-line);
}

.status-mark-ok { color: var(--ok); background: radial-gradient(circle at 50% 25%, rgba(46,204,113,0.26), rgba(46,204,113,0.03) 72%); border-color: rgba(46,204,113,0.45); }
.status-mark-warn { color: var(--warn); background: radial-gradient(circle at 50% 25%, rgba(245,181,68,0.26), rgba(245,181,68,0.03) 72%); border-color: rgba(245,181,68,0.45); }

.status-code {
  font-size: clamp(66px, 21vw, 116px);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.055em;
  margin: 0 0 4px;
  background: linear-gradient(178deg, #ffffff 8%, #ff5a66 118%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.status-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.2px;
}

.status-text {
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto 22px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 9px 14px;
  margin-bottom: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
}

.status-chip code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.status-actions {
  display: grid;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}

.status-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 24px;
}

.status-fact {
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}

.status-fact-n { font-size: 16px; font-weight: 700; }
.status-fact-l { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* Okrag z odliczaniem. Postep rysuje conic-gradient sterowany zmienna --left. */
.status-ring {
  --left: 1;
  position: relative;
  width: 158px;
  height: 158px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    conic-gradient(var(--accent) calc(var(--left) * 360deg), rgba(255, 255, 255, 0.07) 0);
  transition: --left 1s linear;
}

.status-ring::after {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #0b0b11;
  border: 1px solid var(--border);
}

.status-ring-in {
  position: relative;
  z-index: 1;
  text-align: center;
}

.status-ring-time {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.status-ring-l { font-size: 11px; color: var(--text-3); margin-top: 2px; }

@media (max-width: 480px) {
  .status-page { padding: 24px 16px 44px; }
  .status-mark { width: 72px; height: 72px; border-radius: 22px; font-size: 27px; margin-bottom: 16px; }
  .status-title { font-size: 18px; }
  .status-ring { width: 136px; height: 136px; margin-bottom: 20px; }
  .status-ring-time { font-size: 29px; }
  .status-facts { grid-template-columns: minmax(0, 1fr); }
  .status-chip code { max-width: 170px; }
}

/* ==========================================================================
   Zwarte wiersze instancji i prosb na dashboardzie
   ========================================================================== */

.inst-list { display: flex; flex-direction: column; gap: 8px; }

.inst-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.inst-row:hover { border-color: var(--border-2); background: var(--surface-3); }

.inst-row-main { flex: 1 1 220px; min-width: 0; }

.inst-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inst-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.inst-meta code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  padding: 1px 5px;
}

.inst-meta .dot-sep { opacity: 0.45; }

.inst-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.inst-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- Edycja nazwy instancji -------------------------------------------- */

/* W trakcie edycji wiersz pokazuje WYLACZNIE pole i przyciski Zapisz /
   Anuluj. Nazwa instancji i przyciski Otwórz / Edytuj sa schowane, wiec nic
   sie nie dubluje i nie ma dwoch rzedow przyciskow. */
.inst-row.is-editing .inst-row-main,
.inst-row.is-editing .inst-side { display: none; }

.instance-edit-form { width: 100%; }

.instance-edit-form[hidden] { display: none; }

/* Pole i przyciski stoja obok siebie w jednej linii. */
.inst-edit-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.inst-edit-row .field {
  flex: 1 1 200px;
  min-width: 0;
  margin-bottom: 0;
}

/* Pole bez etykiety, wiec komunikat bledu nie moze rozciagac wiersza -
   inaczej przyciski zjezdzaja w dol wzgledem pola. */
.inst-edit-row .field-msg {
  min-height: 0;
  margin-top: 4px;
  font-size: 11.5px;
}

.inst-edit-row .btn { flex: 0 0 auto; }

@media (max-width: 620px) {
  .inst-edit-row .btn { flex: 1 1 0; justify-content: center; }
}

/* Krotki podglad prosb: 2 wiersze + przycisk "zobacz wszystkie". */
.req-preview { display: flex; flex-direction: column; gap: 8px; }

.req-row {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.req-row-main { flex: 1 1 180px; min-width: 0; }
.req-row-type { font-size: 13px; font-weight: 600; }
.req-row-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* Zacheta na poczatku dashboardu. */
.cta-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, rgba(255, 59, 74, 0.11), rgba(255, 59, 74, 0.02) 62%);
}

.cta-card-main { flex: 1 1 240px; min-width: 0; }
.cta-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.cta-card p { font-size: 12.5px; color: var(--text-3); }

@media (max-width: 620px) {
  .inst-row, .req-row { align-items: flex-start; }
  .inst-side { width: 100%; }
  .inst-actions { width: 100%; }
  .inst-actions .btn { flex: 1 1 0; justify-content: center; }
  .cta-card { flex-direction: column; align-items: stretch; text-align: center; }

  /* Bez tego flex-basis 240px z .cta-card-main dzialalo jak WYSOKOSC
     i przycisk "Stworz nowa instancje" odjezdzal daleko od naglowka. */
  .cta-card-main { flex: 0 0 auto; }

  .cta-card .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Sekcja "zanim utworzysz instancje" + nagranie
   ========================================================================== */

.imp-card {
  border: 1px solid var(--accent-line);
  background: linear-gradient(180deg, rgba(255, 59, 74, 0.07), rgba(255, 59, 74, 0.01) 40%);
}

.imp-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.imp-head i { font-size: 19px; color: var(--accent); }

.imp-head h2 { margin: 0; font-size: 16px; }

.imp-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.imp-item:first-of-type { border-top: 0; padding-top: 0; }
.imp-item:last-of-type { padding-bottom: 0; }

.imp-num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.imp-body { flex: 1 1 auto; min-width: 0; }
.imp-body strong { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.imp-body p { font-size: 12.5px; color: var(--text-3); line-height: 1.65; }

.imp-video {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-top: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #000;
}

.imp-fallback { font-size: 12px; margin-top: 8px; color: var(--text-3); }

/* Instrukcja "dodaj jako aplikacje" - dwie kolumny: iPhone i Android. */
.pwa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.pwa-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.pwa-os {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.pwa-os i { font-size: 19px; color: var(--accent); }

.pwa-list {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}

.pwa-list li { margin-bottom: 6px; }
.pwa-list li:last-child { margin-bottom: 0; }

/* Przypomnienie o warunkach pod formularzem. */
.terms-reminder {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.65;
}

.terms-reminder i { color: var(--warn); font-size: 15px; margin-top: 1px; flex: 0 0 auto; }
.terms-reminder a { font-weight: 600; }

@media (max-width: 620px) {
  .imp-item { gap: 11px; }
  .imp-video { max-width: 100%; }
  .pwa-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Wykresy (zakladka Wykresy w panelu admina)
   ========================================================================== */

.chart { width: 100%; }

.chart-plot {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
  border-bottom: 1px solid var(--border);
  /* Poziome linie siatki co 25% wysokosci */
  background-image: repeating-linear-gradient(
    to top,
    rgba(255, 255, 255, 0.06) 0 1px,
    transparent 1px 25%
  );
}

.chart-col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-bar-area {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-end;
}

.chart-stack {
  width: 100%;
  min-height: 2px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 3px 3px 0 0;
  overflow: hidden;
}

.chart-seg { display: block; width: 100%; }

.chart-col:hover .chart-stack { filter: brightness(1.25); }

.chart-label {
  display: block;
  height: 15px;
  line-height: 15px;
  font-size: 9.5px;
  color: var(--text-3);
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-3);
}

.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend-item b { color: var(--text); font-weight: 600; }
.chart-legend-max { margin-left: auto; }

.chart-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.chart-empty {
  padding: 32px 14px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.chart-empty i { display: block; font-size: 22px; margin-bottom: 8px; opacity: 0.5; }

/* --- Paski procentowe (top listy, dysk, pamiec) ------------------------- */

.meters { display: flex; flex-direction: column; gap: 11px; }

.meter-row { display: flex; flex-direction: column; gap: 5px; }

.meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
}

.meter-label {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.meter-value { color: var(--text); font-weight: 600; flex: 0 0 auto; }

.meter-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}

/* --- Serwer / VPS ------------------------------------------------------- */

.sys-rows { display: flex; flex-direction: column; gap: 13px; }

.sys-row { display: flex; flex-direction: column; gap: 6px; }

.sys-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-2);
}

/* --- Filtry dziennika zdarzen ------------------------------------------- */

.log-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.log-filters .field { flex: 1 1 180px; min-width: 0; margin-bottom: 0; }

.log-filters .btn { flex: 0 0 auto; }

/* --- Kafel z ikona (Wykresy) -------------------------------------------- */

.stat { position: relative; }

.stat-icon {
  position: absolute;
  top: 12px;
  right: 13px;
  font-size: 15px;
  opacity: 0.35;
}

@media (max-width: 720px) {
  .chart-label { font-size: 8.5px; }
  .chart-legend-max { margin-left: 0; }
  .log-filters .field { flex: 1 1 100%; }
  .log-filters .btn { flex: 1 1 auto; }
  .meter-label { font-size: 11px; }
}

/* ==========================================================================
   Strona blokady
   ========================================================================== */

/* Przyciski na stronie bana maja dluzsze napisy. Bez tego tekst sie nie
   miescil i przycisk wychodzil poza swoja kolumne, wiec nie byl wysrodkowany. */
.status-actions .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  padding: 13px 18px;
}

/* ==========================================================================
   Formularz generatora (wybor pliku)
   ========================================================================== */

.field-control input[type='file'] {
  width: 100%;
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.field-control input[type='file']:hover { border-color: var(--border-2); }

.field-control input[type='file']::file-selector-button {
  margin-right: 12px;
  padding: 7px 13px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.field-control input[type='file']::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.13);
}
