/* Kolorystyka CTU jak w CTU Kasa: zieleń #026f3f (ciemna #014d2e, jasna #0a8a50), limonka #99ca33. */
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; font: 17px/1.45 Arial, Helvetica, sans-serif; color: #1e293b; background: #f5f7f5; }

/* Tło: animowana sieć na całe okno, pod treścią */
#tlo { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

/* Lewy panel — zielony, z białym logo */
.panel-lewy { position: relative; z-index: 1; width: 34%; max-width: 480px; background: #014d2e; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 40px 32px; }
.logo-biale { width: 160px; height: auto; filter: brightness(0) invert(1); }
.kreska { width: 40px; height: 2px; background: rgba(255,255,255,.25); border-radius: 2px; }
.nazwa-aplikacji { color: #fff; font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.podpis { color: rgba(255,255,255,.65); font-size: 14px; text-align: center; letter-spacing: .03em; line-height: 1.6; max-width: 240px; }

/* Prawa strona — karta na animowanym tle */
.panel-prawy { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.karta { width: 100%; max-width: 600px; background: #fff; border-radius: 14px; border-top: 4px solid #99ca33; box-shadow: 0 4px 32px rgba(0,0,0,.10); padding: 28px 28px 18px; }
.karta-logo { display: flex; justify-content: center; margin-bottom: 8px; }
.karta-logo img { height: 64px; width: auto; }
h1 { text-align: center; font-size: 26px; color: #026f3f; margin: 0 0 20px; }
h2 { font-size: 19px; color: #1e293b; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.numer { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #026f3f; color: #fff; font-size: 17px; }
.krok, .gotowe { border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; margin-bottom: 14px; background: #fbfcfb; }
.gotowe { border-color: #99ca33; background: #f4f9e8; }

/* Krok 1 — strefa upuszczania */
#strefa { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 16px; text-align: center; border: 3px dashed #9fc3ae; border-radius: 10px; cursor: pointer; background: #f6faf7; }
#strefa:hover, #strefa:focus-within, #strefa.nad { border-color: #026f3f; background: #e7f3ec; }
.ukryty { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.nazwa-pliku { margin: 12px 0 0; font-weight: 700; color: #026f3f; word-break: break-all; }
.nazwa-pliku:empty { display: none; }

/* Przyciski */
.przycisk, button { font: inherit; font-size: 18px; font-weight: 700; padding: 12px 20px; border-radius: 7px; border: 2px solid #026f3f; background: #fff; color: #026f3f; cursor: pointer; letter-spacing: .02em; transition: background .15s, color .15s, border-color .15s; }
.przycisk { display: inline-block; }
.przycisk:hover, button.drugi:hover:not(:disabled) { background: #e7f3ec; }
button.glowny { width: 100%; background: #026f3f; color: #fff; font-size: 19px; padding: 14px 20px; }
button.glowny:hover:not(:disabled) { background: #0a8a50; border-color: #0a8a50; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, .przycisk:focus-visible, #strefa:focus-within .przycisk { outline: 3px solid #99ca33; outline-offset: 2px; }

/* Krok 2 — hasło */
#haslo { width: 100%; font: 700 26px/1.2 Consolas, "Courier New", monospace; letter-spacing: .04em; padding: 12px; color: #1e293b; border: 1px solid #cbd5e1; border-radius: 7px; text-align: center; outline: none; transition: border-color .15s, box-shadow .15s; }
#haslo:focus { border-color: #026f3f; box-shadow: 0 0 0 3px rgba(2,111,63,.12); }
#haslo[readonly] { background: #f1f5f2; }
.rzad { display: flex; gap: 12px; margin-top: 12px; }
.rzad button { flex: 1; }

/* Komunikaty */
.komunikat { margin: 12px 0 0; padding: 10px 12px; border-radius: 6px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.gotowe p { margin-top: 0; }

footer { margin-top: 4px; padding-top: 12px; border-top: 1px solid #e2e8f0; font-size: 13px; color: #64748b; text-align: center; }
footer p { margin: 3px 0; }

/* Niskie ekrany (laptop 1366×768): ciaśniej, żeby trzy kroki mieściły się bez przewijania */
@media (max-height: 820px) {
  .panel-prawy { padding: 14px 24px; }
  .karta { padding: 16px 24px 10px; }
  .karta-logo img { height: 44px; }
  h1 { font-size: 22px; margin-bottom: 10px; }
  h2 { margin-bottom: 8px; }
  .krok, .gotowe { padding: 10px 14px; margin-bottom: 10px; }
  #strefa { padding: 12px 16px; gap: 8px; }
  #haslo { padding: 8px; font-size: 24px; }
  .rzad { margin-top: 8px; }
  .przycisk, button { padding: 9px 18px; }
  button.glowny { padding: 11px 20px; }
  footer { padding-top: 8px; }
}

/* Węższe ekrany: zielony pas u góry zamiast lewego panelu */
@media (max-width: 900px) {
  body { flex-direction: column; }
  .panel-lewy { width: 100%; max-width: none; flex-direction: row; padding: 18px 24px; gap: 16px; }
  .logo-biale { width: 64px; }
  .nazwa-aplikacji { font-size: 19px; }
  .kreska, .podpis { display: none; }
  .panel-prawy { padding: 20px 12px; align-items: flex-start; }
  .karta { padding: 20px 16px 14px; }
}
