/* ═══════════════════════════════════════════════════
   Vintage Garbage — Auth Pages Styles
   Dark premium design with glassmorphism
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: #0a0a0f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(138, 92, 246, 0.6);
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #8a5cf6;
  --accent-hover: #7c3ced;
  --accent-glow: rgba(138, 92, 246, 0.3);
  --accent-2: #06b6d4;
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Background glow effects ──────────────────────── */

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: float 8s ease-in-out infinite;
}

.auth-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #8a5cf6, transparent);
  top: -100px;
  left: -100px;
}

.auth-glow-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #06b6d4, transparent);
  bottom: -100px;
  right: -100px;
  animation-delay: -4s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -20px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* ── Global Header ────────────────────────────────── */

.global-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  font-size: 1.4rem;
}

.header-actions .header-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-actions .header-link:hover {
  color: var(--text);
}

.brand-text {
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Auth Container ───────────────────────────────── */

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 100px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.back-home {
  align-self: flex-start;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.back-home:hover {
  color: var(--accent);
}

/* ── Role Selector ────────────────────────────────── */

.role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.role-option {
  cursor: pointer;
  position: relative;
}

.role-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.role-option input:checked+.role-card {
  border-color: var(--accent);
  background: rgba(138, 92, 246, 0.1);
  box-shadow: 0 0 15px var(--accent-glow);
}

.role-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.role-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── Card ─────────────────────────────────────────── */

.auth-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 80px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s ease both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ── Error ────────────────────────────────────────── */

.auth-error {
  background: var(--error-bg);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  color: var(--error);
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-bottom: 20px;
  animation: shake 0.3s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

/* ── Form ─────────────────────────────────────────── */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-group label .optional {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  font-size: 0.75rem;
}

.form-group input,
.form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--border-focus);
  background: rgba(138, 92, 246, 0.06);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Password toggle ──────────────────────────────── */

.input-with-toggle {
  position: relative;
}

.input-with-toggle input {
  padding-right: 42px;
}

.toggle-pwd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 4px;
}

.toggle-pwd:hover {
  opacity: 1;
}

/* ── Submit button ────────────────────────────────── */

.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px;
  margin-top: 8px;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.auth-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.auth-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Spinner ──────────────────────────────────────── */

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Switch link ──────────────────────────────────── */

.auth-switch {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 20px;
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-switch a:hover {
  color: var(--accent-2);
}

/* ── Responsive ───────────────────────────────────── */

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