:root{
  --bg:#0f1320; --surface:#14192a; --surface-2:#1b2238;
  --text:#e7e9f1; --muted:#9aa3b2; --primary:#ff6c2f;
  --border:#262e49; --danger:#ff6b6b;

  --shadow-sm: 0 6px 16px rgba(16,24,40,.20);
  --shadow-lg: 0 10px 28px rgba(16,24,40,.22);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
html{-webkit-text-size-adjust:100%}

body{
  margin:0; background:var(--bg); color:var(--text);
  font: 14px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  min-height: 100svh; display:grid; place-items:center;
  padding: 16px;
  padding-left:max(env(safe-area-inset-left),16px);
  padding-right:max(env(safe-area-inset-right),16px);
  padding-top:max(env(safe-area-inset-top),16px);
  padding-bottom:max(env(safe-area-inset-bottom),16px);
}

/* kartica skaluje med telefoni/tablicami/desktopi */
.login-container{
  width: clamp(320px, 92vw, 560px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 5vw, 28px);
}

.brand{
  display:flex; align-items:center; gap: 12px; margin-bottom: 10px;
}
.brand img{
  width: clamp(40px, 10vw, 56px);
  height: clamp(40px, 10vw, 56px);
  border-radius: 12px;
}
.brand h2{ margin:0; font-size: clamp(18px, 4.2vw, 20px); }

h3{
  margin: 6px 0 18px;
  font-size: clamp(20px, 5.2vw, 24px);
  font-weight: 800;
}

/* polja */
label{
  display:block; margin: 10px 0 6px;
  color: var(--muted); font-size: 13px;
}

input{
  width:100%; padding: clamp(12px, 3.6vw, 14px) clamp(14px, 4vw, 16px);
  min-height: 48px; border-radius: 14px;
  border:1px solid var(--border); background:var(--surface-2); color:var(--text);
  font-size: 16px; /* ≥16px -> iOS ne zooma */
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus{
  border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 28%, transparent);
}

/* password + toggle */
.pwd-row{ display:flex; gap:10px; align-items:center; }
.pwd-row input{ flex:1 }
.ghost{
  min-height: 48px; padding: 0 14px;
  border:1px solid var(--border); border-radius:12px;
  background:transparent; color:var(--text); cursor:pointer; font-size:16px;
}

/* submit */
button[type="submit"]{
  width:100%; margin-top: 16px; padding: clamp(12px, 3.8vw, 16px);
  min-height: 52px; border:none; cursor:pointer;
  border-radius: 16px; background:var(--primary); color:#fff; font-weight:800; font-size:16px;
  box-shadow: 0 8px 22px rgba(255,108,47,.28);
  transition: transform .08s ease, filter .12s ease;
}
button[type="submit"]:active{ transform: translateY(1px); }
button[disabled]{ opacity:.6; cursor:not-allowed }

/* error */
.error{
  display:none; margin-top: 12px; color:#fff; background:var(--danger);
  padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow-sm);
}

/* nizki viewports (landscape/odprta tipkovnica) */
@media (max-height: 600px){
  body{ place-items: start center; padding-top: 12px; }
  .login-container{ margin-top: 12px; padding: 16px; }
}

/* brez animacij, če user ne želi */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}