/* ============================================================
   RAIKAZEN STORE — Telegram Mini App design system
   Mobile-first, Telegram theme aware, light + dark
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg:        var(--tg-theme-bg-color, #ffffff);
  --bg2:       var(--tg-theme-secondary-bg-color, #f4f4f5);
  --text:      var(--tg-theme-text-color, #18222d);
  --hint:      var(--tg-theme-hint-color, #8a929b);
  --link:      var(--tg-theme-link-color, #2481cc);
  --btn:       var(--tg-theme-button-color, #2481cc);
  --btn-text:  var(--tg-theme-button-text-color, #ffffff);
  --destructive: var(--tg-theme-destructive-text-color, #d93025);

  --accent:    var(--tg-theme-link-color, #2481cc);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --ok:        #1fa363;
  --warn:      #d98c00;
  --card:      color-mix(in srgb, var(--bg) 92%, var(--text) 8%);
  --line:      color-mix(in srgb, var(--hint) 26%, transparent);
  --shadow:    0 1px 2px rgba(0,0,0,.06), 0 8px 24px -12px rgba(0,0,0,.18);
  --shadow-lg: 0 12px 40px -12px rgba(0,0,0,.32);
  --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-xl: 28px;
  --tab-h: calc(56px + env(safe-area-inset-bottom, 0px));
  --gap: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1,h2,h3,h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 10px; }

.app { min-height: 100%; display: flex; flex-direction: column; }

/* ---------------- topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__back {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  font-size: 24px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; color: var(--text);
  transition: transform .12s ease, background .12s ease;
}
.topbar__back:active { transform: scale(.92); background: var(--bg2); }
.topbar__title { flex: 1; font-weight: 700; font-size: 16px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; gap: 6px; align-items: center; min-width: 36px; justify-content: flex-end; }

.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; cursor: pointer; font-size: 16px;
  transition: transform .12s ease;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn .dot {
  position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--destructive);
  color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center;
}

/* ---------------- view ---------------- */
.view {
  flex: 1;
  padding: 14px 14px calc(var(--tab-h) + 26px);
  max-width: 1180px; width: 100%; margin: 0 auto;
  animation: viewIn .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- tabbar ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: var(--tab-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--hint); font-size: 11px; font-weight: 600;
  transition: color .15s ease, transform .15s ease;
}
.tab__ico { font-size: 19px; filter: grayscale(1) opacity(.65); transition: filter .15s, transform .15s; }
.tab.active { color: var(--accent); }
.tab.active .tab__ico { filter: none; transform: translateY(-1px) scale(1.06); }
.tab:active { transform: scale(.94); }
.tabbar .badge {
  position: absolute; transform: translate(12px,-10px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--destructive); color: #fff; font-size: 10px;
  display: grid; place-items: center;
}

/* ---------------- generic bits ---------------- */
.section { margin-bottom: 26px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section__title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.section__more { font-size: 13px; font-weight: 600; color: var(--link); cursor: pointer; }
.muted { color: var(--hint); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.center { text-align: center; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid transparent; background: var(--btn); color: var(--btn-text);
  font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform .12s ease, filter .12s ease, opacity .12s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn--block { width: 100%; }
.btn--ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn--soft  { background: var(--accent-soft); color: var(--accent); }
.btn--danger { background: color-mix(in srgb, var(--destructive) 12%, transparent); color: var(--destructive); }
.btn--sm { min-height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 12px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px; box-shadow: var(--shadow);
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--bg2); color: var(--text); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, transform .1s;
}
.chip:active { transform: scale(.95); }
.chip.active { background: var(--btn); color: var(--btn-text); }
.chip--tag { cursor: default; background: var(--accent-soft); color: var(--accent); }

.badge-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  padding: 4px 8px; border-radius: 7px; text-transform: uppercase;
}
.b-new       { background: color-mix(in srgb, var(--link) 16%, transparent); color: var(--link); }
.b-bestseller{ background: color-mix(in srgb, #ff7a00 18%, transparent); color: #e06a00; }
.b-featured  { background: color-mix(in srgb, #8250df 18%, transparent); color: #8250df; }
.b-sale      { background: color-mix(in srgb, var(--destructive) 15%, transparent); color: var(--destructive); }
.b-popular   { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }

.price { font-weight: 800; letter-spacing: -.02em; }
.price--old { color: var(--hint); text-decoration: line-through; font-weight: 500; font-size: 12.5px; }
.price--now { color: var(--accent); }

/* ---------------- hero / home ---------------- */
.brand {
  display: flex; align-items: center; gap: 11px; margin-bottom: 4px;
}
.brand__logo {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, var(--accent), #7c5cff);
  display: grid; place-items: center; font-size: 21px; color: #fff;
  box-shadow: 0 6px 18px -8px var(--accent);
}
.brand__name { font-size: 17px; font-weight: 900; letter-spacing: -.02em; }
.brand__tag  { font-size: 12.5px; color: var(--hint); }

.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); padding: 20px 18px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7c5cff));
  color: #fff; box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255,255,255,.16); filter: blur(4px);
}
.hero__title { font-size: 21px; font-weight: 900; letter-spacing: -.02em; position: relative; z-index: 1; }
.hero__sub { font-size: 13.5px; opacity: .92; margin-top: 5px; position: relative; z-index: 1; }
.hero__cta {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.95); color: var(--accent);
  padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: 13.5px;
  position: relative; z-index: 1; cursor: pointer; border: 0;
}

/* search */
.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 0 13px; height: 47px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input {
  flex: 1; border: 0; background: transparent; outline: none; font-size: 15px; min-width: 0;
}
.search input::placeholder { color: var(--hint); }
.search__clear { border: 0; background: transparent; color: var(--hint); cursor: pointer; font-size: 17px; padding: 4px; }

/* category rail */
.rail { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.cat {
  flex: none; width: 96px; padding: 13px 8px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  text-align: center; cursor: pointer; transition: transform .14s, border-color .14s;
}
.cat:active { transform: scale(.95); }
.cat__ico { font-size: 26px; }
.cat__name { font-size: 12px; font-weight: 700; margin-top: 7px; }
.cat__count { font-size: 10.5px; color: var(--hint); }

/* horizontal product strip */
.strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip > * { flex: none; width: 178px; }

/* banners */
.banner {
  position: relative; overflow: hidden; border-radius: var(--r);
  padding: 16px; color: #fff; min-height: 106px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: var(--shadow); cursor: pointer;
}
.banner__emoji { font-size: 30px; position: absolute; right: 14px; top: 12px; opacity: .85; }
.banner__title { font-size: 16px; font-weight: 800; }
.banner__sub { font-size: 12.5px; opacity: .9; margin-top: 3px; max-width: 78%; }
.banner__cta { margin-top: 10px; font-size: 12px; font-weight: 800;
  background: rgba(255,255,255,.92); color: #1b1b1f; padding: 6px 12px;
  border-radius: 999px; align-self: flex-start; }

/* ---------------- product grid & card ---------------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }

.pcard {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .16s cubic-bezier(.2,.8,.3,1), box-shadow .16s, border-color .16s;
}
@media (hover:hover) { .pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); } }
.pcard:active { transform: scale(.98); }
.pcard__media { position: relative; aspect-ratio: 16/10; background: var(--bg2); overflow: hidden; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.pcard__fav {
  position: absolute; top: 7px; right: 7px; width: 32px; height: 32px;
  border-radius: 50%; border: 0; background: rgba(0,0,0,.35); color: #fff;
  backdrop-filter: blur(6px); display: grid; place-items: center; cursor: pointer;
  font-size: 15px; transition: transform .18s cubic-bezier(.3,1.6,.5,1);
}
.pcard__fav.on { background: rgba(226,64,84,.92); }
.pcard__fav:active { transform: scale(.8); }
.pcard__fav.pop { animation: heartPop .38s cubic-bezier(.3,1.6,.5,1); }
@keyframes heartPop { 0%{transform:scale(1)} 40%{transform:scale(1.42)} 100%{transform:scale(1)} }
.pcard__body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard__cat { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.pcard__title { font-size: 14px; font-weight: 700; line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__meta { font-size: 11.5px; color: var(--hint); display: flex; gap: 8px; flex-wrap: wrap; }
.pcard__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.pcard__price { display: flex; flex-direction: column; line-height: 1.15; }
.pcard__price .now { font-size: 15.5px; font-weight: 900; letter-spacing: -.02em; }
.pcard__rating { font-size: 11.5px; font-weight: 700; color: var(--text); background: var(--bg2); padding: 3px 7px; border-radius: 7px; }

.tech { display: flex; gap: 5px; flex-wrap: wrap; }
.tech span {
  font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px;
  background: var(--bg2); color: var(--hint); border: 1px solid var(--line);
}

/* ---------------- product detail ---------------- */
.gallery { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--bg2); }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: none; width: 100%; scroll-snap-align: center; aspect-ratio: 16/10; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery__dots { position: absolute; bottom: 9px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.gallery__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); transition: all .2s; }
.gallery__dot.on { background: #fff; width: 18px; border-radius: 4px; }
.gallery__count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.55); color:#fff;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(6px); }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
  border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; cursor: pointer;
  display: none; place-items: center; font-size: 20px; backdrop-filter: blur(6px); }
@media (hover:hover) { .gallery__nav { display: grid; } .gallery__nav.l { left: 8px; } .gallery__nav.r { right: 8px; } }
.gallery__thumbs { display: flex; gap: 7px; margin-top: 9px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb { flex: none; width: 56px; height: 40px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; opacity: .6; transition: all .15s; }
.gallery__thumb.on { border-color: var(--accent); opacity: 1; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 9px; text-align: center; }
.stat__v { font-size: 16px; font-weight: 900; letter-spacing: -.02em; }
.stat__l { font-size: 10.5px; color: var(--hint); font-weight: 600; margin-top: 2px; }
.stat--up .stat__v { color: var(--ok); }

.feature { display: flex; gap: 9px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.feature:last-child { border-bottom: 0; }
.feature::before { content: "✓"; color: var(--ok); font-weight: 900; flex: none; }

.prose { font-size: 14.5px; line-height: 1.65; color: var(--text); }
.prose h3 { font-size: 15.5px; margin: 16px 0 7px; }
.prose ul { padding-left: 19px; margin: 6px 0 12px; }
.prose li { margin-bottom: 4px; }
.prose p { margin-bottom: 9px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv__k { color: var(--hint); }
.kv__v { font-weight: 700; text-align: right; }

.stickybar {
  position: fixed; left: 0; right: 0; bottom: var(--tab-h); z-index: 45;
  padding: 11px 14px calc(11px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; align-items: center;
}
.stickybar__price { display: flex; flex-direction: column; line-height: 1.15; min-width: 96px; }
.stickybar__price .now { font-size: 18px; font-weight: 900; }
.stickybar .btn { flex: 1; }

/* ---------------- states ---------------- */
.state { padding: 46px 18px; text-align: center; }
.state__ico { font-size: 54px; line-height: 1; animation: float 2.6s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
.state__title { font-size: 17px; font-weight: 800; margin-top: 14px; }
.state__text { font-size: 13.5px; color: var(--hint); margin-top: 6px; max-width: 320px; margin-inline: auto; }
.state__act { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.skel { background: linear-gradient(100deg, var(--bg2) 30%, color-mix(in srgb, var(--bg2) 60%, var(--text) 6%) 50%, var(--bg2) 70%);
  background-size: 220% 100%; animation: shimmer 1.25s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -120% 0; } }
.skel--card { aspect-ratio: 16/16; border-radius: var(--r); }
.skel--line { height: 12px; margin-top: 8px; }
.skel--line.w60 { width: 60%; }

.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- toast ---------------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + 16px); z-index: 90;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast {
  background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg);
  padding: 11px 16px; border-radius: 13px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); max-width: 460px; width: 100%;
  animation: toastIn .24s cubic-bezier(.2,.9,.3,1.2); display: flex; gap: 8px; align-items: center;
}
.toast.out { animation: toastOut .2s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }
.toast--ok::before { content: "✅"; }
.toast--err::before { content: "❌"; }
.toast--info::before { content: "ℹ️"; }

/* ---------------- sheet / modal ---------------- */
.sheet-backdrop, .modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80;
  animation: fadeIn .18s ease; backdrop-filter: blur(2px);
}
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 81;
  background: var(--bg); border-radius: var(--r-xl) var(--r-xl) 0 0;
  max-height: 86vh; display: flex; flex-direction: column;
  animation: sheetIn .26s cubic-bezier(.2,.9,.3,1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: var(--shadow-lg);
}
@keyframes sheetIn { from { transform: translateY(100%); } }
.sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 4px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 4px; }
.sheet__title { font-size: 16.5px; font-weight: 800; }
.sheet__body { overflow-y: auto; padding: 8px 16px 16px; }
.sheet__foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet__close { border: 0; background: var(--bg2); color: var(--text); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 17px; }

.modal { position: fixed; inset: 0; z-index: 81; display: grid; place-items: center; padding: 18px; }
.modal__box {
  background: var(--bg); border-radius: var(--r-lg); max-width: 520px; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 18px; box-shadow: var(--shadow-lg);
  animation: modalIn .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.94); } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.94);
  display: grid; place-items: center; animation: fadeIn .2s; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px;
  border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 21px; cursor: pointer; }

/* ---------------- forms ---------------- */
.field { margin-bottom: 13px; }
.field__label { display: block; font-size: 12.5px; font-weight: 700; color: var(--hint); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 13px; font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 96px; resize: vertical; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px dashed var(--line); }

/* ---------------- order / list rows ---------------- */
.rowcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 14px; margin-bottom: 11px; cursor: pointer;
  transition: transform .14s, box-shadow .14s;
}
.rowcard:active { transform: scale(.985); }
@media (hover:hover) { .rowcard:hover { box-shadow: var(--shadow); } }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800;
  padding: 4px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.st-pending   { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.st-paid, .st-completed { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.st-cancelled, .st-failed, .st-refunded { background: color-mix(in srgb, var(--destructive) 14%, transparent); color: var(--destructive); }
.st-processing, .st-review { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }

/* ---------------- reviews ---------------- */
.review { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.review:last-child { border-bottom: 0; }
.stars { color: #f5a623; font-size: 14px; letter-spacing: 1px; }
.review__head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.verified { font-size: 10.5px; font-weight: 800; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent);
  padding: 2px 7px; border-radius: 6px; }

/* ---------------- sort/filter bar ---------------- */
.filterbar { display: flex; gap: 8px; align-items: center; margin-bottom: 13px; overflow-x: auto; scrollbar-width: none; }
.filterbar::-webkit-scrollbar { display: none; }
.filterbar .btn { flex: none; }
.result-line { font-size: 12.5px; color: var(--hint); margin-bottom: 10px; }

/* ---------------- profile ---------------- */
.profile__head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.profile__avatar { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; flex: none;
  background: linear-gradient(135deg, var(--accent), #7c5cff); display: grid; place-items: center;
  color: #fff; font-size: 24px; font-weight: 800; }
.profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.menu__item { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer;
  border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14.5px; transition: background .12s; }
.menu__item:last-child { border-bottom: 0; }
.menu__item:active { background: var(--bg2); }
.menu__item .ico { font-size: 18px; width: 24px; text-align: center; }
.menu__item .arr { margin-left: auto; color: var(--hint); }
.menu__item .cnt { margin-left: auto; background: var(--bg2); color: var(--hint);
  font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }

.stats-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 16px; }

/* pagination */
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 18px; }
.pager button { min-width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 700; }
.pager button.on { background: var(--btn); color: var(--btn-text); border-color: transparent; }
.pager button:disabled { opacity: .4; cursor: default; }

/* success burst */
.success-burst { text-align: center; padding: 40px 16px; }
.success-burst .ico { font-size: 74px; display: inline-block; animation: pop .5s cubic-bezier(.3,1.5,.5,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* offline strip */
.offline { position: fixed; left: 0; right: 0; top: 0; z-index: 99;
  background: var(--warn); color: #fff; font-size: 13px; font-weight: 700;
  text-align: center; padding: 7px; animation: slideDown .25s; }
@keyframes slideDown { from { transform: translateY(-100%); } }

/* admin link (desktop convenience) */
.desktop-hint { display: none; }
@media (min-width: 900px) { .desktop-hint { display: block; } }

@media (min-width: 900px) {
  .tabbar { max-width: 1180px; left: 50%; transform: translateX(-50%); border-radius: var(--r-xl) var(--r-xl) 0 0;
    border: 1px solid var(--line); border-bottom: 0; }
  .view { padding-bottom: calc(var(--tab-h) + 40px); }
}
