:root {
  /* aliased to the shared Windowseat palette in main.css — --ink/--muted inherit from there */
  --bg: var(--sapphire);
  --bg2: var(--sapphire-2);
  --card: var(--sapphire-2);
  --ring: var(--glass-line-strong);
  --brand: var(--royal-2);
  --brand-2: var(--royal);
  --ok: #b7ffca;
  --err: #ffb4b4;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body.auth {
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  background: radial-gradient(
      120% 120% at 10% -10%,
      var(--sapphire-3) 0,
      var(--sapphire-2) 60%,
      var(--bg) 100%
    ),
    linear-gradient(180deg, var(--sapphire-2), var(--sapphire));
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

/* Card */
.panel {
  width: min(92vw, 560px);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(8px) saturate(110%);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
  animation: panelIn 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes panelIn {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 8px;
}
.panel-head h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.3px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d9e6ff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.2s;
}
.back-btn:hover {
  filter: brightness(1.1);
}
.back-btn:active {
  transform: translateY(1px);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-top: 6px;
  background: var(--sapphire-2);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
}
.tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--platinum-2);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.tab.is-active {
  background: var(--royal-deep);
  border-color: var(--royal-2);
}

/* Panes */
.pane {
  display: none;
  padding: 16px 4px 6px;
}
.pane.is-active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.98rem;
}
input {
  padding: 12px 12px;
  border: 1px solid var(--ring);
  border-radius: 12px;
  background: var(--sapphire-2);
  color: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus {
  border-color: var(--royal-2);
  box-shadow: 0 0 0 4px rgba(43, 70, 201, 0.25);
  background: var(--sapphire-3);
}

.primary {
  margin-top: 4px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--royal-2);
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.08s ease;
}
.primary:hover {
  filter: brightness(1.04);
}
.primary:active {
  transform: translateY(1px);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.hint a {
  color: #cfe0ff;
  text-decoration: none;
  font-weight: 700;
}

.msg {
  margin-top: 10px;
  min-height: 1.2em;
}
.msg.ok {
  color: var(--ok);
}
.msg.error {
  color: var(--err);
}
/* Background slideshow (reuse from main.css) */
.hero-slides {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 800ms ease-in-out;
  transform: scale(1);
  will-change: opacity, transform;
}
.hero-slide.is-active {
  opacity: 1;
  animation: kenburns 5s linear forwards;
}
@keyframes kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

/* Keep the card above the slides */
.auth-shell {
  position: relative;
  z-index: 1;
}
/* Inline field errors */
.field-error {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.25;
  white-space: pre-line; /* to show bullet list lines */
  backdrop-filter: blur(2px);
}
input.has-error {
  border-color: rgba(248, 113, 113, 0.65) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

/* Top message bar (success/error/info) */
.msg {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  font-weight: 600;
  
}
.msg.ok {
  border-color: rgba(63, 182, 224, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}
.msg.error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}
