/* صفحه «حساب من» (روی app.css سوار می‌شود) */
.brand-link { color: #fff; text-decoration: none; }
.acc-top { justify-content: space-between; }
.back-link { color: #c9d5ea; font-size: .88rem; text-decoration: none; margin-inline-end: auto; }
.back-link:hover { color: #fff; text-decoration: underline; }
a.account-user { color: #dbe5f4; text-decoration: none; }
a.account-user:hover { color: #fff; text-decoration: underline; }

.acc { max-width: 880px; margin: 0 auto; padding: 20px 16px 60px; }
.muted { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.small { font-size: .82rem; }

.acc-login { max-width: 380px; margin: 30px auto; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 22px; }
.acc-login h1 { margin: 0 0 4px; font-size: 1.2rem; }

/* وضعیت */
.status { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tile { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; }
.tile-label { font-size: .85rem; color: var(--muted); }
.tile-value { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.5; }
.tile-sub { font-size: .82rem; color: var(--muted); }
.tile.on { border-color: #b9dccd; background: #f2faf6; }
.tile.on .tile-value { color: var(--ok); }

.pending { background: #fdf6e7; border: 1px solid #f0d9a6; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; }
.pending p { margin: 4px 0; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }

.block { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.block h2 { margin: 0 0 4px; font-size: 1.1rem; }

/* پلن‌ها */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.plan {
  position: relative; border: 1px solid var(--rule); border-radius: 12px; padding: 14px 12px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; background: #fff;
}
.plan.best { border: 2px solid var(--ok); }
.plan-badge { position: absolute; top: -11px; background: var(--ok); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 10px; border-radius: 999px; }
.plan-name { font-weight: 700; font-size: 1rem; }
.plan-price { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.plan-price small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.plan-day { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.plan .primary { width: 100%; margin-top: auto; }
.empty-note { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }

.primary {
  font: inherit; font-weight: 700; font-size: .95rem;
  padding: 8px 18px; border: 0; border-radius: 10px;
  background: var(--navy); color: #fff; cursor: pointer;
}
.primary:hover { filter: brightness(1.12); }
.primary:disabled { opacity: .55; cursor: wait; }

/* شارژ */
.topup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset {
  font: inherit; font-size: .9rem; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 10px; background: #fff; color: var(--ink);
}
.preset[aria-pressed="true"] { border-color: var(--navy); background: #e8eef8; color: var(--navy); font-weight: 700; }
.custom { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--muted); }
.custom input, .pay-form input {
  font: inherit; font-size: 1rem; padding: 7px 10px; border: 1px solid var(--rule); border-radius: 10px; width: 180px; min-width: 0;
}
.custom input:focus, .pay-form input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(47,111,214,.15); }

/* سوابق */
.history { list-style: none; margin: 6px 0 0; padding: 0; font-size: .88rem; }
.history li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.history li:last-child { border-bottom: 0; }
.h-main { font-weight: 600; }
.h-side { text-align: end; white-space: nowrap; }
.h-sub { color: var(--muted); font-size: .8rem; }
.pos { color: var(--ok); } .neg { color: var(--urgent); }
.h-side.pos, .h-side.neg { direction: ltr; text-align: left; font-weight: 700; }
.st { font-size: .75rem; padding: 1px 9px; border-radius: 999px; background: #eceff3; color: var(--muted); }
.st.pending { background: #fdf0d5; color: #8a5a00; }
.st.approved { background: #e3f2ec; color: var(--ok); }
.st.rejected { background: #fbe7e5; color: var(--urgent); }
.link-btn { font: inherit; font-size: .82rem; background: none; border: 0; color: var(--urgent); cursor: pointer; padding: 0; text-decoration: underline; }

/* پنجره پرداخت */
.pay-dialog { width: min(440px, calc(100vw - 24px)); }
.pay-what { margin: 6px 0 10px; font-weight: 700; color: var(--navy); }
.pay-steps { margin: 0; padding-inline-start: 22px; list-style: persian; display: flex; flex-direction: column; gap: 14px; }
.step-title { display: block; font-size: .92rem; margin-bottom: 6px; }
.card-box {
  background: linear-gradient(135deg, #1f3a68, #2c5191); color: #fff; border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.card-no { font-size: 1.35rem; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; align-self: stretch; text-align: center; }
.card-holder { font-size: .88rem; color: #dbe5f4; }
.copy-btn { font: inherit; font-size: .82rem; font-weight: 700; padding: 3px 12px; border: 0; border-radius: 8px; background: #f2c94c; color: #1d2433; cursor: pointer; }
.pay-form { display: flex; flex-direction: column; gap: 8px; }
.pay-form label { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--muted); }
.pay-form input { width: 100%; }
.pay-msg { min-height: 1.3em; margin: 0; font-size: .88rem; color: var(--urgent); }

.acc-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 10px; font-size: .92rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px);
}
.acc-toast.err { background: var(--urgent); }

@media (max-width: 640px) {
  .back-link { display: none; }
  .status { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .custom, .custom input { width: 100%; }
  .topup .primary { width: 100%; }
}


/* 🎟 کد تخفیف و 🎁 دعوت دوستان */
.dc-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; }
.dc-form label { font-weight: 600; }
.dc-form input { width: 9.5em; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; font: inherit; text-align: center; }
.dc-form button { font: inherit; font-weight: 700; font-size: .9rem; padding: 7px 16px; border: 1px solid var(--navy); border-radius: 10px; background: #fff; color: var(--navy); cursor: pointer; }
.dc-form button:disabled { opacity: .55; cursor: wait; }
.dc-msg { font-size: .92em; }
.dc-msg.ok { color: var(--ok); font-weight: 600; }
.dc-msg.err { color: var(--urgent); }
.plan-old { text-decoration: line-through; color: var(--muted); font-size: .85em; }
.plan-off { display: inline-block; background: #e3f2ec; color: var(--ok); border-radius: 6px; padding: 1px 8px; font-size: .82em; font-weight: 600; }
.inv-lead { margin: 0 0 10px; line-height: 1.9; }
.inv-code { background: #fff7e6; border: 1px dashed #e0a100; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; line-height: 1.9; }
.inv-code b { font-size: 1.2em; letter-spacing: .08em; direction: ltr; display: inline-block; }
.inv-links { display: grid; gap: 8px; margin-bottom: 14px; }
.inv-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #f4f6fa; border-radius: 10px; padding: 8px 12px; }
.inv-link span.lbl { font-weight: 600; min-width: 6.5em; }
.inv-link code { direction: ltr; flex: 1 1 14em; overflow-wrap: anywhere; font-size: .9em; }
.inv-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.inv-row { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-row input { flex: 1 1 11em; min-width: 0; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 10px; font: inherit; }
.inv-h { margin: 18px 0 6px; font-size: 1em; }
