/* ============================================================
   telegram.css — ورود/اتصال با تلگرام، کارت‌های پروفایل و مدیر
   (پالت پاستلی سایت: نعنایی + صورتی؛ فقط آیکنِ هواپیمای کاغذی آبیِ تلگرام است)
   ============================================================ */
:root { --tg-blue: #2aabee; }
html.tg-lock { overflow: hidden; }

.tg-logo { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; color: var(--tg-blue); background: #e8f5fd; border: 1px solid #cdeaf9; }
.tg-logo svg { width: 24px; height: 24px; }
.tg-logo.is-on { color: #fff; background: linear-gradient(135deg, #52bdf3, var(--tg-blue)); border-color: transparent; box-shadow: 0 8px 16px rgba(42, 171, 238, .3); }

/* ---------- دکمهٔ صفحه‌های ورود/ثبت‌نام ---------- */
.tg-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--muted); font-size: .82rem; }
.tg-or::before, .tg-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.tg-auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 18px; border-radius: var(--r-pill); font-family: inherit; font-weight: 700; font-size: .98rem; cursor: pointer; color: var(--leaf-900); background: #fff; border: 1.5px solid #cdeaf9; box-shadow: 0 4px 14px rgba(42, 171, 238, .12); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.tg-auth-btn svg { width: 22px; height: 22px; color: var(--tg-blue); }
.tg-auth-btn:hover { background: #f4fbff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(42, 171, 238, .18); }
.tg-auth-hint { margin: 8px 0 0; text-align: center; font-size: .76rem; color: var(--muted); }

/* ---------- پنجرهٔ جریان ---------- */
.tg-ov { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(38, 56, 44, .5); backdrop-filter: blur(4px); animation: tgFade .2s ease; }
@keyframes tgFade { from { opacity: 0; } }
.tg-card { position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px 22px 20px; border-radius: 28px; background: linear-gradient(180deg, #fff, var(--mint-50)); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: tgPop .28s cubic-bezier(.22, 1, .36, 1); }
@keyframes tgPop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.tg-x { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); }
.tg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-inline-start: 38px; }
.tg-head h3 { margin: 0; font-size: 1.12rem; font-weight: 800; color: var(--leaf-900); }
.tg-head p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.7; }
.tg-open { gap: 10px; }
.tg-open svg { width: 22px; height: 22px; }
.tg-code { display: grid; justify-items: center; gap: 2px; margin: 16px 0 14px; padding: 12px 10px; border-radius: 22px; background: linear-gradient(135deg, #fff7f5, #fde6e2); border: 1px solid #f3c9c4; }
.tg-code small { font-size: .76rem; color: var(--blush-text); font-weight: 700; }
.tg-code b { font-size: 2.6rem; line-height: 1.2; font-weight: 900; letter-spacing: .1em; color: var(--leaf-900); font-variant-numeric: tabular-nums; }
.tg-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.tg-steps li { display: flex; align-items: flex-start; gap: 11px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); opacity: .65; transition: all .25s ease; }
.tg-steps li.is-now { opacity: 1; background: #fff; border-color: var(--sage-400); box-shadow: 0 6px 16px rgba(107, 166, 128, .16); }
.tg-steps li.is-done { opacity: .85; }
.tg-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .8rem; font-weight: 800; color: var(--sage-700); background: var(--mint-100); }
.tg-steps li.is-now .tg-n { color: #fff; background: var(--sage-500); }
.tg-steps li.is-done .tg-n { color: #fff; background: var(--success); }
.tg-steps b { display: block; font-size: .88rem; color: var(--leaf-900); }
.tg-steps small { display: block; margin-top: 1px; font-size: .76rem; color: var(--muted); line-height: 1.6; }
.tg-status { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--mint-50); color: var(--sage-700); font-size: .84rem; font-weight: 700; text-align: center; }
.tg-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--sage-300); border-top-color: var(--sage-600); animation: tgSpin .8s linear infinite; }
@keyframes tgSpin { to { transform: rotate(360deg); } }
.tg-wait { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px 0; color: var(--muted); }
.tg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.tg-foot b { color: var(--leaf-900); font-variant-numeric: tabular-nums; }
.tg-link { background: none; border: 0; padding: 4px 2px; font-family: inherit; font-size: .82rem; font-weight: 700; color: var(--link); cursor: pointer; text-decoration: underline; }
.tg-note { margin: 10px 0 0; font-size: .74rem; line-height: 1.8; color: var(--muted); text-align: center; }
.tg-ok { display: grid; justify-items: center; gap: 6px; padding: 28px 0 22px; }
.tg-ok b { font-size: 1.1rem; color: var(--leaf-900); }
.tg-ok small { color: var(--muted); }
.tg-ok-ic { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--sage-400), var(--sage-600)); box-shadow: 0 12px 24px rgba(84, 138, 103, .35); animation: tgPop .4s cubic-bezier(.22, 1, .36, 1); }
.tg-ok-ic svg { width: 30px; height: 30px; }
.tg-fail { display: grid; justify-items: center; gap: 10px; padding: 16px 4px 6px; text-align: center; }
.tg-fail-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; font-size: 1.6rem; font-weight: 900; color: var(--blush-text); background: #fde6e2; }
.tg-fail p { margin: 0; font-size: .9rem; line-height: 1.9; color: var(--ink); }
.tg-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* ---------- کارتِ پروفایل و مدیر ---------- */
.tg-acc { margin-top: 14px; }
.tg-acc-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.tg-acc-head h3 { margin: 0 0 2px; font-size: 1.05rem; color: var(--leaf-900); display: flex; align-items: baseline; gap: 8px; }
.tg-acc-head h3 small { font-size: .78rem; font-weight: 600; color: var(--muted); }
.tg-acc-head p { margin: 0; font-size: .84rem; line-height: 1.8; color: var(--muted); }
.tg-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.tg-badge svg { width: 13px; height: 13px; }
.tg-badge.ok { color: #1f7a45; background: rgba(126, 226, 160, .28); }
.tg-badge.warn { color: #8a5a00; background: #fff0cc; }
.tg-mono { font-variant-numeric: tabular-nums; color: var(--ink); }
.tg-warn { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; font-size: .82rem; line-height: 1.8; color: #8a4a00; background: #fff6e0; border: 1px solid #f3dfae; }
.tg-warn code { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .8); font-size: .78rem; }
.tg-rows { display: grid; gap: 2px; }
.tg-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tg-row:last-child { border-bottom: 0; }
.tg-row-t { display: grid; gap: 1px; min-width: 0; }
.tg-row-t b { font-size: .9rem; color: var(--leaf-900); }
.tg-row-t small { font-size: .76rem; color: var(--muted); }
.tg-h { margin: 18px 0 8px; font-size: .92rem; color: var(--leaf-900); font-weight: 800; }
.tg-admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tg-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.tg-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: .76rem; font-weight: 800; color: var(--sage-700); background: var(--mint-100); }
.tg-pill.ok { color: #1f7a45; background: rgba(126, 226, 160, .3); }
.tg-pill.off { color: var(--blush-text); background: #fde6e2; }
.tg-master { display: flex; align-items: center; gap: 12px; font-size: .88rem; font-weight: 700; color: var(--leaf-900); }
.tg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tg-stats > div { display: grid; justify-items: center; gap: 1px; padding: 10px 6px; border-radius: 16px; background: var(--mint-50); border: 1px solid var(--line); }
.tg-stats b { font-size: 1.3rem; font-weight: 900; color: var(--leaf-900); }
.tg-stats small { font-size: .68rem; color: var(--muted); text-align: center; }
.tg-meta { margin: 8px 0 0; font-size: .76rem; color: var(--muted); }
.tg-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tg-admins { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tg-admins li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--mint-50); font-size: .86rem; }
.tg-admins small { color: var(--muted); }

@media (max-width: 480px) {
  .tg-card { padding: 22px 16px 16px; border-radius: 24px; }
  .tg-code b { font-size: 2.3rem; }
  .tg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .tg-ov, .tg-card, .tg-ok-ic { animation: none; }
  .tg-spin { animation-duration: 2s; }
}
