/* ============================================================
   RoseSMS — светлый «бутик»
   Светло-серый фон · белые панели · ярко-розовый акцент
   Шрифт: Manrope · коды и номера: JetBrains Mono
   Поток: сервис -> шторка выбора страны -> покупка
   ============================================================ */

:root {
  --bg: #f1f2f6;
  --card: #ffffff;
  --ink: #141b2e;
  --muted: #8b93a7;
  --line: #eef0f4;
  --pink: #f43a6e;
  --pink-deep: #d21c53;
  --pink-soft: #ffe3ec;
  --pink-ghost: #fff5f8;
  --ok: #1fb567;
  --ok-soft: #e3f8ed;
  --warn: #e8930c;
  --warn-soft: #fdf1dc;
  --red: #e23c3c;
  --red-soft: #fde8e8;

  --font-body: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  --r-panel: 22px;
  --r-item: 14px;
  --shadow: 0 10px 30px rgba(20, 27, 46, 0.07);
  --shadow-soft: 0 4px 14px rgba(20, 27, 46, 0.05);
  --shadow-pink: 0 8px 22px rgba(244, 58, 110, 0.3);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 96px;
  overflow-x: hidden;
}

::selection { background: var(--pink-soft); }

button, input, select { font-family: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ---- шапка ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(241, 242, 246, 0.98), rgba(241, 242, 246, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; }
.brand-name {
  font-weight: 800; font-size: 22px; letter-spacing: -0.5px; line-height: 1;
  color: var(--ink);
}
.brand-accent { color: var(--pink); }

.balance-pill {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  background: var(--card);
  border: none; border-radius: 16px;
  padding: 8px 15px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}
.balance-pill:hover { box-shadow: var(--shadow); }
.balance-pill:active { transform: scale(0.97); }
.balance-label {
  font-size: 9px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 1.2px; font-weight: 700;
}
.balance-value { font-weight: 800; font-size: 15px; color: var(--pink); }
.balance-flash { display: inline-block; animation: balflash 0.6s ease; }
@keyframes balflash {
  30% { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .balance-flash { animation: none; }
}

/* ---- каркас ---- */
main { padding: 6px 12px; max-width: 640px; margin: 0 auto; }
.tab { animation: fade 0.22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }

.panel {
  background: var(--card);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
}
.panel-list { padding: 6px 16px; }
.panel-title {
  font-size: 17px; font-weight: 800; letter-spacing: -0.2px;
  margin: 2px 2px 14px;
}
.section-title {
  margin: 18px 6px 10px; font-size: 13px; color: var(--muted);
  font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
}

/* ---- поиск ---- */
.search-wrap { position: relative; margin: 4px 0 6px; }
input[type="text"], input[type="number"] {
  width: 100%; appearance: none;
  background: var(--card);
  border: 1.5px solid transparent;
  color: var(--ink);
  padding: 14px 16px; border-radius: 16px;
  font-size: 15px; font-weight: 600; outline: none;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus { border-color: var(--pink); box-shadow: var(--shadow); }
input::placeholder { color: var(--muted); font-weight: 500; }
.search-wrap input { padding-left: 44px; }
.search-wrap::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 17px; height: 17px;
  transform: translateY(-50%); pointer-events: none; opacity: 0.8;
  background: no-repeat center / contain
    url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238b93a7" stroke-width="2.4" stroke-linecap="round"%3E%3Ccircle cx="11" cy="11" r="7"/%3E%3Cpath d="m20 20-3.5-3.5"/%3E%3C/svg%3E');
}
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: none; border-radius: 10px;
  background: var(--bg); color: var(--muted); cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.search-clear svg { width: 14px; height: 14px; }
.search-clear:active { transform: translateY(-50%) scale(0.94); }

/* ---- популярные: плитки ---- */
.popular-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.popular-tile {
  border: none; cursor: pointer;
  background: var(--card); border-radius: 18px;
  padding: 13px 6px 11px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.1s, box-shadow 0.2s;
}
.popular-tile:hover { box-shadow: var(--shadow); }
.popular-tile:active { transform: scale(0.95); }
.popular-tile .tile-ico { width: 40px; height: 40px; border-radius: 13px; display: block; }
.popular-tile .tile-ico .ico-wrap,
.popular-tile .tile-ico .ico-letter { width: 100%; height: 100%; border-radius: 13px; }
.popular-tile .tile-name {
  font-size: 11px; font-weight: 700; color: var(--ink);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- строки списков ---- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left; border: none; background: transparent;
  padding: 12px 2px; cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.15s, transform 0.06s;
  border-radius: 0;
}
.rows .row:last-child { border-bottom: none; }
.row:hover { opacity: 0.85; }
.row:active { transform: scale(0.99); }

.service-ico {
  width: 46px; height: 46px; flex: none;
  border-radius: 15px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.ico-letter {
  width: 100%; height: 100%; border-radius: inherit;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(20, 27, 46, 0.18);
}
.ico-wrap {
  position: relative; width: 100%; height: 100%;
  border-radius: inherit; display: block;
}
.ico-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 15%; box-sizing: border-box; object-fit: contain;
  border-radius: inherit; background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.row-dim .service-ico, .row-dim .row-name { opacity: 0.55; }
.row-body { flex: 1; min-width: 0; }
.row-name {
  font-weight: 700; font-size: 15.5px; letter-spacing: -0.1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 500; }
.row-chevron { flex: none; color: var(--muted); display: grid; place-items: center; }
.row-chevron svg { width: 16px; height: 16px; }

.price-pill {
  flex: none; font-weight: 800; font-size: 13.5px; white-space: nowrap;
  color: var(--pink); background: var(--pink-soft);
  padding: 9px 14px; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.row:hover .price-pill { background: var(--pink); color: #fff; }

.flag { width: 34px; flex: none; display: flex; justify-content: center; }
.flag-wrap { position: relative; width: 28px; height: 21px; display: block; }
.flag-img {
  position: absolute; inset: 0; width: 28px; height: 21px;
  object-fit: cover; border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(20, 27, 46, 0.08);
  display: block;
}
.flag-none {
  width: 28px; height: 21px; border-radius: 4px; display: block;
  background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line);
}

/* ---- шторка выбора страны ---- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(20, 27, 46, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadein 0.2s ease;
}
@keyframes fadein { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  background: var(--card);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -14px 44px rgba(20, 27, 46, 0.18);
  padding: 8px 16px 0;
  max-width: 640px; margin: 0 auto;
  height: min(78vh, 640px);
  display: flex; flex-direction: column;
  animation: sheetup 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes sheetup { from { transform: translateY(60%); opacity: 0.4; } }
.sheet-grabber {
  width: 40px; height: 4px; border-radius: 999px;
  background: var(--line); margin: 4px auto 10px; flex: none;
}
.sheet-head { display: flex; align-items: center; gap: 12px; padding-bottom: 4px; flex: none; }
.sheet-head-text { flex: 1; min-width: 0; }
.sheet-title { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.sheet-sub { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.sheet-search { flex: none; }
.sheet-search input { background: var(--bg); box-shadow: none; }
.sheet-note {
  flex: none; display: flex; align-items: center; gap: 7px;
  margin: 8px 2px 4px; color: var(--muted);
  font-size: 12px; font-weight: 600; line-height: 1.4;
}
.sheet-note svg { width: 14px; height: 14px; flex: none; }
.sheet-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 2px 2px calc(18px + env(safe-area-inset-bottom));
}
.sheet .empty { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.offer-row { cursor: pointer; }
.offer-row[data-busy] { opacity: 0.6; pointer-events: none; }

/* ---- карточки заказов ---- */
.list { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--card);
  border-radius: var(--r-panel);
  padding: 16px;
  box-shadow: var(--shadow);
}
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; min-width: 0;
}
.order-ico { width: 26px; height: 26px; border-radius: 8px; flex: none; display: block; }
.order-ico .ico-wrap, .order-ico .ico-letter { border-radius: 8px; font-size: 12px; }
.order-title .order-country { color: var(--muted); font-weight: 600; font-size: 13px; }
.badge {
  font-size: 11px; padding: 5px 11px; border-radius: 999px;
  font-weight: 700; white-space: nowrap; flex: none;
}
.badge.waiting { background: var(--warn-soft); color: var(--warn); }
.badge.received { background: var(--ok-soft); color: var(--ok); }
.badge.finished { background: var(--bg); color: var(--muted); }
.badge.cancelled, .badge.refunded { background: var(--red-soft); color: var(--red); }

.phone-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 13px; background: var(--bg);
  border-radius: var(--r-item); padding: 9px 9px 9px 15px;
}
.phone-block { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.phone-label {
  font-size: 9.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 1.1px; font-weight: 700;
}
.phone-num {
  font-family: var(--font-mono); font-size: 17px; font-weight: 700; letter-spacing: 0.4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.phone-row .btn-icon { background: var(--pink-ghost); color: var(--pink-deep); box-shadow: none; }

/* код из SMS — главный момент */
.code-box {
  margin-top: 12px;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  border-radius: var(--r-item);
  padding: 13px 13px 13px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: var(--shadow-pink);
}
.code-val {
  font-family: var(--font-mono);
  font-size: 25px; font-weight: 700; letter-spacing: 3px; color: #fff;
  overflow: hidden; text-overflow: ellipsis;
}

.wait-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; color: var(--muted); font-size: 13px; font-weight: 600;
}
.wait-bar {
  flex: 1; height: 4px; border-radius: 999px; background: var(--line);
  overflow: hidden;
}
.wait-bar i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--pink-deep));
  transition: width 1s linear;
}
.muted-sm { color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* инструкция по сервису в карточке заказа */
.tips {
  margin-top: 12px; background: var(--bg);
  border-radius: var(--r-item); padding: 0 14px;
}
.tips summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 0; font-size: 13px; font-weight: 700; color: var(--muted);
}
.tips summary::-webkit-details-marker { display: none; }
.tips summary::before {
  content: ""; width: 15px; height: 15px; flex: none;
  background: no-repeat center / contain
    url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238b93a7" stroke-width="2"%3E%3Ccircle cx="12" cy="12" r="9"/%3E%3Cpath d="M12 11v5M12 8h.01" stroke-linecap="round"/%3E%3C/svg%3E');
}
.tips summary::after {
  content: ""; margin-left: auto; width: 11px; height: 11px;
  background: no-repeat center / contain
    url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"%3E%3Cpath d="M2 4.2 6 8l4-3.8" fill="none" stroke="%238b93a7" stroke-width="2" stroke-linecap="round"/%3E%3C/svg%3E');
  transition: transform 0.2s;
}
.tips[open] summary::after { transform: rotate(180deg); }
.tips ul {
  margin: 0; padding: 0 0 12px 20px;
  font-size: 13px; line-height: 1.55; color: var(--ink); font-weight: 500;
}
.tips li { margin-bottom: 6px; }
.tips li::marker { color: var(--pink); }

.order-actions { display: flex; gap: 9px; margin-top: 13px; }
.cancel-lock {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--r-item);
  background: var(--bg); color: var(--muted);
  font-size: 12.5px; font-weight: 600; text-align: center;
}

/* ============================================================
   КНОПКИ
   primary  — розовый градиент, главное действие
   tonal    — розовая подложка, второстепенное действие
   neutral  — серая подложка (по умолчанию)
   danger   — красная тональная
   icon     — квадратная под SVG
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; background: var(--bg); color: var(--ink);
  min-height: 48px; padding: 12px 18px; border-radius: var(--r-item);
  font-size: 14.5px; font-weight: 700; letter-spacing: -0.1px;
  cursor: pointer; flex: 1;
  transition: transform 0.08s, filter 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { filter: brightness(0.965); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #ff5f8a, var(--pink) 55%, var(--pink-deep));
  color: #fff;
  box-shadow: var(--shadow-pink);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:active { box-shadow: 0 3px 10px rgba(244, 58, 110, 0.3); }

.btn-tonal { background: var(--pink-ghost); color: var(--pink-deep); }
.btn-tonal:hover { background: var(--pink-soft); filter: none; }

.btn-danger { background: var(--red-soft); color: var(--red); }

.btn-on-pink { background: rgba(255, 255, 255, 0.94); color: var(--pink-deep); flex: none; }

.btn-icon {
  flex: none; width: 40px; height: 40px; min-height: 40px;
  padding: 0; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.btn-icon svg { width: 17px; height: 17px; }
.code-box .btn-icon { box-shadow: none; }

.btn-block { width: 100%; flex: none; margin-top: 12px; }
.btn-sm { min-height: 40px; padding: 9px 14px; font-size: 13px; flex: none; }

/* ---- баланс ---- */
.balance-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #ff5f8a, var(--pink) 45%, var(--pink-deep));
  border-radius: var(--r-panel); padding: 24px; margin-bottom: 14px;
  box-shadow: 0 14px 34px rgba(244, 58, 110, 0.32);
}
.balance-card::after {
  content: ""; position: absolute; right: -46px; bottom: -70px;
  width: 190px; height: 190px; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, 0.12);
}
.balance-card::before {
  content: ""; position: absolute; right: 34px; top: -58px;
  width: 130px; height: 130px; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, 0.08);
}
.balance-card-label {
  font-size: 11px; color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase; letter-spacing: 1.6px; font-weight: 700;
}
.balance-card-value {
  font-size: 36px; font-weight: 800; margin-top: 7px; letter-spacing: -0.5px; color: #fff;
}

.chips { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chip {
  background: var(--bg); border: 1.5px solid transparent; color: var(--ink);
  border-radius: 999px; padding: 11px 16px;
  font-weight: 700; cursor: pointer; font-size: 14px;
  transition: background 0.15s, color 0.15s, transform 0.08s, box-shadow 0.15s;
}
.chip:hover { border-color: var(--pink-soft); }
.chip:active { transform: scale(0.95); }
.chip.active {
  background: var(--pink); color: #fff;
  box-shadow: 0 4px 14px rgba(244, 58, 110, 0.3);
}
#tab-balance .panel input[type="number"] { background: var(--bg); box-shadow: none; }
#tab-balance .panel input[type="number"]:focus { background: var(--card); box-shadow: var(--shadow-soft); }

.topup-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 2px; border-bottom: 1px solid var(--line);
}
.rows .topup-row:last-child { border-bottom: none; }
.topup-row .amt { font-weight: 800; font-size: 14.5px; }
.topup-row .when { color: var(--muted); font-size: 12px; font-weight: 500; flex: 1; margin-left: 2px; }

/* ---- пустые состояния ---- */
.empty {
  text-align: center; color: var(--muted); padding: 30px 20px;
  line-height: 1.7; font-size: 14px; font-weight: 500;
}
.empty-tall { padding: 60px 24px; }
.empty-ico { width: 44px; height: 44px; opacity: 0.5; margin-bottom: 6px; }

/* ---- нижняя навигация ---- */
.tabbar {
  position: fixed; bottom: 10px; left: 10px; right: 10px; z-index: 20;
  display: flex; gap: 4px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(20, 27, 46, 0.12);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom) / 2);
  max-width: 640px; margin: 0 auto;
}
.tabbtn {
  flex: 1; background: none; border: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 7px; font-size: 11px; font-weight: 700; cursor: pointer;
  border-radius: 16px; transition: color 0.15s, background 0.15s;
}
.tabbtn-ico { display: grid; place-items: center; position: relative; }
.tabbtn-ico svg { width: 22px; height: 22px; }
.tabbtn.active { color: var(--pink); background: var(--pink-ghost); }
.tabbtn:active { transform: scale(0.96); }
.tab-dot {
  position: absolute; top: -2px; right: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pink); border: 2px solid var(--card);
}

/* ---- админка ---- */
.admin-nav { margin: 4px 0 12px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card {
  background: var(--card); border-radius: 18px; padding: 14px 15px;
  box-shadow: var(--shadow-soft);
}
.stat-label {
  font-size: 10.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.8px; font-weight: 700;
}
.stat-value { font-size: 21px; font-weight: 800; margin-top: 5px; letter-spacing: -0.3px; }
.stat-extra { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 3px; }
.stat-warn { box-shadow: inset 0 0 0 1.5px var(--red); }
.stat-warn .stat-value, .stat-warn .stat-extra { color: var(--red); }
.status-panel { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; padding: 14px 15px; }

.mini-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600;
}
.mini-row:last-child { border-bottom: none; }
.mini-row > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txt-red { color: var(--red); }
.txt-ok { color: var(--ok); }

.credit-form { display: flex; flex-direction: column; gap: 9px; }
.credit-form input { background: var(--bg); box-shadow: none; }
.credit-form .order-actions { margin-top: 0; }

textarea {
  width: 100%; appearance: none; resize: vertical;
  background: var(--bg); border: 1.5px solid transparent; color: var(--ink);
  padding: 13px 15px; border-radius: var(--r-item);
  font-size: 15px; font-weight: 600; outline: none; font-family: inherit;
  margin-bottom: 12px; min-height: 110px;
  transition: border-color 0.15s;
}
textarea:focus { border-color: var(--pink); background: var(--card); }
textarea::placeholder { color: var(--muted); font-weight: 500; }

.feed-card { padding: 13px 14px; }
.feed-card .order-actions { margin-top: 10px; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 13px 19px; border-radius: 16px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(20, 27, 46, 0.25);
  z-index: 40; max-width: 90%;
  animation: toastin 0.22s ease;
}
.toast.err { background: var(--red); }
.toast.ok { background: var(--ok); }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(244, 58, 110, 0.25);
  border-top-color: var(--pink); border-radius: 50%; display: inline-block;
  animation: spin 0.7s linear infinite; vertical-align: middle;
}
.btn-primary .spinner, .code-box .spinner {
  border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 359px) {
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .tab, .toast, .sheet, .sheet-backdrop { animation: none; }
  .wait-bar i { transition: none; }
}
