/* Customer Dashboard UI System - mobile first */
:root {
  --cust-bg: #fff4f7;
  --cust-surface: rgba(255, 255, 255, 0.88);
  --cust-surface-soft: #fff6f9;
  --cust-primary: #970d2e;
  --cust-primary-strong: #7d0b28;
  --cust-accent: #b21f52;
  --cust-ink: #2b1b24;
  --cust-muted: #7f6571;
  --cust-border: #efccd9;
  --cust-shadow: 0 14px 34px rgba(119, 20, 54, 0.12);
  --cust-radius: 16px;
  --cust-radius-sm: 12px;
  --cust-gap: 12px;
}

body {
  background: linear-gradient(135deg, #fff7f8, #fff, #fdf2f5);
  color: var(--cust-ink);
  font-family: "Poppins", "Inter", "Segoe UI", sans-serif;
}

main[data-page="customer-login"],
main[data-page="customer-dashboard"],
main[data-page="customer-orders"],
main[data-page="customer-wishlist"] {
  min-height: calc(100vh - 120px);
}

.customer-shell,
.customer-orders,
.customer-wishlist,
.customer-login {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.customer-login__layout {
  display: grid;
  gap: 18px;
}

.customer-login__layout--luxury {
  position: relative;
  animation: customerLoginFade 520ms ease both;
}

.customer-login__card,
.customer-panel,
.profile-card,
.address-card,
.notification-card,
.order-card,
.customer-detail,
.customer-stat {
  border: 1px solid var(--cust-border);
  border-radius: var(--cust-radius);
  background: var(--cust-surface);
  box-shadow: var(--cust-shadow);
}

.customer-login__visual {
  position: relative;
  order: 2;
  overflow: hidden;
  min-height: 320px;
  border-radius: 24px;
  background: #180d11;
  color: #fff;
  box-shadow: 0 28px 70px rgba(48, 18, 29, 0.16);
}

.customer-login__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20, 10, 13, 0.16), rgba(20, 10, 13, 0.72));
}

.customer-login__hero-image {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transform: scale(1.01);
  animation: customerImageFloat 7s ease-in-out infinite;
}

.customer-login__visual-copy {
  position: absolute;
  inset: auto 24px 24px;
  z-index: 2;
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.customer-login__visual-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 4.35rem);
  line-height: 1;
  font-weight: 600;
}

.customer-login__eyebrow {
  margin: 0;
  color: #8e6572;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.customer-login__visual-copy .customer-login__eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.customer-login__brand-logo-link {
  display: inline-flex;
  align-items: center;
}

.customer-login__brand-logo-link img {
  height: 54px;
  width: auto;
}

.customer-login__brand-logo-link--light img {
  height: 58px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.customer-login__benefits {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-login__benefits li {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
}

.customer-login__card {
  order: 1;
  width: 100%;
  max-width: 420px;
  justify-self: center;
  align-self: center;
  display: grid;
  gap: 22px;
  padding: 28px;
  border-radius: 24px;
  border-color: rgba(123, 16, 35, 0.1);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(57, 21, 32, 0.12);
  backdrop-filter: blur(10px);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.customer-login__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 78px rgba(57, 21, 32, 0.15);
}

.customer-login__brand {
  display: grid;
  gap: 8px;
}

.customer-login__title {
  margin: 0;
  color: #24151a;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  line-height: 1.12;
  font-weight: 600;
}

.customer-login__subtitle {
  margin: 0;
  color: #6d5860;
  font-size: 0.95rem;
  line-height: 1.6;
}

.customer-form--luxury {
  gap: 14px;
}

.customer-login__field {
  display: grid;
  gap: 8px;
}

.customer-form.customer-form--luxury input[type="email"],
.customer-login__otp-grid .otp-slot {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(123, 16, 35, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.customer-form.customer-form--luxury input[type="email"] {
  padding: 0 16px;
  font-size: 0.98rem;
}

.customer-form.customer-form--luxury input[type="email"]:focus,
.customer-login__otp-grid .otp-slot:focus {
  outline: none;
  border-color: #b3123f;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(179, 18, 63, 0.12), 0 12px 26px rgba(67, 25, 37, 0.07);
}

.customer-form.customer-form--luxury input.is-invalid {
  border-color: #a41434;
  box-shadow: 0 0 0 4px rgba(164, 20, 52, 0.12);
}

.customer-login__otp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.customer-login__otp-grid .otp-slot {
  text-align: center;
  padding: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.customer-login__otp-grid .otp-slot:focus {
  transform: translateY(-1px);
}

.customer-login__otp-panel {
  display: grid;
  gap: 10px;
}

.customer-login__otp-panel:not([hidden]) {
  animation: customerOtpReveal 280ms ease both;
}

.customer-login__remember {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4d3b42;
  font-size: 0.9rem;
  cursor: pointer;
}

.customer-login__remember input {
  appearance: none;
  width: 38px;
  height: 22px;
  min-height: 22px;
  padding: 2px;
  border: 1px solid rgba(123, 16, 35, 0.18);
  border-radius: 999px;
  background: #f2e7eb;
  transition: background 180ms ease, border-color 180ms ease;
}

.customer-login__remember input::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(57, 21, 32, 0.18);
  transition: transform 180ms ease;
}

.customer-login__remember input:checked {
  border-color: #b3123f;
  background: linear-gradient(135deg, #7b1023, #b3123f);
}

.customer-login__remember input:checked::before {
  transform: translateX(16px);
}

.customer-login__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7b1023, #b3123f);
  box-shadow: 0 14px 30px rgba(123, 16, 35, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.customer-login__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(123, 16, 35, 0.28);
  filter: saturate(1.05);
}

.customer-login__submit:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
}

.customer-btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  animation: customerSpin 740ms linear infinite;
}

.customer-login__submit.is-loading .customer-btn__label {
  display: none;
}

.customer-login__submit.is-loading .customer-btn__spinner {
  display: inline-block;
}

.customer-login__meta,
.customer-login__status,
.customer-login__terms {
  margin: 0;
  color: #7a6870;
  font-size: 0.84rem;
  line-height: 1.5;
}

.customer-login__status {
  min-height: 20px;
}

.customer-login__status.is-success {
  color: #146c43;
}

.customer-login__status.is-error {
  color: #a41434;
}

.customer-login__status.is-info {
  color: #6d4551;
}

.customer-login__terms {
  text-align: center;
  color: #8b7780;
}

.customer-login__switch {
  text-align: center;
  margin: 16px 0 8px;
  font-size: 0.9rem;
  color: #6d4551;
}

.customer-login__switch a {
  color: #7b1023;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}

.customer-login__switch a:hover {
  color: #b3123f;
  text-decoration: underline;
}

.customer-login__divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #7f6571;
  font-size: 0.82rem;
  margin: 2px 0;
}

.customer-login__divider::before,
.customer-login__divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ead4de;
}

.customer-login__divider span {
  padding: 0 10px;
}

.customer-login__register-link {
  text-align: center;
  margin-top: 10px;
}

.customer-form {
  display: grid;
  gap: 10px;
}

.customer-form label {
  font-size: 0.83rem;
  color: var(--cust-muted);
  font-weight: 600;
}

.customer-form input,
.customer-form select,
.customer-search,
.customer-track__input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e8cfda;
  min-height: 42px;
  background: #fff;
  padding: 10px 12px;
  color: var(--cust-ink);
}

.customer-panel input,
.customer-panel select,
.customer-panel textarea,
.address-card input,
.address-card select,
.address-card textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e8cfda;
  min-height: 42px;
  background: linear-gradient(180deg, #fff, #fff8fb);
  padding: 10px 12px;
  color: var(--cust-ink);
}

.customer-panel input:focus,
.customer-panel select:focus,
.customer-panel textarea:focus,
.address-card input:focus,
.address-card select:focus,
.address-card textarea:focus {
  outline: none;
  border-color: #b53160;
  box-shadow: 0 0 0 3px rgba(181, 49, 96, 0.16);
}

.customer-panel label {
  display: grid;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--cust-muted);
  font-weight: 600;
}

.customer-panel input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--cust-primary);
  box-shadow: none;
}

.customer-form input:focus,
.customer-form select:focus,
.customer-search:focus,
.customer-track__input:focus {
  outline: none;
  border-color: #b53160;
  box-shadow: 0 0 0 3px rgba(181, 49, 96, 0.16);
}

.customer-btn,
.customer-form button,
.customer-action {
  border-radius: 12px;
  border: 0;
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.customer-btn--primary,
.customer-form .customer-btn--primary {
  background: linear-gradient(135deg, #7b102e, #b53160);
  color: #fff;
}

.customer-btn--ghost {
  background: #fff;
  border: 1px solid #dfbccb;
  color: var(--cust-primary);
}

.account-dashboard {
  --account-burgundy: #8b0f2a;
  --account-border: #eee3e7;
  --account-ink: #221519;
  --account-muted: #7d6b72;
  display: grid;
  position: relative;
  min-height: calc(100vh - 120px);
  min-height: calc(100dvh - 120px);
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 14px 86px;
  color: var(--account-ink);
  background: linear-gradient(135deg, #fff7f8, #fff, #fdf2f5);
  overflow-x: hidden;
  overflow-x: clip;
}

.account-dashboard *,
.account-dashboard *::before,
.account-dashboard *::after {
  box-sizing: border-box;
}

.account-sidebar {
  display: none;
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 100;
  border-bottom: 1px solid var(--account-border);
  box-shadow: 0 4px 12px rgba(45, 22, 30, 0.1);
  max-height: min(72vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.account-sidebar.is-open {
  display: block;
}

.account-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

.account-mobile-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 16px 0 10px;
}

.account-mobile-logo {
  justify-self: center;
  color: var(--account-burgundy);
  font-family: "DM Serif Display", serif;
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
}

.account-icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--account-border);
  border-radius: 999px;
  background: #fff;
  color: var(--account-ink);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.account-home {
  display: grid;
  gap: 14px;
}

main[data-page="customer-dashboard"] [data-dashboard-panel][hidden] {
  display: none !important;
}

.account-welcome,
.account-panel,
.account-stat,
.account-promo {
  min-width: 0;
  border: 1px solid var(--account-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 48px rgba(45, 22, 30, 0.07);
}

.account-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 24px;
}

.account-welcome p,
.account-welcome span,
.account-stat span,
.account-overview small {
  margin: 0;
  color: var(--account-muted);
  font-size: 0.86rem;
}

.account-welcome h1 {
  margin: 5px 0 8px;
  color: var(--account-burgundy);
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.account-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  background: #f8dbe2;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-stat {
  min-height: 94px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.account-stat strong {
  color: #2a1419;
  font-size: 1.7rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.account-stat--success strong {
  color: #15814d;
}

.account-stat--warning strong {
  color: #c96f08;
}

.account-stat--heart strong {
  color: #e91e63;
}

.account-dashboard-grid {
  display: grid;
  gap: 14px;
}

.account-panel {
  padding: 18px;
}

.account-panel h2 {
  margin: 0 0 14px;
  color: #2b151b;
  font-size: 1rem;
}

.account-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.account-panel__head h2 {
  margin: 0;
}

.account-panel__head button,
.account-overview button {
  border: 0;
  background: transparent;
  color: var(--account-burgundy);
  cursor: pointer;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.account-orders-list .order-card {
  border: 0;
  border-bottom: 1px solid var(--account-border);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  margin: 0;
  padding: 12px 0;
}

.account-orders-list .order-card:last-child {
  border-bottom: 0;
}

.account-orders-list .order-card__actions {
  margin-top: 8px;
}

.order-card__header,
.customer-detail__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.order-card__header h3,
.customer-detail__header h3 {
  margin: 0 0 4px;
  color: var(--account-burgundy);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.order-card__amount {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 112px;
  text-align: right;
}

.order-card__amount strong {
  color: var(--account-ink);
  font-size: 1rem;
}

.order-card__meta {
  margin: 3px 0 0;
  color: var(--account-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.order-card__status,
.order-card__payment,
.order-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.order-card__payment {
  color: #5e4a55;
  background: #fff8fa;
  border-color: #ead6de;
}

.order-card__status--pending,
.order-status-chip.pending,
.order-status-chip.sent {
  color: #93600a;
  background: #fff6dc;
  border-color: #f2dda5;
}

.order-card__status--confirmed,
.order-card__status--ready {
  color: #13528b;
  background: #eaf5ff;
  border-color: #c6e2ff;
}

.order-card__status--preparing,
.order-card__status--delivering {
  color: #5a3589;
  background: #f4ecff;
  border-color: #dccbf7;
}

.order-card__status--delivered,
.order-status-chip.accepted {
  color: #11613a;
  background: #e8f8ee;
  border-color: #c4ead3;
}

.order-card__status--cancelled,
.order-status-chip.cancelled,
.order-status-chip.expired {
  color: #8c243f;
  background: #ffe8ec;
  border-color: #ffcbd5;
}

.customer-detail__header {
  align-items: center;
}

.customer-detail__items h4,
.profile-card h4 {
  margin: 0;
  padding: 10px;
  color: var(--cust-primary);
  font-size: 0.92rem;
}

.customer-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.account-overview {
  display: grid;
  gap: 2px;
}

.account-overview button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid var(--account-border);
  text-align: left;
  color: var(--account-ink);
}

.account-overview button:last-child {
  border-bottom: 0;
}

.account-overview span {
  font-weight: 600;
}

.account-promo {
  overflow: hidden;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
}

.account-promo img {
  width: 100%;
  height: 122px;
  object-fit: cover;
}

.account-promo div {
  padding: 16px;
  min-width: 0;
}

.account-promo h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.account-promo p {
  margin: 0 0 12px;
  color: var(--account-muted);
  font-size: 0.86rem;
}

.account-promo a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7b1023, #b3123f);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.account-promo--desktop {
  display: none;
}

.account-avatar-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.account-avatar-choice {
  display: inline-grid;
  grid-template-columns: 44px auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 7px 12px;
  border: 1px solid var(--account-border);
  border-radius: 14px;
  background: #fff;
  color: var(--account-ink);
  cursor: pointer;
}

.account-avatar-choice img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.account-avatar-choice.is-selected {
  border-color: rgba(139, 15, 42, 0.35);
  background: #fff3f6;
  box-shadow: 0 0 0 4px rgba(139, 15, 42, 0.08);
}

.account-panel .customer-grid {
  gap: 16px;
}

.account-field--wide,
.account-track-result,
.account-list-block {
  min-width: 0;
}

.account-track-result,
.account-list-block {
  margin-top: 12px;
}

.account-phone-row,
.account-map-row,
.account-form-actions {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.account-phone-row {
  align-items: stretch;
}

.account-phone-row select {
  flex: 0 0 116px;
}

.account-phone-row input,
.account-map-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.account-map-row {
  align-items: flex-end;
}

.account-checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.account-form-actions {
  flex-wrap: wrap;
}

.account-panel label {
  display: grid;
  gap: 8px;
  color: #5f4b52;
  font-size: 0.82rem;
  font-weight: 700;
}

.account-panel input,
.account-panel select,
.account-panel textarea,
.account-panel .customer-track__input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(139, 15, 42, 0.12);
  border-radius: 14px;
  background: #fff;
  color: #28171c;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 10px 26px rgba(45, 22, 30, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.account-panel select {
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, #7d6b72 50%), linear-gradient(135deg, #7d6b72 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.account-panel textarea {
  min-height: 104px;
  padding-top: 14px;
  resize: vertical;
}

.account-panel input:focus,
.account-panel select:focus,
.account-panel textarea:focus,
.account-panel .customer-track__input:focus {
  outline: none;
  border-color: #b3123f;
  box-shadow: 0 0 0 4px rgba(179, 18, 63, 0.1), 0 14px 30px rgba(45, 22, 30, 0.07);
}

.account-panel input:disabled {
  color: #86757b;
  background: #faf6f7;
  cursor: not-allowed;
}

.account-panel input[type="date"] {
  color-scheme: light;
}

.account-panel input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--account-burgundy);
  box-shadow: none;
}

.account-panel .customer-btn--primary {
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7b1023, #b3123f);
  box-shadow: 0 14px 30px rgba(123, 16, 35, 0.18);
}

.account-panel .customer-btn--ghost {
  min-height: 52px;
  border-radius: 14px;
  border-color: rgba(139, 15, 42, 0.16);
  color: var(--account-burgundy);
}

.account-panel .address-card__line {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(139, 15, 42, 0.1);
  border-radius: 14px;
  background: #fff8fa;
  color: #6d4a55;
  font-size: 0.86rem;
}

.account-bottom-nav {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--account-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 42px rgba(45, 22, 30, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.account-bottom-nav button,
.account-bottom-nav a {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #6d5c63;
  font-size: 0.72rem;
  text-decoration: none;
  cursor: pointer;
}

.account-bottom-nav button.is-active,
.account-bottom-nav button.active {
  color: var(--account-burgundy);
  font-weight: 700;
}

.customer-shell {
  display: grid;
  gap: var(--cust-gap);
}

.customer-sidebar {
  display: none;
  padding: 14px;
  position: sticky;
  top: 78px;
  height: fit-content;
}

.customer-sidebar__avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5d7e1, #fff);
  color: var(--cust-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.customer-sidebar__name {
  margin: 8px 0 12px;
  font-weight: 700;
  color: var(--cust-primary);
}

.customer-sidebar__nav,
.customer-mobile-tabs {
  display: grid;
  gap: 6px;
}

.customer-sidebar__nav button,
.customer-mobile-tabs button,
.mobile-nav button {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
  background: #fff;
  color: #5e4a55;
  font-size: 0.86rem;
  cursor: pointer;
}

.customer-sidebar__nav button.is-active,
.customer-mobile-tabs button.is-active,
.mobile-nav button.is-active {
  border-color: #ddb1c4;
  color: var(--cust-primary);
  background: #fff2f7;
  font-weight: 700;
}

.customer-topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.customer-topbar h1 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: 1.55rem;
  color: var(--cust-primary);
}

.customer-topbar p {
  margin: 4px 0 0;
  color: var(--cust-muted);
  font-size: 0.86rem;
}

.customer-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customer-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-chip.pending,
.status-chip.pending_payment,
.status-chip.payment_under_review {
  background: #fff4d6;
  color: #9a6300;
  border-color: #f4d99d;
}

.status-chip.confirmed,
.status-chip.ready,
.status-chip.ready_for_pickup {
  background: #e6f2ff;
  color: #134d89;
  border-color: #bfdcff;
}

.status-chip.preparing,
.status-chip.out_for_delivery {
  background: #f2e9ff;
  color: #58338f;
  border-color: #d5c2fa;
}

.status-chip.delivered,
.status-chip.completed {
  background: #def7e8;
  color: #11613a;
  border-color: #bde9ce;
}

.status-chip.cancelled,
.status-chip.rejected {
  background: #ffe3e7;
  color: #8c243f;
  border-color: #ffc6d1;
}

.status-chip.refunded,
.status-chip.partially_refunded,
.status-chip.fully_refunded,
.status-chip.refund_requested {
  background: #f5e6ff;
  color: #6f2a9d;
  border-color: #e4c8f8;
}

.customer-grid {
  display: grid;
  gap: var(--cust-gap);
}

.customer-grid--stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-stat {
  padding: 12px;
}

.customer-stat__label {
  color: var(--cust-muted);
  font-size: 0.77rem;
}

.customer-stat__value {
  margin-top: 4px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--cust-primary);
}

.customer-stat--accent-pending {
  background: linear-gradient(180deg, #fff7f1, #fffdfb);
}

.customer-stat--accent-pending .customer-stat__value {
  color: #9c4e15;
}

.customer-stat--accent-delivered {
  background: linear-gradient(180deg, #f3fff8, #fbfffd);
}

.customer-stat--accent-delivered .customer-stat__value {
  color: #1e6a43;
}

.customer-stat--accent-cancelled {
  background: linear-gradient(180deg, #fff4f7, #fffdfd);
}

.customer-stat--accent-cancelled .customer-stat__value {
  color: #8c243f;
}

.customer-stat--accent-refund {
  background: linear-gradient(180deg, #f8f3ff, #fcfbff);
}

.customer-stat--accent-refund .customer-stat__value {
  color: #6f2a9d;
}

.customer-panel {
  padding: 12px;
}

.customer-panel h2,
.customer-panel h3,
.profile-card h3,
.customer-detail h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--cust-primary);
}

.order-card {
  padding: 10px;
  margin-bottom: 10px;
}

.order-card__head,
.order-card__foot,
.order-card__meta {
  display: grid;
  gap: 8px;
}

.order-card__head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.order-card__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.order-card__thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #ecd7df;
}

.order-card__id {
  font-weight: 700;
  color: var(--cust-primary);
  margin: 0;
}

.order-card__items {
  font-size: 0.82rem;
  color: var(--cust-muted);
  margin: 2px 0 0;
}

.order-card__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cust-ink);
  text-align: right;
}

.order-card__meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  font-size: 0.76rem;
  color: var(--cust-muted);
}

.order-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.order-timeline {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
}

.order-timeline__item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
}

.order-timeline__dot {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 999px;
  border: 2px solid #c7a4b5;
  background: #fff;
}

.order-timeline__item.is-active .order-timeline__dot,
.order-timeline__item.is-done .order-timeline__dot,
.order-timeline__item--active .order-timeline__dot {
  border-color: #7b102e;
  background: #7b102e;
}

.order-timeline__label {
  font-size: 0.83rem;
  color: #4f3a45;
  font-weight: 600;
}

.order-timeline__time {
  font-size: 0.72rem;
  color: var(--cust-muted);
  margin-top: 2px;
}

.profile-card,
.address-card,
.notification-card,
.customer-detail {
  padding: 12px;
}

.address-card__line,
.notification-card__meta {
  color: var(--cust-muted);
  font-size: 0.82rem;
}

.notification-card {
  border-style: dashed;
}

.notification-card.is-unread {
  background: #fff4f8;
  border-style: solid;
}

.notification-card h4 {
  margin: 0 0 4px;
  color: var(--cust-primary);
  font-size: 0.9rem;
}

.customer-detail {
  position: fixed;
  right: 10px;
  left: 10px;
  bottom: 78px;
  z-index: 120;
  max-height: 72vh;
  overflow: auto;
  display: none;
}

.customer-detail.is-open {
  display: block;
}

.customer-detail__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.customer-detail__items {
  margin: 10px 0;
  border: 1px solid var(--cust-border);
  border-radius: 12px;
  overflow: hidden;
}

.customer-detail__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--cust-border);
  font-size: 0.83rem;
}

.customer-detail__item:last-child {
  border-bottom: 0;
}

.customer-detail__sticky-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -12px -12px;
  padding: 10px;
  background: #fff;
  border-top: 1px solid var(--cust-border);
  display: flex;
  gap: 8px;
}

.customer-track {
  display: grid;
  gap: 10px;
}

.customer-track__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.customer-empty {
  border: 1px dashed #e7c9d5;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: var(--cust-muted);
  background: #fffbfd;
  font-size: 0.86rem;
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--cust-border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
}

.mobile-nav button {
  min-height: 40px;
  text-align: center;
  font-size: 0.74rem;
  padding: 6px 4px;
}

@keyframes customerLoginFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes customerOtpReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes customerImageFloat {
  0%,
  100% {
    transform: scale(1.01) translateY(0);
  }
  50% {
    transform: scale(1.025) translateY(-6px);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .customer-login__layout--luxury,
  .customer-login__hero-image,
  .customer-login__otp-panel:not([hidden]),
  .customer-btn__spinner {
    animation: none;
  }

  .customer-login__card,
  .customer-login__submit,
  .customer-form.customer-form--luxury input[type="email"],
  .customer-login__otp-grid .otp-slot {
    transition: none;
  }
}

@media (min-width: 768px) {
  .account-dashboard {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    padding: 28px 24px 56px;
    border: 1px solid var(--account-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 30px 90px rgba(45, 22, 30, 0.1);
  }

  .account-sidebar {
    display: block;
    position: sticky;
    top: 24px;
    left: auto;
    right: auto;
    z-index: 1;
    align-self: start;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 30px 26px;
    border-right: 1px solid var(--account-border);
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
  }

  .account-sidebar h2 {
    margin: 0 0 24px;
    font-size: 1.1rem;
  }

  .account-sidebar__nav {
    display: grid;
    gap: 10px;
  }

  .account-sidebar__nav button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4f4046;
    text-align: left;
    padding: 0 16px;
    cursor: pointer;
  }

  .account-sidebar__nav button.is-active,
  .account-sidebar__nav button.active {
    background: #fff1f5;
    color: var(--account-burgundy);
    font-weight: 700;
  }

  .account-main {
    padding: 0 28px;
  }

  .account-mobile-head,
  .account-bottom-nav {
    display: none;
  }

  .account-welcome {
    padding: 30px;
  }

  .account-avatar {
    width: 112px;
    height: 112px;
  }

  .account-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .account-dashboard-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  }

  .account-promo--mobile {
    display: none;
  }

  .account-promo--desktop {
    display: grid;
    grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1fr);
  }

  .account-promo--desktop img {
    height: 186px;
  }

  .account-promo--desktop h2 {
    font-size: 1.35rem;
  }

  .customer-login__layout {
    min-height: calc(100vh - 168px);
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: stretch;
    gap: 24px;
  }

  .customer-login__visual {
    order: 1;
    min-height: 620px;
  }

  .customer-login__card {
    order: 2;
  }

  .customer-login__visual-copy {
    inset: auto 36px 36px;
  }

  .customer-shell {
    grid-template-columns: 255px minmax(0, 1fr);
    padding-bottom: 20px;
  }

  .customer-sidebar {
    display: block;
  }

  .customer-mobile-tabs,
  .mobile-nav {
    display: none;
  }

  .customer-grid--stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .customer-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-detail {
    right: 16px;
    left: auto;
    width: min(560px, calc(100vw - 290px));
    bottom: 16px;
    max-height: calc(100vh - 110px);
  }
}

@media (min-width: 768px) and (max-width: 1040px) {
  .account-dashboard {
    grid-template-columns: 220px minmax(0, 1fr);
    padding: 22px 18px 46px;
  }

  .account-sidebar {
    padding: 24px 18px;
  }

  .account-main {
    padding: 0 20px;
  }

  .account-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .account-promo--desktop {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .account-sidebar {
    padding: 12px 14px 16px;
    border-radius: 0 0 18px 18px;
  }

  .account-sidebar h2 {
    margin: 4px 0 10px;
    font-size: 1rem;
  }

  .account-sidebar__nav {
    display: grid;
    gap: 6px;
  }

  .account-sidebar__nav button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: #fff8fa;
    color: #4f4046;
    text-align: left;
    padding: 0 12px;
    font: inherit;
    cursor: pointer;
  }

  .account-sidebar__nav button.is-active,
  .account-sidebar__nav button.active {
    background: #fff1f5;
    color: var(--account-burgundy);
    font-weight: 700;
  }

  .account-welcome {
    padding: 18px;
  }

  .account-avatar {
    width: 64px;
    height: 64px;
  }

  .account-panel {
    padding: 16px;
  }

  .account-stat {
    min-height: 86px;
    padding: 14px;
  }

  .account-stat strong {
    font-size: 1.45rem;
  }

  .account-orders-list .order-card__header,
  .order-card__header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .order-card__amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    text-align: left;
  }

  .account-phone-row,
  .account-map-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-phone-row select {
    flex-basis: auto;
  }

  .account-map-row .customer-btn {
    width: 100%;
  }

  .customer-track__bar {
    grid-template-columns: 1fr;
  }

  .customer-detail {
    left: 10px;
    right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: auto;
  }
}

@media (max-width: 520px) {
  .account-dashboard {
    padding-left: 10px;
    padding-right: 10px;
  }

  .account-mobile-logo {
    font-size: 1.45rem;
  }

  .account-stats {
    grid-template-columns: 1fr;
  }

  .account-promo {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .account-promo img {
    height: 132px;
  }

  .account-panel__head {
    align-items: flex-start;
  }

  .account-panel__head button,
  .account-form-actions .customer-btn {
    width: 100%;
  }

  .account-bottom-nav {
    left: 8px;
    right: 8px;
    grid-template-columns: repeat(5, minmax(46px, 1fr));
    overflow-x: auto;
  }
}

@media (min-width: 1100px) {
  .account-dashboard {
    margin-top: 24px;
  }

  .customer-shell,
  .customer-orders,
  .customer-wishlist {
    padding-left: 14px;
    padding-right: 14px;
  }

  .customer-login {
    padding: 32px 24px 88px;
  }

  .customer-panel {
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .customer-login {
    padding-left: 12px;
    padding-right: 12px;
  }

  .customer-login__card {
    padding: 22px;
  }

  .customer-login__otp-grid {
    gap: 6px;
  }

  .customer-login__visual {
    min-height: 280px;
  }
}

html,
body {
  overflow-x: hidden;
}
