/* =================== Shop: buy numbers, bundles, plan & bundles, package editor (sh-*) =================== */
.sh-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; display: inline-grid; place-items: center; font-size: 17px; line-height: 1; background: var(--primary-50); color: var(--primary); }
.sh-ic.blue { background: var(--primary-50); color: var(--primary); }
.sh-ic.green { background: var(--green-50); color: #15803d; }
.sh-ic.amber { background: var(--amber-50); color: #b45309; }
.sh-ic.purple { background: var(--purple-50); color: #6d28d9; }
.sh-ic.red { background: var(--red-50); color: #b91c1c; }
.sh-lbl { font-size: 12.5px; font-weight: 600; color: var(--text); margin: 4px 0 6px; }
.sh-note { margin-top: 10px; font-size: 12px; }
.sh-small { padding: 12px 16px; font-size: 13px; }
.sh-sec { margin-top: 6px; }
.sh-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--primary-50); color: var(--primary); margin: 3px 0; }
.sh-empty .sh-ic { width: 52px; height: 52px; font-size: 24px; border-radius: 14px; }

/* cards */
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.sh-bundle, .sh-offer, .sh-mine, .sh-plan, .sh-bal { display: flex; flex-direction: column; gap: 10px; border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 8px 24px rgba(15, 27, 45, .06); }
.sh-bundle.off, .sh-mine.off { opacity: .62; }
.sh-b-top { display: flex; gap: 12px; align-items: flex-start; }
.sh-b-top > .pill, .sh-b-top > .sh-badge { margin-left: auto; }
.sh-b-name { min-width: 0; flex: 1; }
.sh-b-name h3 { font-size: 15.5px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.sh-b-name .section-title { margin: 0 0 2px; font-size: 11px; }
.sh-b-price { font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sh-b-price small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 5px; letter-spacing: 0; }
.sh-feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.sh-b-sold { border-top: 1px solid var(--border); padding-top: 8px; font-size: 12px; margin-top: auto; }
.sh-offer { transition: transform .15s ease, box-shadow .15s ease; }
.sh-offer:hover { transform: translateY(-2px) !important; box-shadow: 0 2px 4px rgba(15, 27, 45, .05), 0 14px 32px rgba(29, 91, 240, .12) !important; }
.sh-offer .sh-buy { margin-top: auto; width: 100%; justify-content: center; }

/* KPI tiles */
.sh-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sh-kpi { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; }
.sh-kpi > div > span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.sh-kpi > div > b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }

/* usage bars */
.sh-ubs { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.sh-mine .sh-ubs { margin-top: 2px; }
.sh-ub-t { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.sh-ub-t b { font-variant-numeric: tabular-nums; }
.sh-ub-n { font-size: 11.5px; margin-top: 3px; }
.sh-bar { height: 8px; border-radius: 8px; background: var(--primary-50); overflow: hidden; margin-top: 6px; }
.sh-bar i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, #34d399, #16a34a); }
.sh-ub.mid .sh-bar i { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.sh-ub.warn .sh-bar i { background: linear-gradient(90deg, #fbbf24, #ef4444); }

/* badges / warnings */
.sh-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: #eef2f7; color: #475569; white-space: nowrap; }
.sh-badge.ok { background: var(--green-50); color: #15803d; }
.sh-badge.warn { background: var(--amber-50); color: #b45309; }
.sh-warn { font-size: 12px; font-weight: 600; color: #b45309; }
.sh-warn.block { background: var(--amber-50); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }

/* country picker */
.sh-cp { display: flex; flex-direction: column; gap: 8px; }
.sh-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-preset { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 20px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sh-preset:hover { border-color: var(--primary); color: var(--primary); }
.sh-preset.ghost { color: var(--muted); border-style: dashed; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.sh-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 4px 3px 10px; border-radius: 20px; background: var(--primary-50); color: var(--primary); font-size: 12px; font-weight: 600; }
.sh-chip small { opacity: .65; font-weight: 500; }
.sh-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 5px; border-radius: 50%; }
.sh-chip button:hover { background: rgba(29, 91, 240, .15); }

/* buy numbers: search */
.sh-search { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr 1fr auto; gap: 12px; align-items: end; border-radius: 14px; }
.sh-search label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; min-width: 0; }
.sh-search label[hidden] { display: none; }
.sh-search .sh-go { height: 40px; white-space: nowrap; }
.sh-notice { display: flex; gap: 14px; align-items: flex-start; }
.sh-notice p { margin: 4px 0 10px; }

/* buy numbers: results */
.sh-res-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 2px 2px 10px; }
.sh-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding-bottom: 16px; }
.sh-num { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px 42px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); cursor: pointer; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.sh-num, .sh-num b, .sh-num-p { color: var(--text); font-weight: 400; text-transform: none; letter-spacing: 0; }
.sh-num b { font-weight: 700; }
.sh-num:hover { border-color: var(--primary); }
.sh-num.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50), var(--shadow); }
.sh-num.off { cursor: not-allowed; opacity: .7; }
.sh-num > input { position: absolute; left: 14px; top: 16px; width: 17px; height: 17px; accent-color: var(--primary); margin: 0; }
.sh-num-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sh-num-n { font-size: 15.5px; font-variant-numeric: tabular-nums; letter-spacing: .01em; white-space: nowrap; }
.sh-num-loc { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-num-p { font-size: 12.5px; }
.sh-num-x { font-size: 11.5px; }

/* buy numbers: sticky footer */
.sh-foot { position: sticky; bottom: 14px; z-index: 5; }
.sh-foot-in { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 10px 34px rgba(15, 27, 45, .16); }
.sh-foot-k span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sh-foot-k b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sh-foot-k.neg b, .sh-foot-h.neg { color: var(--red); }
.sh-foot-a { margin-left: auto; display: flex; gap: 8px; }
.sh-foot-h { margin: 6px 4px 0; font-size: 12px; background: var(--panel); border-radius: 8px; padding: 4px 8px; display: inline-block; }

/* buy modal + success */
.sh-buylist { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 12px; max-height: 240px; overflow-y: auto; }
.sh-buylist > div { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 8px 12px; font-size: 13px; align-items: center; }
.sh-buylist > div + div { border-top: 1px solid var(--border); }
.sh-buylist span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.sh-kv { margin-bottom: 12px; }
.sh-users { max-height: 180px; overflow-y: auto; margin-bottom: 8px; }
.sh-done { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sh-done-row { display: flex; gap: 10px; align-items: center; }
.sh-done-row .sh-ic { width: 30px; height: 30px; font-size: 14px; border-radius: 9px; }
.sh-done-row small { display: block; }

/* plan & bundles */
.sh-top { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: stretch; }
.sh-lines { display: flex; flex-direction: column; font-size: 13px; }
.sh-lines > div { display: grid; grid-template-columns: 1fr auto 90px; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); align-items: baseline; }
.sh-lines b { text-align: right; font-variant-numeric: tabular-nums; }
.sh-lines .disc b { color: #15803d; }
.sh-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; }
.sh-total b { font-size: 22px; font-variant-numeric: tabular-nums; }
.sh-bal-v { font-size: 26px !important; font-weight: 800 !important; letter-spacing: -.02em; }
.sh-old summary { cursor: pointer; list-style: revert; }
.sh-old[open] summary { margin-bottom: 14px; }
.sh-sms .card-head { flex-wrap: wrap; align-items: flex-start; }
.sh-q { max-width: 240px; }
.sh-sms-t { max-height: 420px; overflow-y: auto; }
.sh-pk .sh-ubs { margin-top: 14px; }

/* dark */
[data-theme=dark] .sh-ic.green, [data-theme=dark] .sh-badge.ok { background: rgba(34, 184, 102, .14); color: #4ade80; }
[data-theme=dark] .sh-ic.amber, [data-theme=dark] .sh-badge.warn, [data-theme=dark] .sh-warn.block { background: rgba(245, 158, 11, .14); color: #fbbf24; }
[data-theme=dark] .sh-warn { color: #fbbf24; }
[data-theme=dark] .sh-ic.purple { background: rgba(139, 92, 246, .16); color: #c4b5fd; }
[data-theme=dark] .sh-ic.red { background: rgba(239, 68, 68, .14); color: #fca5a5; }
[data-theme=dark] .sh-ic.blue, [data-theme=dark] .sh-tag, [data-theme=dark] .sh-chip { color: #93b4ff; }
[data-theme=dark] .sh-badge { background: rgba(148, 163, 184, .15); color: var(--muted); }
[data-theme=dark] .sh-preset { background: var(--surface-2, var(--panel)); }
[data-theme=dark] .sh-bundle, [data-theme=dark] .sh-offer, [data-theme=dark] .sh-mine, [data-theme=dark] .sh-plan, [data-theme=dark] .sh-bal, [data-theme=dark] .sh-foot-in { box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35); }
[data-theme=dark] .sh-lines .disc b { color: #4ade80; }

/* phone width */
@media (max-width: 980px) {
  .sh-search { grid-template-columns: 1fr 1fr; }
  .sh-search .sh-go { grid-column: 1 / -1; }
  .sh-top { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sh-search { grid-template-columns: 1fr; }
  .sh-kpis { grid-template-columns: 1fr; }
  .sh-grid, .sh-nums { grid-template-columns: 1fr; }
  .sh-foot-in { gap: 12px 18px; }
  .sh-foot-a { margin-left: 0; width: 100%; }
  .sh-foot-a .btn-primary { flex: 1; justify-content: center; }
  .sh-q { max-width: none; width: 100%; }
  .sh-lines > div { grid-template-columns: 1fr auto; }
  .sh-lines > div > span.hint { display: none; }
}
