/* =====================================================================
   screens.css - male, samodzielne ekrany nowego panelu, ktore nie ladujo
   Tailwinda: "musisz sie zalogowac" (body.ng-login) oraz "serwer
   niedostepny" (body.ng-blocked).
   ===================================================================== */

:root {
  --clr-primary: hsl(24, 100%, 54%);
  --clr-secondary: hsl(249, 36%, 21%);
  --clr-s400: hsl(259, 100%, 79%);
  --clr-hl: hsla(259, 100%, 79%, 0.1);
  /* Napisy na pomaranczu/lawendzie - biel dawala tam ~2.7:1 (ponizej WCAG AA). */
  --clr-on-primary: hsl(243, 40%, 11%);
}

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 5vw; background: var(--clr-secondary); color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  background-image: radial-gradient(circle at top, hsla(24, 100%, 54%, 0.28), transparent 60%);
}

.card {
  max-width: 34rem; width: 100%; background: var(--clr-hl); border: 2px solid var(--clr-hl);
  border-radius: 1rem; padding: 2.5rem; text-align: center;
}
.ng-blocked .card { max-width: 36rem; }

.deco {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700; text-transform: uppercase;
  letter-spacing: 4px; color: var(--clr-primary); font-size: .75rem; margin: 0 0 .75rem;
}

h1 { font-size: 1.75rem; line-height: 1.333; margin: 0 0 .75rem; }
.ng-blocked h1 { font-size: 1.5rem; }

p { opacity: .86; line-height: 1.6; margin: 0 0 1.75rem; }
.ng-blocked p { margin: 0 0 1.5rem; }

.ico { font-size: 2.5rem; color: var(--clr-primary); display: block; margin-bottom: .5rem; }

a.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: 1rem 1.75rem;
  border-radius: .75rem; background: var(--clr-primary); color: var(--clr-on-primary);
  text-decoration: none; font-weight: 600;
  transition: transform .15s ease-out, background .2s ease;
}
a.btn:hover { transform: translateY(-3px) scale(.95); background: var(--clr-s400); }

.ng-blocked a {
  display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.25rem;
  border-radius: .75rem; background: var(--clr-hl); color: #fff;
  text-decoration: none; margin: .25rem;
}
.ng-blocked a.primary { background: var(--clr-primary); color: var(--clr-on-primary); font-weight: 600; }

/* ---------------------------------------------------------------------
   Formularz logowania (body.ng-login > main.card)
   --------------------------------------------------------------------- */

/* Na duzych ekranach karta ma zajmowac polowe szerokosci okna; ponizej ~64rem
   50vw robi sie ciasne, wiec wracamy do pelnej szerokosci kontenera. */
.ng-login .card { width: 50vw; max-width: none; padding: 3rem; }
@media (max-width: 64rem) {
  .ng-login .card { width: 100%; max-width: 34rem; padding: 2.5rem; }
}

.ng-login .lead { font-size: .9375rem; margin-bottom: 1.5rem; }

.login-form { text-align: left; }

.login-form label {
  display: block; font-family: 'IBM Plex Mono', monospace; font-size: .625rem;
  text-transform: uppercase; letter-spacing: 2px; color: var(--clr-primary);
  margin-bottom: .5rem;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%; padding: .8125rem 1rem; margin-bottom: 1rem;
  border: 2px solid var(--clr-hl); border-radius: .75rem;
  background: hsla(249, 36%, 12%, .6); color: #fff;
  font-family: inherit; font-size: 1rem;
  transition: border-color .2s ease;
}
.login-form input::placeholder { color: hsla(0, 0%, 100%, .35); }
.login-form input:focus { outline: none; border-color: var(--clr-primary); }

.pass-row[hidden] { display: none; }

.login-form .btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .9375rem 1.25rem; margin-top: .25rem;
  border: none; border-radius: .75rem; background: var(--clr-primary); color: var(--clr-on-primary);
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: transform .15s ease-out, background .2s ease;
}
.login-form .btn:hover { transform: translateY(-3px) scale(.97); background: var(--clr-s400); }
.login-form .btn:disabled { opacity: .6; cursor: progress; transform: none; }

.switch { margin: 1rem 0 0; font-size: .875rem; }
.switch a { color: var(--clr-s400); text-decoration: underline dashed; text-underline-offset: 3px; }

.alert {
  display: flex; align-items: flex-start; gap: .625rem; text-align: left;
  padding: .875rem 1rem; margin: 0 0 1.25rem; border-radius: .75rem;
  font-size: .875rem; line-height: 1.5; opacity: 1;
}
.alert .mdi { font-size: 1.125rem; line-height: 1.4; }
.alert.ok  { background: hsla(152, 60%, 45%, .14); border: 1px solid hsla(152, 60%, 55%, .45); }
.alert.err { background: hsla(24, 100%, 54%, .16); border: 1px solid hsla(24, 100%, 54%, .5); }
.alert a { color: var(--clr-s400); }

.sep {
  display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 1rem;
  font-size: .75rem; text-transform: uppercase; letter-spacing: 2px; opacity: .5;
}
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: var(--clr-hl); }

.oauth-row {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
}
.google { display: inline-block; line-height: 0; }
.google img { max-width: 15rem; width: 100%; }
.oauth-github {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  width: 15rem; max-width: 100%; padding: .7rem 1rem;
  background: #fff; color: #1f1f1f;
  border-radius: .25rem; text-decoration: none;
  font-weight: 500; font-size: .875rem; line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.oauth-github:hover { background: #f2f2f2; }
.oauth-github svg { flex-shrink: 0; }

.foot { margin: 1.75rem 0 0; font-size: .75rem; opacity: .6; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
