/* Premium Account Dashboard */
.page-account .app-main {
  padding: var(--space-3);
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-8));
}

/* Guest state */
.acct-guest {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.acct-guest__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #fce7f3, #f3e8ff);
  border: 1px solid var(--border-subtle);
}

.acct-guest__icon svg { width: 32px; height: 32px; color: var(--accent); }
.acct-guest__title { font-size: 1.25rem; font-weight: var(--weight-bold); margin-bottom: 8px; }
.acct-guest__sub { font-size: 0.875rem; color: var(--text-secondary); max-width: 280px; margin: 0 auto; }
.acct-guest__actions { display: flex; gap: 10px; justify-content: center; margin-top: var(--space-5); }

/* Profile hero */
.acct-hero {
  position: relative;
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.acct-hero__glow {
  position: absolute;
  width: 140px;
  height: 140px;
  top: -40px;
  right: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.18), transparent 70%);
  pointer-events: none;
}

.acct-hero__body {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: start;
}

.acct-hero__avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.25);
}

.acct-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }

.acct-hero__info { min-width: 0; }

.acct-hero__name {
  font-size: 1rem;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.acct-hero__phone {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.acct-hero__email {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-hero__status { margin-top: 8px; }

.acct-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.5625rem;
  font-weight: var(--weight-semibold);
  border-radius: 8px;
}

.acct-badge svg { width: 11px; height: 11px; }

.acct-badge--verified {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.acct-badge--pending {
  color: #d97706;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.acct-hero__edit {
  align-self: flex-start;
  white-space: nowrap;
  border-radius: 8px;
}

/* Order summary */
.acct-orders {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.03);
}

.acct-orders__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.acct-orders__title {
  font-size: 0.8125rem;
  font-weight: var(--weight-bold);
}

.acct-orders__link {
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  color: var(--accent);
}

.acct-orders__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.acct-order-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.acct-order-stat:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 72, 153, 0.2);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.acct-order-stat__val {
  font-size: 0.9375rem;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.acct-order-stat--total .acct-order-stat__val { color: var(--accent); }
.acct-order-stat--pending .acct-order-stat__val { color: #f59e0b; }
.acct-order-stat--delivered .acct-order-stat__val { color: #10b981; }
.acct-order-stat--cancelled .acct-order-stat__val { color: #ef4444; }

.acct-order-stat__lbl {
  font-size: 0.5rem;
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  text-align: center;
}

/* Account menu grid */
.acct-grid {
  display: grid;
  gap: 8px;
}

.acct-tile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px var(--space-3);
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.acct-tile:hover {
  border-color: rgba(236, 72, 153, 0.18);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transform: translateX(2px);
}

.acct-tile:active { transform: scale(0.99); }

.acct-tile__icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  flex-shrink: 0;
}

.acct-tile--pink .acct-tile__icon { background: rgba(236, 72, 153, 0.1); color: var(--accent); }
.acct-tile--purple .acct-tile__icon { background: rgba(168, 85, 247, 0.1); color: var(--accent-purple); }
.acct-tile--blue .acct-tile__icon { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.acct-tile--cyan .acct-tile__icon { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }

.acct-tile__icon svg { width: 18px; height: 18px; }

.acct-tile__body { flex: 1; min-width: 0; }

.acct-tile__title {
  display: block;
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
  line-height: 1.2;
}

.acct-tile__sub {
  display: block;
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.acct-tile__arrow svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.acct-logout { margin-top: var(--space-3); }

.acct-logout__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.acct-logout__btn svg { width: 16px; height: 16px; }
.acct-logout__btn:hover { background: rgba(239, 68, 68, 0.1); }
.acct-logout__btn:active { transform: scale(0.99); }

@media (max-width: 359px) {
  .acct-hero__body { grid-template-columns: auto 1fr; }
  .acct-hero__edit { grid-column: 1 / -1; width: 100%; text-align: center; }
  .acct-order-stat__lbl { font-size: 0.4375rem; }
}

@media (min-width: 480px) {
  .acct-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Notifications */
.notif-list { display: grid; gap: var(--space-2); }

.notif-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  transition: all var(--duration-fast);
}

.notif-item--unread {
  border-color: rgba(236, 72, 153, 0.25);
  background: linear-gradient(135deg, rgba(255,241,242,0.5), rgba(250,232,255,0.3));
}

.notif-item__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-muted);
}

.notif-item__icon svg { width: 16px; height: 16px; color: var(--accent); }

.notif-item__icon--success { background: rgba(16,185,129,0.12); }
.notif-item__icon--success svg { color: var(--success); }

.notif-item__icon--order { background: rgba(59,130,246,0.12); }
.notif-item__icon--order svg { color: var(--info); }

.notif-item__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.notif-item__text {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.notif-item__time {
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.notif-item-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.notif-item-wrap--unread .notif-item { border-color: var(--accent-muted); }
.notif-item-wrap .notif-item { flex: 1; }
.notif-item__delete {
  display: flex;
  align-items: center;
  padding-right: 8px;
}
.notif-item__delete button {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.125rem;
  cursor: pointer;
  line-height: 1;
}
.notif-item__delete button:hover { background: rgba(239,68,68,0.1); color: var(--error); }
.notif-item__icon--repair { background: rgba(168,85,247,0.12); }
.notif-item__icon--repair svg { color: #7c3aed; }

/* Compare table */
.compare-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-primary);
}

.compare-table table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.compare-table th,
.compare-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.compare-table th {
  background: var(--bg-secondary);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
}

.compare-table th a {
  color: var(--accent);
  font-size: var(--text-sm);
}

.account-guest {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.account-guest__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: var(--gradient-pink);
  border: 1px solid var(--border-subtle);
}

.account-guest__icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.account-profile {
  position: relative;
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  background: var(--gradient-hero);
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.account-profile__orb {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.2);
  filter: blur(40px);
  top: -20px;
  right: -20px;
}

.account-profile__top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: relative;
}

.account-profile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: var(--weight-bold);
  color: white;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
  overflow: hidden;
}

.account-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-profile__name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

.account-profile__phone {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

.account-profile__email {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.account-profile__badges {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  position: relative;
}

.account-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.account-stat {
  display: block;
  padding: var(--space-3);
  text-align: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast);
  color: inherit;
}

.account-stat:hover {
  border-color: rgba(236, 72, 153, 0.2);
  transform: translateY(-2px);
}

.account-stat__val {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--accent);
}

.account-stat__lbl {
  font-size: 0.5625rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.account-menu {
  display: grid;
  gap: var(--space-2);
}

.account-menu__group-title {
  font-size: 0.625rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: var(--space-3) 0 var(--space-2);
}

.account-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.account-menu__item:hover {
  border-color: rgba(236, 72, 153, 0.2);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.account-menu__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.account-menu__icon--pink { background: rgba(236, 72, 153, 0.12); color: var(--accent); }
.account-menu__icon--purple { background: rgba(168, 85, 247, 0.12); color: var(--accent-purple); }
.account-menu__icon--blue { background: rgba(99, 102, 241, 0.12); color: var(--accent-blue); }
.account-menu__icon--green { background: rgba(16, 185, 129, 0.12); color: var(--success); }

.account-menu__icon svg {
  width: 20px;
  height: 20px;
}

.account-menu__text { flex: 1; }

.account-menu__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.account-menu__sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.account-menu__arrow svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.account-logout {
  margin-top: var(--space-5);
}

.account-logout .btn {
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
}

/* Wishlist page */
.wishlist-list { display: grid; gap: var(--space-3); }

.wishlist-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  align-items: flex-start;
}

.wishlist-item__img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-btn);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wishlist-item__img svg { width: 32px; opacity: 0.35; }

.wishlist-item__body { flex: 1; min-width: 0; }

.wishlist-item__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* Notification sections */
.notif-section { margin-bottom: var(--space-5); }

.notif-section__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

/* Settings notification toggles */
.payment-method-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  cursor: pointer;
}

.payment-method-card input { accent-color: var(--accent); }

.payment-method-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-method-card__body strong { font-size: var(--text-sm); }
.payment-method-card__body span { font-size: var(--text-xs); color: var(--text-muted); }

.page-cart .app-main {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-8));
}

/* Device thumbnail */
.device-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-secondary);
  border-radius: var(--radius-btn);
  flex-shrink: 0;
}

.device-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-thumb svg {
  width: 60%;
  height: 60%;
  opacity: 0.35;
}

.cart-item__img.device-thumb {
  width: 72px;
  height: 72px;
}

.wishlist-item__img.device-thumb {
  width: 72px;
  height: 72px;
}

/* Account cart/wishlist previews */
.account-previews {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.account-preview {
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.account-preview__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.account-preview__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.account-preview__list {
  display: grid;
  gap: var(--space-2);
}

.account-preview__item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2);
  border-radius: var(--radius-btn);
  color: inherit;
  transition: background var(--duration-fast);
}

.account-preview__item:hover {
  background: var(--bg-secondary);
}

.account-preview__thumb {
  width: 48px;
  height: 48px;
}

.account-preview__name {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-preview__price {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--accent);
  white-space: nowrap;
}
