/* Customer account dashboard */
.account-page {
  min-height: 100vh;
  background: #f6f5f3;
  color: #1d1b22;
  padding-bottom: 70px;
}

.account-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 140, 120, 0.55), transparent 45%),
    linear-gradient(120deg, #6d0016, #e60023 62%, #ff5c45);
  color: #fff;
  padding: 30px 0 64px;
}

.account-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, transparent 30%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  pointer-events: none;
}

.account-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 26px;
}

.account-back {
  justify-self: start;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.account-back:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateX(-3px);
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-identity > img,
.account-identity > b {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.6);
  object-fit: cover;
  background: #fff;
  color: #b9001c;
  display: grid;
  place-items: center;
  font-size: 30px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.account-identity p,
.account-identity span {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.account-identity h1 {
  margin: 2px 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.025em;
}

.account-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 24px;
  margin-top: -34px;
}

.account-sidebar,
.account-content {
  background: #fff;
  border: 1px solid #eeeae8;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(30, 15, 20, 0.07);
}

.account-sidebar {
  height: max-content;
  padding: 12px;
  position: sticky;
  top: 92px;
}

.account-sidebar button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 13px 14px;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  color: #55494c;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.account-sidebar button:hover {
  background: #fff5f6;
  color: #bd0020;
  transform: translateX(3px);
}

.account-sidebar button.active {
  background: linear-gradient(135deg, #ff2a47, #e60023 60%, #bd0020);
  color: #fff;
  box-shadow: 0 10px 22px rgba(230, 0, 35, 0.28);
  transform: none;
}

.account-sidebar em {
  float: right;
  background: #f1ecec;
  color: #5a4d51;
  border-radius: 99px;
  padding: 1px 8px;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

.account-sidebar button.active em {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.account-sidebar .danger {
  color: #bc0021;
  margin-top: 12px;
  border-top: 1px solid #f0e3e5;
  border-radius: 0 0 14px 14px;
}

.account-content {
  padding: 30px;
  min-height: 500px;
  animation: account-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes account-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.account-heading {
  margin-bottom: 26px;
}

.account-heading p {
  margin: 0;
  color: #c50023;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
}

.account-heading h2 {
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  margin: 4px 0;
  letter-spacing: -0.03em;
}

.account-heading span {
  color: #766a6d;
}

.account-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.account-stat-grid article {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #fff7f8, #fff1f3);
  border: 1px solid #fde0e5;
  border-radius: 18px;
  padding: 20px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}

.account-stat-grid article::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(230, 0, 35, 0.07);
}

.account-stat-grid article:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(230, 0, 35, 0.1);
}

.account-stat-grid b {
  display: block;
  font: 800 1.75rem Inter, sans-serif;
  color: #a60020;
  letter-spacing: -0.02em;
}

.account-stat-grid span {
  font-size: 0.88rem;
  color: #745f64;
}

.account-panel {
  border: 1px solid #efe9ea;
  border-radius: 20px;
  padding: 20px;
  margin: 18px 0;
  background: #fff;
}

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

.account-panel-head h3 {
  margin: 0;
}

.account-panel-head button,
.address-card button,
.device-row button {
  border: 0;
  background: none;
  color: #bd0020;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 8px;
  transition: background 0.2s;
}

.account-panel-head button:hover,
.address-card button:hover,
.device-row button:hover {
  background: #fff0f2;
}

.account-order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid #f1ebec;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.account-order-card:hover {
  background: #fff8f9;
}

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

.account-order-card b,
.account-order-card small,
.account-order-card strong,
.account-order-card span {
  display: block;
}

.account-order-card small {
  color: #817477;
  font-size: 0.78rem;
  margin-top: 3px;
}

.account-order-card > div:last-child {
  text-align: right;
}

.order-kind {
  display: inline-block !important;
  background: #fde8ec;
  color: #b70021;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.order-status {
  color: #766568;
  font-size: 0.82rem;
  margin-top: 3px;
}

.address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.address-card {
  border: 1px solid #eee4e6;
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.2s;
}

.address-card:hover {
  transform: translateY(-3px);
  border-color: #f5c9d0;
  box-shadow: 0 12px 26px rgba(230, 0, 35, 0.08);
}

.address-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.address-card span,
.device-row span {
  background: #e8f8ee;
  color: #137333;
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 0.7rem;
  font-weight: 800;
}

.address-card p {
  margin: 13px 0 4px;
}

.address-card small {
  color: #766a6d;
  display: block;
  min-height: 38px;
}

.address-card > div:last-child {
  margin-top: 12px;
}

.account-form label,
.preference-form label,
#addressForm label {
  display: grid;
  gap: 7px;
  color: #5f5356;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.account-form input,
.account-form textarea,
#addressForm input,
#addressForm textarea {
  border: 1px solid #e2d6d9;
  border-radius: 12px;
  padding: 13px;
  font: inherit;
  background: #fdfcfc;
  color: #261f21;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.account-form input:focus,
.account-form textarea:focus,
#addressForm input:focus,
#addressForm textarea:focus {
  outline: none;
  border-color: #e60023;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(230, 0, 35, 0.12);
}

.account-form textarea,
#addressForm textarea {
  min-height: 84px;
  resize: vertical;
}

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

.preference-form label {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #f2ebec;
  margin-bottom: 0;
}

.preference-form label:last-of-type {
  border-bottom: 0;
}

.preference-form input {
  width: 20px;
  height: 20px;
  accent-color: #e60023;
}

.notification-row {
  padding: 15px 12px;
  border-bottom: 1px solid #f0e9ea;
  border-radius: 14px;
  transition: background 0.2s;
}

.notification-row:hover {
  background: #fbf8f8;
}

.notification-row.unread {
  position: relative;
  background: #fff5f6;
  box-shadow: inset 3px 0 0 #e60023;
}

.notification-row p {
  margin: 5px 0;
  color: #716568;
}

.notification-row small,
.device-row small {
  color: #837679;
}

.device-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #f1eaeb;
}

.device-row b,
.device-row small {
  display: block;
}

.account-loading {
  padding: 120px 0;
  text-align: center;
  font-size: 1.05rem;
  color: #766a6d;
}

.account-page .empty {
  padding: 30px 6px;
  color: #796d70;
}

.account-page .primary-button {
  border: 0;
  cursor: pointer;
}

@media (max-width: 760px) {
  .account-hero {
    padding: 22px 0 56px;
  }

  .account-shell {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: -28px;
  }

  .account-sidebar {
    position: static;
    display: flex;
    gap: 4px;
    overflow: auto;
    padding: 8px;
    white-space: nowrap;
    border-radius: 20px;
    scrollbar-width: none;
  }

  .account-sidebar::-webkit-scrollbar {
    display: none;
  }

  .account-sidebar button {
    width: auto;
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
  }

  .account-sidebar button:hover {
    transform: none;
  }

  .account-sidebar .danger {
    margin: 0;
    border: 0;
    border-radius: 999px;
  }

  .account-content {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .account-stat-grid {
    gap: 8px;
  }

  .account-stat-grid article {
    padding: 14px 10px;
    border-radius: 14px;
  }

  .account-stat-grid b {
    font-size: 1.35rem;
  }

  .account-stat-grid span {
    font-size: 0.74rem;
  }

  .address-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .account-order-card {
    padding: 14px 10px;
  }

  .account-identity > img,
  .account-identity > b {
    width: 62px;
    height: 62px;
    font-size: 25px;
  }
}

/* Nav account button */
.account-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.account-nav-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

@media (max-width: 480px) {
  .nav-actions .account-nav-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #fff0f2;
    color: #c70023;
    padding: 0;
  }

  .nav-actions .account-nav-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav-actions .cart-button {
    padding: 9px 11px;
  }
}