/* ==========================================================================
   FYNEX — Account pages (login / register / account)
   ========================================================================== */
.auth-wrap {
  position: relative;
  overflow: hidden;
  padding: 70px 0 90px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
}
.auth-wrap .container { position: relative; z-index: 2; }

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}
.auth-glow.g1 { width: 420px; height: 420px; background: var(--purple-glow); top: -120px; inset-inline-start: -100px; }
.auth-glow.g2 { width: 360px; height: 360px; background: rgba(168, 85, 247, 0.28); bottom: -140px; inset-inline-end: -80px; }

.auth-card {
  width: min(460px, 100%);
  margin-inline: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px 32px 28px;
  text-align: center;
}
.auth-card.wide { width: min(760px, 100%); }

.auth-brand {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--black);
  direction: ltr;
  margin-bottom: 18px;
}
.auth-brand span { color: var(--purple); }

.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

/* Social sign-in */
.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-google:hover { border-color: var(--purple); box-shadow: 0 6px 18px rgba(124, 58, 237, 0.12); transform: translateY(-1px); }
.btn-google:active { transform: translateY(0); }
.btn-google svg { width: 20px; height: 20px; flex: none; }

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.auth-or::before,
.auth-or::after { content: ''; height: 1px; background: var(--line); flex: 1; }

.auth-form { text-align: start; display: grid; gap: 16px; }
.auth-form .field { display: grid; gap: 7px; }
.auth-form label { font-weight: 700; font-size: 14px; }
.auth-form .input {
  width: 100%;
  padding: 13px 15px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.auth-form .input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-soft);
}
.auth-form .input::placeholder { color: #b6b6c4; }

/* Password field with a show/hide eye */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-inline-start: 46px; }
.pw-toggle {
  position: absolute;
  inset-inline-start: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
}
.pw-toggle:hover { color: var(--purple); background: var(--purple-soft); }
.pw-toggle svg { width: 19px; height: 19px; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  margin-top: -2px;
}
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); }
.check input { width: 17px; height: 17px; accent-color: var(--purple); cursor: pointer; }
.link-sm { color: var(--purple); font-weight: 700; font-size: 14px; }
.link-sm:hover { text-decoration: underline; }

.auth-alert {
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
  text-align: start;
  line-height: 1.6;
}
.auth-alert.error { background: #fdf0f0; color: var(--danger); border: 1px solid #f6d5d5; }
.auth-alert.success { background: #eefaf1; color: var(--success); border: 1px solid #cfeeda; }
.auth-alert.info { background: var(--purple-soft); color: var(--purple); border: 1px solid #e2d6ff; }

.auth-foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.auth-foot a { color: var(--purple); font-weight: 800; }
.auth-foot a:hover { text-decoration: underline; }
.auth-back { margin-top: 12px; font-size: 14px; }
.auth-back a { color: var(--muted); }
.auth-back a:hover { color: var(--purple); }

.auth-form .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hint { font-size: 12.5px; color: var(--muted); font-weight: 600; }

@media (max-width: 520px) {
  .auth-card { padding: 30px 20px 24px; }
  .auth-form .two { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------- Account page */
.acc-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
.acc-side {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.acc-user { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.acc-avatar {
  width: 66px; height: 66px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: #fff;
  font-size: 26px; font-weight: 900;
  box-shadow: var(--shadow-purple);
}
.acc-user b { display: block; font-size: 16px; }
.acc-user span { display: block; font-size: 13px; color: var(--muted); direction: ltr; word-break: break-all; }
.acc-nav { display: grid; gap: 4px; }
.acc-nav button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px;
  color: var(--text); text-align: start;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.acc-nav button svg { width: 19px; height: 19px; flex: none; }
.acc-nav button:hover { background: var(--bg-soft); color: var(--purple); }
.acc-nav button.active { background: var(--purple); color: #fff; box-shadow: 0 8px 20px var(--purple-glow); }
.acc-nav button.danger { color: var(--danger); }
.acc-nav button.danger:hover { background: #fdf0f0; color: var(--danger); }

.acc-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.acc-panel h2 { font-size: 20px; margin-bottom: 4px; }
.acc-panel > p.muted { margin-bottom: 20px; font-size: 14px; }

.acc-order {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 17px;
  margin-bottom: 12px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.acc-order:hover { border-color: var(--purple); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.1); }
.acc-order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.acc-order-top b { font-family: var(--font-display); font-size: 15px; direction: ltr; }
.acc-order-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.acc-order-items { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acc-order-items img { width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; background: var(--bg-soft); }

/* Order card details ------------------------------------------------------ */
.ord-steps { display: flex; gap: 6px; margin: 14px 0 4px; }
.ord-step { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.ord-step i { display: block; height: 4px; border-radius: 99px; background: var(--line); margin-bottom: 6px; }
.ord-step.done i { background: var(--success); }
.ord-step.now i { background: var(--purple); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.ord-step.now small { color: var(--purple); font-weight: 800; }
.ord-step.done small { color: var(--text); }

.ord-lines { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ord-line { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.ord-line img { width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; background: var(--bg-soft); flex: none; }
.ord-line > div { flex: 1; min-width: 0; }
.ord-line b { display: block; font-size: 13.5px; line-height: 1.45; }
.ord-line small { color: var(--muted); font-size: 12px; }
.ord-line > span { font-weight: 800; white-space: nowrap; direction: ltr; }

.ord-facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px;
}
.ord-facts span { color: var(--muted); display: block; font-size: 12px; }
.ord-facts b { font-size: 13.5px; }

.ord-totals { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ord-totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.ord-totals .off span:last-child { color: var(--success); font-weight: 700; }
.ord-totals .sum { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 900; font-size: 15px; }

.ord-coins { margin-top: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; }
.ord-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

@media (max-width: 520px) { .ord-facts { grid-template-columns: 1fr; } }

/* Header account button — shows the signed-in customer ---------------------- */
.icon-btn.signed-in { padding: 0; overflow: hidden; }
.icon-btn.signed-in::after {
  content: ''; position: absolute; bottom: 3px; inset-inline-end: 3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--success); border: 2px solid #fff;
}
.acc-pic { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: block; }
.acc-initial {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--purple), var(--purple-3));
  color: #fff; font-weight: 900; font-size: 14px; line-height: 1;
}

.pill { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; display: inline-block; }
.pill.pending { background: #fff5e5; color: #b45309; }
.pill.confirmed { background: var(--purple-soft); color: var(--purple); }
.pill.shipped { background: #e6f2ff; color: #1d4ed8; }
.pill.delivered { background: #eefaf1; color: var(--success); }
.pill.cancelled { background: #fdf0f0; color: var(--danger); }

.acc-empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.acc-empty svg { width: 56px; height: 56px; color: var(--line); margin: 0 auto 12px; }

@media (max-width: 860px) {
  .acc-grid { grid-template-columns: 1fr; }
  .acc-side { position: static; }
  .acc-nav { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* -------------------------------------------------- Header account control */
.acc-btn-wrap { position: relative; }
.acc-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 215px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 40px rgba(20, 20, 40, 0.14);
  padding: 8px;
  display: none;
  z-index: 60;
  text-align: start;
}
.acc-menu.open { display: block; }
.acc-menu .who { padding: 9px 11px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acc-menu .who b { display: block; font-size: 14px; }
.acc-menu .who span { font-size: 12px; color: var(--muted); direction: ltr; word-break: break-all; }
.acc-menu a, .acc-menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 10px 11px;
  border-radius: 8px; font-size: 14.5px; font-weight: 700;
  color: var(--text); text-align: start;
}
.acc-menu a svg, .acc-menu button svg { width: 17px; height: 17px; flex: none; }
.acc-menu a:hover, .acc-menu button:hover { background: var(--bg-soft); color: var(--purple); }
.acc-menu button.danger { color: var(--danger); }
.acc-menu button.danger:hover { background: #fdf0f0; }
