/* =========================================================
   Black Sistem – user dashboard (RTL, light + dark, responsive)
   Relies on tokens from main.css
   ========================================================= */
.dash-body { --dash-h: 72px; --side-w: 290px; --dash-gap: clamp(14px, 1.8vw, 24px); }

/* panels share one look */
.dash-header, .profile, .side-nav, .stat, .panel, .promo, .dash-side {
  --panel: var(--surface);
}
:root[data-theme="dark"] .dash-body { background: #060516; }
:root[data-theme="dark"] .dash-body { --panel: #0b0924; }

/* ---------- Header ---------- */
.dash-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--head-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.dash-header__inner {
  display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.5rem);
  height: var(--dash-h); padding-inline: clamp(12px, 2.4vw, 32px);
}
.dash-actions { display: flex; align-items: center; gap: .2rem; padding-inline-start: .4rem; border-inline-start: 1px solid var(--line); margin-inline-start: .2rem; }
.dash-header .dash-menu { order: 0; }
.dash-actions { order: 1; }
.dash-search { order: 2; flex: 1; max-width: 640px; margin-inline: auto; width: auto; height: 46px; margin-inline-end: auto; padding-inline: 1.1rem; }
.dash-search input { font-size: .85rem; }
.dash-brand { order: 3; display: flex; align-items: center; gap: .7rem; flex: none; }
.dash-brand img { height: 46px; width: auto; }
:root[data-theme="dark"] .dash-brand img { filter: hue-rotate(38deg) saturate(1.1) brightness(1.15); }
.dash-brand__text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.dash-brand__text strong { font-family: var(--latin); font-size: 1.05rem; font-weight: 600; color: var(--text-strong); }
.dash-brand__text small { font-family: var(--latin); font-size: .68rem; color: var(--muted); }
:root[data-theme="dark"] .dash-search { box-shadow: 0 0 0 1px rgba(139, 92, 246, .25), 0 0 24px -6px rgba(139, 92, 246, .4); border-color: rgba(139, 92, 246, .6); }

/* ---------- Layout ---------- */
.dash {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); gap: var(--dash-gap);
  max-width: 1600px; margin-inline: auto; padding: var(--dash-gap) clamp(12px, 2.4vw, 32px) 2.5rem;
  align-items: start;
}
.dash.is-collapsed { grid-template-columns: minmax(0, 1fr); }
.dash.is-collapsed .dash-side { display: none; }
.dash-main { display: flex; flex-direction: column; gap: var(--dash-gap); min-width: 0; }

/* ---------- Sidebar ---------- */
.dash-side {
  position: sticky; top: calc(var(--dash-h) + var(--dash-gap)); isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 1rem; min-height: calc(100vh - var(--dash-h) - var(--dash-gap) * 2);
  padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow);
}
.dash-side__close { display: none; }
.profile { display: flex; align-items: center; gap: .9rem; padding: .5rem .4rem .9rem; border-bottom: 1px solid var(--line); }
.profile__avatar {
  display: grid; place-items: center; width: 62px; height: 62px; flex: none; border-radius: 50%;
  color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent);
}
.profile__avatar .i { width: 30px; height: 30px; }
.profile__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.6; }
.profile__info strong { display: flex; align-items: center; gap: .4rem; font-size: 1rem; font-weight: 700; color: var(--text-strong); }
.profile__info strong .i { color: var(--accent-2); fill: currentColor; stroke-width: 1.2; }
.profile__info span { font-size: .82rem; color: var(--muted); }
.side-nav a {
  display: flex; align-items: center; gap: .9rem; padding: .85rem .9rem; border-radius: 12px;
  font-size: .95rem; font-weight: 500; color: var(--text); transition: background-color .18s, color .18s;
}
.side-nav li + li { border-top: 1px solid var(--line); }
.side-nav li:has(.is-active) , .side-nav li:has(.is-active) + li { border-top-color: transparent; }
.side-nav a .i { color: var(--text); }
.side-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.side-nav a:hover .i { color: var(--accent); }
.side-nav a.is-active { background: var(--btn-bg); color: #fff; box-shadow: var(--btn-shadow); }
.side-nav a.is-active .i { color: #fff; }
.side-art { position: relative; margin-top: auto; height: 180px; margin-inline: -1rem; margin-bottom: -1rem; pointer-events: none; }
.side-art img {
  position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%); mask-image: linear-gradient(to bottom, transparent, #000 55%); opacity: .9;
}
.dash-backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(5, 8, 30, .6); backdrop-filter: blur(2px); }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--dash-gap); }
.stat {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem clamp(1.1rem, 2vw, 1.8rem); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); box-shadow: var(--shadow);
}
:root[data-theme="dark"] .stat { background: linear-gradient(135deg, #0f0c2e, #0a0820 60%, #14103f); }
.stat::after {
  content: ""; position: absolute; z-index: -1; inset-inline-end: -10%; bottom: -30%; width: 55%; height: 140%;
  background: linear-gradient(115deg, transparent 40%, var(--accent-soft) 70%, transparent 71%); transform: skewX(-20deg); pointer-events: none;
}
.stat__text { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.stat__text span { font-size: .95rem; font-weight: 600; color: var(--text); }
.stat__text strong { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: var(--text-strong); line-height: 1.3; }
.stat__bar { display: block; width: 64px; height: 3px; margin-top: .5rem; border-radius: 3px; background: linear-gradient(90deg, var(--accent), transparent); }
.stat__icon {
  display: grid; place-items: center; width: clamp(58px, 6vw, 78px); aspect-ratio: 1; flex: none; border-radius: 50%;
  color: var(--accent); border: 2px solid var(--accent); background: var(--accent-soft);
}
:root[data-theme="dark"] .stat__icon { box-shadow: 0 0 22px -4px rgba(139, 92, 246, .7), inset 0 0 14px rgba(139, 92, 246, .25); color: #c8b2ff; }
.stat__icon .i { width: 52%; height: 52%; stroke-width: 1.5; }

/* ---------- Orders panel ---------- */
.panel { padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); box-shadow: var(--shadow); }
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.panel__head h2 { font-size: 1.15rem; font-weight: 800; color: var(--text-strong); }
.panel__head .i { color: var(--accent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
:root[data-theme="dark"] .table-wrap { background: rgba(10, 8, 32, .7); }
.orders { width: 100%; border-collapse: collapse; font-size: .88rem; }
.orders th { padding: .9rem 1rem; text-align: start; font-size: .8rem; font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 1px solid var(--line); }
.orders td { padding: .8rem 1rem; white-space: nowrap; border-top: 1px solid var(--line); vertical-align: middle; color: var(--text); }
.orders tbody tr:first-child td { border-top: 0; }
.orders tbody tr:hover { background: var(--accent-soft); }
.ltr-cell { text-align: right; font-family: var(--latin); font-size: .85rem; }
.prod { display: flex; align-items: center; gap: .9rem; min-width: 190px; font-weight: 500; }
.prod img { width: 66px; height: 44px; flex: none; object-fit: cover; border-radius: 8px; background: var(--media-bg); border: 1px solid var(--line); }
.amount { font-weight: 600; }
.status { display: inline-block; min-width: 96px; padding: .3rem .9rem; border-radius: 8px; border: 1px solid; font-size: .8rem; font-weight: 500; text-align: center; }
.status--shipping { color: #17b26a; border-color: #17b26a; background: rgba(23, 178, 106, .12); }
.status--done { color: #2e8bff; border-color: #2e8bff; background: rgba(46, 139, 255, .12); }
.status--canceled { color: #f0384f; border-color: #f0384f; background: rgba(240, 56, 79, .12); }
:root[data-theme="dark"] .status--shipping { color: #35d894; }
:root[data-theme="dark"] .status--done { color: #5aa8ff; }
:root[data-theme="dark"] .status--canceled { color: #ff5d73; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .5rem 1rem; border-radius: 10px;
  border: 1px solid var(--accent); color: var(--accent); background: var(--accent-soft); font-size: .84rem; font-weight: 500; white-space: nowrap;
  transition: background-color .18s, color .18s;
}
:root[data-theme="dark"] .btn-outline { color: #d8ccff; border-color: rgba(139, 92, 246, .8); background: rgba(124, 58, 237, .12); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-outline--lg { padding: .65rem 1.4rem; border-radius: 99px; font-size: .9rem; }

/* ---------- Promo banner ---------- */
.promo {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 190px; padding: 1.5rem clamp(1.2rem, 3vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--r-md);
  background: radial-gradient(90% 160% at 85% 50%, #2a1a72 0, #0b0925 55%, #060516 100%); color: #f3f1ff; box-shadow: var(--shadow);
}
.promo__art { position: relative; flex: 0 0 min(52%, 560px); align-self: stretch; min-height: 170px; }
.promo__art img { position: absolute; object-fit: cover; border-radius: 14px; -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent 100%); mask-image: radial-gradient(closest-side, #000 60%, transparent 100%); }
.promo__art .a1 { inset-inline-start: 0; top: 8%; width: 54%; height: 84%; }
.promo__art .a2 { inset-inline-start: 24%; top: -6%; width: 52%; height: 112%; z-index: 1; }
.promo__art .a3 { inset-inline-end: 0; top: 12%; width: 46%; height: 78%; }
.promo__badge {
  position: absolute; z-index: 2; inset-inline-end: 2%; top: 2%; padding: .6rem 1rem; transform: rotate(-6deg);
  font-weight: 800; font-size: .95rem; line-height: 1.35; text-align: center; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #5b21b6); clip-path: polygon(4% 8%, 96% 0, 100% 90%, 8% 100%); box-shadow: 0 8px 24px rgba(124, 58, 237, .6);
}
.promo__body { flex: 1; min-width: 0; }
.promo__body h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.3; background: linear-gradient(180deg, #c9a8ff, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.promo__body p { margin-block: .2rem 1rem; font-size: clamp(.9rem, 1.4vw, 1.05rem); font-weight: 500; color: #ece9ff; }
.promo .btn-outline { color: #e6dcff; border-color: rgba(167, 139, 250, .8); background: rgba(124, 58, 237, .15); }
.promo .btn-outline:hover { background: #7c3aed; color: #fff; }
.promo__icon { display: grid; place-items: center; width: 92px; height: 92px; flex: none; color: #a47cff; opacity: .9; transform: rotate(-12deg); }
.promo__icon .i { width: 100%; height: 100%; stroke-width: 1.2; filter: drop-shadow(0 0 12px rgba(139, 92, 246, .8)); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1280px) {
  .dash-body { --side-w: 250px; }
  .promo__icon { display: none; }
}

/* tablet + phone: the account menu is always visible, in the page flow above the content (no burger / drawer) */
@media (max-width: 1024px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-side { position: static; min-height: 0; gap: .9rem; padding: .9rem; }
  .dash.is-collapsed .dash-side { display: flex; }
  .dash-side .profile { padding: .2rem .2rem .85rem; }
  .side-art { display: none; }
  .side-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
  .side-nav li + li { border-top: 0; }
  .side-nav a { height: 100%; padding: .7rem .8rem; gap: .6rem; border: 1px solid var(--line); font-size: .9rem; line-height: 1.5; }
  .side-nav a .i { width: 20px; height: 20px; }
  .side-nav a.is-active { border-color: transparent; }
  .stat { padding-inline: 1.1rem; }
}
@media (max-width: 640px) {
  .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-nav li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .side-nav a { padding: .65rem .7rem; gap: .5rem; font-size: .86rem; }
  .side-nav a .i { width: 19px; height: 19px; }
}

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; gap: .8rem; }
  .stat__icon { width: 52px; height: 52px; aspect-ratio: auto; align-self: flex-start; }
  .promo { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .promo__art { flex: none; width: 100%; height: 190px; }
  .promo__body .btn-outline { margin-inline: auto; }
}

@media (max-width: 760px) {
  .dash-header__inner { flex-wrap: wrap; height: auto; padding-block: .6rem; row-gap: .5rem; }
  .dash-body { --dash-h: 118px; }
  .dash-header .dash-menu { order: 0; }
  .dash-actions { order: 1; margin-inline-end: auto; }
  .dash-brand { order: 2; }
  .dash-search { order: 3; flex: 1 1 100%; max-width: none; margin: 0; height: 42px; }
  .dash-brand__text strong { font-size: .95rem; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .stat { flex-direction: column-reverse; align-items: center; justify-content: flex-end; gap: .55rem; padding: .95rem .35rem 1rem; text-align: center; }
  .stat__text { align-items: center; }
  .stat__text span { font-size: .78rem; line-height: 1.6; }
  .stat__text strong { font-size: 1.6rem; }
  .stat__bar { width: 40px; margin-top: .3rem; margin-inline: auto; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
  .stat__icon { width: 44px; height: 44px; align-self: center; border-width: 1.5px; }
}
@media (max-width: 380px) {
  .stats { gap: .45rem; }
  .stat { padding-inline: .2rem; }
  .stat__text span { font-size: .72rem; }
  .stat__text strong { font-size: 1.45rem; }
  .stat__icon { width: 38px; height: 38px; }
}

/* orders table -> stacked cards */
@media (max-width: 900px) {
  .table-wrap { border: 0; background: none !important; overflow: visible; }
  .orders, .orders tbody, .orders tr, .orders td { display: block; width: 100%; }
  .orders thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .orders tbody { display: grid; gap: .8rem; }
  .orders tr { padding: .4rem 1rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-soft); }
  :root[data-theme="dark"] .orders tr { background: rgba(10, 8, 32, .8); }
  .orders td { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px dashed var(--line) !important; white-space: normal; text-align: end; }
  .orders tbody tr:first-child td, .orders td:first-child { border-top: 0 !important; }
  .orders td::before { content: attr(data-label); flex: none; font-size: .78rem; color: var(--muted); }
  .orders td:first-child::before, .orders .td-action::before { display: none; }
  .orders td:first-child { padding-block: .8rem; }
  .orders .td-action { padding-top: .8rem; }
  .orders .td-action .btn-outline { width: 100%; }
  .prod { min-width: 0; }
  .ltr-cell { text-align: end; }
}

@media (max-width: 460px) {
  .dash-brand img { height: 38px; }
  .dash-brand__text small { display: none; }
  .profile__avatar { width: 54px; height: 54px; }
  .promo { padding: 1.2rem 1rem; }
  .promo__art { height: 160px; }
}

/* keep the dashboard search visible at every width (main.css hides .search on tablets) */
.dash-header .dash-search { position: static; display: flex; box-shadow: none; }
:root[data-theme="dark"] .dash-header .dash-search { box-shadow: 0 0 0 1px rgba(139, 92, 246, .25), 0 0 24px -6px rgba(139, 92, 246, .4); }

/* =========================================================
   Account page (اطلاعات حساب)
   ========================================================= */
.acct { padding: clamp(1rem, 2.4vw, 1.8rem); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow); }
.acct__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.1rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.acct__title { display: flex; align-items: center; gap: .9rem; }
.acct__icon { position: relative; display: grid; place-items: center; width: 48px; height: 48px; color: var(--accent); }
.acct__icon .i { width: 30px; height: 30px; }
.acct__icon::after { content: ""; position: absolute; inset-inline: 0; bottom: -1.25rem; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
:root[data-theme="dark"] .acct__icon { color: #c8b2ff; }
.acct__title h1 { font-size: 1.3rem; font-weight: 800; color: var(--text-strong); line-height: 1.4; }
.acct__title p { font-size: .85rem; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: 99px; font-size: .88rem; color: var(--muted); transition: color .18s, background-color .18s; }
.back-link:hover { color: var(--accent); background: var(--accent-soft); }

.acct__grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(1rem, 2vw, 1.6rem); align-items: start; }
.acct__forms { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.acct__side { display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: calc(var(--dash-h) + var(--dash-gap)); }

/* form cards */
.fcard { margin: 0; min-width: 0; padding: 1.2rem clamp(1rem, 2vw, 1.5rem) 1.4rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
:root[data-theme="dark"] .fcard { background: rgba(14, 11, 40, .55); }
.fcard__head { float: inline-start; width: 100%; display: flex; align-items: center; gap: .6rem; padding: 0; margin-bottom: 1rem; font-size: 1.02rem; font-weight: 700; color: var(--text-strong); }
.fcard__head + * { clear: both; }
.fcard__head .i { color: var(--accent); }
:root[data-theme="dark"] .fcard__head .i { color: #b79bff; }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field { margin-bottom: 1rem; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; margin-bottom: .45rem; font-size: .88rem; font-weight: 600; color: var(--text-strong); }
.req { color: #ff4d6d; text-decoration: none; margin-inline-start: .15rem; }
.opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
.control { position: relative; display: flex; align-items: center; }
.control > input {
  width: 100%; height: 50px; padding-block: 0; padding-inline: 1rem; padding-left: 3rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); font-size: .92rem; transition: border-color .18s, box-shadow .18s, background-color .18s;
}
:root[data-theme="dark"] .control > input { background: rgba(6, 5, 24, .8); }
.control > input::placeholder { color: var(--muted); opacity: .75; }
.control > input:hover { border-color: var(--accent-2); }
.control > input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* field icon sits on the left; password eye on the right (as in the design) */
.control > .i { position: absolute; left: .95rem; width: 19px; height: 19px; color: var(--accent); pointer-events: none; }
.control--pwd > input { padding-right: 3.2rem; }
.eye { position: absolute; right: .55rem; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.eye:hover { color: var(--accent); background: var(--accent-soft); }
.field--locked .control > input { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
:root[data-theme="dark"] .field--locked .control > input { background: rgba(20, 16, 55, .5); }
.hint { margin-top: .4rem; font-size: .78rem; line-height: 1.7; color: var(--muted); }
.hint--top { margin: -.4rem 0 1rem; }
.hint--center { text-align: center; }
.field-error { display: flex; align-items: center; gap: .35rem; margin-top: .4rem; font-size: .8rem; color: #ff4d6d; }
.field-error[hidden] { display: none; }
.field.has-error .control > input { border-color: #ff4d6d; box-shadow: 0 0 0 3px rgba(255, 77, 109, .14); }
.field.is-valid .control > input { border-color: #22c55e; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; }
.code-row .btn-outline { height: 50px; border-radius: 12px; }
.code-row .btn-outline:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }

/* password strength */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-top: .55rem; }
.strength i { height: 4px; border-radius: 4px; background: var(--line); transition: background-color .2s; }
.strength span { grid-column: 1 / -1; font-size: .76rem; color: var(--muted); }
.strength[data-level="1"] i:nth-child(-n+1) { background: #ef4444; }
.strength[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.strength[data-level="3"] i:nth-child(-n+3) { background: #84cc16; }
.strength[data-level="4"] i:nth-child(-n+4) { background: #22c55e; }

/* save */
.form-actions { display: flex; flex-direction: column; gap: .5rem; padding-top: .4rem; }
.btn-save {
  display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; height: 54px; border: 0; border-radius: 14px;
  background: var(--btn-bg); color: #fff; font-weight: 700; font-size: 1rem; box-shadow: var(--btn-shadow); transition: filter .18s, transform .18s, opacity .18s;
}
.btn-save:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn-save:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-save.is-loading span::after { content: "…"; }
.form-note { text-align: center; font-size: .8rem; color: var(--muted); }

/* avatar card */
.avatar-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 2.2rem 1rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #07061a; color: #ece9ff; }
.avatar-card__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(135deg, transparent 0 46px, rgba(139, 92, 246, .55) 46px 47px, transparent 47px 92px),
    radial-gradient(80% 70% at 50% 40%, rgba(124, 58, 237, .35), transparent 70%), #07061a;
  opacity: .9;
}
.avatar { position: relative; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; border: 2px solid #8b5cf6; box-shadow: 0 0 28px -4px rgba(139, 92, 246, .8), inset 0 0 24px rgba(139, 92, 246, .3); background: rgba(10, 8, 32, .7); overflow: hidden; color: #8b5cf6; }
.avatar .i { width: 66px; height: 66px; fill: currentColor; stroke-width: 0; opacity: .85; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.btn-pill { display: inline-flex; align-items: center; gap: .55rem; padding: .6rem 1.2rem; border-radius: 99px; border: 1px solid rgba(167, 139, 250, .6); background: rgba(10, 8, 32, .6); color: #f0eaff; font-size: .86rem; transition: background-color .18s, border-color .18s; }
.btn-pill:hover { background: rgba(124, 58, 237, .35); border-color: #a78bfa; }
.link-danger { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; color: #ff7a90; font-size: .8rem; }
.link-danger:hover { text-decoration: underline; }
.avatar-card .hint { color: #a9a3d6; margin: 0; }
.avatar-card.is-busy .avatar { opacity: .6; }

.secure-card { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.4rem 1rem; text-align: center; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
:root[data-theme="dark"] .secure-card { background: rgba(14, 11, 40, .55); }
.secure-card .i { width: 32px; height: 32px; color: var(--accent); }
:root[data-theme="dark"] .secure-card .i, :root[data-theme="dark"] .secure-card strong { color: #c8a6ff; }
.secure-card strong { font-size: .9rem; color: var(--accent); }
.secure-card p { font-size: .82rem; color: var(--muted); line-height: 1.9; }

/* toast */
.toast-host { position: fixed; z-index: 300; inset-inline: 0; bottom: 1.2rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; pointer-events: none; padding-inline: 1rem; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: .6rem; max-width: 460px; padding: .8rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5); font-size: .9rem; animation: toast-in .25s ease; }
.toast--ok { border-color: #22c55e; } .toast--ok .i { color: #22c55e; }
.toast--err { border-color: #ff4d6d; } .toast--err .i { color: #ff4d6d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1024px) {
  .acct__grid { display: flex; flex-direction: column; }
  .acct__side { display: contents; }
  .avatar-card { order: -1; }
  .secure-card { order: 2; }
  .acct__forms { order: 1; }
}
@media (max-width: 640px) {
  .acct { padding: 1rem; border-radius: var(--r-md); }
  .acct__head { flex-wrap: wrap; }
  .frow { grid-template-columns: minmax(0, 1fr); }
  .form-actions { position: sticky; bottom: 0; z-index: 5; margin-inline: -1rem; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
  .form-note { display: none; }
  .code-row { grid-template-columns: 1fr; }
  .code-row .btn-outline { height: 46px; }
}

/* وضعیت سفارشهای واقعی در جدول «آخرین سفارشها» (pending/processing تازهاند؛
   shipped/completed/canceled همان کلاسهای قبلیاند) */
.status--pending { color: #b7791f; border-color: #b7791f; background: rgba(183, 121, 31, .12); }
.status--processing { color: #2e8bff; border-color: #2e8bff; background: rgba(46, 139, 255, .12); }
:root[data-theme="dark"] .status--pending { color: #f0b429; }
:root[data-theme="dark"] .status--processing { color: #5aa8ff; }
.orders__empty { padding: 1.6rem 1rem; text-align: center; color: var(--muted, #6b7280); }
