/* MNB ID light theme — tokens aligned with platform Connect cabinet (globals.css). */

:root {
  --bg: #e8ebf5;
  --card: rgba(255, 255, 255, 0.97);
  --stroke: rgba(79, 93, 212, 0.12);
  --text: #0f172a;
  --muted: #5c6578;
  --accent: #4f5dd4;
  --accent-deep: #4338ca;
  --danger: #dc2626;
  --ok: #0d9488;
  --focus: #4f46e5;
  --radius-card: 24px;
  --radius-control: 12px;
  --shadow-card: 0 32px 80px rgba(15, 23, 42, 0.14), 0 8px 24px rgba(15, 23, 42, 0.07);
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

.platform-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg);
  background-image: url("/bg-platform-light.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 20;
  border-radius: 8px;
}
.skip:focus { left: calc(8px + var(--safe-left)); top: calc(8px + var(--safe-top)); }

.auth-page-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(20px + var(--safe-top))
    calc(16px + var(--safe-right))
    calc(24px + var(--safe-bottom))
    calc(16px + var(--safe-left));
}

.auth-card.glass {
  width: min(480px, 100%);
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 36px 40px;
  backdrop-filter: blur(10px);
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.auth-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.auth-brand-text {
  min-width: 0;
  flex: 1 1 auto;
}

.auth-brand-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.auth-brand-sub {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.auth-heading {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 4.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.auth-sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.98rem;
}

.auth-note {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.meta {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.field-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.input {
  width: 100%;
  border-radius: var(--radius-control);
  border: 1px solid rgba(70, 90, 160, 0.22);
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  font-size: 1rem;
  margin-bottom: 14px;
  min-height: 44px;
}
.input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: rgba(79, 70, 229, 0.45);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  appearance: none;
  width: 100%;
  border-radius: var(--radius-control);
  padding: 11px 14px;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  border: 1px solid var(--accent-deep);
  color: #fff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.32);
}

.btn-secondary {
  background: #fff;
  border: 1px solid rgba(70, 90, 160, 0.22);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
}

.btn-danger {
  background: #fff;
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.06);
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.hint.error {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
}
/* No empty error/status chrome: zero height, no border/background/space */
.hint:empty,
.hint.error:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  min-height: 0;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 12px auto 0;
  border-radius: 50%;
  border: 3px solid rgba(79, 93, 212, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--muted); }
  .btn { transition: none; }
}

/* Mobile: card breathing room, full-width buttons */
@media (max-width: 480px) {
  .auth-card.glass {
    border-radius: 18px;
    padding: 24px 18px 22px;
  }
  .auth-brand-row {
    gap: 10px;
  }
  .auth-heading {
    font-size: 1.35rem;
  }
}

@media (min-width: 720px) {
  .actions {
    flex-direction: column;
  }
}
