/* Админ-панель: дополняет style.css магазина (те же цвета, стекло, шторка, таббар) */

.section-head .link-btn { flex: none; }

/* ---------- обзор */
.hero { position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: var(--r-lg); margin-bottom: 12px; }
.hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 184, 61, .28), transparent 70%); }
.hero-label { font-family: var(--sc); font-weight: 700; font-size: 15px; letter-spacing: .05em; color: var(--muted); }
.hero-value { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-weight: 700; font-size: 36px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-value .star { width: 28px; height: 28px; fill: var(--gold); stroke: none; filter: drop-shadow(0 0 10px rgba(245, 184, 61, .5)); }
.hero-sub { margin-top: 6px; font-size: 13px; color: var(--faint); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile {
  display: flex; flex-direction: column; gap: 2px; padding: 13px 14px; border-radius: var(--r-md); text-align: left;
  background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shine); transition: transform .12s;
}
button.tile:active { transform: scale(.97); }
.tile-value { font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.tile-label { font-family: var(--sc); font-weight: 700; font-size: 13.5px; letter-spacing: .04em; color: var(--muted); }
.tile.hot { background: var(--accent-soft); border-color: rgba(30, 155, 255, .5); box-shadow: var(--shine), 0 0 18px rgba(30, 155, 255, .18); }
.tile.warm { background: rgba(245, 184, 61, .09); border-color: rgba(245, 184, 61, .35); }

/* ---------- списки */
.row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; }
.row + .row { border-top: 1px solid var(--stroke); }
.row:active { background: rgba(255, 255, 255, .03); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { margin-top: 1px; font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.row .price { font-size: 15px; }
.row .price .star { width: 13px; height: 13px; }
.row.off .row-title, .row.off .mini-thumb { opacity: .5; }
.row.picked { background: var(--accent-soft); }
.picked-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent); color: #fff; }
.picked-mark svg { width: 15px; height: 15px; stroke-width: 2.6; }
#gift-users, #gift-products, #banner-products { max-height: 340px; overflow-y: auto; }
.search-wrap + #gift-users, .search-wrap + #banner-products { margin-top: 4px; }

.mini-thumb {
  position: relative; width: 46px; height: 46px; border-radius: 13px; flex: none; overflow: hidden;
  display: grid; place-items: center; background: #171b24; border: 1px solid rgba(255, 255, 255, .06);
  font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--c);
}
.mini-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.toolbar { display: flex; gap: 10px; align-items: center; }
.toolbar .search-wrap { flex: 1; min-width: 0; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 12px 0 14px; padding: 0; }
.btn.small { height: 46px; padding: 0 16px; font-size: 16px; border-radius: 16px; flex: none; }
.btn.slim { height: 38px; padding: 0 12px; font-size: 15px; border-radius: 13px; }
.btn.danger { background: rgba(255, 107, 122, .12); color: var(--danger); border: 1px solid rgba(255, 107, 122, .4); box-shadow: none; }
.btn.ok { background: rgba(79, 217, 139, .14); color: var(--ok); border: 1px solid rgba(79, 217, 139, .4); box-shadow: none; }
.btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.load-more { margin-top: 12px; }

/* ---------- формы в шторке */
.sheet-head { padding: 6px 48px 0 4px; }
.sheet-head .sheet-title { margin: 4px 0 6px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--sc); font-weight: 700; font-size: 14.5px; letter-spacing: .05em; color: var(--muted); }
.counter { font-family: var(--mono); font-size: 11.5px; color: var(--faint); letter-spacing: 0; }
.counter.over { color: var(--danger); }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 14px; outline: none;
  background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shine); color: var(--text); font: inherit;
}
textarea.input { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: rgba(30, 155, 255, .5); }
.input::placeholder { color: var(--faint); }
.field-hint { font-size: 12.5px; color: var(--faint); }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice .chip { height: 36px; }

.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 14px; flex: none; background: rgba(255, 255, 255, .16); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(18px); }

.attach { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; }
.attach + .attach { border-top: 1px solid var(--stroke); }
.attach-main { flex: 1; min-width: 0; }
.attach-title { font-family: var(--sc); font-weight: 700; font-size: 14px; letter-spacing: .05em; color: var(--muted); }
.attach-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-name.none { color: var(--faint); }

.img-box { position: relative; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; display: grid; place-items: center; background: #171b24; border: 1px solid var(--stroke); color: var(--faint); font-family: var(--mono); font-size: 28px; }
.img-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-tools { display: flex; gap: 8px; margin-top: 8px; }
.img-tools .btn { flex: 1; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.actions .btn { flex: 1 1 calc(50% - 4px); height: 44px; font-size: 16px; }
.actions .btn.block { flex-basis: 100%; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; word-break: break-word; }

/* ---------- реклама */
.ad-card { margin-bottom: 12px; padding: 14px 15px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shine); }
.ad-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ad-no { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.ad-text { margin: 10px 0; font-size: 14.5px; word-break: break-word; }
.ad-meta { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.ad-meta b { color: var(--text); font-weight: 600; }
.ad-actions { display: flex; gap: 8px; margin-top: 12px; }
.ad-actions .btn { flex: 1; }
.banner-head { margin-bottom: 10px; }
.banner-meta { margin-top: 10px; }
.banner-meta b { word-break: break-word; }
.ad-actions .banner-move { flex: none; width: 42px; padding: 0; }
.img-tools .banner-photo-remove { flex: none; width: 46px; padding: 0; }
.field .note { margin-top: 2px; }
.file-picker { position: fixed; left: -100px; top: 0; width: 1px; height: 1px; opacity: 0; }
.ad-card .note { margin-top: 10px; }

.tg-preview { margin-top: 8px; padding: 14px; border-radius: 18px; background: #0e1621; border: 1px solid var(--stroke); }
.bubble { max-width: 86%; overflow: hidden; border-radius: 16px 16px 16px 6px; background: #182533; }
.bubble img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.bubble-text { padding: 8px 12px 10px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.bubble-text.empty { color: var(--faint); font-style: italic; }
.bubble-btn { max-width: 86%; margin-top: 4px; padding: 9px; border-radius: 12px; text-align: center; font-size: 14px; font-weight: 600; background: rgba(24, 37, 51, .9); }

.summary { display: grid; gap: 4px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; font-size: 14px; background: var(--glass); border: 1px solid var(--stroke); }
.summary b { font-weight: 600; }
.note.bad { color: var(--danger); background: rgba(255, 107, 122, .08); border-color: rgba(255, 107, 122, .3); }
