/* ============================================================
   KHADIZA DREAMS — account.css
   Used only by: account.html
   Depends on: styles.css (tokens, buttons, footer, drawers)
   ============================================================ */


/* ============================================================
   1. BREADCRUMBS
   ============================================================ */
.crumbs{
  padding-block:24px;
  font-size:10.5px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
}
.crumbs a{ transition:color .3s; }
.crumbs a:hover{ color:var(--ink); }
.crumbs span{ margin-inline:9px; opacity:.45; }


/* ============================================================
   2. PAGE HEAD
   ============================================================ */
.page-head{
  padding-bottom:clamp(24px, 3vw, 34px);
  margin-bottom:clamp(28px, 3.6vw, 44px);
  border-bottom:1px solid var(--line);
}

.page-head__title{
  font-size:clamp(30px, 4.2vw, 52px);
  font-weight:300;
  line-height:1.05;
  margin-top:10px;
}

.page-head__meta{
  margin-top:10px;
  font-size:11.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--muted);
}


/* ============================================================
   3. AUTH (GUEST) STATE
   ============================================================ */
.auth{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
  gap:clamp(28px, 5vw, 80px);
  align-items:center;
  padding-block:clamp(40px, 5vw, 72px) clamp(56px, 7vw, 96px);
  min-height:60vh;
}

.auth__media{
  position:relative;
  overflow:hidden;
  aspect-ratio:4 / 5;
  border-radius:var(--radius);
  background:var(--soft);
}
.auth__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:grayscale(.45) contrast(1.03);
}

.auth__body{
  max-width:460px;
}

.auth__tabs{
  display:flex;
  gap:0;
  margin-bottom:28px;
  border-bottom:1px solid var(--line);
}

.auth__tab{
  flex:1;
  padding:14px 8px;
  font-size:11px;
  font-weight:500;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--muted);
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
  text-align:center;
  transition:color .3s, border-color .3s;
  cursor:pointer;
}
.auth__tab:hover{ color:var(--ink); }
.auth__tab.is-active{
  color:var(--ink);
  border-bottom-color:var(--ink);
}

.auth__panel{ display:none; }
.auth__panel.is-active{ display:block; }

.auth__title{
  font-size:clamp(22px, 2.6vw, 30px);
  font-weight:300;
  line-height:1.2;
  margin-bottom:10px;
}

.auth__text{
  font-size:13.5px;
  line-height:1.7;
  color:var(--muted);
  margin-bottom:24px;
}


/* ============================================================
   4. FORMS
   ============================================================ */
.form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px 18px;
}
.form-grid > .form-field--full{ grid-column:1 / -1; }

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}

.field__label{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  font-size:10px;
  font-weight:500;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--ink);
}

.field__optional{
  font-size:10px;
  letter-spacing:.14em;
  color:var(--muted);
  font-weight:300;
  text-transform:none;
}

.field__input,
.field__select,
.field__textarea{
  width:100%;
  padding:13px 14px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  font-family:var(--font-body);
  font-size:14px;
  font-weight:300;
  color:var(--ink);
  outline:none;
  transition:border-color .3s, box-shadow .3s;
  -webkit-appearance:none;
  appearance:none;
}

.field__input::placeholder,
.field__textarea::placeholder{ color:var(--muted); opacity:.85; }

.field__input:focus,
.field__select:focus,
.field__textarea:focus{
  border-color:var(--ink);
  box-shadow:0 0 0 3px rgba(176,141,87,.12);
}

.field__textarea{
  min-height:90px;
  resize:vertical;
  line-height:1.6;
}

.field__hint{
  font-size:11.5px;
  line-height:1.55;
  color:var(--muted);
  margin-top:-2px;
}

.check{
  display:flex;
  align-items:flex-start;
  gap:12px;
  cursor:pointer;
  font-size:13px;
  font-weight:300;
  line-height:1.55;
  color:var(--ink-soft);
}
.check input{
  flex-shrink:0;
  width:18px;
  height:18px;
  margin-top:2px;
  accent-color:var(--ink);
  cursor:pointer;
}
.check a{
  color:var(--ink);
  border-bottom:1px solid var(--line-dark);
  transition:border-color .3s;
}
.check a:hover{ border-bottom-color:var(--ink); }

.form-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.form-link{
  font-size:12.5px;
  font-weight:300;
  color:var(--muted);
  border-bottom:1px solid transparent;
  transition:color .3s, border-color .3s;
}
.form-link:hover{
  color:var(--ink);
  border-bottom-color:var(--ink);
}

.form-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:6px;
}
.form-actions .btn{
  flex:1 1 auto;
  min-width:0;
}

.form-status{
  min-height:18px;
  font-size:12.5px;
  font-weight:300;
  color:var(--gold);
  margin-top:6px;
}
.form-status.is-error{ color:var(--rose); }


/* ============================================================
   5. DASHBOARD STATE
   ============================================================ */
.dash{
  display:grid;
  grid-template-columns:230px minmax(0, 1fr);
  gap:clamp(24px, 3.4vw, 56px);
  align-items:start;
  padding-block:clamp(32px, 4vw, 56px) clamp(56px, 7vw, 96px);
}


/* ============================================================
   6. DASH SIDEBAR
   ============================================================ */
.dash-nav{
  position:sticky;
  top:calc(var(--header-h) + 26px);
}

.dash-user{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px;
  margin-bottom:20px;
  background:var(--soft);
  border-radius:var(--radius);
}

.dash-user__avatar{
  flex-shrink:0;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:50%;
  background:var(--ink);
  color:var(--paper);
  font-family:var(--font-display);
  font-size:18px;
  font-weight:500;
  line-height:1;
}

.dash-user__body{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.dash-user__name{
  font-size:13.5px;
  font-weight:500;
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dash-user__email{
  font-size:11.5px;
  font-weight:300;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dash-nav__list{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.dash-nav__link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:var(--radius);
  font-size:13px;
  font-weight:300;
  color:var(--ink-soft);
  cursor:pointer;
  transition:background .3s, color .3s;
}
.dash-nav__link:hover{
  background:var(--soft);
  color:var(--ink);
}
.dash-nav__link.is-active{
  background:var(--ink);
  color:var(--paper);
}

.dash-nav__count{
  min-width:22px;
  height:22px;
  padding:0 7px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--soft);
  color:var(--muted);
  border-radius:99px;
  font-size:10.5px;
  font-weight:400;
}
.dash-nav__link.is-active .dash-nav__count{
  background:rgba(255,253,251,.14);
  color:var(--paper);
}

.dash-nav__signout{
  margin-top:22px;
  padding-top:22px;
  border-top:1px solid var(--line);
}
.dash-nav__signout .btn{
  width:100%;
}


/* ============================================================
   7. DASH PANELS
   ============================================================ */
.dash-panel{ display:none; }
.dash-panel.is-active{ display:block; animation:panelFade .35s var(--ease); }

@keyframes panelFade{
  from{ opacity:0; transform:translateY(6px); }
  to  { opacity:1; transform:none; }
}

.panel-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  padding-bottom:20px;
  margin-bottom:24px;
  border-bottom:1px solid var(--line);
}

.panel-head__title{
  font-size:clamp(24px, 2.8vw, 32px);
  font-weight:300;
  line-height:1.15;
  margin-top:8px;
}

.panel-head__text{
  margin-top:8px;
  font-size:13.5px;
  color:var(--muted);
}


/* ============================================================
   8. DASHBOARD OVERVIEW STATS
   ============================================================ */
.stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:clamp(14px, 2vw, 22px);
  margin-bottom:clamp(28px, 3.6vw, 44px);
}

.stat{
  padding:clamp(20px, 2.4vw, 30px);
  background:var(--soft);
  border-radius:var(--radius);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.stat__icon{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--paper);
  color:var(--gold);
}
.stat__icon svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.stat__label{
  font-size:10px;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--muted);
}

.stat__value{
  font-family:var(--font-display);
  font-size:clamp(24px, 2.6vw, 32px);
  font-weight:400;
  line-height:1;
  color:var(--ink);
}


/* ============================================================
   9. ORDERS LIST
   ============================================================ */
.orders{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.order-card{
  padding:clamp(18px, 2.2vw, 26px);
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--paper);
  display:flex;
  flex-direction:column;
  gap:16px;
}

.order-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.order-card__num{
  font-family:var(--font-body);
  font-size:12.5px;
  font-weight:500;
  letter-spacing:.06em;
  color:var(--ink);
}

.order-card__date{
  margin-top:4px;
  font-size:11.5px;
  color:var(--muted);
}

.order-status{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:5px 11px;
  border-radius:99px;
  font-size:9.5px;
  letter-spacing:.16em;
  text-transform:uppercase;
  font-weight:500;
  white-space:nowrap;
}
.order-status::before{
  content:'';
  width:6px;
  height:6px;
  border-radius:50%;
}

.order-status--pending{
  background:#fbf4e6;
  color:#8a6a2b;
}
.order-status--pending::before{ background:#c9a227; }

.order-status--shipped{
  background:#e9eff7;
  color:#3c5a83;
}
.order-status--shipped::before{ background:#5b7fa5; }

.order-status--delivered{
  background:#e9f2e7;
  color:#486b3f;
}
.order-status--delivered::before{ background:#6ea06e; }

.order-status--cancelled{
  background:#f7e8e6;
  color:#8a2d26;
}
.order-status--cancelled::before{ background:var(--rose); }

/* items row */
.order-card__items{
  display:flex;
  gap:12px;
  align-items:center;
  padding-top:14px;
  border-top:1px solid var(--line);
}

.order-item{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
  flex:1;
}

.order-item__media{
  flex-shrink:0;
  width:52px;
  aspect-ratio:3 / 4;
  overflow:hidden;
  background:var(--soft);
  border-radius:var(--radius);
}
.order-item__media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.order-item__body{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.order-item__name{
  font-size:12.5px;
  font-weight:400;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.order-item__meta{
  font-size:11px;
  color:var(--muted);
}

.order-card__foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding-top:14px;
  border-top:1px solid var(--line);
}

.order-card__total{
  display:flex;
  align-items:baseline;
  gap:10px;
}
.order-card__total span{
  font-size:10.5px;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--muted);
}
.order-card__total strong{
  font-family:var(--font-display);
  font-size:19px;
  font-weight:500;
  color:var(--ink);
}

.order-card__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.order-card__actions .btn{
  padding:10px 20px;
  font-size:9.5px;
  letter-spacing:.18em;
}


/* ============================================================
   10. ADDRESSES
   ============================================================ */
.addresses{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:clamp(16px, 2.2vw, 26px);
}

.address-card{
  padding:clamp(20px, 2.4vw, 30px);
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--paper);
  display:flex;
  flex-direction:column;
  gap:12px;
  position:relative;
}

.address-card--default{
  border-color:var(--ink);
}

.address-card__tag{
  position:absolute;
  top:-1px;
  right:-1px;
  padding:5px 10px;
  background:var(--ink);
  color:var(--paper);
  font-size:9px;
  letter-spacing:.16em;
  text-transform:uppercase;
  border-radius:0 var(--radius) 0 var(--radius);
}

.address-card__name{
  font-size:14px;
  font-weight:500;
  color:var(--ink);
}

.address-card__text{
  font-size:13px;
  font-weight:300;
  line-height:1.7;
  color:var(--ink-soft);
}

.address-card__meta{
  font-size:11.5px;
  color:var(--muted);
}

.address-card__actions{
  display:flex;
  gap:14px;
  margin-top:auto;
  padding-top:12px;
  border-top:1px solid var(--line);
  flex-wrap:wrap;
}

.address-card__link{
  font-size:10px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted);
  border-bottom:1px solid transparent;
  transition:color .3s, border-color .3s;
}
.address-card__link:hover{
  color:var(--ink);
  border-bottom-color:var(--ink);
}
.address-card__link--danger:hover{
  color:var(--rose);
  border-bottom-color:var(--rose);
}

.add-address{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:clamp(28px, 4vw, 48px);
  background:var(--soft);
  border:1px dashed var(--line-dark);
  border-radius:var(--radius);
  cursor:pointer;
  text-align:center;
  min-height:180px;
  transition:border-color .3s, background .3s;
}
.add-address:hover{
  border-color:var(--ink);
  background:var(--paper);
}

.add-address__icon{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:50%;
  background:var(--paper);
  color:var(--gold);
}
.add-address__icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.add-address__title{
  font-size:13px;
  font-weight:500;
  color:var(--ink);
}
.add-address__text{
  font-size:11.5px;
  color:var(--muted);
}


/* ============================================================
   11. WISHLIST PREVIEW
   ============================================================ */
.wish-preview{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:clamp(12px, 1.8vw, 22px);
}

.wish-mini{
  display:flex;
  flex-direction:column;
  gap:10px;
  cursor:pointer;
  transition:transform .3s var(--ease);
}
.wish-mini:hover{ transform:translateY(-3px); }

.wish-mini__media{
  aspect-ratio:3 / 4;
  overflow:hidden;
  background:var(--soft);
  border-radius:var(--radius);
}
.wish-mini__media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.wish-mini__name{
  font-size:12px;
  font-weight:400;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.wish-mini__price{
  font-size:12px;
  color:var(--ink);
}


/* ============================================================
   12. EMPTY STATE (inside a panel)
   ============================================================ */
.panel-empty{
  padding:clamp(48px, 6vw, 80px) clamp(20px, 4vw, 40px);
  text-align:center;
  border:1px dashed var(--line-dark);
  border-radius:var(--radius);
  background:var(--soft);
}

.panel-empty__icon{
  display:inline-grid;
  place-items:center;
  width:64px;
  height:64px;
  margin-bottom:20px;
  border-radius:50%;
  background:var(--paper);
  color:var(--gold);
}
.panel-empty__icon svg{
  width:26px;
  height:26px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.panel-empty__title{
  font-family:var(--font-display);
  font-size:clamp(22px, 2.8vw, 30px);
  font-weight:300;
  line-height:1.15;
  margin-bottom:10px;
}

.panel-empty__text{
  max-width:44ch;
  margin:0 auto 24px;
  font-size:13.5px;
  line-height:1.75;
  color:var(--muted);
}


/* ============================================================
   13. RESPONSIVE
   ============================================================ */
@media (max-width:1024px){
  .auth{
    grid-template-columns:1fr;
    gap:32px;
  }
  .auth__media{
    aspect-ratio:16 / 10;
    order:-1;
  }
  .auth__body{
    max-width:none;
  }

  .dash{
    grid-template-columns:1fr;
    gap:24px;
  }
  .dash-nav{
    position:static;
    top:auto;
  }
  .dash-nav__list{
    flex-direction:row;
    flex-wrap:wrap;
    gap:8px;
  }
  .dash-nav__link{
    padding:9px 14px;
    border:1px solid var(--line);
    border-radius:99px;
    background:var(--paper);
  }
  .dash-nav__link:hover{
    background:var(--soft);
  }
  .dash-nav__link.is-active{
    background:var(--ink);
    color:var(--paper);
    border-color:var(--ink);
  }
  .dash-nav__count{
    background:transparent;
    padding:0;
    min-width:auto;
    height:auto;
  }
  .dash-nav__link.is-active .dash-nav__count{
    background:transparent;
  }
  .dash-nav__signout{
    display:none;
  }

  .stats{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .addresses{
    grid-template-columns:1fr;
  }

  .wish-preview{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width:640px){
  .form-grid{
    grid-template-columns:1fr;
  }

  .stats{
    grid-template-columns:1fr;
    gap:12px;
  }

  .wish-preview{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .order-card__items{
    flex-direction:column;
    align-items:stretch;
  }

  .order-item__media{
    width:60px;
  }

  .form-actions .btn{
    flex:1 1 100%;
  }
}