/* ═══════════════════════════════════════════════════════════════════
   BaddiezInc™ — Customer Account Shared Styles
   Apple-inspired mobile-first design system
   ═══════════════════════════════════════════════════════════════════ */

/* ── Account page header ──────────────────────────────────────────── */
.acct-header {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.5rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--line, #2a2a2a);
}
.acct-header h1 {
  font-size: clamp(1.4rem, 5vw, 2rem); margin: 0;
  font-family: var(--serif, 'Playfair Display', serif);
}
.acct-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-soft, #141414); border: 1px solid var(--line, #2a2a2a);
  color: var(--ivory, #F5EFE6); font-size: 1.1rem; text-decoration: none;
  transition: .15s; flex-shrink: 0;
}
.acct-back:hover { border-color: var(--gold, #D4AF37); color: var(--gold); }

/* ── Dashboard cards ──────────────────────────────────────────────── */
.dash-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.dash-card {
  background: var(--bg-soft, #141414);
  border: 1px solid var(--line, #2a2a2a);
  border-radius: 14px; padding: 1.1rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  text-decoration: none; color: var(--ivory, #F5EFE6);
  display: flex; flex-direction: column; gap: .5rem;
}
.dash-card:hover {
  border-color: var(--gold, #D4AF37);
  box-shadow: 0 4px 20px rgba(212,175,55,.08);
}
.dash-card.full { grid-column: 1 / -1; }
.dash-card-icon {
  font-size: 1.4rem; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,.08); border-radius: 10px;
}
.dash-card-title {
  font-size: .82rem; font-weight: 700; color: var(--ivory);
}
.dash-card-value {
  font-size: 1.6rem; font-weight: 800; color: var(--gold, #D4AF37);
  line-height: 1;
}
.dash-card-sub {
  font-size: .72rem; color: var(--ivory-mute, #999);
}
.dash-card-link {
  font-size: .75rem; color: var(--gold, #D4AF37);
  font-weight: 600; margin-top: auto;
}

/* ── Welcome banner ───────────────────────────────────────────────── */
.acct-welcome {
  background: linear-gradient(135deg, rgba(212,175,55,.1) 0%, rgba(212,175,55,.03) 100%);
  border: 1px solid rgba(212,175,55,.2);
  border-radius: 16px; padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.acct-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold, #D4AF37); color: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; flex-shrink: 0;
}
.acct-welcome-name {
  font-size: 1.1rem; font-weight: 700; color: var(--ivory);
}
.acct-welcome-email {
  font-size: .78rem; color: var(--ivory-mute, #999);
}
.acct-welcome-badge {
  font-size: .6rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; background: rgba(212,175,55,.15);
  color: var(--gold); padding: 3px 8px; border-radius: 4px;
  display: inline-block; margin-top: .25rem;
}

/* ── Dashboard topbar (replaces storefront header) ────────────────── */
.acct-topbar {
  position: sticky; top: 0; z-index: 90;
  background: var(--bg, #0A0A0A);
  border-bottom: 1px solid var(--line, #2a2a2a);
  padding: 0 1rem; height: 56px;
  display: flex; align-items: center; gap: .75rem;
}
.acct-topbar-brand {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: .95rem; font-weight: 600; color: var(--gold, #D4AF37);
  text-decoration: none; letter-spacing: .06em;
  white-space: nowrap; flex-shrink: 0;
}
.acct-topbar-brand img {
  height: 32px; vertical-align: middle;
}
.acct-topbar-nav {
  display: flex; align-items: center; gap: 2px; margin-left: auto;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.acct-topbar-nav a {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  text-decoration: none; font-size: .78rem; font-weight: 600;
  color: var(--ivory-mute, #999); white-space: nowrap;
  transition: .15s; -webkit-tap-highlight-color: transparent;
}
.acct-topbar-nav a:hover { color: var(--ivory, #F5EFE6); background: rgba(212,175,55,.06); }
.acct-topbar-nav a.active { color: var(--gold, #D4AF37); background: rgba(212,175,55,.1); }
.acct-topbar-nav .tbn-icon { font-size: .9rem; }
.acct-topbar-actions {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: 8px;
}
.acct-topbar-actions button {
  background: none; border: none; color: var(--ivory-mute, #999);
  cursor: pointer; padding: 6px; border-radius: 8px; transition: .15s;
  display: flex; align-items: center; justify-content: center;
}
.acct-topbar-actions button:hover { color: var(--ivory, #F5EFE6); background: rgba(212,175,55,.06); }

/* ── Bottom tab bar — REMOVED from dashboard (now in topbar) ──────── */
.acct-tabs {
  display: none;
}

/* ── Account form improvements ────────────────────────────────────── */
.acct-form .field { margin-bottom: .6rem; }
.acct-form .field span {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em; color: var(--ivory-mute, #999);
  margin-bottom: .25rem; display: block;
}
.acct-form input, .acct-form select, .acct-form textarea {
  font-size: 16px !important; /* prevents iOS zoom */
  padding: .7rem .8rem; border-radius: 10px;
  border: 1px solid var(--line, #2a2a2a);
  background: var(--bg, #0A0A0A);
  color: var(--ivory, #F5EFE6);
  font-family: var(--sans, 'Inter', sans-serif);
  width: 100%; box-sizing: border-box;
}
.acct-form input:focus, .acct-form select:focus {
  border-color: var(--gold, #D4AF37);
  outline: none;
}
.acct-form .btn {
  min-height: 48px; border-radius: 12px;
  font-size: .88rem; font-weight: 700;
}

/* ── Order card improvements ──────────────────────────────────────── */
.order-card {
  background: var(--bg-soft, #141414);
  border: 1px solid var(--line, #2a2a2a);
  border-radius: 14px; overflow: hidden;
  margin-bottom: .75rem; transition: .15s;
}
.order-card:active { border-color: var(--gold, #D4AF37); }

/* ── Phone breakpoints ────────────────────────────────────────────── */

/* Tablets + small laptops */
@media (max-width: 820px) {
  .dash-grid { gap: 10px; }
}

/* All phones (≤640px) */
@media (max-width: 640px) {
  /* Layout */
  .grid.grid-2, .grid.grid-3 { grid-template-columns: 1fr !important; gap: .5rem !important; }
  main.container.section { padding: 1rem 16px !important; }

  /* Header */
  .acct-header h1 { font-size: 1.4rem; }

  /* Dashboard grid: 2 cols on phone */
  .dash-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-card { padding: .85rem; border-radius: 12px; }
  .dash-card-icon { width: 32px; height: 32px; font-size: 1.1rem; border-radius: 8px; }
  .dash-card-value { font-size: 1.3rem; }
  .dash-card-title { font-size: .75rem; }

  /* Welcome */
  .acct-welcome { padding: 1rem; border-radius: 14px; }
  .acct-avatar { width: 40px; height: 40px; font-size: 1rem; }
  .acct-welcome-name { font-size: 1rem; }

  /* Cards */
  .card { border-radius: 12px !important; }

  /* Topbar nav: hide labels on small phones, show only icons */
  .acct-topbar-nav a span:not(.tbn-icon) { display: none; }
  .acct-topbar-nav a { padding: 6px 8px; }
  .acct-topbar-nav .tbn-icon { font-size: 1.1rem; }
  .acct-topbar { padding: 0 .75rem; height: 50px; }

  /* Hamburger + drawer: show on mobile */
  .acct-hamburger { display: flex; }
  .acct-drawer-overlay { display: block; pointer-events: none; }
  .acct-drawer-overlay.open { pointer-events: auto; }
}

/* ── Desktop sidebar ──────────────────────────────────────────────── */
.acct-layout {
  display: flex; gap: 0; min-height: calc(100vh - 80px);
}
.acct-sidebar {
  display: none;
}
.acct-content {
  flex: 1; min-width: 0;
}

/* ── Hamburger button (mobile) ────────────────────────────────────── */
.acct-hamburger {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 110;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-soft, #141414); border: 1px solid var(--line, #2a2a2a);
  cursor: pointer; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; transition: .15s;
}
.acct-hamburger:hover { border-color: var(--gold, #D4AF37); }
.acct-hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--ivory, #F5EFE6); border-radius: 1px;
  transition: .25s; position: relative;
}
.acct-hamburger span::before,
.acct-hamburger span::after {
  content: ''; position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--ivory, #F5EFE6); border-radius: 1px; transition: .25s;
}
.acct-hamburger span::before { top: -6px; }
.acct-hamburger span::after  { top: 6px; }
.acct-hamburger.open span { background: transparent; }
.acct-hamburger.open span::before { top: 0; transform: rotate(45deg); }
.acct-hamburger.open span::after  { top: 0; transform: rotate(-45deg); }

/* ── Mobile drawer overlay ────────────────────────────────────────── */
.acct-drawer-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .25s;
}
.acct-drawer-overlay.open { opacity: 1; }

.acct-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 105;
  width: min(280px, 80vw); background: var(--bg, #0A0A0A);
  border-right: 1px solid var(--line, #2a2a2a);
  transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 60px 0 24px;
}
.acct-drawer.open { transform: translateX(0); }

/* ── Sidebar / drawer nav links ───────────────────────────────────── */
.acct-nav {
  list-style: none; margin: 0; padding: 0;
}
.acct-nav-section {
  font-size: .6rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .14em; color: var(--ivory-mute, #999);
  padding: .75rem 1.25rem .35rem;
}
.acct-nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem 1.25rem; text-decoration: none;
  color: var(--ivory, #F5EFE6); font-size: .85rem; font-weight: 500;
  border-left: 3px solid transparent; transition: .15s;
}
.acct-nav a:hover {
  background: rgba(212,175,55,.06);
  color: var(--gold, #D4AF37);
}
.acct-nav a.active {
  color: var(--gold, #D4AF37); font-weight: 700;
  border-left-color: var(--gold, #D4AF37);
  background: rgba(212,175,55,.08);
}
.acct-nav-icon {
  font-size: 1rem; width: 24px; text-align: center; flex-shrink: 0;
}
.acct-nav-divider {
  height: 1px; background: var(--line, #2a2a2a); margin: .5rem 1.25rem;
}
.acct-nav a.danger { color: var(--danger, #ef4444); }
.acct-nav a.danger:hover { background: rgba(239,68,68,.06); }

/* ── Avatar image support ─────────────────────────────────────────── */
.acct-avatar img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}

/* ── Rewards page ─────────────────────────────────────────────────── */
.rewards-stat {
  text-align: center; padding: 1.25rem;
}
.rewards-stat-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ivory-mute, #999);
}
.rewards-stat-value {
  font-size: 2rem; font-weight: 800; color: var(--gold, #D4AF37);
  line-height: 1.2; margin-top: .25rem;
}
.rewards-history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem 0; border-bottom: 1px solid var(--line, #2a2a2a);
  font-size: .85rem;
}
.rewards-history-item:last-child { border-bottom: none; }

/* ── Appointments page ────────────────────────────────────────────── */
.appt-card {
  background: var(--bg-soft, #141414);
  border: 1px solid var(--line, #2a2a2a);
  border-radius: 14px; padding: 1.25rem;
  margin-bottom: .75rem; transition: .15s;
}
.appt-card:hover { border-color: var(--gold, #D4AF37); }
.appt-empty {
  text-align: center; padding: 3rem 1.5rem;
  color: var(--ivory-mute, #999);
}
.appt-empty-icon { font-size: 3rem; margin-bottom: .75rem; }

/* ── Settings page ────────────────────────────────────────────────── */
.settings-group {
  background: var(--bg-soft, #141414);
  border: 1px solid var(--line, #2a2a2a);
  border-radius: 14px; padding: 1.25rem;
  margin-bottom: 1rem;
}
.settings-group h3 {
  font-size: .9rem; font-weight: 700; margin-bottom: .75rem;
  color: var(--ivory, #F5EFE6);
}
.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem 0; border-bottom: 1px solid var(--line, #2a2a2a);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label {
  font-size: .85rem; color: var(--ivory, #F5EFE6);
}
.settings-row-sub {
  font-size: .75rem; color: var(--ivory-mute, #999); margin-top: .15rem;
}

/* ── Beauty profile pills ─────────────────────────────────────────── */
.beauty-pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: .35rem;
}
.beauty-pill {
  padding: 6px 14px; border-radius: 20px; font-size: .78rem;
  font-weight: 600; cursor: pointer; transition: .15s;
  background: var(--bg, #0A0A0A); border: 1px solid var(--line, #2a2a2a);
  color: var(--ivory, #F5EFE6); -webkit-tap-highlight-color: transparent;
}
.beauty-pill:hover { border-color: var(--gold, #D4AF37); }
.beauty-pill.selected {
  background: rgba(212,175,55,.15); border-color: var(--gold, #D4AF37);
  color: var(--gold, #D4AF37);
}

/* ── Toggle switch ────────────────────────────────────────────────── */
.toggle {
  position: relative; display: inline-block; width: 44px; height: 24px;
}
.toggle input {
  opacity: 0; width: 0; height: 0;
}
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--line, #2a2a2a); border-radius: 24px; transition: .25s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; bottom: 3px; background: var(--ivory, #F5EFE6);
  border-radius: 50%; transition: .25s;
}
.toggle input:checked + .toggle-slider {
  background: var(--gold, #D4AF37);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px); background: #0A0A0A;
}

/* ── Desktop: show sidebar ────────────────────────────────────────── */
@media (min-width: 821px) {
  .acct-sidebar {
    display: block; width: 240px; flex-shrink: 0;
    background: var(--bg, #0A0A0A);
    border-right: 1px solid var(--line, #2a2a2a);
    padding: 1.5rem 0; position: sticky; top: 0;
    height: 100vh; overflow-y: auto;
  }
  .acct-sidebar .acct-sidebar-brand {
    padding: 0 1.25rem 1rem; font-family: var(--serif, 'Playfair Display', serif);
    font-size: 1rem; font-weight: 600; color: var(--gold, #D4AF37);
    letter-spacing: .08em;
  }
  .acct-content { padding: 0; }
  .acct-hamburger { display: none !important; }
}

/* iPhone SE / small phones (≤375px) */
@media (max-width: 375px) {
  main.container.section { padding: 1rem 12px !important; }
  .acct-header h1 { font-size: 1.25rem; }
  .dash-card { padding: .75rem; }
  .dash-card-value { font-size: 1.1rem; }
  .acct-welcome { flex-direction: column; text-align: center; padding: .85rem; }
  .acct-avatar { width: 36px; height: 36px; }
}
