/* login.css — standalone, responsive + accessible */

:root{
  color-scheme: light;

  --bg1: #f8fafc;
  --bg2: #f1f5f9;
  --bg3: #eef2ff;

  --text: #0f172a;
  --muted: #64748b;

  --border: rgba(148,163,184,0.45);
  --border-strong: rgba(148,163,184,0.55);

  --glass: rgba(255,255,255,0.92);

  --shadow-card: 0 22px 70px rgba(15,23,42,0.12);
  --shadow-brand: 0 10px 30px rgba(2,6,23,0.14);
  --shadow-btn: 0 18px 40px rgba(2,6,23,0.10);

  --radius-xl: 1.1rem;
  --radius-lg: .85rem;
  --radius-md: .75rem;

  --focus: rgba(37,99,235,0.55);
  --focus-ring: 0 0 0 3px rgba(37,99,235,0.12);

  --accent-a: #0ea5e9;
  --accent-b: #22c55e;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh; /* mobilbarát */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, var(--bg1), var(--bg2) 45%, var(--bg3) 100%);
  color: var(--text);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 1.5rem;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* iOS Safari fallback, ha a dvh nem elég stabil */
@supports (-webkit-touch-callout: none){
  body{ min-height: -webkit-fill-available; }
}

.login-shell{
  width: 100%;
  max-width: 430px;
}

.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: .7rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.brand-logo{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, var(--accent-b), var(--accent-a));
  box-shadow: var(--shadow-brand);
  flex: 0 0 auto;
}

.brand-text-main{
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .98rem;
}

.brand-text-sub{
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .18em;
  margin-top: .1rem;
}

.card{
  background: var(--glass);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 1.35rem 1.25rem 1.25rem;
  backdrop-filter: blur(6px);
}

.card-title{
  font-size: 1.15rem;
  font-weight: 1000;
  margin: 0 0 .3rem;
  text-align: center;
}

.card-subtitle{
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 1rem;
}

.alert{
  border-radius: var(--radius-lg);
  padding: .75rem .85rem;
  font-size: .9rem;
  margin-bottom: .85rem;
  white-space: pre-line;
}

.alert-error{
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.22);
  color: #7f1d1d;
}

.field-row{ margin-bottom: .85rem; }

.field-label{
  display:block;
  font-size: .85rem;
  font-weight: 900;
  margin-bottom: .35rem;
  color: #334155;
}

.field-input{
  width: 100%;
  padding: .6rem .7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: rgba(248,250,252,0.95);
  color: var(--text);
  font-size: .95rem;
  outline: none;
}

.field-input:focus{
  border-color: var(--focus);
  box-shadow: var(--focus-ring);
}

.btn-primary{
  width: 100%;
  padding: .65rem .9rem;
  border-radius: var(--radius-lg);
  border: none;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #06202a;
  font-size: .95rem;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover{ filter: brightness(0.98); }
.btn-primary:focus-visible{ outline: none; box-shadow: var(--focus-ring), var(--shadow-btn); }

.actions{
  display:flex;
  flex-direction:column;
  gap: .6rem;
  margin-top: .15rem;
}

.register-block{
  margin-top: 1rem;
  padding-top: .95rem;
  border-top: 1px solid rgba(148,163,184,0.35);
  text-align: center;
}

.register-title{
  font-weight: 1000;
  margin-bottom: .55rem;
}

.btn-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: .55rem .9rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: rgba(248,250,252,0.95);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.btn-link:hover{ background: rgba(241,245,249,0.95); }
.btn-link:focus-visible{ outline:none; box-shadow: var(--focus-ring); }

.muted{
  font-size: .85rem;
  color: var(--muted);
  margin-top: .85rem;
  text-align: center;
  line-height: 1.35;
}

.login-footer{
  margin-top: .95rem;
  font-size: .85rem;
  text-align: center;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 420px){
  body{ padding: 1rem; }
  .card{ padding: 1.1rem 1rem 1rem; }
  .brand{ margin-bottom: 1rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .btn-primary{ transition: none; }
}

