/* dealer_login.css — standalone login page */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Tokens ── */
:root {
  --amber:        #f59e0b;
  --amber-dark:   #d97706;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --border:       #e2e8f0;
  --bg-input:     #f8fafc;
  --radius:       12px;
  --shadow:       0 20px 60px rgba(2,6,23,.18);
  --transition:   180ms ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased; }

/* ── Page ── */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0f1e 0%, #111827 60%, #0f1724 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: .18;
}
.blob--1 {
  width: 400px; height: 400px;
  background: #f59e0b;
  top: -100px; left: -80px;
}
.blob--2 {
  width: 320px; height: 320px;
  background: #3b82f6;
  bottom: -80px; right: -60px;
}

/* ── Card ── */
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
  animation: cardIn .4s cubic-bezier(.2,.9,.2,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Brand ── */
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.login-brand__name {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}

.login-brand__sub {
  font-size: .875rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Form ── */
.login-form { display: flex; flex-direction: column; gap: 14px; }

.lf-field { display: flex; flex-direction: column; gap: 5px; }

.lf-label {
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.lf-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.lf-input-wrap:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
  background: #fff;
}

.lf-icon {
  width: 17px; height: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.lf-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  color: var(--text);
  padding: 11px 0;
}

.lf-input::placeholder { color: #b0b8c4; }

.lf-input--otp {
  letter-spacing: .3em;
  font-size: 1.2rem;
  text-align: center;
}

/* Password toggle */
.lf-toggle-pw {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.lf-toggle-pw:hover { color: var(--text); background: rgba(0,0,0,.04); }

/* ── Submit button ── */
.lf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  color: #000;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(245,158,11,.3);
  margin-top: 4px;
}

.lf-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.lf-btn:active:not(:disabled) { transform: translateY(0); filter: brightness(.97); }
.lf-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; }
.lf-btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.lf-btn--ghost:hover:not(:disabled) { background: var(--bg-input); filter: none; }

/* Spinner */
.lf-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.lf-btn.loading .lf-spinner { display: block; }
.lf-btn.loading #btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Feedback ── */
.lf-feedback {
  min-height: 20px;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ef4444;
}
.lf-feedback.lf-success { color: #10b981; }
.lf-feedback:empty { display: none; }

/* ── Footer links ── */
.lf-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}
.lf-link {
  font-size: .85rem;
  color: var(--amber-dark);
  text-decoration: none;
  font-weight: 500;
}
.lf-link:hover { text-decoration: underline; }

/* ── Credit ── */
.login-credit {
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 20px;
}

/* ── Modal ── */
.lf-modal {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.lf-modal[hidden] { display: none; }

.lf-modal__box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(2,6,23,.35);
  position: relative;
  animation: cardIn .25s cubic-bezier(.2,.9,.2,1) both;
}

.lf-modal__close {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--bg-input);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 6px;
  color: var(--text-muted);
  line-height: 0;
  transition: background var(--transition), color var(--transition);
}
.lf-modal__close:hover { background: var(--border); color: var(--text); }

.lf-modal__title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.lf-modal__sub {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.lf-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ── Password rules ── */
.pw-rules {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pw-rule {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-rule::before {
  content: '✕';
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(239,68,68,.1);
  color: #ef4444;
  font-size: .7rem;
  flex-shrink: 0;
}

.pw-rule.ok {
  color: var(--text);
}

.pw-rule.ok::before {
  content: '✓';
  background: rgba(16,185,129,.12);
  color: #10b981;
}

/* ── Responsive ── */
@media (max-width: 440px) {
  .login-card { padding: 28px 20px 22px; border-radius: 16px; }
  .lf-modal__box { padding: 22px 18px 18px; }
}