/* panel.css – jeden arkusz stylów dla całego panelu (strona główna i podstrony) */
:root {
  --bg: #0f1419;
  --surface: #161c24;
  --surface-2: #121820;
  --line: #232c37;
  --text: #e9e7e2;
  --muted: #8793a2;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  --c: #5aa9ff; /* kolor sekcji – ustawiany w <body style> */
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Tło podstron: poświata w kolorze sekcji */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(640px circle at 6% -8%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%),
    radial-gradient(520px circle at 100% 100%, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%);
}

/* Tło strony głównej: poświata w kolorach wszystkich sekcji + kropki odsłaniane kursorem */
body.home::before {
  background:
    radial-gradient(600px circle at 8% -5%,   rgba(90, 169, 255, .13), transparent 70%),
    radial-gradient(520px circle at 95% 10%,  rgba(183, 148, 246, .11), transparent 70%),
    radial-gradient(560px circle at 85% 105%, rgba(242, 180, 90, .08), transparent 70%),
    radial-gradient(520px circle at 0% 100%,  rgba(79, 209, 160, .08), transparent 70%);
}
body.home::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .6) 1px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(280px circle at var(--gx, 50%) var(--gy, 30%), #000, transparent 70%);
          mask-image: radial-gradient(280px circle at var(--gx, 50%) var(--gy, 30%), #000, transparent 70%);
  opacity: .45;
}

main {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 6vh, 64px) 24px 48px;
  flex: 1;
}
main.narrow { width: min(620px, 100%); }
main.wide, body.home main { width: min(1040px, 100%); }
body.home main { padding-top: clamp(40px, 10vh, 112px); }

.i { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Strona główna: nagłówek ---------- */
.home-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 28px 48px;
  margin-bottom: clamp(40px, 7vh, 72px);
}
.home-head h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 8vw, 84px);
  font-weight: 200;
  letter-spacing: -.035em;
  line-height: 1;
  background: linear-gradient(100deg, #fff 0%, #c9d6e6 55%, #9aa8ba 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-head p { margin: 0; font-size: 18px; color: var(--muted); }

/* ---------- Podstrony: powrót i nagłówek ---------- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  padding: 5px 16px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color .25s, border-color .25s;
}
.back span {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  transition: transform .25s;
}
.back svg { width: 16px; height: 16px; }
.back:hover, .back:focus-visible { color: var(--text); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.back:hover span { transform: translateX(-3px); }
.back:focus-visible, .row:focus-visible, .tile:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }

.head { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.head h1 { margin: 0 0 6px; font-size: clamp(30px, 5vw, 44px); font-weight: 300; letter-spacing: -.02em; line-height: 1.1; }
.head p { margin: 0; color: var(--muted); font-size: 16px; }

.badge {
  width: 60px; height: 60px; flex: none;
  display: grid; place-items: center;
  border-radius: 17px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent);
  transition: background .3s, color .3s, box-shadow .3s;
}
.badge svg { width: 28px; height: 28px; }

/* ---------- Kafelki (strona główna, Logi) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 220px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
.tile .badge { width: 58px; height: 58px; }

/* Kolorowa krawędź u góry – kolor oznacza sekcję */
.tile::after {
  content: "";
  position: absolute; top: 0; left: 26px;
  width: 36px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--c);
  transition: width .35s cubic-bezier(.2, .8, .2, 1);
}
/* Plama światła podąża za kursorem (ustawia ją tiles.js) */
.tile::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 20%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.tile:hover, .tile:focus-visible {
  border-color: color-mix(in srgb, var(--c) 55%, var(--line));
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -24px color-mix(in srgb, var(--c) 55%, transparent);
}
.tile:hover::before, .tile:focus-visible::before { opacity: 1; }
.tile:hover::after, .tile:focus-visible::after { width: calc(100% - 52px); }
.tile:hover .badge, .tile:focus-visible .badge {
  background: var(--c); color: #0f1419;
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--c) 70%, transparent);
}

.tile .label { position: relative; margin-top: auto; padding-right: 44px; }
.tile h2 { margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tile p  { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.tile .go { position: absolute; right: 22px; bottom: 24px; }

.tile kbd {
  position: absolute; top: 22px; right: 22px;
  min-width: 26px; padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 13px; text-align: center;
  color: var(--muted);
}

/* Okrągły przycisk-strzałka */
.go {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.go svg { width: 16px; height: 16px; }
.row:hover .go, .row:focus-visible .go { transform: translateY(2px); }
.tile:hover .go, .tile:focus-visible .go { transform: translateX(3px); }
.row:hover .go, .row:focus-visible .go,
.tile:hover .go, .tile:focus-visible .go { background: var(--c); border-color: var(--c); color: #0f1419; }

/* ---------- Lista plików ---------- */
.list { display: grid; gap: 10px; }

.row {
  display: grid;
  grid-template-columns: 48px 1fr 36px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  color: inherit;
  text-decoration: none;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(min(var(--i, 0), 10) * 50ms);
}
.row:hover, .row:focus-visible {
  border-color: color-mix(in srgb, var(--c) 55%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -22px color-mix(in srgb, var(--c) 60%, transparent);
}

.ext {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}

.meta { min-width: 0; }
.name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.size { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.empty {
  padding: 56px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- Wysyłanie plików ---------- */
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.uploader { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: stretch; }

.pad, .queue {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px;
  border: 1px solid var(--line); border-radius: 26px;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  transition: border-color .25s;
}
.uploader.over .pad { border-color: var(--c); }

/* Strefa upuszczania z pierścieniem */
.padzone {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 340px; padding: 28px 16px;
  border: 2px dashed color-mix(in srgb, var(--c) 30%, var(--line)); border-radius: 20px;
  background: color-mix(in srgb, var(--c) 4%, var(--surface-2));
  text-align: center; cursor: pointer;
  transition: border-color .25s, background .25s;
}
.padzone:hover, .padzone:focus-visible, .uploader.over .padzone {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 9%, var(--surface-2));
  outline: none;
}
.uploader[data-state="uploading"] .padzone { pointer-events: none; cursor: default; }
.padzone strong { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.padzone small { max-width: 28ch; color: var(--muted); font-size: 14px; line-height: 1.5; }

.dial { position: relative; width: 172px; height: 172px; margin-bottom: 14px; transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s; }
.padzone:hover .dial, .padzone:focus-visible .dial { transform: scale(1.03); }
.uploader.over .dial { transform: scale(1.08); filter: drop-shadow(0 0 26px color-mix(in srgb, var(--c) 50%, transparent)); }
.ringsvg { display: block; width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 10; }
.uploader:not([data-state="idle"]) .ring-track { stroke-dasharray: none; }
.ring-arc {
  fill: none; stroke: url(#ringgrad); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 440; stroke-dashoffset: 440;
  transition: stroke-dashoffset .5s cubic-bezier(.2, .8, .2, 1);
}

.dial-center { position: absolute; inset: 0; display: grid; place-items: center; }
.dc { display: none; }
.uploader[data-state="idle"] .dc-idle,
.uploader[data-state="uploading"] .dc-pct,
.uploader[data-state="done"] .dc-done { display: grid; place-items: center; }
.uploader[data-state="selected"] .dc-count { display: flex; flex-direction: column; align-items: center; }
.dc-idle svg { width: 48px; height: 48px; color: var(--c); }
.dc-count b { font-size: 46px; font-weight: 300; line-height: 1; letter-spacing: -.03em; }
.dc-count small { margin-top: 4px; color: var(--muted); font-size: 14px; }
.dc-pct { font-size: 36px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dc-done svg { width: 54px; height: 54px; color: #4fd1a0; }

.pad .btn { height: 48px; font-size: 15px; }
.uploader[data-state="uploading"] #pick-btn { display: none; }
.hint-paste { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
@media (hover: none) { .hint-paste { display: none; } }

/* Kolejka */
.queue-head { display: flex; align-items: center; gap: 10px; }
.queue-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.chip {
  padding: 3px 10px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.qtotal { margin-left: auto; color: var(--muted); font-size: 14px; }

.qempty {
  flex: 1; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 220px; padding: 32px 16px;
  border: 1px dashed var(--line); border-radius: 18px;
  color: var(--muted); text-align: center;
}
.qempty strong { color: var(--text); font-weight: 600; }
.qempty small { font-size: 14px; }
.qicon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 6px; border-radius: 14px; background: var(--surface); color: var(--muted); }
.qicon svg { width: 22px; height: 22px; }
.uploader[data-state="idle"] .qempty { display: flex; }

/* Lista plików */
.flist { display: grid; flex: 1; align-content: start; gap: 8px; max-height: 420px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.uploader[data-state="idle"] .flist { display: none; }

.frow {
  position: relative;
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color .25s;
}
.frow .ext { width: 44px; height: 44px; font-size: 11px; }
.frow .size { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .size a { color: inherit; }
.frow.ok  { border-color: rgba(79, 209, 160, .35); }
.frow.ok .size { color: #4fd1a0; }
.frow.err { border-color: rgba(239, 107, 107, .4); }
.frow.err .size { color: #ef8a8a; white-space: normal; }
.fstat { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.fbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.fbar span { display: block; width: 0; height: 100%; background: var(--c); transition: width .2s; }

.remove {
  flex: none; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 50%;
  background: none; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: color .25s, border-color .25s;
}
.remove:hover, .remove:focus-visible { color: #ef6b6b; border-color: #ef6b6b; }
.rm { display: none; }
.uploader[data-state="selected"] .rm { display: block; }

/* Akcje kolejki zależne od etapu */
.qactions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; }
.qactions .btn { display: none; }
.uploader[data-state="selected"] #clear-btn,
.uploader[data-state="selected"] #submit-btn,
.uploader[data-state="done"] #copy-all-btn,
.uploader[data-state="done"] #retry-btn { display: block; }
.uploader[data-state="done"] .qactions { grid-template-columns: 1fr; }
.qactions:not(:has(.btn:not([hidden]))) { display: none; }

@media (max-width: 860px) {
  .uploader { grid-template-columns: 1fr; }
  .padzone { min-height: 290px; }
  .qempty { min-height: 160px; }
}

/* Przyciski akcji przy wysłanym pliku: ikona, po najechaniu rozwija się z opisem */
.acts { display: flex; gap: 6px; }
.act {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 99px;
  background: none; color: var(--muted);
  font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer;
  transition: color .25s, border-color .25s, background .25s, padding .3s cubic-bezier(.2, .8, .2, 1);
}
.act svg { width: 18px; height: 18px; flex: none; }
.act span {
  max-width: 0; margin-left: 0; opacity: 0; overflow: hidden;
  transition: max-width .3s cubic-bezier(.2, .8, .2, 1), margin .3s cubic-bezier(.2, .8, .2, 1), opacity .2s;
}
.act:hover, .act:focus-visible, .act.show {
  padding-right: 14px;
  color: var(--text); border-color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  outline: none;
}
.act:hover span, .act:focus-visible span, .act.show span { max-width: 130px; margin-left: 8px; opacity: 1; }
.act.ok  { color: #4fd1a0; border-color: #4fd1a0; background: rgba(79, 209, 160, .1); }
.act.bad { color: #ef8a8a; border-color: #ef6b6b; background: rgba(239, 107, 107, .1); }
.act:active { transform: scale(.96); }

/* Przyciski */
.btn {
  width: 100%; height: 52px;
  border: 1px solid transparent; border-radius: 14px;
  background: var(--c); color: #0f1419;
  font: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: filter .2s, transform .2s, border-color .2s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.99); }
.btn.ghost { background: none; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--c); filter: none; }
.btn:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }

/* Komunikaty */
.message {
  padding: 14px 16px;
  border: 1px solid transparent; border-radius: 14px;
  font-size: 15px; line-height: 1.5; overflow-wrap: anywhere;
}
.message.success { color: #4fd1a0; background: rgba(79, 209, 160, .1); border-color: rgba(79, 209, 160, .3); }
.message.error   { color: #ef8a8a; background: rgba(239, 107, 107, .1); border-color: rgba(239, 107, 107, .3); }
#message-container:empty { display: none; }

/* ---------- Stopka ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(22, 28, 36, .6), transparent);
}

@media (hover: none) { .tile kbd { display: none; } }

@media (max-width: 520px) {
  .head { gap: 14px; }
  .head .badge { width: 52px; height: 52px; }
  .pad, .queue { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .tile:hover, .tile:focus-visible, .row:hover, .row:focus-visible { transform: none; }
}

/* ---------- Logowanie, pasek użytkownika, zablokowane kafelki ---------- */
.badge { position: relative; }

.lock {
  position: absolute; right: -7px; bottom: -7px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--bg); color: var(--muted);
}
.lock svg { width: 12px; height: 12px; }

.topbar {
  position: absolute; top: 16px; right: 20px; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  margin: 0;
}
.topbar .who { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.topbar svg { width: 16px; height: 16px; }
.out {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--muted);
  font: inherit; font-size: 14px; cursor: pointer;
  transition: color .25s, border-color .25s;
}
.out:hover, .out:focus-visible { color: #ef8a8a; border-color: #ef6b6b; outline: none; }

body.auth main { display: grid; place-items: center; width: min(1040px, 100%); }

.login {
  width: min(420px, 100%);
  padding: 36px 32px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
  text-align: center;
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards;
}
/* Pierścień w kolorach wszystkich sekcji wokół kłódki */
.ring {
  width: 84px; height: 84px; margin: 0 auto 22px; padding: 2px;
  border-radius: 26px;
  background: conic-gradient(from 210deg, #5aa9ff, #4fd1a0, #f2b45a, #b794f6, #5aa9ff);
}
.ring .badge { width: 100%; height: 100%; border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: none; }
.ring svg { width: 34px; height: 34px; }

.login h1 { margin: 0 0 6px; font-size: 30px; font-weight: 300; letter-spacing: -.02em; }
.login .sub { margin: 0 0 26px; color: var(--muted); }
.login .message { margin-bottom: 18px; text-align: left; }

.loginform { display: grid; gap: 12px; text-align: left; }

.field { position: relative; display: block; }
.field input {
  width: 100%; height: 54px; padding: 0 50px 0 48px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--muted); }
.field input:focus { outline: none; border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 16%, transparent); }
.field .fi {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  display: grid; color: var(--muted); pointer-events: none; transition: color .2s;
}
.field:focus-within .fi { color: var(--c); }
.fi svg { width: 20px; height: 20px; }

.eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer;
}
.eye:hover, .eye:focus-visible { color: var(--text); }
.eye svg { width: 20px; height: 20px; }
.eye .off, .eye.shown .on { display: none; }
.eye.shown .off { display: grid; }
.eye .on { display: grid; }

.hint { color: #f2b45a; font-size: 14px; }
.hint[hidden] { display: none; }

.loginform .btn { margin-top: 6px; }
.plain {
  display: inline-block; margin-top: 22px;
  color: var(--muted); font-size: 14px; text-decoration: none;
  transition: color .2s;
}
.plain:hover, .plain:focus-visible { color: var(--text); }

.ext svg { width: 22px; height: 22px; }

@media (max-width: 520px) {
  .login { padding: 28px 20px 22px; }
  .topbar .who { display: none; }
}

.hashbox {
  width: 100%; margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--text);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: none; word-break: break-all;
}
.login code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-size: .9em; }

/* Miejsce na dysku (strona główna, tylko po zalogowaniu) */
.disk {
  min-width: 220px;
  font-size: 14px;
  color: var(--muted);
}
.disk strong { color: var(--text); }
.disk-bar {
  height: 6px;
  margin: 8px 0;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.disk-bar span {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: #5aa9ff;
  animation: fill 1s cubic-bezier(.2, .8, .2, 1) backwards;
}
.disk.warn .disk-bar span { background: #f2b45a; }
.disk.crit .disk-bar span { background: #ef6b6b; }
@keyframes fill { from { width: 0; } }

/* Stały pasek u góry: logowanie / wylogowanie */
.topbar {
  position: fixed; top: 14px; right: 18px; gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: 99px;
  background: rgba(22, 28, 36, .78);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.topbar .who { padding: 0 8px 0 12px; }
.topbar .out { border: 0; background: none; text-decoration: none; }
.topbar .out:hover, .topbar .out:focus-visible { background: rgba(255, 255, 255, .06); }
.topbar .out.in { color: var(--text); }
.topbar .out.in svg { color: var(--c); }
.topbar .out.in:hover, .topbar .out.in:focus-visible { color: var(--text); border-color: transparent; }
main { padding-top: clamp(72px, 9vh, 88px); }
body.home main { padding-top: clamp(80px, 10vh, 112px); }

/* Wiersz pliku: otwarcie w nowej karcie (lewa część) + przyciski akcji (prawa część) */
.row.file { grid-template-columns: 1fr auto; padding-right: 12px; }
.rowmain {
  display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 16px;
  min-width: 0;
  color: inherit; text-decoration: none;
  border-radius: 12px;
}
.rowmain:focus-visible { outline: 2px solid var(--c); outline-offset: 4px; }
a.act { text-decoration: none; }

/* Zakończenie wysyłania: ptaszek rysuje się sam, a wokół pierścienia przebiega jednorazowa fala */
.dc-done path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.uploader[data-state="done"] .dc-done path { animation: draw .6s cubic-bezier(.2, .8, .2, 1) .15s backwards; }
@keyframes draw { from { stroke-dashoffset: 1; } }

.dial::after {
  content: ""; position: absolute; inset: 0;
  border: 2px solid #4fd1a0; border-radius: 50%;
  opacity: 0; pointer-events: none;
}
.uploader[data-state="done"][data-result="ok"] .dial::after { animation: ripple 1s ease-out .1s; }
@keyframes ripple { from { opacity: .75; transform: scale(.82); } to { opacity: 0; transform: scale(1.4); } }

.uploader[data-result="partial"] .dc-done svg { color: #f2b45a; }

/* Po wysłaniu strefa jest kartą wyniku (nie przyciskiem); nowe pliki dodaje przycisk „Wyślij kolejne pliki” */
.uploader[data-state="done"] .padzone {
  pointer-events: none; cursor: default;
  border-style: solid;
  border-color: color-mix(in srgb, #4fd1a0 35%, var(--line));
  background: color-mix(in srgb, #4fd1a0 5%, var(--surface-2));
}
.uploader[data-state="done"][data-result="partial"] .padzone {
  border-color: color-mix(in srgb, #f2b45a 40%, var(--line));
  background: color-mix(in srgb, #f2b45a 5%, var(--surface-2));
}
.uploader[data-state="uploading"] .hint-paste,
.uploader[data-state="done"] .hint-paste { display: none; }

.hint-paste a { color: var(--c); }
