/* Оформление магазина MONOLITH: строгая тёмная тема, основной цвет — из админки («Дизайн»). Поле «Свой CSS» в админке подключается после и может переопределить что угодно. */
@font-face { font-family: MONOLITH; src: url('/fonts/Kurland.ttf') format('truetype'); font-display: swap; }
:root {
  --bg: #0a0c10; --panel: rgba(17, 20, 26, .95); --panel-solid: #12151b; --panel2: #1a1f27; --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .13);
  --text: #e9ecf1; --muted: #8b93a1; --accent: #007bff; --accent2: color-mix(in srgb, var(--accent) 70%, #fff); --ok: #2fbf71; --err: #ef4b4b; --warn: #f5a524;
  --radius: 8px; --shadow: none; --ease: cubic-bezier(.2, .7, .3, 1);
  --glow: color-mix(in srgb, var(--accent) 40%, transparent); --tint: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-grad: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 75%, #000));
  --card: linear-gradient(180deg, #171b22, #111419); --graphite: #10131a; --chip: rgba(255, 255, 255, .07);
  --head: MONOLITH, system-ui, sans-serif; --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); min-height: 100vh; -webkit-font-smoothing: antialiased; }
/* Фон отдельным слоем: не перерисовывается при прокрутке (дешевле, чем background-attachment: fixed) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, .55), rgba(8, 10, 14, .92) 70%),
    var(--site-bg, url(/img/sitebg.png)) center / cover no-repeat;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; letter-spacing: .04em; }
h1 { font-size: 28px; margin: 0 0 16px; } h2 { font-size: 21px; margin: 24px 0 10px; } h3 { margin: 0 0 10px; font-size: 17px; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#app > div { max-width: 1440px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
[hidden] { display: none !important; }

/* ---------- Шапка ---------- */
.navbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin: 0 0 22px; padding: 10px 18px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px;
  background: #0f1217; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; white-space: nowrap; min-width: 0; }
.brand img { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; box-shadow: 0 0 0 1px var(--line2); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--head); font-size: 22px; letter-spacing: .1em; line-height: 1; color: #f1f3f7; }
.brand-short { display: none; font-family: var(--head); font-size: 18px; letter-spacing: .1em; line-height: 1; color: #f1f3f7; }
.nav-links { display: flex; gap: 4px; align-items: center; flex: 1; flex-wrap: wrap; min-width: 0; }
.nav-links a { position: relative; color: #c9ced8; padding: 7px 12px; border-radius: 8px; font-family: var(--head); letter-spacing: .03em; font-size: 15px; transition: background .2s, color .2s; }
.nav-links a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease); }
.nav-links a:hover { background: rgba(255, 255, 255, .04); color: #fff; text-decoration: none; }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-user { display: flex; align-items: center; gap: 9px; color: #fff; padding: 3px 10px 3px 3px; border-radius: 999px; transition: background .2s; max-width: 220px; }
.nav-user:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav-user img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px var(--line2); }
.name-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balance-btn {
  display: flex; flex-direction: column; align-items: center; line-height: 1.1; gap: 2px; cursor: pointer; color: #fff;
  background: #171b22; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 16px; font: inherit;
  transition: border-color .2s;
}
.balance-btn small { font: 11px/1 var(--body); color: var(--muted); transition: color .2s; }
.balance-btn b { font-size: 15px; font-variant-numeric: tabular-nums; }
.balance-btn:hover { border-color: var(--accent); }
.balance-btn:hover small { color: var(--accent2); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--err); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 0 rgba(127, 174, 62, .6); }
form.inline { display: inline; margin: 0; }

/* ---------- Кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel2); color: #fff;
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font: 600 14px/1.2 var(--body); letter-spacing: .01em; text-decoration: none !important;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .2s, filter .2s;
}
.btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel2)); }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); border-color: color-mix(in srgb, var(--accent) 85%, #000); }
.btn-danger { background: #7a2318; border-color: #7a2318; }
.btn-danger:hover { background: #a4321f; }
.btn-ghost { background: transparent; }
.btn-small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-steam { background: #1b2838; border-color: #2a475e; color: #c7e6ff; }
.btn-steam:hover { background: #22364b; border-color: #66c0f4; }
.btn-discord { background: #5865f2; border-color: #5865f2; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }
.ico { flex: none; }
input, select, textarea { font: inherit; font-family: var(--body); background: rgba(0, 0, 0, .35); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 11px; max-width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
textarea { width: 100%; }
textarea.code { font-family: Consolas, monospace; font-size: 13px; }
label { display: block; margin-bottom: 10px; }
label > input:not([type=checkbox]), label > select { display: block; width: 100%; margin-top: 4px; }
label.check { display: flex; gap: 8px; align-items: center; }
.muted { color: var(--muted); } .small { font-size: 13px; } .ok { color: var(--ok); } .err { color: var(--err); } .warn { color: var(--warn); }
.center { text-align: center; }

/* ---------- Витрина ---------- */
.grid-wrapper { display: grid; grid-template-columns: 230px minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.left-column, .right-column { display: flex; flex-direction: column; gap: 14px; }
.left-column { position: sticky; top: 96px; }
.products-types-buttons { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.cat-btn {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 8px;
  color: #cdd2db; font: 500 14.5px/1.3 var(--body); overflow: hidden; transition: color .2s, background .25s, transform .25s var(--ease);
}
.cat-btn::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 0; background: var(--accent); transform: scaleY(0); transition: transform .25s var(--ease); }
.cat-btn i { font: 12px/1 var(--body); font-style: normal; color: var(--muted); background: rgba(255, 255, 255, .06); padding: 4px 8px; border-radius: 8px; transition: background .25s, color .25s; }
.cat-btn:hover { text-decoration: none; background: rgba(255, 255, 255, .05); color: #fff; }
.cat-btn.app-button--active { color: #fff; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cat-btn.app-button--active::before { transform: scaleY(1); }
.cat-btn.app-button--active i { background: var(--accent); color: #fff; }
.search { width: 100%; padding: 11px 14px 11px 38px; border-radius: 8px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239196a3' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5.5'/%3E%3Cpath d='m11.5 11.5 3.5 3.5'/%3E%3C/svg%3E") 13px 50% no-repeat; border: 1px solid var(--line); }

.product-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.product-cell { min-width: 0; }
.product-card {
  position: relative; display: flex; flex-direction: column; height: 100%; min-height: 270px; color: #fff; text-decoration: none !important; isolation: isolate;
  background: #14171d; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s;
}
.product-card:hover { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.product-card-image-container { position: relative; flex: 1; min-height: 190px; display: flex; align-items: center; justify-content: center; padding: 36px 14px 10px; background: #101318; }
.product-card-image-container img { width: 100%; height: 170px; object-fit: contain; }
.product-card-image-container.no-image img { width: 96px; height: 96px; border-radius: 8px; opacity: .5; filter: grayscale(.5); }
.product-card-labels { position: absolute; top: 10px; left: 10px; right: 10px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 4px; z-index: 4; pointer-events: none; }
.product-card-label { background: var(--chip); color: #fff; border-radius: 8px; padding: 2px 7px; font: 700 11px/1.35 var(--body); letter-spacing: .04em; }
.product-card-labels > .product-card-label { position: static !important; }
/* Срок — слева, метки — по центру, скидка — справа */
.plc-days { justify-self: start; } .plc-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; } .plc-sale { justify-self: end; }
.product-card-label.static { display: inline-block; position: static !important; }
.product-card-label--rental-days { background: rgba(10, 12, 16, .7); color: #d5dae3; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); backdrop-filter: blur(4px); }
.product-card-label--sale { background: var(--accent); color: #fff; }
.product-card-footer { display: flex; align-items: center; gap: 10px; padding: 11px 12px 12px; border-top: 1px solid var(--line); }
.product-card-name { flex: 1; min-width: 0; font: 500 14.5px/1.3 var(--body); color: #eef1f5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price { flex: none; font: 700 15px/1.2 var(--body); font-variant-numeric: tabular-nums; color: var(--accent2); white-space: nowrap; text-align: right; }
.product-card-price s, .pd-price s { opacity: .6; font-weight: 400; margin-right: 4px; }
.pd-sale { font: 600 14px/1.2 var(--body); background: var(--accent); padding: 3px 9px; border-radius: 8px; vertical-align: middle; }
.labels-cell .product-card-label { display: inline-block; margin: 1px; }
.empty-note { text-align: center; padding: 40px 0; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.server-card { display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; padding: 16px; }
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.server-name { font: 17px/1.2 var(--head); letter-spacing: .03em; min-width: 0; }
.sc-online { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-online b { color: #fff; }
.progress { height: 4px; background: rgba(255, 255, 255, .06); border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.copy-ip { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px dashed var(--line2); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font: 13px/1.2 Consolas, monospace; transition: border-color .2s, background .2s; }
.copy-ip small { font: 12px var(--body); color: var(--muted); }
.copy-ip:hover { border-color: var(--accent); background: rgba(255, 255, 255, .03); }
.copy-ip.copied { border-color: var(--ok); } .copy-ip.copied small { color: var(--ok); }

/* Discord и Steam: компактные строки-ссылки */
.wrow { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; }
a.wrow.panel { padding: 13px 14px; transition: border-color .2s, background .2s; }
.wrow-box { padding: 0; overflow: hidden; }
.wrow-box > .wrow { padding: 13px 14px; transition: background .2s; }
.wrow-ico { flex: none; width: 38px; height: 38px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; }
.wrow-discord .wrow-ico { background: #5865f2; }
.wrow-launcher .wrow-ico { background: var(--accent); }
.wrow-steam .wrow-ico { background: #1b2838; box-shadow: inset 0 0 0 1px #3d6c8e; }
.wrow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wrow-text b { font: 600 14.5px/1.2 var(--body); }
.wrow-text small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.wrow-text small .dot { width: 7px; height: 7px; }
.wrow-launcher .wrow-text small { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrow-go { flex: none; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s var(--ease), color .2s; }
a.wrow:hover .wrow-go, .wrow-box > a.wrow:hover .wrow-go { color: var(--accent2); transform: translateX(3px); }
a.wrow.panel:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.wrow-box > a.wrow:hover { background: rgba(255, 255, 255, .03); }
[data-widget]:not(.loaded) [data-w]:not([data-w="mods"]) { color: transparent; border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
.widget-mods { border-top: 1px solid var(--line); padding: 8px 14px; }
.widget-mods summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: flex; align-items: center; gap: 6px; user-select: none; }
.widget-mods summary::-webkit-details-marker { display: none; }
.widget-mods summary:focus-visible { outline: none; color: #fff; }
.widget-mods summary:hover { color: #fff; }
.widget-mods summary::before { content: '›'; font-size: 18px; line-height: 1; transition: transform .2s; }
.widget-mods[open] summary::before { transform: rotate(90deg); }
.widget-list { margin-top: 8px; max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.widget-mod { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 7px; color: #d6d8de; font-size: 13px; }
.widget-mod:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.widget-mod span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-mod i { font-style: normal; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.widget .btn { width: 100%; }

.banner-title { font: 600 15px/1.3 var(--body); margin-bottom: 6px; color: #fff; }
.banner-content { color: #b9bfca; font-size: 14px; }
.banner { padding: 14px 16px; }
.banner-link { margin-top: 10px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border-left-width: 4px !important; }
.flash-success { background: rgba(127, 174, 62, .12); border: 1px solid var(--ok); }
.flash-error { background: rgba(217, 80, 58, .12); border: 1px solid var(--err); }
.footer { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; padding: 28px 0; margin-top: 30px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); position: relative; }
.footer a { color: var(--muted); } .footer a:hover { color: #fff; }
.page { max-width: 1000px; margin: 0 auto; }

/* ---------- Окна ---------- */
dialog.modal { border: 1px solid var(--line2); border-radius: 10px; background: #15181e; color: var(--text); padding: 0; width: min(780px, calc(100% - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
dialog.modal::backdrop { background: rgba(5, 7, 10, .78); }
.modal-body { padding: 24px; position: relative; }
.modal-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, .06); border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; z-index: 2; transition: background .2s, transform .2s; }
.modal-close:hover { background: rgba(255, 255, 255, .14); }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; position: relative; }
.pd-image { background: #101318; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; min-height: 260px; padding: 16px; }
.pd-image img { max-height: 360px; object-fit: contain; }
.pd-info h2 { margin-top: 0; font-size: 24px; padding-right: 36px; }
.pd-price { font-size: 24px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-days { font: 700 13px/1.2 var(--body); background: var(--chip); color: #eef1f5; padding: 4px 9px; border-radius: 8px; letter-spacing: .05em; }
.pd-desc { margin-bottom: 14px; color: #d6d8de; }
.pd-action { margin-top: 12px; }
.pd-action .btn { width: 100%; padding: 12px 16px; }
.recharge-form h2 { margin-top: 0; }
.recharge-panel-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.recharge-panel-provider { position: relative; height: 92px; padding: 10px; border: 2px solid transparent; border-radius: 6px; background: #ece7dc; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #222; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.recharge-panel-provider:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, #fff); }
.recharge-panel-provider img { max-height: 46px; max-width: 85%; object-fit: contain; pointer-events: none; }
.recharge-panel-provider-title { font: 600 12px/1.2 var(--body); color: #444; }
.recharge-panel-provider.selected { border-color: var(--accent); }
.recharge-panel-provider.selected::after { content: '✓'; position: absolute; top: 6px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 12px/20px var(--body); text-align: center; }
.recharge-bonus { min-height: 22px; margin-bottom: 10px; }
.recharge-for { margin-bottom: 12px; padding: 10px 14px; border-radius: 8px; background: var(--tint); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.modal-footer-buttons { display: flex; justify-content: flex-end; }
.inline-buttons { display: flex; gap: 10px; justify-content: center; }

/* Приветствие и голосование */
dialog.modal-notify { width: min(430px, calc(100% - 24px)); }
.notify { text-align: center; padding: 30px 26px 26px; }
.notify h2 { margin: 0 0 10px; font-size: 25px; line-height: 1.2; }
.notify p { color: #c9ccd4; margin: 0 0 22px; }
.notify-icon { width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px var(--line2); }
.notify-icon img { width: 100%; height: 100%; object-fit: cover; }
.notify-icon--vote { border-radius: 50%; font-size: 36px; color: #fff; background: var(--accent); }
.notify-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Профиль и таблицы ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile-head img { width: 68px; height: 68px; border-radius: 50%; box-shadow: 0 0 0 3px var(--line2); }
.profile-balance { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.promo-form { margin-top: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 8px 9px; text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.table tr:hover td { background: rgba(255, 255, 255, .02); }
.table tr.dim { opacity: .5; }
.pre { white-space: pre-wrap; word-break: break-all; background: #0b0d12; padding: 10px; border-radius: 8px; font-size: 12px; max-height: 400px; overflow: auto; }

/* Админка: та же палитра, плотнее и строже */
body.admin { background: #0a0c10; }
body.admin::before { display: none; }
.admin .navbar { position: relative; }
.admin-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 10px; max-height: calc(100vh - 20px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #333 transparent; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-nav a { position: relative; padding: 7px 12px; border-radius: 8px; color: #c9ced8; font-size: 14px; transition: background .2s, color .2s; }
.admin-nav a.active { background: color-mix(in srgb, var(--accent) 18%, transparent); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.admin-nav a:hover { text-decoration: none; background: rgba(255, 255, 255, .05); color: #fff; }
.admin-nav-group { margin: 12px 8px 4px; color: var(--muted); font: 600 12px/1 var(--body); }
.admin-nav-group:first-child { margin-top: 4px; }
.admin-nav-back { margin-top: 12px; border: 1px dashed var(--line2); text-align: center; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 14px; margin-bottom: 12px; }
.check-grid label.check { margin: 0; padding: 4px 0; }
.field-title { margin: 8px 0 6px; color: var(--muted); font-size: 14px; }
.tabs a { padding: 6px 12px; border-radius: 8px; background: var(--panel2); color: #c9ced8; border: 1px solid var(--line); font-size: 14px; }
.tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs a:hover { text-decoration: none; border-color: var(--accent); }
.list-row { display: flex; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-top: 8px; }
.list-row > form:first-child { flex: 1; }
.row.wrap .grow { flex: 2; min-width: 220px; }
.form fieldset.dim, fieldset.dim { opacity: .6; }
.admin-main fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 14px; background: rgba(0, 0, 0, .15); }
.admin-main legend { padding: 0 6px; color: #dfe3ea; font: 600 13px/1 var(--body); }
.admin-main code { background: #0a0c10; border: 1px solid var(--line); padding: 1px 5px; border-radius: 8px; word-break: break-all; color: #9cc8ff; }
input[type=color] { width: 60px; height: 36px; padding: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.admin-main { min-width: 0; overflow-x: auto; font-family: var(--body); }
.admin-main h1 { font-family: var(--head); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-main h2 { font-size: 17px; color: #f1f3f7; margin-top: 28px; }
.admin-main .table { font-size: 13.5px; }
.admin-main .table th { position: sticky; top: 0; background: #151920; z-index: 1; font-size: 12px; }
.admin-main .table tr:nth-child(even) td { background: rgba(255, 255, 255, .015); }
.admin-main .table tr:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.badge { background: var(--err); color: #fff; border-radius: 8px; padding: 1px 7px; font-size: 12px; }
.tag { background: var(--accent2); color: #fff; border-radius: 8px; padding: 1px 7px; font: 700 11px/1.5 var(--body); letter-spacing: .06em; vertical-align: middle; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.stat { position: relative; background: #151920; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.stat span { color: var(--muted); font-size: 12px; letter-spacing: .06em; } .stat b { font-size: 22px; font-variant-numeric: tabular-nums; } .stat i { color: var(--muted); font-size: 12px; font-style: normal; }
.chart { background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 8px; padding: 10px 10px 4px; }
.chart svg { display: block; width: 100%; height: auto; }
.ch-grid { stroke: rgba(255, 255, 255, .08); stroke-dasharray: 3 4; }
.ch-ax { fill: var(--muted); font: 10px var(--body); }
.ch-hit { fill: transparent; }
.ch-bar { fill: var(--accent); opacity: .85; transition: opacity .15s; }
.ch-col:hover .ch-bar { opacity: 1; fill: var(--accent2); }
.ch-col:hover .ch-hit { fill: rgba(255, 255, 255, .04); }
.ch-line { fill: none; stroke: var(--accent2); stroke-width: 2; stroke-linejoin: round; pointer-events: none; }
.chart-legend { color: var(--muted); margin: 6px 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg-bar, .lg-line { display: inline-block; width: 14px; height: 10px; background: var(--accent); border-radius: 2px; }
.lg-line { height: 3px; background: var(--accent2); margin-left: 10px; }
.player-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.player-head img { width: 64px; height: 64px; border-radius: 6px; box-shadow: 0 0 0 2px var(--line2); }
.player-name { font: 20px/1.2 var(--head); letter-spacing: .04em; margin-bottom: 4px; }
.panel-sub { background: rgba(0, 0, 0, .2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.panel-sub summary { cursor: pointer; color: var(--accent2); }
.form { max-width: 640px; } .form.wide { max-width: 1000px; }
.form fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.row input:not(.w60):not(.w80) { flex: 1; min-width: 140px; }
.w60 { width: 60px; } .w80 { width: 80px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cols .form { background: var(--card); border: 1px solid var(--line); padding: 14px; border-radius: 8px; }
.thumb { width: 48px; height: 48px; object-fit: contain; background: #0a0c10; border-radius: 8px; }
.thumb.big { width: 160px; height: 160px; }
.upload { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.actions form { display: inline-flex; gap: 4px; margin: 2px; }
.danger-zone { margin-top: 24px; }
.pager { margin: 12px 0; display: flex; gap: 14px; }

/* ---------- Анимации: только при включённых в админке (body.anim) и если система не просит меньше движения ---------- */
@media (prefers-reduced-motion: no-preference) {
  body.anim .navbar { animation: slide-down .5s var(--ease) both; }
  body.anim .left-column { animation: fade-right .5s var(--ease) .05s both; }
  body.anim .right-column > * { animation: fade-left .5s var(--ease) both; }
  body.anim .right-column > :nth-child(2) { animation-delay: .08s; } body.anim .right-column > :nth-child(3) { animation-delay: .16s; } body.anim .right-column > :nth-child(n+4) { animation-delay: .24s; }
  body.anim .product-cell, body.anim .product-cell.enter { animation: card-in .5s var(--ease) both; animation-delay: calc(min(var(--i, 0), 20) * 40ms); }
  body.anim .product-cell.enter { animation-name: card-in2; }
  body.anim .product-card-image-container img { transition: transform .3s var(--ease); }
  body.anim .product-card:hover .product-card-image-container img { transform: scale(1.03); }
  body.anim dialog.modal[open] { animation: modal-in .32s var(--ease); }
  body.anim dialog.modal[open]::backdrop { animation: fade-in .3s ease; }
  body.anim dialog.modal.closing { animation: modal-out .18s ease forwards; }
  body.anim dialog.modal.closing::backdrop { animation: fade-out .18s ease forwards; }
  body.anim .page.panel, body.anim .flash { animation: fade-up .45s var(--ease) both; }
  body.anim .progress span { animation: grow .9s var(--ease) .2s both; }
  body.anim .dot.on { animation: pulse 2s infinite; }
  body.anim .notify-icon { animation: pop .6s var(--ease) .1s both; }
  body.anim .notify-icon--vote { animation: pop .6s var(--ease) .1s both, float 3s ease-in-out .7s infinite; }
}
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes card-in2 { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-left { from { opacity: 0; } to { opacity: 1; transform: none; } }
@keyframes fade-right { from { opacity: 0; } to { opacity: 1; transform: none; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(127, 174, 62, .6); } 70% { box-shadow: 0 0 0 8px rgba(127, 174, 62, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 174, 62, 0); } }
@keyframes pop { from { opacity: 0; transform: scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.progress span { transform-origin: left; }

/* Праздничные эффекты (effects.js) */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.fx-garland { position: fixed; top: 0; left: 0; right: 0; height: 34px; pointer-events: none; z-index: 51; display: flex; justify-content: space-around; }
.fx-garland i { width: 10px; height: 14px; border-radius: 50%; margin-top: 14px; animation: fx-blink 1.6s infinite; }
.fx-garland i:nth-child(4n+1) { background: #ff3b3b; color: #ff3b3b; } .fx-garland i:nth-child(4n+2) { background: #ffd23b; color: #ffd23b; animation-delay: .4s; }
.fx-garland i:nth-child(4n+3) { background: #3bff7a; color: #3bff7a; animation-delay: .8s; } .fx-garland i:nth-child(4n) { background: #3bb4ff; color: #3bb4ff; animation-delay: 1.2s; }
.fx-garland::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 18px; border-bottom: 2px solid #2d4a2d; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
@keyframes fx-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 10px currentColor; } 50% { opacity: .35; box-shadow: none; } }
.fx-pumpkin { position: fixed; bottom: 6px; font-size: 34px; pointer-events: none; z-index: 50; filter: drop-shadow(0 0 8px #ff8c00); }

/* ---------- Адаптив ---------- */
@media (max-width: 1240px) { .grid-wrapper { grid-template-columns: 210px minmax(0, 1fr); } .right-column { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
@media (max-width: 860px) {
  .grid-wrapper { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .left-column, .right-column { min-width: 0; }
  .left-column { position: static; }
  .products-types-buttons { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px; }
  .products-types-buttons::-webkit-scrollbar { display: none; }
  .cat-btn { flex: none; padding: 9px 12px; }
  .cat-btn::before { left: 18%; right: 18%; top: auto; bottom: 0; width: auto; height: 3px; transform: scaleX(0); }
  .cat-btn.app-button--active::before { transform: scaleX(1); }
  body.anim .cat-btn:hover { transform: none; }
  .navbar { gap: 10px; padding: 8px 12px; position: relative; }
  .nav-links { order: 5; flex-basis: 100%; }
  .brand-name { font-size: 18px; }
  .product-cards { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
  .product-card { min-height: 230px; }
  .product-card-image-container { min-height: 150px; padding-top: 30px; }
  .product-card-image-container img { height: 130px; }
  .product-card-name { font-size: 14px; }
  .product-card-footer { flex-direction: column; align-items: flex-start; gap: 4px; padding: 9px 10px 10px; }
  .product-card-price { text-align: left; }
}
@media (max-width: 700px) { .product-detail { grid-template-columns: 1fr; } .admin-wrap { grid-template-columns: 1fr; } .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; } .profile-balance { margin-left: 0; } .name-user { display: none; } .nav-user { padding-right: 3px; } }
@media (max-width: 520px) { .brand-name { display: none; } .brand-short { display: inline; } .nav-right { margin-left: auto; gap: 6px; } .balance-btn { padding: 9px 12px; } .balance-btn small { display: none; } .balance-btn b::before { content: "+ "; color: var(--accent2); } .nav-right { flex-wrap: nowrap; } .navbar .btn-small { padding: 5px 7px; font-size: 12px; letter-spacing: .02em; } .brand img { width: 38px; height: 38px; } .navbar { gap: 8px; } }

/* Админка: скрытие сумм, тепловая карта, режим «от имени игрока» (28.10) */
.hide-sums .stat b, .hide-sums .money, .hide-sums .admin-main .table td:nth-child(n+2) .money { filter: blur(7px); user-select: none; }
.w120 { width: 120px; }
.heat { overflow-x: auto; }
.heat table { border-collapse: separate; border-spacing: 2px; font-size: 11px; color: var(--muted); }
.heat th { font-weight: normal; padding: 0 3px; text-align: center; }
.heat td { width: 22px; height: 18px; border-radius: 3px; background: var(--accent); }
.imp-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Кнопка «Отменить» счёт в строке таблицы/тексте */
.inline-form { display: inline-block; margin: 0 0 0 6px; }

/* Всплывающие уведомления (flash): справа сверху, исчезают сами через 3 с, клик — закрыть */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toasts:empty { display: none; }
.flash.toast { margin: 0; pointer-events: auto; cursor: pointer; background-color: var(--panel-solid); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.flash-success.toast { background-image: linear-gradient(rgba(47, 191, 113, .14), rgba(47, 191, 113, .14)); }
.flash-error.toast { background-image: linear-gradient(rgba(239, 75, 75, .14), rgba(239, 75, 75, .14)); }
body.anim .flash.toast { animation: toast-in .3s var(--ease) both; }
.flash.toast.toast-hide, body.anim .flash.toast.toast-hide { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
.doc-text h2 { font-size: 18px; margin: 22px 0 8px; }
.doc-text p { margin: 0 0 10px; line-height: 1.55; }
.doc-text ul { margin: 0 0 12px; padding-left: 22px; line-height: 1.55; }
.doc-text li { margin-bottom: 4px; }

/* ===== Свои окна и контролы (js/ui.js) ===== */
input, select, textarea { color-scheme: dark; } /* календарь/палитра браузера - тёмные */
.ui-dialog { border: 1px solid var(--line2); border-radius: 12px; background: var(--card); color: var(--text); padding: 0; width: min(440px, calc(100% - 32px)); box-shadow: 0 24px 70px rgba(0, 0, 0, .65); }
.ui-dialog::backdrop { background: rgba(5, 7, 10, .72); backdrop-filter: blur(2px); }
.ui-dialog-body { padding: 22px 22px 18px; border-top: 3px solid var(--accent); border-radius: 12px; }
.ui-dialog-danger .ui-dialog-body { border-top-color: var(--err); }
.ui-dialog-title { font: 600 17px/1.3 var(--head); letter-spacing: .02em; margin-bottom: 10px; }
.ui-dialog-text { color: #cdd2db; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.ui-dialog-actions .btn { min-width: 110px; justify-content: center; }
body.anim .ui-dialog[open] { animation: ui-dlg-in .18s var(--ease); }
@keyframes ui-dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ошибки заполнения */
.field-invalid, .field-invalid.msel .msel-btn, .mnum.field-invalid input { border-color: var(--err) !important; box-shadow: 0 0 0 3px rgba(239, 75, 75, .18); }
.mnum.field-invalid, .msel.field-invalid { box-shadow: none; }
.field-error { display: block; color: var(--err); font-size: 13px; margin-top: 4px; line-height: 1.35; }
body.anim .field-error { animation: ui-err-in .2s var(--ease); }
@keyframes ui-err-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* выпадающие списки */
.msel { position: relative; display: inline-block; vertical-align: middle; max-width: 100%; min-width: 120px; padding: 0 !important; border: 0 !important; background: none !important; }
label > .msel { display: block; width: 100%; margin-top: 4px; }
.msel-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; margin: 0 !important; }
.msel-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-family: var(--body); background: rgba(0, 0, 0, .35); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 11px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.msel-btn:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line2)); }
.msel-btn:focus-visible, .msel-open .msel-btn { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.msel-btn:disabled { opacity: .55; cursor: not-allowed; }
.msel-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-arrow { flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.msel-open .msel-arrow { transform: translateY(2px) rotate(-135deg); border-color: var(--accent2); }
.msel-list { position: fixed; z-index: 2000; overflow-y: auto; overscroll-behavior: contain; max-width: min(560px, calc(100vw - 16px)); background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 8px; padding: 4px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); font-family: var(--body); }
body.anim .msel-list { animation: ui-list-in .14s var(--ease); }
@keyframes ui-list-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.msel-opt { padding: 7px 10px; border-radius: 6px; cursor: pointer; color: #cdd2db; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-opt.msel-in-group { padding-left: 20px; }
.msel-opt.msel-hl { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.msel-opt.msel-sel { color: var(--accent2); font-weight: 600; }
.msel-opt.msel-sel::before { content: '✓'; display: inline-block; width: 16px; margin-left: -4px; }
.msel-opt.msel-dis { opacity: .4; cursor: default; }
.msel-group { padding: 8px 10px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 600px) { .msel-opt { padding: 11px 12px; } }

/* числа: свои кнопки вместо стрелок браузера */
.mnum { display: inline-flex; align-items: stretch; vertical-align: middle; max-width: 100%; }
label > .mnum { display: flex; width: 100%; margin-top: 4px; }
.mnum input { flex: 1; min-width: 60px; margin: 0 !important; border-radius: 0; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.mnum input::-webkit-outer-spin-button, .mnum input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mnum-btn { flex: none; width: 34px; font: 600 16px/1 var(--body); color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line2); cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.mnum-dec { border-radius: 8px 0 0 8px; border-right: 0; }
.mnum-inc { border-radius: 0 8px 8px 0; border-left: 0; }
.mnum-btn:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); }
.mnum-disabled .mnum-btn { opacity: .4; pointer-events: none; }

/* выбор файла */
input[type=file] { padding: 6px; cursor: pointer; color: var(--muted); }
input[type=file]::file-selector-button { font: 500 14px var(--body); color: var(--text); background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 6px 12px; margin-right: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
input[type=file]:hover::file-selector-button { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel2)); }

/* «О сервере» на главной: текст для игроков и поисковиков */
.about-block { margin-top: 18px; }
.about-title { font-size: 20px; margin: 0 0 10px; line-height: 1.3; }
.about-text p { margin: 0 0 10px; color: #b9bfca; font-size: 14px; line-height: 1.55; }
.about-text p:last-child { margin-bottom: 0; }
