/* ==========================================================================
   account.css — حساب کاربری
   ورود/ثبت‌نام (کارت دوبخشی)، ستون منو، پیشخوان، سفارش‌ها، آدرس‌ها، فرم‌های حساب
   ========================================================================== */

/* ---------- ورود / ثبت‌نام ---------- */
.auth { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); max-width: 980px; margin: 8px auto 0; border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--c-line); box-shadow: var(--shadow); }
.auth__aside {
	position: relative; display: flex; flex-direction: column; gap: 18px; padding: clamp(24px, 4vw, 40px);
	color: rgba(255, 255, 255, .85); overflow: hidden;
	background: radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--c-accent) 35%, transparent), transparent 60%), linear-gradient(160deg, var(--c-primary), var(--c-dark));
}
.auth__aside::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .05); }
.auth__aside .logo__img { max-height: 48px; }
.auth__aside-title { margin: 8px 0 0; color: #fff; font-size: 21px; font-weight: 700; line-height: 1.6; }
.auth__perks { display: grid; gap: 12px; }
.auth__perks li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.auth__perks .ico { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: var(--c-accent); }
.auth__help { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); font-size: 13.5px; }
.auth__help:hover { color: #fff; }
.auth__help b { color: #fff; }

.auth__main { padding: clamp(22px, 4vw, 40px); }
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 24px; border-radius: 14px; background: var(--c-soft); }
.auth__tabs button { min-height: 44px; border-radius: 11px; font-weight: 700; color: var(--c-muted); transition: background-color .2s, color .2s, box-shadow .2s; }
.auth__tabs button[aria-selected="true"] { background: #fff; color: var(--c-primary); box-shadow: var(--shadow-sm); }
.js .auth__panel[data-hidden] { display: none; }
.auth__panel + .auth__panel { margin-top: 28px; }
.js .auth__panel + .auth__panel { margin-top: 0; }
.auth__title { font-size: var(--h2); margin-bottom: 18px; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 18px; font-size: 13.5px; }
.auth__check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--c-muted); }
.auth__check input { width: 18px; height: 18px; accent-color: var(--c-primary); }
.auth__lost { font-weight: 700; }
.auth__note { font-size: 13px; color: var(--c-muted); }
.auth__switch { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--c-muted); }
.auth__switch button { font-weight: 700; color: var(--c-primary); }
.auth .woocommerce-privacy-policy-text { font-size: 12px; color: var(--c-muted); }
@media (max-width: 767.98px) {
	.auth { grid-template-columns: 1fr; }
	.auth__aside { order: 2; }
	.auth__perks { grid-template-columns: 1fr 1fr; gap: 10px; }
	.auth__perks li { font-size: 13px; }
}

/* فرم‌های بازیابی رمز */
.woocommerce-ResetPassword, .woocommerce-form-login:not(.auth .woocommerce-form-login) { max-width: 520px; margin-inline: auto; padding: 28px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; }

/* ---------- چیدمان حساب ---------- */
.acc { display: grid; gap: 24px; grid-template-columns: 270px minmax(0, 1fr); align-items: start; }
.acc__side { position: sticky; top: 150px; padding: 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; }
.hdr.is-compact ~ #main .acc__side { top: 96px; }
.acc-user { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--c-line); }
.acc-user__avatar { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--c-primary); color: #fff; font-size: 22px; font-weight: 700; box-shadow: 0 0 0 4px var(--c-primary-l); }
.acc-user__txt { min-width: 0; }
.acc-user__txt strong { display: block; font-size: 15px; color: var(--c-dark); }
.acc-user__txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--c-muted); }
.acc-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.acc-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--c-text); font-weight: 700; font-size: 14.5px; transition: background-color .2s, color .2s; }
.acc-nav a .ico { color: var(--c-muted); transition: color .2s; }
.acc-nav a:hover { background: var(--c-soft); color: var(--c-primary); }
.acc-nav .is-active a { background: var(--c-primary); color: #fff; }
.acc-nav .is-active a .ico { color: #fff; }
.acc-nav .woocommerce-MyAccount-navigation-link--customer-logout { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--c-line); }
.acc-nav .woocommerce-MyAccount-navigation-link--customer-logout a, .acc-nav .woocommerce-MyAccount-navigation-link--customer-logout a .ico { color: var(--c-danger); }
.acc-nav .woocommerce-MyAccount-navigation-link--customer-logout a:hover { background: #fdecea; }
.acc__content { min-width: 0; }
.acc__content > h2, .acc__content h2.woocommerce-order-details__title, .acc__content h2.woocommerce-column__title, .acc__content .woocommerce-Address-title h2 { font-size: var(--h2); }
@media (max-width: 991.98px) {
	.acc { grid-template-columns: minmax(0, 1fr); }
	.acc__side { min-width: 0; }
	.acc__side { position: static; padding: 12px; }
	.acc-nav ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
	.acc-nav li { flex: none; }
	.acc-nav a { padding: 8px 14px; background: var(--c-soft); white-space: nowrap; font-size: 13.5px; }
	.acc-nav .woocommerce-MyAccount-navigation-link--customer-logout { margin: 0; padding: 0; border: 0; }
}

/* ---------- پیشخوان ---------- */
.dash { display: grid; gap: 18px; }
.dash__hello {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	padding: 22px 24px; border-radius: var(--radius-lg); color: rgba(255, 255, 255, .85);
	background: radial-gradient(80% 140% at 0% 0%, color-mix(in srgb, var(--c-accent) 30%, transparent), transparent 60%), linear-gradient(120deg, var(--c-primary), var(--c-primary-d));
}
.dash__hello p { margin: 0; }
.dash__title { margin-bottom: 4px !important; color: #fff; font-size: 20px; font-weight: 700; }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dash-stats li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; }
.dash-stats__ico { grid-row: span 2; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--c-primary-l); color: var(--c-primary); }
.dash-stats__ico.is-accent { background: var(--c-accent-l); color: var(--c-accent-d); }
.dash-stats__ico.is-green { background: #eaf7f0; color: var(--c-success); }
.dash-stats strong { font-size: 20px; line-height: 1.4; color: var(--c-dark); }
.dash-stats strong .woocommerce-Price-currencySymbol { font-size: 12px; font-weight: 400; color: var(--c-muted); }
.dash-stats small { font-size: 13px; color: var(--c-muted); }
@media (max-width: 575.98px) { .dash-stats { grid-template-columns: 1fr; } }

.dash-box { padding: 18px 20px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; }
.dash-box__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dash-box__head a { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; }
.dash-box__title { margin: 0; font-size: 16px; font-weight: 700; color: var(--c-dark); }
.dash-orders li + li { border-top: 1px solid var(--c-soft); }
.dash-orders a { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "no status total" "date status total"; align-items: center; gap: 0 16px; padding: 12px 4px; color: var(--c-text); }
.dash-orders a:hover { background: var(--c-soft); border-radius: 10px; }
.dash-orders__no { grid-area: no; font-weight: 700; }
.dash-orders__date { grid-area: date; font-size: 12.5px; color: var(--c-muted); }
.dash-orders .status-badge { grid-area: status; }
.dash-orders__total { grid-area: total; font-weight: 700; min-width: 120px; text-align: end; }
.dash-empty { margin: 0; color: var(--c-muted); }
.dash-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dash-links a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; color: var(--c-text); transition: border-color .2s, box-shadow .2s, transform .25s var(--ease); }
.dash-links a:hover { border-color: var(--c-primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); color: var(--c-text); }
.dash-links .ico { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--c-soft); color: var(--c-primary); }
.dash-links b { display: block; font-size: 14.5px; }
.dash-links small { display: block; font-size: 12px; color: var(--c-muted); }
@media (max-width: 767.98px) { .dash-links { grid-template-columns: 1fr; } .dash-orders a { grid-template-columns: 1fr auto; grid-template-areas: "no total" "date status"; } }
.dash-support { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius-lg); background: var(--c-soft); }
.dash-support > .ico { color: var(--c-primary); }
.dash-support p { flex: 1; margin: 0; font-size: 13.5px; color: var(--c-muted); }
.dash-support b { display: block; font-size: 14.5px; color: var(--c-dark); }

/* ---------- سفارش‌ها و جزئیات سفارش ---------- */
.woocommerce-orders-table__cell-order-number a { font-weight: 700; }
.woocommerce-orders-table__cell-order-actions .button { min-height: 36px; padding: 4px 14px; font-size: 13px; }
.woocommerce-order-details, .woocommerce-customer-details { margin-top: 24px; }
.woocommerce-customer-details address { padding: 16px; border: 1px solid var(--c-line); border-radius: var(--radius); font-style: normal; line-height: 2; }
.woocommerce-customer-details .woocommerce-customer-details--phone, .woocommerce-customer-details .woocommerce-customer-details--email { margin: 0; }
.woocommerce-MyAccount-content > p:first-child mark { padding: 0 4px; }
.woocommerce-pagination { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- آدرس‌ها ---------- */
.woocommerce-Addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.woocommerce-Addresses .woocommerce-Address { padding: 18px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; }
.woocommerce-Address-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.woocommerce-Address-title h2 { margin: 0; }
.woocommerce-Address-title .edit { padding: 4px 12px; border-radius: 999px; background: var(--c-primary-l); font-size: 13px; font-weight: 700; }
.woocommerce-Address address { font-style: normal; line-height: 2; color: var(--c-muted); }
@media (max-width: 767.98px) { .woocommerce-Addresses { grid-template-columns: 1fr; } }

/* فرم‌های ویرایش آدرس و جزئیات حساب */
.woocommerce-address-fields, .woocommerce-EditAccountForm { max-width: 720px; padding: 22px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; }
.woocommerce-address-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.woocommerce-address-fields__field-wrapper .form-row { width: auto !important; margin-inline-end: 0 !important; }
.woocommerce-address-fields__field-wrapper .form-row-wide { grid-column: 1 / -1; }
@media (max-width: 575.98px) { .woocommerce-address-fields__field-wrapper { grid-template-columns: 1fr; } }
