/* Mahnaam Account — Brown #3E2723 · Cream #F4EFEA · Gray #8C827B */
.mhn, .mhn-um, .mhn-page {
  --b: #3E2723; --c: #F4EFEA; --g: #8C827B;
  --glow-s: 0 0 0 1px var(--b), 0 0 10px rgba(62,39,35,.45), 0 0 26px rgba(140,130,123,.55);
  --glow-w: 0 0 0 1px var(--g), 0 0 8px rgba(140,130,123,.45);
}
.mhn { box-sizing: border-box; direction: rtl; text-align: right; color: var(--b); font-family: inherit; line-height: 1.7; }
.mhn *, .mhn *::before, .mhn *::after { box-sizing: border-box; }
.mhn-page-auth { display: flex; justify-content: center; padding: 24px 12px; }
.mhn-page-auth .mhn-auth { width: 100%; max-width: 440px; }

/* کارت‌ها با کادر نئونی */
.mhn-auth, .mhn-dash, .mhn-menu {
  background: var(--c); border: 1px solid var(--g); border-radius: 18px; padding: 20px;
  box-shadow: var(--glow-w); transition: box-shadow .35s, border-color .35s;
}
.mhn-auth:hover, .mhn-dash:hover, .mhn-menu:hover, .mhn-auth:focus-within { border-color: var(--b); box-shadow: var(--glow-s); }
.mhn-um-panel .mhn-auth, .mhn-um-panel .mhn-menu { border: 0; box-shadow: none; padding: 6px; background: transparent; }
.elementor-popup-modal .mhn-auth, .elementor-popup-modal .mhn-menu { border: 0; box-shadow: none; background: transparent; }

/* تب‌ها */
.mhn-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--g); margin-bottom: 18px; }
.mhn-tab { background: none; border: 0; padding: 12px 8px; font: inherit; font-weight: 700; color: var(--g); cursor: pointer; transition: color .25s, text-shadow .25s; }
.mhn-tab:hover { color: var(--b); text-shadow: 0 0 12px rgba(140,130,123,.8); }
.mhn-tab.is-active { color: var(--b); }
.mhn-tab-line { position: absolute; bottom: -1px; height: 2px; width: 50%; right: 0; background: var(--b); border-radius: 2px;
  box-shadow: 0 0 8px var(--b), 0 0 18px rgba(62,39,35,.6); transition: transform .3s ease; }
.mhn-auth[data-active="register"] .mhn-tab-line { transform: translateX(-100%); }

.mhn-pane { display: none; }
.mhn-pane.is-active { display: block; animation: mhn-in .3s ease; }
@keyframes mhn-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* فیلدها */
.mhn-hint { margin: 0 0 14px; font-size: 13px; color: var(--g); }
.mhn-field { display: block; margin-bottom: 14px; }
.mhn-field > span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--g); }
.mhn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mhn input[type=text], .mhn input[type=tel], .mhn input[type=email], .mhn select, .mhn textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--b);
  background: rgba(255,255,255,.55); border: 1px solid var(--g); border-radius: 12px; outline: 0; margin: 0;
  box-shadow: none; transition: border-color .25s, box-shadow .25s, background .25s; -webkit-appearance: none; appearance: none;
}
.mhn select { background-image: linear-gradient(45deg, transparent 50%, var(--g) 50%), linear-gradient(135deg, var(--g) 50%, transparent 50%);
  background-position: 18px 50%, 12px 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-left: 34px; }
.mhn textarea { resize: vertical; min-height: 78px; }
.mhn input:hover, .mhn select:hover, .mhn textarea:hover { border-color: var(--b); box-shadow: var(--glow-w); }
.mhn input:focus, .mhn select:focus, .mhn textarea:focus { border-color: var(--b); background: #fff; box-shadow: var(--glow-s); }
.mhn ::placeholder { color: rgba(140,130,123,.8); }
.mhn input[type=tel], .mhn .mhn-code { text-align: center; letter-spacing: 2px; }
.mhn .mhn-code { font-size: 22px; font-weight: 700; letter-spacing: 8px; }
.mhn-locked input { background: rgba(140,130,123,.12); color: var(--g); cursor: not-allowed; }
.mhn-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.mhn-sep { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: 12px; color: var(--g); }
.mhn-sep::before, .mhn-sep::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--g), transparent); }
.mhn [hidden], .mhn-um [hidden] { display: none !important; }
.mhn-otp, .mhn-step2 { animation: mhn-in .35s ease; }

.mhn-resend { display: flex; justify-content: space-between; gap: 10px; margin: -4px 0 12px; font-size: 13px; color: var(--g); }
.mhn-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--b); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mhn-link:hover { text-shadow: 0 0 10px rgba(62,39,35,.5); }

.mhn-msg { min-height: 0; margin-bottom: 12px; font-size: 13px; border-radius: 10px; }
.mhn-msg:not(:empty) { padding: 10px 12px; border: 1px solid var(--g); background: rgba(255,255,255,.5); }
.mhn-msg.is-err { border-color: var(--b); box-shadow: var(--glow-w); }
.mhn-msg.is-ok { border-color: var(--b); background: rgba(62,39,35,.07); }

/* دکمه‌ها */
.mhn-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 10px 18px; font: inherit; font-weight: 700; text-decoration: none;
  color: var(--c); background: var(--b); border: 1px solid var(--b); border-radius: 12px; cursor: pointer;
  transition: box-shadow .3s, transform .2s, background .25s, color .25s; }
.mhn-btn + .mhn-btn { margin-top: 10px; }
.mhn-btn:hover, .mhn-btn:focus-visible { box-shadow: 0 0 0 1px var(--g), 0 0 14px rgba(62,39,35,.7), 0 0 34px rgba(140,130,123,.8); transform: translateY(-1px); color: var(--c); }
.mhn-btn:active { transform: none; }
.mhn-btn[disabled] { opacity: .55; cursor: wait; }
.mhn-btn-sm { width: auto; min-height: 40px; padding: 6px 16px; font-size: 14px; display: inline-flex; margin-top: 8px; }
.mhn-btn-ghost { background: transparent; color: var(--b); }
.mhn-btn-ghost:hover { background: transparent; color: var(--b); }

/* آواتار */
.mhn-avatar { display: inline-flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; font-weight: 700;
  color: var(--c); background: var(--b); border-radius: 50%; box-shadow: 0 0 0 2px var(--c), 0 0 0 3px var(--g), 0 0 14px rgba(62,39,35,.5); }
.mhn-avatar-lg { width: 56px; height: 56px; flex-basis: 56px; font-size: 22px; }

/* آکاردئون */
.mhn-acc { border: 1px solid var(--g); border-radius: 12px; margin-bottom: 10px; background: rgba(255,255,255,.35); transition: box-shadow .3s, border-color .3s; overflow: hidden; }
.mhn-acc:hover, .mhn-acc.is-open { border-color: var(--b); box-shadow: var(--glow-w); }
.mhn-acc-h { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-weight: 700; color: var(--b); background: none; border: 0; cursor: pointer; text-align: right; text-decoration: none; }
.mhn-acc-h > span:first-child { flex: 1; }
.mhn-acc-h svg { transition: transform .3s; flex: 0 0 auto; }
.mhn-acc.is-open > .mhn-acc-h svg { transform: rotate(180deg); }
.mhn-acc-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.mhn-acc.is-open > .mhn-acc-b { grid-template-rows: 1fr; }
.mhn-acc-in { overflow: hidden; padding: 0 14px; }
.mhn-acc.is-open .mhn-acc-in { padding-bottom: 14px; }
.mhn-logout { border: 1px solid var(--g); border-radius: 12px; background: rgba(255,255,255,.35); transition: box-shadow .3s, border-color .3s; }
.mhn-logout:hover { border-color: var(--b); box-shadow: var(--glow-s); }
.mhn-menu-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mhn-menu-head strong, .mhn-dash-head h2 { display: block; margin: 0; font-size: 16px; color: var(--b); }
.mhn-menu-head small, .mhn-dash-head small { color: var(--g); display: block; }

.mhn-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 6px; font-size: 14px; }
.mhn-dl dt { color: var(--g); } .mhn-dl dd { margin: 0; }
.mhn-mini-orders, .mhn-items { list-style: none; margin: 0 0 6px; padding: 0; font-size: 14px; }
.mhn-mini-orders li, .mhn-items li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(140,130,123,.5); }
.mhn-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mhn-st { font-style: normal; font-size: 12px; font-weight: 400; padding: 2px 10px; border: 1px solid var(--g); border-radius: 20px; }
.mhn-st.st-processing, .mhn-st.st-shipped, .mhn-st.st-completed { border-color: var(--b); box-shadow: 0 0 8px rgba(62,39,35,.35); }
.mhn-o-id { flex: 1; }

/* داشبورد */
.mhn-dash { max-width: 760px; margin: 0 auto; }
.mhn-dash-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; }
.mhn-dash-head > div { flex: 1; }
.mhn-dash-nav { display: flex; gap: 6px; border-bottom: 1px solid var(--g); margin-bottom: 18px; }
.mhn-dash-nav a { padding: 10px 18px; color: var(--g); text-decoration: none; font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .25s, text-shadow .25s; }
.mhn-dash-nav a:hover { color: var(--b); text-shadow: 0 0 12px rgba(140,130,123,.8); }
.mhn-dash-nav a.is-active { color: var(--b); border-color: var(--b); box-shadow: 0 6px 10px -8px var(--b); }
.mhn-empty { text-align: center; padding: 30px 0; }

/* آیکن هدر + پاپ‌اور */
.mhn-um { position: relative; display: inline-block; direction: rtl; }
.mhn-um-btn, .mhn-icon-in { position: relative; }
.mhn-um-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; color: var(--b); background: transparent; border: 1px solid transparent; border-radius: 50%; cursor: pointer; transition: box-shadow .3s, border-color .3s; }
.mhn-um-btn:hover, .mhn-um-btn[aria-expanded=true] { border-color: var(--b); box-shadow: var(--glow-s); }
.mhn-dot { position: absolute; top: 6px; left: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--b); border: 2px solid var(--c); box-shadow: 0 0 8px var(--b); display: none; }
.mhn-um.is-in .mhn-dot, .mhn-icon-in::after { display: block; }
.mhn-icon-in::after { content: ""; position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--b); border: 2px solid var(--c); box-shadow: 0 0 8px var(--b); }
.mhn-um-panel { position: absolute; top: calc(100% + 10px); left: 0; z-index: 99999; width: 360px; max-width: calc(100vw - 24px); max-height: 80vh; overflow: auto;
  background: var(--c); border: 1px solid var(--b); border-radius: 18px; padding: 14px; box-shadow: var(--glow-s); animation: mhn-in .25s ease; }
.mhn-um-close { display: none; }
.mhn-um-overlay { position: fixed; inset: 0; z-index: 99998; background: rgba(62,39,35,.35); }

@media (max-width: 600px) {
  .mhn-auth, .mhn-dash { padding: 16px; border-radius: 16px; }
  .mhn-row { grid-template-columns: 1fr; gap: 0; }
  .mhn-dash-nav a { flex: 1; text-align: center; padding: 12px 8px; }
  .mhn-um-panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; padding: 18px 14px 28px; animation: mhn-up .3s ease; }
  .mhn-um-close { display: flex; position: absolute; top: 8px; left: 10px; width: 36px; height: 36px; align-items: center; justify-content: center; font-size: 26px; color: var(--b); background: none; border: 0; cursor: pointer; }
}
@keyframes mhn-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mhn *, .mhn-um * { animation: none !important; transition: none !important; } }


/* اتصال کم‌تغییر سبد جاری ووکامرس به تب سفارشات؛ تاریخچه سفارش‌ها حفظ می‌شود */
.mhn-cart-heading { margin: 0 0 10px; color: var(--b); font-size: 14px; font-weight: 700; }
.mhn-cart-panel { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--g); }
.mhn-orders-history { padding-top: 2px; }
.mhn-cart-items li { align-items: flex-start; gap: 8px; }
.mhn-cart-items li > span { min-width: 0; }
.mhn-cart-items li > b { white-space: nowrap; }
.mhn-cart-items a { color: inherit; text-decoration: none; }
.mhn-cart-items a:hover { text-decoration: underline; }
.mhn-cart-total { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0; font-weight: 700; }
.mhn-cart-panel .mhn-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mhn-cart-panel .mhn-actions .mhn-btn { margin-top: 0; }
@media (max-width: 420px) { .mhn-cart-panel .mhn-actions { grid-template-columns: 1fr; } }
