:root {
  --scope-black: #0E1420;
  --deep-pine: #141B2C;
  --panel-border: #2A3350;
  --phosphor: #C9A24B;
  --phosphor-dim: rgba(201, 162, 75, 0.14);
  --amber: #8A6D3A;
  --amber-dim: rgba(138, 109, 58, 0.16);
  --mist: #E9EDF5;
  --static: #8891A8;
  --ink: #14110B;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(ellipse 900px 700px at 50% 0%, rgba(201,162,75,0.07), transparent 60%),
    radial-gradient(ellipse 700px 600px at 85% 30%, rgba(138,109,58,0.06), transparent 55%),
    var(--scope-black);
  background-attachment: fixed;
  color: var(--mist);
  font-family: 'IBM Plex Sans', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,162,75,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,75,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ============ LUXURY COMPASS BACKGROUND (signature element) ============ */
.radar-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

.radar-rings {
  position: relative;
  width: 900px;
  height: 900px;
  max-width: 140vw;
  max-height: 140vw;
}

.ring {
  position: absolute;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.ring.r1 { width: 220px; height: 220px; border-color: rgba(201,162,75,0.18); }
.ring.r2 { width: 440px; height: 440px; }
.ring.r3 { width: 660px; height: 660px; border-style: dashed; opacity: 0.5; }
.ring.r4 { width: 880px; height: 880px; }

.crosshair-v, .crosshair-h { display: none; }

.radar-sweep {
  position: absolute;
  top: 50%; left: 50%;
  width: 620px;
  height: 620px;
  margin: -310px 0 0 -310px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--phosphor-dim), transparent 18%, transparent 82%, var(--phosphor-dim));
  animation: sweep-rotate 22s linear infinite;
  opacity: 0.85;
  mask: radial-gradient(circle, transparent 34%, black 35%, black 100%);
  -webkit-mask: radial-gradient(circle, transparent 34%, black 35%, black 100%);
}

@keyframes sweep-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Fin, zlaten prsten - kako racka na luksuzen casovnik */
.radar-stage::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--phosphor);
  border-right-color: var(--phosphor);
  opacity: 0.5;
  animation: sweep-rotate 14s linear infinite reverse;
}

.blip {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 10px 2px var(--phosphor);
  opacity: 0;
  animation: sparkle-fade 7s ease-in-out infinite;
}
.b1 { top: 38%; left: 62%; animation-delay: 0.2s; }
.b2 { top: 58%; left: 70%; animation-delay: 1.6s; background: var(--amber); box-shadow: 0 0 10px 2px var(--amber); }
.b3 { top: 68%; left: 42%; animation-delay: 3.0s; }
.b4 { top: 32%; left: 38%; animation-delay: 4.4s; }
.b5 { top: 50%; left: 55%; animation-delay: 5.2s; background: var(--amber); box-shadow: 0 0 10px 2px var(--amber); }
.b6 { top: 44%; left: 28%; animation-delay: 6.0s; }

@keyframes sparkle-fade {
  0%, 90%, 100% { opacity: 0; transform: scale(0.6); }
  6%, 12% { opacity: 1; transform: scale(1); }
}

/* ============ AUTH CARD ============ */
.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 380px;
  max-width: 100%;
  background: rgba(20, 27, 44, 0.72);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 36px 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: authCardIn 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--mist);
  margin-bottom: 6px;
}
.wordmark span { color: var(--phosphor); font-style: italic; }

.tagline {
  font-size: 13px;
  color: var(--static);
  margin: 0 0 28px;
}

form label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--static);
  margin: 16px 0 6px;
}
form label:first-of-type { margin-top: 0; }

form input {
  width: 100%;
  background: rgba(14, 20, 32, 0.75);
  border: 1px solid var(--panel-border);
  color: var(--mist);
  padding: 12px 14px;
  border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  transition: border-color 0.15s;
}
form input:focus {
  outline: none;
  border-color: var(--phosphor);
}

button[type="submit"] {
  width: 100%;
  margin-top: 24px;
  background: linear-gradient(135deg, #E8CE8B, var(--phosphor) 55%, #8A6D3A);
  color: var(--ink);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
button[type="submit"]:hover {
  box-shadow: 0 8px 28px var(--phosphor-dim), 0 4px 14px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}
button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-error {
  min-height: 18px;
  color: var(--amber);
  font-size: 13px;
  margin: 12px 0 0;
}

.switch-link {
  text-align: center;
  font-size: 13px;
  color: var(--static);
  margin-top: 24px;
}
.switch-link a {
  color: var(--phosphor);
  text-decoration: none;
}
.switch-link a:hover { text-decoration: underline; }

.forgot-link {
  text-align: right;
  margin-top: 10px;
}
.forgot-link a {
  font-size: 12px;
  color: var(--static);
  text-decoration: none;
}
.forgot-link a:hover { color: var(--phosphor); text-decoration: underline; }

.hidden { display: none; }

.auth-success {
  min-height: 18px;
  color: var(--phosphor);
  font-size: 13px;
  margin: 12px 0 0;
}

.reset-link-box {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(201, 162, 75, 0.05);
  animation: authCardIn 0.4s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.reset-link-note {
  font-size: 12px;
  color: var(--static);
  margin: 0 0 12px;
  line-height: 1.5;
}
.reset-link-row {
  display: flex;
  gap: 8px;
}
.reset-link-row input {
  flex: 1;
  min-width: 0;
  background: rgba(14, 20, 32, 0.75);
  border: 1px solid var(--panel-border);
  color: var(--mist);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
}
.reset-link-row button {
  flex-shrink: 0;
  background: linear-gradient(135deg, #E8CE8B, var(--phosphor) 55%, #8A6D3A);
  color: var(--ink);
  border: none;
  padding: 0 16px;
  border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .radar-sweep, .blip { animation: none; opacity: 0.3; }
  .auth-card { animation: none; }
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 22px; }
}
