/* ============ Account: sign-in and customer panel (WordPress «حساب کاربری») ============ */

/* ---------- sign-in ---------- */
.acc-login { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.acc-login__card { position: relative; padding: clamp(26px, 4vw, 40px); border-radius: 26px; background: #fff; border: 1px solid var(--hair); box-shadow: var(--shadow-m); text-align: center; }
.acc-login__card::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(217, 189, 140, .35); border-radius: 18px; pointer-events: none; }
.acc-login__mark { display: block; width: 64px; height: 64px; margin: 0 auto 10px; }
.acc-login__card h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.acc-login__p { font-size: 14px; line-height: 2; color: var(--text); margin: 0 0 18px; }
.acc-login__hint { margin: 18px 0 0; font-size: 12px; color: var(--muted); line-height: 2; }
.acc-login__hint a { color: var(--wine); }
.acc-pass { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--hair); text-align: start; }
.acc-pass summary { cursor: pointer; font-size: 13px; color: var(--text); list-style: none; text-align: center; }
.acc-pass summary::-webkit-details-marker { display: none; }
.acc-pass[open] summary { margin-bottom: 14px; color: var(--wine); }
.acc-check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; }
.acc-login__why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.acc-login__why li { display: grid; gap: 6px; padding: 22px; border-radius: 20px; background: var(--cream); border: 1px solid var(--hair); }
.acc-login__why .acc-ic { width: 30px; height: 30px; color: var(--gold-deep); stroke-width: 1.3; }
.acc-login__why b { font-size: 15.5px; color: var(--ink); }
.acc-login__why span { font-size: 13.5px; line-height: 1.9; color: var(--text); }

/* ---------- panel shell ---------- */
.acc { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.acc-side { position: sticky; top: 120px; border-radius: 24px; overflow: hidden; background: #fff; border: 1px solid var(--hair); box-shadow: var(--shadow-s); }
.acc-me { position: relative; display: flex; align-items: center; gap: 12px; padding: 22px 20px; color: #fff; overflow: hidden;
  background: radial-gradient(ellipse 90% 120% at 90% 0%, #8a1a39, var(--wine-ink) 75%); }
.acc-me::after { content: ""; position: absolute; inset: 0; opacity: .08; background: url("../assets/toranj-mark.svg") center / 90px repeat; pointer-events: none; }
.acc-av { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 50%; background: var(--champagne); color: var(--wine); font-size: 22px; font-weight: 700; box-shadow: 0 0 0 3px rgba(217, 189, 140, .45); }
.acc-me div { position: relative; z-index: 1; display: grid; gap: 2px; min-width: 0; }
.acc-me b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-me small { font-size: 12.5px; color: var(--gold-soft); text-align: start; }
.acc-nav { display: grid; padding: 10px; }
.acc-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--text); font-size: 14.5px; font-weight: 500; transition: background .2s, color .2s; }
.acc-nav a:hover { background: var(--cream); color: var(--wine); }
.acc-nav a.is-active { background: var(--cream); color: var(--wine); font-weight: 700; box-shadow: inset -3px 0 0 var(--gold); }
.acc-nav a span { flex: 1; }
.acc-nav a i { min-width: 24px; padding: 1px 7px; border-radius: 20px; background: var(--wine); color: #fff; font-style: normal; font-size: 12px; text-align: center; }
.acc-nav__out { margin-top: 6px; border-top: 1px solid var(--hair); border-radius: 0 0 14px 14px !important; color: var(--muted) !important; }
.acc-main { min-width: 0; display: grid; gap: 18px; align-content: start; }
.acc-main > .woocommerce-notices-wrapper:empty { display: none; }

/* ---------- headings, sections, empty states ---------- */
.acc-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.acc-h h2 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.acc-h p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--text); max-width: 60ch; }
.acc-sec { display: grid; gap: 12px; }
.acc-sec__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acc-sec__h h3 { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.acc-sec__h a { font-size: 13px; font-weight: 600; color: var(--wine); }
.acc-empty[hidden], .acc-favs[hidden], .acc-newname[hidden] { display: none !important; }
.acc-empty { display: grid; justify-items: center; gap: 10px; padding: 28px 20px; border-radius: 20px; border: 1px dashed var(--gold-soft); background: var(--ivory); text-align: center; }
.acc-empty p { margin: 0; font-size: 14px; line-height: 2; color: var(--text); }
.acc-empty p b { display: block; color: var(--ink); font-size: 15.5px; }
.acc-empty .acc-ic { width: 38px; height: 38px; color: var(--gold); stroke-width: 1.2; }
.acc-empty .cta { justify-content: center; }
.acc-note { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- dashboard stats ---------- */
.acc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.acc-stat { display: grid; gap: 4px; align-content: start; padding: 18px; border-radius: 20px; background: #fff; border: 1px solid var(--hair); box-shadow: var(--shadow-s); color: var(--text); transition: transform .3s var(--ease), border-color .2s; }
.acc-stat:hover { transform: translateY(-2px); border-color: var(--gold-soft); }
.acc-stat .acc-ic { width: 26px; height: 26px; color: var(--gold-deep); }
.acc-stat b { font-size: 26px; font-weight: 700; color: var(--wine); line-height: 1.3; }
.acc-stat span, .acc-stat small { font-size: 12.5px; }
.acc-stat--rate { color: #fff; border: 0; background: radial-gradient(ellipse 90% 120% at 90% 0%, #8a1a39, var(--wine-ink) 75%); }
.acc-stat--rate b { color: var(--champagne); font-size: 22px; }
.acc-stat--rate small, .acc-stat--rate span { color: var(--gold-soft); }
.acc-stat--rate em { font-style: normal; }

/* ---------- cards: custom orders and purchases ---------- */
.acc-card { display: grid; gap: 14px; padding: clamp(16px, 2.2vw, 22px); border-radius: 20px; background: #fff; border: 1px solid var(--hair); box-shadow: var(--shadow-s); }
.acc-card__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.acc-card__h div { display: grid; gap: 2px; }
.acc-card__h b { font-size: 15.5px; color: var(--ink); }
.acc-card__h small { font-size: 12.5px; color: var(--muted); }
.acc-chip { flex: none; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.acc-chip.run { background: var(--champagne); color: var(--gold-deep); }
.acc-chip.ok { background: #e3f3f1; color: var(--turquoise); }
.acc-chip.x { background: #f3eded; color: var(--muted); }
.acc-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: s; }
.acc-steps li { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.acc-steps li::before { content: ""; position: absolute; top: 14px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--hair); z-index: 0; }
.acc-steps li:last-child::before { display: none; }
.acc-steps li span { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sand); color: var(--muted); font-weight: 700; font-size: 13px; }
.acc-steps li.is-done { color: var(--text); }
.acc-steps li.is-done::before { background: var(--gold); }
.acc-steps li.is-done span { background: var(--gold); color: #fff; }
.acc-steps li.is-now { color: var(--wine); font-weight: 700; }
.acc-steps li.is-now span { background: var(--wine); color: #fff; box-shadow: 0 0 0 5px rgba(109, 15, 41, .12); }
.acc-req__next { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--cream); font-size: 13.5px; line-height: 1.9; color: var(--text); }
.acc-req__dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 0; }
.acc-req__dl div { display: grid; gap: 2px; }
.acc-req__dl dt { font-size: 12px; color: var(--muted); }
.acc-req__dl dd { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.9; }
.acc-req__imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-req__imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.acc-order__items { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.acc-order__items li { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 14px; background: var(--ivory); border: 1px solid var(--hair); font-size: 13px; color: var(--ink); }
.acc-order__items img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }
.acc-order__f { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 13.5px; color: var(--text); }
.acc-order__f b { color: var(--wine); font-size: 15.5px; }
.acc-order__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-pager { display: flex; justify-content: center; gap: 10px; }
.acc-favs { margin: 0; }

/* ---------- WooCommerce forms inside the panel (addresses, account details, order view) ---------- */
.acc-main .woocommerce-MyAccount-content, .acc-main form.edit-account, .acc-main .woocommerce-address-fields { display: grid; gap: 4px; }
.acc-main form .form-row { display: grid; gap: 6px; margin: 0 0 12px; }
.acc-main form .form-row label { font-size: 13px; font-weight: 600; color: var(--ink); }
.acc-main form .form-row .required { color: var(--wine); text-decoration: none; }
.acc-main .input-text, .acc-main select, .acc-main textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--ivory); font: 500 15px var(--f-body); color: var(--ink); }
.acc-main .input-text:focus, .acc-main select:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184, 140, 73, .15); }
.acc-main fieldset { margin: 14px 0 0; padding: 16px; border: 1px solid var(--hair); border-radius: 18px; }
.acc-main legend { padding: 0 8px; font-weight: 700; color: var(--wine); }
.acc-main .form-row-first, .acc-main .form-row-last { width: auto; }
.acc-main .woocommerce-address-fields__field-wrapper, .acc-main form.edit-account { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.acc-main .form-row-wide, .acc-main form.edit-account fieldset, .acc-main form.edit-account > p:not(.form-row-first):not(.form-row-last), .acc-main form.edit-account .acc-ro { grid-column: 1 / -1; }
.acc-ro { display: grid; gap: 2px; margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; background: var(--cream); border: 1px solid var(--hair); }
.acc-ro span { font-size: 12.5px; color: var(--muted); }
.acc-ro b { font-size: 17px; color: var(--ink); text-align: start; }
.acc-ro small { font-size: 12px; color: var(--muted); }
.acc-main > p:first-of-type:not(.acc-note) { margin: 0; font-size: 14px; color: var(--text); line-height: 2; }
.acc-main .woocommerce-Addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.acc-main .woocommerce-Address { padding: 18px; border-radius: 20px; background: #fff; border: 1px solid var(--hair); box-shadow: var(--shadow-s); }
.acc-main .woocommerce-Address-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.acc-main .woocommerce-Address-title h2, .acc-main .woocommerce-Address-title h3 { margin: 0; font-size: 16px; color: var(--ink); }
.acc-main .woocommerce-Address-title a { font-size: 13px; font-weight: 600; color: var(--wine); }
.acc-main address { font-style: normal; font-size: 14px; line-height: 2; color: var(--text); }
.acc-main .woocommerce-table, .acc-main table.shop_table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--hair); border-radius: 18px; overflow: hidden; font-size: 14px; }
.acc-main table th, .acc-main table td { padding: 12px 14px; border-bottom: 1px solid var(--hair); text-align: start; }
.acc-main table thead th { background: var(--cream); color: var(--ink); }
.acc-main mark { background: var(--champagne); color: var(--wine); padding: 0 6px; border-radius: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .acc-login { grid-template-columns: 1fr; }
  .acc-login__card { max-width: 520px; margin-inline: auto; width: 100%; }
  .acc { grid-template-columns: 1fr; }
  .acc-side { position: static; }
  .acc-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px; }
  .acc-nav::-webkit-scrollbar { display: none; }
  .acc-nav a { flex: none; padding: 9px 14px; border: 1px solid var(--hair); border-radius: 30px; font-size: 13.5px; }
  .acc-nav a.is-active { box-shadow: none; border-color: var(--wine); }
  .acc-nav__out { margin-top: 0; border-top: 1px solid var(--hair); border-radius: 30px !important; }
}
@media (max-width: 600px) {
  .acc-login__why { grid-template-columns: 1fr; }
  .acc-main .woocommerce-address-fields__field-wrapper, .acc-main form.edit-account { grid-template-columns: 1fr; }
  .acc-steps li { font-size: 11px; }
}
/* WooCommerce layout CSS floats half-width rows; the panel uses its own grid */
.woocommerce .acc-main form .form-row-first, .woocommerce .acc-main form .form-row-last, .woocommerce .acc-main form .form-row { float: none !important; width: auto !important; padding: 0; }
.acc-main label[for="account_email"] .required, .acc-main label[for="account_display_name"] .required, .acc-main label[for="account_last_name"] .required { display: none; }
.acc-main form .form-row em, .acc-main .description { font-style: normal; font-size: 12px; color: var(--muted); }
.acc-main form.edit-account > .clear { display: none; }
.woocommerce .acc-main form .form-row .input-text, .woocommerce .acc-main form .form-row select, .woocommerce .acc-main form .form-row textarea { border: 1px solid var(--hair); border-radius: 14px; background: var(--ivory); min-height: 48px; padding: 10px 14px; box-shadow: none; }
.woocommerce .acc-main form .form-row .input-text:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184, 140, 73, .15); }
.woocommerce .acc-main .select2-container .select2-selection { min-height: 48px; border: 1px solid var(--hair); border-radius: 14px; background: var(--ivory); display: flex; align-items: center; }
.acc-sec--proto { margin-top: clamp(40px, 5vw, 64px); }
.wc-page { padding: 18px 0 72px; } .wc-page .cx-h1 { margin: 6px 0 22px; }
