/* TopTel24 design system: mobile first, RTL, light and dark. */
@font-face { font-family: Vazirmatn; src: url("fonts/Vazirmatn-wght.f6d31671339d.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #f9fafd; --text: #0e1426; --muted: #626b80; --faint: #9ca3b5;
  --line: #e3e8f2; --brand: #2f5bff; --brand-strong: #1d3fd6; --brand-soft: #e9eeff; --on-brand: #fff;
  --hero: linear-gradient(140deg, #070b1f 0%, #101a4d 55%, #2346e0 100%);
  --r1: #12a150; --r2: #2f6fe4; --r3: #ef8a1d; --danger: #c62f2a; --warn-bg: #fff6dd; --warn-text: #6d4c00;
  --shadow: 0 1px 2px rgba(14, 20, 38, .04), 0 6px 20px rgba(14, 20, 38, .06);
  --radius: 18px; --radius-sm: 12px;
}
:root[data-theme="dark"] {
  --bg: #070a14; --surface: #111729; --surface-2: #171e33; --text: #eaf0ff; --muted: #a3adc4; --faint: #6f7891;
          --line: #232c45; --brand: #7c9bff; --brand-strong: #a9bcff; --brand-soft: #18244d; --on-brand: #050816;
          --hero: linear-gradient(140deg, #050816 0%, #0c1640 60%, #1b2f80 100%);
          --warn-bg: #3a2f0e; --warn-text: #f5d57e; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; background: var(--bg); color: var(--text);
       font-size: 15.5px; line-height: 1.65; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 1.35rem; line-height: 1.4; margin: 0 0 .3em; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0; font-weight: 700; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .error { color: var(--danger); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.sm { width: 18px; height: 18px; }
main { max-width: 760px; margin: 0 auto; padding: 0 16px 24px; }

/* header */
.hero { background: var(--hero); color: #fff; padding: 14px 16px 18px; position: sticky; top: 0; z-index: 10;
        border-radius: 0 0 22px 22px; box-shadow: 0 8px 24px rgba(7, 11, 31, .18); }
.hero .bar { max-width: 728px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brandmark { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 1.05rem; }
.brandmark .logo { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: .8rem; }
.hero .who { font-size: .85rem; opacity: .85; }
.search { position: relative; max-width: 728px; margin: 12px auto 0; }
.search .i { position: absolute; right: 14px; top: 25px; transform: translateY(-50%); color: var(--faint); }
.search input { width: 100%; height: 50px; border: 0; border-radius: 16px; padding: 0 46px 0 16px; font: inherit; font-size: 1rem;
                background: var(--surface); color: var(--text); box-shadow: 0 4px 14px rgba(0,0,0,.12); outline: none; }
.search input { padding-inline-end: 54px; }
.search .mic { position: absolute; left: 6px; top: 25px; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 12px;
               display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); cursor: pointer; }
.search .mic .i { position: static; transform: none; color: inherit; }
.search .mic.on { background: var(--danger); color: #fff; animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 8px rgba(198, 47, 42, .18); } }
.mic-note { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: .85rem; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { .search .mic.on { animation: none; } }
.search input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.35), 0 4px 14px rgba(0,0,0,.12); }
.suggest { position: absolute; inset-inline: 0; top: calc(100% + 6px); background: var(--surface); border-radius: 16px;
           box-shadow: 0 16px 40px rgba(0,0,0,.18); overflow: hidden; z-index: 20; }
.suggest a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); border-bottom: 1px solid var(--line); }
.suggest a:last-child { border: 0; }
.suggest b { direction: ltr; font-weight: 700; }
.suggest small { color: var(--muted); white-space: nowrap; }

/* banners */
.banner { max-width: 728px; margin: 12px auto 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--text); font-size: .95rem; }
.banner.warn, .banner.warning { background: var(--warn-bg); color: var(--warn-text); }
.banner.error { background: #fde8e7; color: var(--danger); }
.banner a { font-weight: 700; }
.wrap-banners { padding: 0 16px; }

/* cards and lists */
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; margin-top: 14px; box-shadow: var(--shadow); }
.card.narrow { max-width: 420px; margin: 28px auto 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 4px 10px; }
.section-title h2 { color: var(--text); }
.section-title span { color: var(--muted); font-size: .85rem; }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.list .item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); }
.list .name.rtl { direction: rtl; text-align: right; font-weight: 600; }
.list .item .grow { flex: 1; min-width: 0; }
.list .name { display: block; font-weight: 700; direction: ltr; text-align: right; }
.list .sub { color: var(--muted); font-size: .88rem; }
.list .sub b { color: var(--text); }
.list .i { color: var(--faint); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }

/* forms */
label, .label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: .9rem; }
input, select, textarea { width: 100%; font: inherit; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
                          background: var(--surface-2); color: var(--text); outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); background: var(--surface); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); vertical-align: middle; }
input.code { text-align: center; letter-spacing: .6em; font-size: 1.6rem; font-weight: 700; direction: ltr; height: 60px; }
input.num { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; padding: 12px 18px;
       border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-align: center; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.block { width: 100%; margin-top: 18px; height: 52px; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 8px 12px; font-size: .88rem; border-radius: 11px; }
.btn:active { transform: scale(.98); }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: .88rem; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.check-row label { margin: 0; color: var(--text); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { margin: 0; display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border: 1.5px solid var(--line);
                border-radius: 12px; color: var(--text); background: var(--surface-2); }

/* login */
.welcome { text-align: center; padding: 34px 8px 6px; }
.welcome .mark { width: 64px; height: 64px; border-radius: 20px; background: var(--hero); color: #fff; display: grid; place-items: center;
                 margin: 0 auto 14px; font-weight: 800; box-shadow: 0 10px 24px rgba(7, 11, 31,.25); }
.welcome p { color: var(--muted); margin: 0; }
.points { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.points li { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .92rem; }
.points .i { color: var(--brand); }

/* home */
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.brand-tile { background: var(--surface); border-radius: var(--radius); padding: 16px; color: var(--text); box-shadow: var(--shadow);
              display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.brand-tile strong { font-size: 1.05rem; }
.brand-tile span { color: var(--muted); font-size: .85rem; }
.brand-tile::after { content: ""; position: absolute; left: -18px; bottom: -18px; width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); }

/* product page */
.product-head { margin: 18px 4px 6px; }
.product-head h1 { direction: ltr; text-align: right; }
.product-head .meta { color: var(--muted); font-size: .9rem; }
.options { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 14px; }
.opt-row { padding: 10px 0; }
.opt-row + .opt-row { border-top: 1px solid var(--line); }
.opt-row .title { color: var(--muted); font-size: .82rem; margin-bottom: 6px; display: block; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; min-height: 44px;
        padding: 6px 14px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text);
        line-height: 1.25; font-weight: 600; transition: all .15s; }
.chip small { color: var(--muted); font-size: .72rem; font-weight: 500; margin-top: 2px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 4px 12px rgba(47, 91, 255,.25); }
.chip.on small { color: inherit; opacity: .85; }
.hint { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
        background: var(--brand-soft); font-size: .9rem; }
.hint .i { color: var(--brand); }
.prices { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.prices > li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.prices > li + li { border-top: 1px solid var(--line); }
.rank { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .9rem;
        background: var(--surface-2); color: var(--faint); }
.rank.r1 { background: var(--r1); color: #fff; } .rank.r2 { background: var(--r2); color: #fff; } .rank.r3 { background: var(--r3); color: #fff; }
.offer { flex: 1; min-width: 0; }
.offer .price { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; display: block; }
.offer .seller { color: var(--text); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.offer .verified { color: var(--r2); }
.offer .tags { display: block; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
li.stale .price, li.stale .seller { color: var(--faint); }
.call { flex: none; display: inline-flex; align-items: center; gap: 6px; background: var(--r1); color: #fff; border-radius: 14px;
        padding: 11px 15px; font-weight: 800; box-shadow: 0 6px 14px rgba(18,161,80,.28); }
.call .num { display: none; font-weight: 500; font-size: .8rem; }
.call.wide { width: 100%; justify-content: center; height: 52px; margin-top: 14px; }
.call.wide .num { display: inline; }
@media (hover: hover) and (min-width: 700px) { .call .num { display: inline; } }
.locked { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }

/* stats (panel) */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }
.status-card { background: var(--hero); color: #fff; border-radius: var(--radius); padding: 18px; margin-top: 16px; box-shadow: 0 10px 28px rgba(7, 11, 31,.25); }
.status-card .muted { color: rgba(255,255,255,.8); }
.status-card .btn { background: rgba(255,255,255,.16); border-color: transparent; color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
        background: var(--brand-soft); color: var(--brand-strong); }
.pill.off { background: var(--surface-2); color: var(--muted); }
.pill.warn { background: var(--warn-bg); color: var(--warn-text); }

/* editable product table (panel) */
.edit-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.edit-list li { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 16px; align-items: center; }
.edit-list li + li { border-top: 1px solid var(--line); }
.edit-list li.off { opacity: .55; }
.edit-list .what b { direction: ltr; display: block; text-align: right; }
.edit-list .what span { color: var(--muted); font-size: .82rem; }
.edit-list .inputs { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.edit-list .inputs input.num { padding: 10px 12px; }
.edit-list .toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin: 0; }
.sticky-save { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 14px; }
.sticky-save .btn { width: 100%; height: 52px; box-shadow: 0 10px 24px rgba(47, 91, 255,.3); }
@media (min-width: 900px) {
  .edit-list li { grid-template-columns: 1fr 160px 160px 90px; }
  .edit-list .inputs { grid-column: auto / span 3; grid-template-columns: 160px 160px 90px; }
}

/* plans (billing) */
.plans { display: grid; gap: 12px; margin-top: 14px; }
.plan { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border: 2px solid transparent; }
.plan.best { border-color: var(--brand); }
.plan .top { display: flex; justify-content: space-between; align-items: center; }
.plan .amount { font-size: 1.5rem; font-weight: 800; margin: 6px 0 2px; }
.plan .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wallet b { font-size: 1.4rem; }
.push h2, .invite h2 { display: flex; align-items: center; gap: 8px; }
.push h2 .i { color: var(--brand); }
.push .btn { margin-top: 10px; }
.push-note { margin: 10px 0 0; font-size: .88rem; }
.digest-link { display: flex; align-items: center; gap: 12px; color: var(--text); }
.digest-link > .i { color: var(--brand); }
.drop { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.drop small { color: var(--r1); font-weight: 700; }
.fav-form { margin-top: 10px; }
.fav-form .btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong); }
.fav-form .btn.on .i { fill: currentColor; }
.invite h2 { display: flex; align-items: center; gap: 8px; }
.invite h2 .i { color: var(--brand); }
.invite-link { display: flex; gap: 8px; margin: 12px 0 8px; }
.invite-link input { flex: 1; min-width: 0; font-size: .85rem; }
.invite-link .btn { white-space: nowrap; }
.discount { display: flex; gap: 8px; margin-top: 12px; }
.discount input { flex: 1; min-width: 0; text-transform: uppercase; }
.discount .btn { white-space: nowrap; }
.discount-on { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px;
  padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-size: .9rem; }
.amount s, .ad-plans s { color: var(--faint); font-weight: 400; font-size: .8em; margin-inline-start: 6px; }
.ad-plans s { display: block; margin: 2px 0 0; white-space: nowrap; }
.ledger { list-style: none; padding: 0; margin: 0; }
.ledger li { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.plus { color: var(--r1); } .minus { color: var(--danger); }

/* tab bar (phone) and side nav (laptop) */
.tabbar { position: fixed; bottom: 0; inset-inline: 0; z-index: 10; display: flex; justify-content: space-around; background: var(--surface);
          border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0,0,0,.05); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--faint); font-size: .74rem; font-weight: 600; border-radius: 14px; }
.tabbar a.on { color: var(--brand); }
.tabbar a.on .i { background: var(--brand-soft); border-radius: 10px; padding: 3px 12px; width: 48px; height: 28px; }
@media (min-width: 900px) {
  body.panel { padding-bottom: 0; padding-right: 220px; }
  body.panel .tabbar { top: 0; bottom: 0; right: 0; left: auto; width: 220px; flex-direction: column; justify-content: flex-start;
                       padding: 20px 12px 12px; border-top: 0; border-left: 1px solid var(--line); box-shadow: none; gap: 4px; }
  body.panel .tabbar a { flex: none; flex-direction: row; gap: 10px; padding: 10px 14px; font-size: .95rem; }
  body.panel .tabbar a.on { background: var(--brand-soft); }
  body.panel .tabbar a.on .i { background: none; padding: 0; width: 22px; height: 22px; }
  body.panel main, body.panel .hero .bar, body.panel .wrap-banners { max-width: 980px; }
  body.panel .hero { border-radius: 0 0 0 28px; }
  body.panel .sticky-save { bottom: 16px; }
}

/* alerts, watchlist */
.hero .who { display: inline-flex; align-items: center; gap: 10px; }
.theme-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.theme-btn .dark-only, :root[data-theme="dark"] .theme-btn .light-only { display: none; }
:root[data-theme="dark"] .theme-btn .dark-only { display: block; }
.bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; }
.bell b { position: absolute; top: -4px; left: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ff5a4e; color: #fff; font-size: .7rem; display: grid; place-items: center; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 4px 14px; }
.actions-row form { margin: 0; }
.btn.on { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.btn.on .i { fill: currentColor; }
.item .star { color: #f5a524; fill: #f5a524; }
.item.unread { background: var(--brand-soft); }
.item.off { opacity: .6; }
.row-actions { display: flex; gap: 6px; margin: 0; }
.waiting b { color: var(--brand); }
.top-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card.off { opacity: .65; }
.reply-form { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.reply-form input[name=note] { grid-column: 1 / -1; }
.reply-form button { grid-column: 1 / -1; }
@media (min-width: 700px) { .reply-form { grid-template-columns: 1.2fr .7fr 1.5fr auto; } .reply-form input[name=note], .reply-form button { grid-column: auto; } }
.tabbar a { position: relative; }
.tabbar .dot { position: absolute; top: 2px; inset-inline-end: calc(50% - 26px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ff5a4e; color: #fff; font-size: .68rem; display: grid; place-items: center; }
@media (min-width: 900px) { body.panel .tabbar .dot { position: static; margin-inline-start: auto; } }
.row-actions .btn { padding: 6px 12px; min-height: 0; }
@media (max-width: 520px) { .list .item:has(.row-actions) { flex-wrap: wrap; } .list .item .row-actions { margin-inline-start: auto; } }

/* reports */
.offer .flag { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-inline-start: 2px; border-radius: 8px; color: var(--faint); vertical-align: middle; }
.offer .flag:hover, .offer .flag:focus-visible { color: var(--danger); background: var(--surface-2); }
.reasons { display: grid; gap: 8px; }
.reasons label { margin: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
                 background: var(--surface-2); color: var(--text); cursor: pointer; }
.reasons label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.reasons input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.inline-reply { display: flex; gap: 8px; margin-top: 10px; }
.inline-reply input { flex: 1; padding: 10px 12px; }

/* panel cards that open a page */
.link-card { display: flex; align-items: center; gap: 12px; color: var(--text); }
.link-card .grow { flex: 1; min-width: 0; }
.link-card .muted b { color: var(--brand); }
.link-card .i { color: var(--faint); }

/* home tools */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.tool { background: var(--surface); border-radius: var(--radius); padding: 14px 12px; box-shadow: var(--shadow); color: var(--text);
        display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tool .i { color: var(--brand); background: var(--brand-soft); border-radius: 11px; padding: 7px; width: 36px; height: 36px; margin-bottom: 6px; }
.tool b { font-size: .95rem; }
.tool span { color: var(--muted); font-size: .76rem; line-height: 1.45; }
@media (max-width: 380px) { .tools { grid-template-columns: 1fr; } .tool { flex-direction: row; align-items: center; gap: 10px; } .tool .i { margin: 0; } .tool span { margin-inline-start: auto; } }

/* price history chart */
.chart-card .top-line { align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a { padding: 4px 10px; border-radius: 9px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.chart-nums { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px; font-size: .85rem; color: var(--muted); }
.chart-nums b { color: var(--text); }
.down { color: var(--r1); font-weight: 700; } .up { color: var(--danger); font-weight: 700; }
.chart { width: 100%; height: 170px; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .city { stroke: var(--brand); stroke-width: 2.6; }
.chart .iran { stroke: var(--faint); stroke-width: 1.6; stroke-dasharray: 5 5; }
.chart .dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.chart-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: .74rem; flex-direction: row-reverse; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-inline-end: 6px; background: var(--brand); }
.legend i.iran { background: repeating-linear-gradient(90deg, var(--faint) 0 5px, transparent 5px 9px); }
.legend .faint { margin-inline-start: auto; }

/* market today */
.move { flex: none; text-align: left; font-weight: 800; font-size: .92rem; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.move small { font-weight: 600; font-size: .74rem; opacity: .8; }

/* budget finder */
.budget-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.budget-form .wide { grid-column: 1 / -1; }
.budget-form input[name=budget] { font-size: 1.3rem; font-weight: 700; height: 56px; }

/* basket */
.basket .qty { width: 64px; flex: none; text-align: center; padding: 8px 6px; }
.basket .btn.ghost { border: 0; color: var(--faint); padding: 6px 8px; }
.status-card .call.wide { background: #fff; color: var(--brand-strong); box-shadow: none; }
.split-group { padding: 12px 0 2px; }
.split-group + .split-group { border-top: 1px solid var(--line); }
.split-group .call { padding: 8px 12px; }
.offer .price { white-space: nowrap; }
.prices.wrap .tags { white-space: normal; }

/* ads */
.prices.ads { margin-top: 14px; border: 1.5px solid #f5c46b; }
.rank.ad { width: auto; min-width: 30px; padding: 0 7px; font-size: .72rem; background: #fff3d6; color: #7a5200; }
:root[data-theme="dark"] .rank.ad { background: #3a2f0e; color: #f5d57e; }
.ad-banner { display: block; position: relative; margin-top: 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ad-banner img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.ad-banner span { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.5); color: #fff; font-size: .7rem; padding: 2px 8px; border-radius: 8px; }
.featured { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.featured::-webkit-scrollbar { display: none; }
.featured-w { flex: none; width: 150px; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); color: var(--text);
              display: flex; flex-direction: column; gap: 2px; }
.featured-w .avatar { width: 40px; height: 40px; border-radius: 13px; background: var(--hero); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.featured-w b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.featured-w span:last-child { color: var(--muted); font-size: .78rem; }
.ad-kind h2 { margin-bottom: 0; }
.ad-form select { margin-bottom: 10px; }
.ad-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ad-plans label { margin: 0; cursor: pointer; position: relative; }
.ad-plans input { position: absolute; opacity: 0; }
.ad-plans span { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--text); }
.ad-plans small { color: var(--muted); font-size: .8rem; }
.ad-plans input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 4px 12px rgba(47, 91, 255,.15); }
.ad-plans input:focus-visible + span { outline: 2px solid var(--brand); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* did you buy? */
.followup { border: 1.5px solid var(--brand); }
.followup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.followup-actions .ghost { grid-column: 1 / -1; padding: 6px; color: var(--muted); border: 0; }

/* share list */
.share-grid { display: grid; gap: 0 14px; }
.share-grid .card .btn.block { margin-top: 10px; }
.share-preview { display: block; width: 100%; max-width: 540px; margin: 0 auto 14px; border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-tools { margin-top: 14px; }
@media (min-width: 900px) { .share-grid { grid-template-columns: 1fr 1.4fr; align-items: start; } }
.list-check { display: grid; gap: 12px; }
.list-check-img { display: grid; gap: 8px; }
.list-check-img img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.edit-list .raw { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; text-align: left; overflow-wrap: anywhere; }
.edit-list .edit-link { font-size: 13px; }
@media (min-width: 900px) {
  .list-check { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .list-check-img { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; }
}
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }

/* TopTel24 logo in the header squares, brand logos on tiles and brand pages */
.brandmark .logo img, .mock-top .logo img { width: 100%; height: 100%; border-radius: inherit; display: block; object-fit: cover; }
.brandmark .logo, .mock-top .logo { overflow: hidden; }
.brand-tile .brand-logo { height: 28px; width: auto; max-width: 104px; object-fit: contain; align-self: flex-start; margin-bottom: 8px; position: relative; z-index: 1; }
.section-title .brand-logo.sm { height: 22px; width: auto; max-width: 80px; object-fit: contain; vertical-align: middle; margin-inline-end: 8px; }
.brand-tile .brand-logo[src*="brands/samsung"], .brand-tile .brand-logo[src*="brands/honor"], .brand-tile .brand-logo[src*="brands/nokia"] { height: 18px; margin: 5px 0 13px; }

/* product page on a phone: title, actions and options take less height so the prices show sooner */
@media (max-width: 699px) {
  .product-head { margin: 10px 4px 8px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
  .product-head h1 { font-size: 1.15rem; margin: 0; }
  .product-head .meta { font-size: .78rem; }
  .actions-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 10px; }
  .actions-row form, .actions-row form .btn { display: flex; width: 100%; }
  .actions-row .btn.sm { flex-direction: column; gap: 3px; padding: 7px 2px; font-size: .7rem; font-weight: 600; line-height: 1.2; text-align: center; min-height: 0; }
  .actions-row .btn .long { display: none; }
  .options { padding: 2px 10px; }
  .opt-row { padding: 7px 0; display: flex; align-items: center; gap: 8px; }
  .opt-row .title { margin: 0; flex: none; width: 3.2em; font-size: .72rem; }
  .opt-row .chips { flex: 1; min-width: 0; gap: 6px; }
  .chip { min-width: 52px; min-height: 0; padding: 4px 10px; border-radius: 11px; font-size: .84rem; }
  .chip small { font-size: .64rem; margin-top: 0; }
  .chip.on { box-shadow: none; }
}

/* the three cheapest offers: the whole box takes its rank's color, not only the number */
.prices > li.top1 { background: color-mix(in srgb, var(--r1) 12%, var(--surface)); box-shadow: inset -4px 0 0 var(--r1); }
.prices > li.top2 { background: color-mix(in srgb, var(--r2) 10%, var(--surface)); box-shadow: inset -4px 0 0 var(--r2); }
.prices > li.top3 { background: color-mix(in srgb, var(--r3) 12%, var(--surface)); box-shadow: inset -4px 0 0 var(--r3); }
.prices > li.top1 + li, .prices > li.top2 + li, .prices > li.top3 + li { border-top-color: transparent; }

/* text is 15px at the root; fields stay 16px on touch screens, or iPhones zoom in when one is tapped */
@media (pointer: coarse) { input:not(.code):not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; } }

/* admin looking at a wholesaler's panel */
.admin-view { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between;
              padding: 8px 14px; background: #1f1f24; color: #fff; font-size: .82rem; }
.admin-view a { color: #fff; font-weight: 700; text-decoration: underline; }
.steps { margin: 14px 0 0; padding-inline-start: 1.3em; color: var(--muted); font-size: .88rem; line-height: 1.9; }

/* colors as circles: option chips on the product page and the dots in each price row */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -2px; flex: none;
       box-shadow: inset 0 0 0 1px rgba(14, 20, 38, .18); }
.dots { display: inline-flex; gap: 3px; margin: 0 2px; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chip.color { min-width: 0; padding: 5px 8px; gap: 3px; }
.chip.color .dot { width: 26px; height: 26px; box-shadow: inset 0 0 0 1px rgba(14, 20, 38, .2), 0 1px 3px rgba(14, 20, 38, .12); }
.chip.color.on { background: var(--surface); color: var(--text); border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.chip.color.on small { color: var(--brand); opacity: 1; font-weight: 700; }
@media (max-width: 699px) { .chip.color { padding: 4px 6px; } .chip.color .dot { width: 22px; height: 22px; } }

/* the brand: «تاپ‌تل» and a raised, glowing «۲۴» */
.b24 { display: inline-block; margin-inline-start: 2px; font-size: .68em; font-weight: 900; letter-spacing: -.02em; line-height: 1;
       vertical-align: .62em; background: linear-gradient(135deg, #a9c8ff 0%, #ffffff 55%, #7fa6ff 100%);
       -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 6px rgba(127, 166, 255, .45)); }
:root[data-theme="light"] .public .b24, .public .b24 { background: linear-gradient(135deg, #2f5bff, #1d3fd6); -webkit-background-clip: text; background-clip: text; filter: none; }
.brand-name { display: inline-flex; align-items: flex-start; white-space: nowrap; }
.brand-name .b24 { vertical-align: 0; margin-top: -.2em; }
