/* ─────────────────────────────────────────
   MotorVault — login.css
   Place at: static/css/login.css
   ───────────────────────────────────────── */

/* ── RESET & TOKENS ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #0d0d0d;
  --bg-2:         #141414;
  --surface:      #1a1a1a;
  --border:       rgba(255, 255, 255, 0.08);
  --border-focus: rgba(232, 200, 74, 0.55);
  --text:         #f0ede8;
  --text-muted:   #6e6b66;
  --accent:       #e8c84a;
  --accent-dim:   rgba(232, 200, 74, 0.10);
  --danger:       #e05252;
  --danger-dim:   rgba(224, 82, 82, 0.12);
  --success:      #52c17a;
  --success-dim:  rgba(82, 193, 122, 0.12);
  --warning:      #e8a84a;
  --radius:       10px;
  --font-disp:    'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --ease:         cubic-bezier(.4, 0, .2, 1);
}

html { height: 100%; }

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─────────────── LEFT PANEL ─────────────── */

.panel-left {
  position: sticky;
  top: 0;
  height: 100svh;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  overflow: hidden;
}

.panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.panel-left::after {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 200, 74, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.logo {
  font-family: var(--font-disp);
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  color: var(--text);
  position: relative;
}

.logo span { color: var(--accent); }

.panel-left__center { position: relative; }

.panel-tag {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(232, 200, 74, 0.2);
  margin-bottom: 1.25rem;
}

.panel-headline {
  font-family: var(--font-disp);
  font-size: clamp(2.6rem, 3.5vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}

.panel-headline em {
  font-style: normal;
  color: var(--accent);
}

.panel-sub {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.75;
  max-width: 300px;
}

.perks {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.perk {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 13px;
  color: var(--text-muted);
}

.perk__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ─────────────── RIGHT PANEL ─────────────── */

.panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  min-height: 100svh;
}

.form-wrap {
  width: 100%;
  max-width: 400px;
  animation: fadeUp 0.6s var(--ease) both;
}

/* ─────────────── HEADING ─────────────── */

.form-heading {
  margin-bottom: 2.25rem;
}

.form-heading h1 {
  font-family: var(--font-disp);
  font-size: 2.8rem;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.form-heading p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.form-heading a {
  color: var(--accent);
  font-weight: 500;
}

.form-heading a:hover { text-decoration: underline; }

/* ─────────────── FORM ─────────────── */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  animation: fadeUp 0.5s var(--ease) both;
}

.field:nth-child(1) { animation-delay: 0.05s; }
.field:nth-child(2) { animation-delay: 0.12s; }

.field label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Label row with forgot password link */
.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forgot-link {
  font-size: 12px;
  color: var(--accent);
  transition: opacity 0.2s;
}

.forgot-link:hover { opacity: 0.75; text-decoration: underline; }

/* ─────────────── INPUT ─────────────── */

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s var(--ease);
}

.input-wrap:focus-within .input-icon {
  color: var(--accent);
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  outline: none;
  transition:
    border-color 0.2s var(--ease),
    box-shadow   0.2s var(--ease),
    background   0.2s;
  -webkit-appearance: none;
}

.login-form input::placeholder { color: var(--text-muted); }

.login-form input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(232, 200, 74, 0.08);
  background: #1e1e1e;
}

/* Password toggle */
.pw-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
}

.pw-toggle:hover { color: var(--text); }

/* ─────────────── REMEMBER ME ─────────────── */

.remember-row {
  animation: fadeUp 0.5s 0.18s var(--ease) both;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  border: 2px solid #0d0d0d;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

/* ─────────────── SUBMIT BUTTON ─────────────── */

.btn-submit {
  margin-top: 0.25rem;
  padding: 0.85rem;
  background: var(--accent);
  color: #0d0d0d;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  transition:
    background  0.2s,
    transform   0.15s,
    box-shadow  0.2s;
  animation: fadeUp 0.5s 0.24s var(--ease) both;
}

.btn-submit:hover {
  background: #f5d76a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(232, 200, 74, 0.2);
}

.btn-submit:active { transform: translateY(0); }

/* ─────────────── TERMS ─────────────── */

.terms {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  animation: fadeUp 0.5s 0.3s var(--ease) both;
}

.terms a {
  color: var(--accent);
}

.terms a:hover { text-decoration: underline; }

/* ─────────────── DJANGO MESSAGES ─────────────── */

.messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.message {
  font-size: 13px;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--danger);
  background: var(--danger-dim);
  color: var(--text);
  animation: fadeUp 0.3s var(--ease) both;
}

.message--success {
  border-color: var(--success);
  background: var(--success-dim);
}

.message--warning {
  border-color: var(--warning);
  background: rgba(232, 168, 74, 0.12);
}

/* ─────────────── ANIMATIONS ─────────────── */

/* @keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
} */

/* ─────────────── RESPONSIVE ─────────────── */

@media (max-width: 768px) {
  body {
    grid-template-columns: 1fr;
  }

  .panel-left {
    display: none;
  }

  .panel-right {
    padding: 4rem 1.5rem 2.5rem;
    align-items: flex-start;
  }
}