/*
 * auth.css — Shared stylesheet for all LinkUpHai auth pages
 * Covers: vendor login, vendor register, customer login,
 *         customer register, staff login
 */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1a2e4a 55%, #0d1f35 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  -webkit-font-smoothing: antialiased;
}

/* ── TOKENS ───────────────────────────────────────────────── */
:root {
  --green:    #10b981;
  --green-dk: #059669;
  --green-lt: #ecfdf5;
  --blue:     #1A6BFF;
  --blue-lt:  #EEF4FF;
  --orange:   #f97316;
  --purple:   #8b5cf6;
  --red:      #ef4444;
  --dark:     #0f172a;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --radius:   16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow:   0 24px 64px rgba(0,0,0,.45);
  --shadow-sm:0 4px 16px rgba(0,0,0,.12);
}

/* ── HOME BUTTON (top-left corner) ───────────────────────── */
.home-btn {
  position: fixed;
  top: 1rem; left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  color: rgba(255,255,255,.65);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  padding: .35rem .85rem;
  text-decoration: none;
  transition: all .18s;
  z-index: 100;
  backdrop-filter: blur(6px);
}
.home-btn:hover {
  background: rgba(255,255,255,.16);
  color: #fff;
}

/* ── AUTH CARD ────────────────────────────────────────────── */
.auth-card {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: cardIn .35s cubic-bezier(.22,1,.36,1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── HERO BAND (coloured top section) ─────────────────────── */
.auth-hero {
  padding: 2rem 1.75rem 1.5rem;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* decorative blobs */
.auth-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.auth-hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -30px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

/* logo wrapper */
.auth-logo {
  display: inline-block;
  background: #fff;
  border-radius: 12px;
  padding: 5px 14px;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.auth-logo img {
  height: 48px;
  display: block;
  object-fit: contain;
}

/* page title */
.auth-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: .3rem;
  position: relative;
  z-index: 1;
  letter-spacing: -.01em;
}
.auth-sub {
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

/* role chips row */
.auth-chips {
  display: flex;
  gap: .35rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: .875rem;
  position: relative;
  z-index: 1;
}
.auth-chip {
  font-size: .6rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(4px);
}

/* ── BODY ─────────────────────────────────────────────────── */
.auth-body {
  padding: 1.75rem;
}

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.auth-group {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: .875rem;
}
.auth-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--gray-700);
  letter-spacing: .02em;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .9rem;
  color: var(--gray-400);
  pointer-events: none;
}
.auth-input {
  width: 100%;
  padding: .7rem .875rem .7rem 2.4rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xs);
  font-size: .875rem;
  font-family: inherit;
  color: var(--gray-800);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input:focus {
  border-color: var(--accent, var(--green));
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
.auth-pw-toggle {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: .85rem;
  color: var(--gray-400);
  padding: 0;
  line-height: 1;
}

/* ── ERROR ────────────────────────────────────────────────── */
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: .74rem;
  font-weight: 600;
  padding: .55rem .8rem;
  border-radius: var(--radius-xs);
  margin-bottom: .875rem;
  display: none;
  align-items: center;
  gap: .4rem;
}
.auth-error.show { display: flex; }

/* ── CTA BUTTON ───────────────────────────────────────────── */
.auth-submit {
  width: 100%;
  padding: .8rem;
  border: none;
  border-radius: var(--radius-xs);
  font-size: .9rem;
  font-weight: 800;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .25rem;
}
.auth-submit:hover  { transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* colour variants */
.auth-submit.green  { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 14px rgba(16,185,129,.35); }
.auth-submit.blue   { background: linear-gradient(135deg, #1A6BFF, #1255cc); box-shadow: 0 4px 14px rgba(26,107,255,.35); }
.auth-submit.orange { background: linear-gradient(135deg, #f97316, #ea6e0c); box-shadow: 0 4px 14px rgba(249,115,22,.35); }
.auth-submit.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); box-shadow: 0 4px 14px rgba(139,92,246,.35); }

.auth-submit.green:hover  { box-shadow: 0 6px 20px rgba(16,185,129,.45); }
.auth-submit.blue:hover   { box-shadow: 0 6px 20px rgba(26,107,255,.45); }
.auth-submit.orange:hover { box-shadow: 0 6px 20px rgba(249,115,22,.45); }
.auth-submit.purple:hover { box-shadow: 0 6px 20px rgba(139,92,246,.45); }

/* ── DIVIDER ──────────────────────────────────────────────── */
.auth-divider {
  text-align: center;
  font-size: .68rem;
  color: var(--gray-400);
  margin: 1rem 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  background: var(--gray-200);
  width: 38%;
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ── DEMO PANEL ───────────────────────────────────────────── */
.auth-demo {
  background: #f8fafc;
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius-xs);
  padding: .875rem;
  margin-top: .875rem;
}
.auth-demo-title {
  font-size: .62rem;
  font-weight: 800;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .5rem;
}
.auth-demo-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--gray-100);
}
.auth-demo-row:last-child { border-bottom: none; }
.auth-demo-row:hover { background: var(--gray-100); }
.auth-demo-role {
  font-size: .62rem;
  font-weight: 800;
  padding: .15rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.auth-demo-creds {
  font-size: .68rem;
  color: var(--gray-500);
  flex: 1;
}
.auth-demo-tap {
  font-size: .6rem;
  font-weight: 700;
  color: var(--green);
}
.auth-demo-hint {
  font-size: .6rem;
  color: var(--gray-400);
  text-align: center;
  margin-top: .4rem;
}

/* ── FOOTER LINKS ─────────────────────────────────────────── */
.auth-foot {
  border-top: 1px solid var(--gray-100);
  padding: .875rem 1.75rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.auth-foot-link {
  font-size: .74rem;
  color: var(--gray-500);
  text-decoration: none;
}
.auth-foot-link strong { color: var(--gray-800); }
.auth-foot-link:hover { color: var(--gray-800); }
.auth-foot-sep {
  font-size: .65rem;
  color: var(--gray-300);
}
.auth-foot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}

/* ── ILLUSTRATION ICON ────────────────────────────────────── */
.auth-illus {
  font-size: 2.8rem;
  margin-bottom: .75rem;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}

/* ── TOAST ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #0f172a;
  color: #fff;
  padding: .55rem 1.25rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all .25s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── HERO BACKGROUND GRADIENTS per page type ─────────────── */
.hero-vendor   { background: linear-gradient(135deg, #1e3a5f 0%, #0f2027 100%); }
.hero-customer { background: linear-gradient(135deg, #064e3b 0%, #052e16 100%); }
.hero-staff    { background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%); }
.hero-register { background: linear-gradient(135deg, #0f3460 0%, #16213e 100%); }

/* ── CHECKBOX ─────────────────────────────────────────────── */
.auth-check-row {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .74rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: .875rem;
}
.auth-check-row input[type=checkbox] {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--green);
}
.auth-check-row a { color: var(--blue); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-body { padding: 1.25rem; }
  .auth-hero { padding: 1.5rem 1.25rem 1.25rem; }
  .auth-foot { padding: .75rem 1.25rem 1rem; }
  .auth-logo img { height: 40px; }
  .auth-title { font-size: 1rem; }
}
