/* =========================================================
   EMS — Отчётная система ИП · modern glass edition
   ========================================================= */

:root {
  --bg: #0b0a09;
  --bg-soft: rgba(255, 236, 214, .045);
  --surface: rgba(30, 27, 24, .74);
  --surface-2: rgba(37, 33, 29, .8);
  --surface-3: rgba(255, 236, 214, .06);
  --line: rgba(255, 236, 214, .10);
  --line-strong: rgba(255, 236, 214, .18);
  --text: #f6f1e9;
  --muted: #a79e91;
  --muted-2: #7c7365;

  --accent: #ffb54d;
  --accent-2: #ff9a3c;
  --lime-grad: linear-gradient(135deg, #ffd88a 0%, #ffb54d 48%, #ff8a3d 100%);
  --violet: #ff5c3d;
  --cyan: #ffe2b2;
  --pink: #ff6a4d;
  --amber: #ffd88a;

  --accent-soft: rgba(255, 181, 77, .12);
  --accent-line: rgba(255, 181, 77, .38);
  --danger: #ff6159;
  --danger-soft: rgba(255, 97, 89, .14);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
  --shadow-glow: 0 18px 50px rgba(255, 154, 60, .2);
  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Unbounded', 'Manrope', sans-serif;

  --mx: 50vw;
  --my: 12vh;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

::selection { background: rgba(255, 181, 77, .3); color: #fff; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0e0c0a; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,181,77,.5), rgba(255,92,61,.45));
  border-radius: 11px; border: 3px solid #0e0c0a;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #d7f76b, #ff5c3d); }

.hidden { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* =========================================================
   ИКОНКИ (кастомный SVG)
   ========================================================= */

[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.ico { display: block; flex-shrink: 0; }
.ico.spin { animation: spin .9s linear infinite; }

[data-icon] > .ico,
.btn-ico > .ico { width: 16px; height: 16px; }
.menu-icon > .ico { width: 30px; height: 30px; }
.back-btn > .ico { width: 15px; height: 15px; }
.close-btn > .ico,
.remove-btn > .ico,
.a-del > .ico,
.a-move > .ico { width: 15px; height: 15px; }
.btn.primary .btn-ico > .ico { width: 17px; height: 17px; }
.pin-ico { color: var(--accent); display: inline-flex; padding-left: 2px; }
.pin-ico > .ico { width: 14px; height: 14px; }
.act-category-title > .ico { width: 15px; height: 15px; }
.toast .t-icon > .ico { width: 19px; height: 19px; }
.toast.error .t-icon { color: var(--danger); }
.toast:not(.error) .t-icon { color: var(--accent); }

/* =========================================================
   ФОН — тёплая тёмная база, диагональные лучи, точечная
   сетка, два свечения, шум, виньетка, прожектор курсора
   ========================================================= */

.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* --- частицы и дальние звёзды (canvas) --- */
.bg-particles {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: .95;
  animation: fadeIn 1.4s ease both;
}

.bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(1250px 720px at 6% -12%, rgba(255, 138, 61, .16), transparent 62%),
    radial-gradient(1050px 720px at 102% -6%, rgba(255, 92, 61, .13), transparent 58%),
    radial-gradient(1200px 900px at 50% 118%, rgba(255, 216, 138, .10), transparent 62%),
    linear-gradient(180deg, #17130d 0%, #0e0c09 48%, #0a0908 100%);
}

/* --- мягкие свечения --- */
.bg-glow {
  position: absolute;
  filter: blur(120px);
  opacity: .5;
  will-change: transform;
  border-radius: 50%;
}
.bg-glow-1 {
  top: -320px; left: -260px; width: 900px; height: 640px;
  background: radial-gradient(closest-side, rgba(255, 138, 61, .34), rgba(255, 138, 61, 0) 72%);
  animation: glowDrift1 40s ease-in-out infinite alternate;
}
.bg-glow-2 {
  bottom: -360px; right: -280px; width: 880px; height: 660px;
  background: radial-gradient(closest-side, rgba(255, 216, 138, .26), rgba(255, 216, 138, 0) 74%);
  animation: glowDrift2 52s ease-in-out infinite alternate;
}
@keyframes glowDrift1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(70px, 55px, 0) scale(1.12); }
}
@keyframes glowDrift2 {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  100% { transform: translate3d(-60px, -55px, 0) scale(.94); }
}

/* --- диагональные лучи --- */
.bg-beams {
  position: absolute; inset: -40%;
  background: repeating-linear-gradient(64deg,
    transparent 0 58px,
    rgba(255, 216, 138, .06) 58px 59px,
    transparent 59px 148px);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 25%, transparent 85%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 25%, transparent 85%);
  animation: beamsDrift 70s linear infinite;
}
@keyframes beamsDrift { to { transform: translate3d(-160px, 160px, 0); } }

/* --- точечная сетка --- */
.bg-dots {
  position: absolute; inset: -2px;
  background-image: radial-gradient(rgba(255, 236, 214, .17) 1px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 85% 62% at 50% 0%, #000 22%, transparent 84%);
  mask-image: radial-gradient(ellipse 85% 62% at 50% 0%, #000 22%, transparent 84%);
  animation: dotsDrift 55s linear infinite;
}
@keyframes dotsDrift { to { background-position: 28px 56px; } }

/* --- прожектор за курсором --- */
.halo {
  position: absolute; inset: 0;
  background: radial-gradient(560px circle at var(--mx) var(--my), rgba(255, 216, 138, .075), transparent 60%);
}

/* --- шум --- */
.bg-noise {
  position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- виньетка --- */
.bg-vignette {
  position: absolute; inset: 0;
  box-shadow: inset 0 0 260px 70px rgba(10, 7, 4, .82);
}

/* =========================================================
   ШАПКА
   ========================================================= */

.site-header {
  position: relative; z-index: 5;
  max-width: 1140px; margin: 0 auto;
  padding: 26px 26px 6px;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
}

.header-right { display: flex; align-items: center; gap: 11px; }

.icon-btn {
  width: 46px; height: 46px; border-radius: 15px;
  background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
  transition: .25s cubic-bezier(.16, 1, .3, 1);
}
.icon-btn:hover {
  color: var(--accent); border-color: var(--accent-line);
  transform: translateY(-3px) rotate(-8deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
}
.icon-btn svg { width: 20px; height: 20px; }

/* =========================================================
   КАРКАС
   ========================================================= */

.wrap {
  position: relative; z-index: 2;
  max-width: 1140px; margin: 0 auto;
  padding: 28px 26px 90px;
}

.screen > * { animation: rise .55s cubic-bezier(.16, 1, .3, 1) both; }
.screen > *:nth-child(1) { animation-delay: .02s; }
.screen > *:nth-child(2) { animation-delay: .08s; }
.screen > *:nth-child(3) { animation-delay: .14s; }
.screen > *:nth-child(4) { animation-delay: .20s; }
.screen > *:nth-child(5) { animation-delay: .26s; }
.screen > *:nth-child(6) { animation-delay: .32s; }
.screen > *:nth-child(7) { animation-delay: .38s; }
.screen > *:nth-child(8) { animation-delay: .44s; }
.screen > *:nth-child(n+9) { animation-delay: .50s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* =========================================================
   МЕНЮ
   ========================================================= */

.hero { text-align: center; padding: 42px 10px 40px; position: relative; }
.hero::before {
  content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: min(560px, 90%); height: 260px;
  background: radial-gradient(ellipse at center, rgba(255, 181, 77, .16), transparent 70%);
  filter: blur(20px); z-index: -1;
}
.hero-tag {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: #ffe6c2;
  background: linear-gradient(120deg, rgba(255,181,77,.18), rgba(255,92,61,.16));
  border: 1px solid rgba(255, 181, 77, .3);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
  backdrop-filter: blur(10px);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
  background: linear-gradient(180deg, #ffffff 25%, #cbbfad 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); max-width: 580px; margin: 18px auto 0; font-size: 15.5px; }

.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px; margin-top: 8px;
}

.menu-card {
  position: relative; text-align: left; cursor: pointer;
  border-radius: 20px; padding: 34px 32px 30px; color: var(--text);
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden; transition: .35s cubic-bezier(.16, 1, .3, 1);
  font-family: inherit;
  background: linear-gradient(160deg, rgba(255,236,214,.07), rgba(255,236,214,.02) 55%, rgba(255,236,214,.01));
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.menu-idx {
  position: absolute; top: 16px; right: 26px;
  font-family: var(--font-display); font-size: 56px; font-weight: 800;
  line-height: 1; letter-spacing: -.06em; pointer-events: none;
  color: transparent; -webkit-text-stroke: 1.4px rgba(255, 236, 214, .16);
  transition: .35s cubic-bezier(.16, 1, .3, 1);
}
.menu-card:hover .menu-idx { -webkit-text-stroke-color: rgba(255, 181, 77, .5); transform: translateY(-5px); }
.menu-card.alt:hover .menu-idx { -webkit-text-stroke-color: rgba(255, 106, 77, .5); }
.menu-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(255,181,77,.6), rgba(255,92,61,.35) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: .35s;
}
.menu-card::after {
  content: ''; position: absolute; width: 320px; height: 320px; right: -110px; top: -130px;
  background: radial-gradient(circle, rgba(255, 181, 77, .28), transparent 65%);
  opacity: 0; transition: .45s; pointer-events: none;
}
.menu-card:hover { transform: translateY(-10px) scale(1.012); box-shadow: 0 34px 70px rgba(0, 0, 0, .55); }
.menu-card:hover::before, .menu-card:hover::after { opacity: 1; }
.menu-card.alt::before { background: linear-gradient(140deg, rgba(255,140,96,.65), rgba(255,106,77,.35) 45%, transparent 70%); }
.menu-card.alt::after { background: radial-gradient(circle, rgba(255, 140, 96, .26), transparent 65%); }

.menu-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(150deg, rgba(255,181,77,.2), rgba(255,255,255,.03));
  border: 1px solid rgba(255, 181, 77, .3);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: .35s cubic-bezier(.16, 1, .3, 1);
}
.menu-card.alt .menu-icon {
  background: linear-gradient(150deg, rgba(255,140,96,.2), rgba(255,255,255,.03));
  border-color: rgba(255, 140, 96, .32);
  color: var(--pink);
}
.menu-card:hover .menu-icon { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(255, 181, 77, .22); }
.menu-card.alt:hover .menu-icon { box-shadow: 0 16px 34px rgba(255, 140, 96, .22); }

.menu-card-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25;
}
.menu-card-desc { font-size: 13.5px; color: var(--muted); }
.menu-card-cta {
  margin-top: 20px; font-size: 13px; font-weight: 800; color: var(--accent);
  display: flex; align-items: center; gap: 9px;
}
.menu-card.alt .menu-card-cta { color: var(--amber); }
.menu-card-cta span {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 181, 77, .14); font-size: 13px; transition: .3s;
}
.menu-card.alt .menu-card-cta span { background: rgba(255, 140, 96, .16); }
.menu-card:hover .menu-card-cta span { transform: translateX(6px); background: var(--accent); color: #17110b; }
.menu-card.alt:hover .menu-card-cta span { background: var(--amber); }

/* =========================================================
   ЗАГОЛОВКИ ФОРМ
   ========================================================= */

.top-row { margin-bottom: 18px; }
.back-btn {
  background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--line); color: var(--muted);
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; font-family: inherit; transition: .25s;
  display: inline-flex; align-items: center; gap: 9px;
}
.back-btn:hover {
  color: var(--text); border-color: var(--accent-line);
  background: rgba(255, 181, 77, .1); transform: translateX(-4px);
}

.page-head { margin-bottom: 24px; }
.page-head h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15;
  color: var(--text);
  display: flex; align-items: center; gap: 14px;
  position: relative; padding-bottom: 16px;
}
.page-head h2 > .ico {
  width: clamp(24px, 3.4vw, 32px); height: clamp(24px, 3.4vw, 32px);
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(255, 181, 77, .5));
}
.page-head h2 > span {
  background: linear-gradient(120deg, #ffffff 30%, #ffd9a8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head h2::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 92px; height: 3px; border-radius: 3px;
  background: var(--lime-grad); box-shadow: 0 0 16px rgba(255, 181, 77, .6);
}
.page-sub { color: var(--muted); font-size: 14.5px; margin-top: 14px; }

/* =========================================================
   СЕКЦИИ-КАРТОЧКИ
   ========================================================= */

.card {
  position: relative;
  background: linear-gradient(165deg, rgba(255,255,255,.055), rgba(255,255,255,.018) 60%, rgba(255,255,255,.01));
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px; margin-bottom: 22px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .38);
  overflow: visible;
  transition: border-color .3s;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
}
.card:hover { border-color: rgba(255, 255, 255, .13); }

.card-title {
  display: flex; align-items: center; gap: 13px;
  font-size: 16px; font-weight: 800; margin-bottom: 24px; letter-spacing: -.01em;
}
.step {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  color: #17110b; background: var(--lime-grad);
  box-shadow: 0 8px 20px rgba(255, 154, 60, .3), inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* =========================================================
   ПОЛЯ
   ========================================================= */

.field { display: grid; grid-template-columns: 215px 1fr; gap: 18px; align-items: center; margin-bottom: 18px; }
.field.column { display: block; }
.field.column > label { display: block; margin-bottom: 12px; }
.field label { font-size: 14px; font-weight: 700; color: var(--muted); }
.req { color: var(--danger); font-weight: 800; }

input[type="text"], input[type="password"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; font-family: inherit; font-size: 14.5px; color: var(--text);
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--line);
  border-radius: 13px; padding: 13px 16px; transition: .25s;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(255, 181, 77, .65);
  background: rgba(0, 0, 0, .45);
  box-shadow: 0 0 0 4px rgba(255, 181, 77, .13), 0 8px 24px rgba(0, 0, 0, .3);
}
input[readonly] { cursor: pointer; background: rgba(255, 255, 255, .045); }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2397a1b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
.err-field input, input.err-field, textarea.err-field {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px var(--danger-soft);
  animation: shake .35s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.conditional {
  background: linear-gradient(120deg, rgba(255, 181, 77, .13), rgba(255, 181, 77, .04));
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0; padding: 18px 20px; margin-top: 6px;
  animation: rise .4s cubic-bezier(.16, 1, .3, 1) both;
}
.conditional .field { margin-bottom: 0; }

/* =========================================================
   ПЕРИОД / КАЛЕНДАРЬ
   ========================================================= */

.period-selector { position: relative; z-index: 70; }
.date-range-input {
  background: rgba(0, 0, 0, .32) !important;
  min-height: 48px;
  cursor: pointer;
}
.date-range-input.partial { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.date-picker {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
  width: min(378px, 92vw);
  background: rgba(24, 21, 18, .96); backdrop-filter: blur(26px);
  border: 1px solid var(--accent-line); border-radius: 18px;
  padding: 18px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 181, 77, .12), 0 30px 70px rgba(0, 0, 0, .6);
  display: none;
}
.date-picker.up { top: auto; bottom: calc(100% + 10px); }
.date-picker.active { display: block; animation: rise .24s cubic-bezier(.16, 1, .3, 1) both; }
.card.picker-open { z-index: 60; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.cal-title { font-weight: 800; font-size: 14.5px; text-transform: capitalize; }
.cal-status {
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
  background: rgba(255, 236, 214, .05);
  border: 1px solid var(--line);
  border-radius: 11px; padding: 9px 13px; margin-bottom: 13px;
}
.cal-status b { color: var(--accent); font-weight: 800; }
.cal-nav {
  width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface-3); color: var(--text); cursor: pointer; font-size: 15px; transition: .2s;
}
.cal-nav:hover { background: var(--lime-grad); color: #17110b; border-color: transparent; transform: scale(1.08); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-wd { text-align: center; font-size: 10.5px; color: var(--muted-2); padding: 6px 0; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.cal-day {
  text-align: center; padding: 9px 0; font-size: 13px; border-radius: 10px;
  background: rgba(255, 255, 255, .05); cursor: pointer; transition: .16s; color: var(--text);
  border: 1px solid transparent;
}
.cal-day:hover { background: rgba(255, 181, 77, .2); border-color: var(--accent-line); transform: translateY(-2px); }
.cal-day.start { background: var(--lime-grad); color: #17110b; font-weight: 800; border-radius: 10px 0 0 10px; }
.cal-day.end { background: var(--lime-grad); color: #17110b; font-weight: 800; border-radius: 0 10px 10px 0; }
.cal-day.single { background: var(--lime-grad); color: #17110b; font-weight: 800; border-radius: 10px; box-shadow: 0 6px 18px rgba(255, 154, 60, .3); }
.cal-day.range { background: rgba(255, 181, 77, .26); border-radius: 0; }
.week-btns { display: flex; gap: 9px; margin-top: 15px; }
.btn-mini {
  flex: 1; padding: 10px 10px; font-size: 12.5px; font-weight: 800; font-family: inherit;
  background: var(--lime-grad); color: #17110b; border: none; border-radius: 11px; cursor: pointer; transition: .2s;
  box-shadow: 0 8px 18px rgba(255, 154, 60, .25);
}
.btn-mini.ghost { background: var(--surface-3); color: var(--muted); box-shadow: none; border: 1px solid var(--line); }
.btn-mini:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* =========================================================
   РАНГИ
   ========================================================= */

.ranks { display: flex; flex-wrap: wrap; gap: 10px; }
.rank-btn {
  font-family: inherit; font-size: 14px; font-weight: 800;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--text);
  padding: 11px 20px; border-radius: 13px; cursor: pointer; transition: .25s cubic-bezier(.16, 1, .3, 1);
  position: relative; overflow: hidden;
}
.rank-btn:hover { border-color: var(--accent-line); transform: translateY(-3px); background: rgba(255, 181, 77, .1); }
.rank-btn.active {
  background: var(--lime-grad); border-color: transparent; color: #17110b;
  box-shadow: 0 12px 26px rgba(255, 154, 60, .3);
}
.ranks.err { border: 1px solid var(--danger); border-radius: 16px; padding: 6px; animation: shake .35s ease; }

/* =========================================================
   ПРАВИЛА / ФОТОХОСТИНГИ / БАННЕР
   ========================================================= */

.rules {
  position: relative;
  background: linear-gradient(120deg, rgba(255, 181, 77, .12), rgba(255, 92, 61, .07));
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px;
  overflow: hidden;
}
.rules::after {
  content: ''; position: absolute; z-index: -1; right: -60px; top: -60px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255, 181, 77, .3), transparent 70%);
}
.rules-title {
  font-size: 10.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 13px; position: relative;
}
.rule-item {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13.5px; color: #ded5c7; padding: 6px 0; position: relative;
}
.rule-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--lime-grad);
  margin-top: 8px; flex-shrink: 0; box-shadow: 0 0 8px var(--accent);
}

.photobar {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  background: var(--surface); backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 16px; margin-bottom: 20px;
}
.photobar-label { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.photobar-links { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-link {
  font-size: 12px; font-weight: 700; text-decoration: none;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--muted);
  transition: .25s;
}
a.ph-link:hover {
  color: #17110b; border-color: transparent; background: var(--lime-grad);
  transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255, 154, 60, .25);
}
.ph-link.muted { opacity: .5; cursor: not-allowed; }

.banner-container { margin-bottom: 20px; }
.banner-box {
  background: var(--surface); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 120px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .38);
}
.banner-box img { width: 100%; max-height: 330px; object-fit: contain; display: block; }
.banner-box:has(.banner-embed) { display: block; min-height: 0; }
.banner-box video.banner-video {
  width: 100%; max-height: 380px; display: block;
  background: #000; border-radius: inherit;
}
.banner-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.banner-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; display: block; border-radius: inherit;
}
.banner-fallback {
  padding: 26px 20px; text-align: center;
  font-size: 13.5px; color: var(--muted-2); word-break: break-all;
}

/* =========================================================
   ПУНКТЫ ДЕЙСТВИЙ
   ========================================================= */

.actions-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.actions-list:empty { margin-bottom: 0; }

.action-card {
  position: relative;
  background: linear-gradient(150deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px; transition: .28s cubic-bezier(.16, 1, .3, 1);
  overflow: hidden;
}
.action-card::before {
  content: ''; position: absolute; left: 0; top: 14%; bottom: 14%; width: 3px;
  background: var(--lime-grad); border-radius: 0 3px 3px 0; opacity: .55;
}
.action-card:hover { border-color: rgba(255, 181, 77, .3); transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0, 0, 0, .4); }
.action-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.action-name { font-size: 15.5px; font-weight: 800; }
.action-rate {
  font-size: 11px; font-weight: 800; color: #ffe6c2; letter-spacing: .03em;
  background: rgba(255, 181, 77, .12); border: 1px solid rgba(255, 181, 77, .25);
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.action-grid { display: grid; grid-template-columns: 1fr 140px 130px auto; gap: 14px; align-items: end; }
.fgroup label {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px;
}
.fgroup textarea { min-height: 64px; resize: vertical; line-height: 1.5; border-radius: 12px; }
.fgroup input.count { text-align: center; font-weight: 800; }
.fgroup input.action-points {
  text-align: center; font-weight: 800; color: var(--accent);
  background: rgba(255, 181, 77, .12) !important;
  border-color: rgba(255, 181, 77, .3) !important;
}
.remove-btn {
  width: 44px; height: 44px; border-radius: 13px;
  border: 1px solid rgba(255, 97, 89, .3);
  background: var(--danger-soft); color: var(--danger); cursor: pointer; font-size: 17px;
  display: grid; place-items: center; transition: .25s;
}
.remove-btn:hover { background: var(--danger); color: #fff; transform: scale(1.08) rotate(90deg); box-shadow: 0 12px 26px rgba(255, 97, 89, .3); }

/* =========================================================
   КНОПКИ
   ========================================================= */

.btn {
  font-family: inherit; font-size: 14px; font-weight: 800;
  padding: 13px 24px; border-radius: 14px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: .28s cubic-bezier(.16, 1, .3, 1); position: relative; overflow: hidden;
}
.btn.primary {
  background: var(--lime-grad); color: #17110b;
  box-shadow: 0 16px 34px rgba(255, 154, 60, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn.primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-120%); transition: .6s;
}
.btn.primary:hover { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(255, 154, 60, .38); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost {
  background: rgba(255, 255, 255, .05); color: var(--muted);
  border: 1px solid var(--line); backdrop-filter: blur(12px);
}
.btn.ghost:hover { color: var(--text); border-color: var(--accent-line); background: rgba(255, 181, 77, .1); transform: translateY(-2px); }
.btn.block { width: 100%; }
.btn.big { padding: 17px 26px; font-size: 15.5px; border-radius: 16px; }
.btn.small { padding: 9px 15px; font-size: 13px; border-radius: 11px; }
.actions-right { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* =========================================================
   БАЛЛЫ
   ========================================================= */

.points-panel {
  position: relative;
  display: flex; align-items: center; gap: 28px;
  background: linear-gradient(120deg, rgba(255, 181, 77, .14), rgba(255, 92, 61, .08) 55%, rgba(255, 226, 178, .07));
  backdrop-filter: blur(20px);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 26px 30px; margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 24px 55px rgba(0, 0, 0, .42);
}
.points-panel::after {
  content: ''; position: absolute; z-index: -1; right: -80px; bottom: -110px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255, 181, 77, .3), transparent 70%);
  pointer-events: none;
}
.points-num {
  font-family: var(--font-display);
  font-size: clamp(46px, 8vw, 64px); font-weight: 800; line-height: 1; color: #fff;
  letter-spacing: -.04em; min-width: 110px; text-align: center;
  background: var(--lime-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 181, 77, .45));
  position: relative;
}
.points-meta { flex: 1; min-width: 0; position: relative; }
.points-label {
  font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.points-breakdown { display: flex; flex-wrap: wrap; gap: 9px; }
.badge {
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: rgba(0, 0, 0, .4); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px; backdrop-filter: blur(8px);
  transition: .2s;
}
.badge:hover { border-color: var(--accent-line); color: var(--text); }
.badge b { color: var(--accent); font-weight: 800; }

/* =========================================================
   ОШИБКИ / ТОСТЫ
   ========================================================= */

.form-error {
  display: none;
  background: linear-gradient(120deg, rgba(255, 97, 89, .16), rgba(255, 97, 89, .06));
  border: 1px solid rgba(255, 97, 89, .4);
  color: #ffc4c0; padding: 16px 20px; border-radius: 15px;
  font-size: 14px; margin-bottom: 18px; line-height: 1.65;
  backdrop-filter: blur(14px);
}
.form-error.show { display: block; animation: rise .25s ease both; }
.inline-error { color: var(--danger); font-size: 13px; margin-top: 10px; }

.toast-stack {
  position: fixed; z-index: 3000; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 12px; width: min(470px, 92vw);
}
.toast {
  background: rgba(18, 21, 30, .9); backdrop-filter: blur(22px);
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 16px; padding: 15px 18px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .6);
  display: flex; gap: 13px; align-items: flex-start; animation: toastIn .4s cubic-bezier(.16, 1, .3, 1) both;
  font-size: 14px;
}
.toast.error { border-left-color: var(--danger); }
.toast .t-icon { font-size: 18px; line-height: 1.3; }
.toast .t-body { flex: 1; }
.toast .t-title { font-weight: 800; margin-bottom: 3px; }
.toast .t-msg { color: var(--muted); font-size: 13.5px; white-space: pre-line; }
@keyframes toastIn { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }

/* =========================================================
   МОДАЛКИ
   ========================================================= */

.overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(3, 4, 8, .72); backdrop-filter: blur(10px);
  align-items: center; justify-content: center; padding: 20px;
}
.overlay.active { display: flex; animation: fadeIn .2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(730px, 100%); max-height: 88vh;
  background: rgba(15, 18, 26, .92); backdrop-filter: blur(26px);
  border: 1px solid var(--line-strong);
  border-radius: 24px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalIn .35s cubic-bezier(.16, 1, .3, 1) both;
  position: relative;
}
.modal::before {
  content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 181, 77, .6), rgba(255, 92, 61, .5), transparent);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(28px) scale(.97); } to { opacity: 1; transform: none; } }
.modal.wide { width: min(990px, 100%); }
#adminModal .modal.tall { height: min(88vh, 790px); }

.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent);
}
.modal-head h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.modal-head-right { display: flex; align-items: center; gap: 10px; }
.modal-search { width: 210px; padding: 10px 14px; font-size: 13.5px; border-radius: 12px; }
.close-btn {
  width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-3); color: var(--muted); cursor: pointer; font-size: 15px;
  display: grid; place-items: center; transition: .25s;
}
.close-btn:hover { color: var(--danger); border-color: rgba(255, 97, 89, .4); background: var(--danger-soft); transform: rotate(90deg); }
.modal-body { flex: 1; overflow-y: auto; padding: 24px; }

.act-category { margin-bottom: 28px; }
.act-category:last-child { margin-bottom: 0; }
.act-category-title {
  font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 14px; padding-left: 12px; border-left: 3px solid;
}
.act-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.act-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; font-family: inherit; font-size: 13.5px; font-weight: 700;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line); border-radius: 13px;
  color: var(--text); cursor: pointer; text-align: left;
  transition: .22s cubic-bezier(.16, 1, .3, 1);
}
.act-item:hover {
  background: var(--lime-grad); border-color: transparent; color: #17110b;
  transform: translateY(-3px) translateX(4px);
  box-shadow: 0 16px 30px rgba(255, 154, 60, .3);
}
.act-item .pts { font-size: 11px; font-weight: 800; color: var(--muted-2); }
.act-item:hover .pts { color: #17110b; }
.act-empty { color: var(--muted-2); font-size: 13.5px; padding: 14px 0; }

/* =========================================================
   АДМИНКА
   ========================================================= */

.admin-root { display: flex; flex-direction: column; min-height: 0; }
.admin-panel { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.admin-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 18px; flex-shrink: 0;
}
.admin-tab {
  font-family: inherit; font-size: 12.5px; font-weight: 800;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--muted);
  padding: 9px 15px; border-radius: 11px; cursor: pointer; transition: .22s;
}
.admin-tab:hover { color: var(--text); border-color: var(--accent-line); transform: translateY(-2px); }
.admin-tab.active {
  background: var(--lime-grad); border-color: transparent; color: #17110b;
  box-shadow: 0 10px 22px rgba(255, 154, 60, .28);
}
.admin-content {
  flex: 1 1 auto; min-height: 320px; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.admin-tab-content { display: none; min-height: 0; }
.admin-tab-content.active {
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0; position: relative;
  animation: rise .3s ease both;
}
.admin-scroll {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  scroll-behavior: smooth; overscroll-behavior: contain;
  padding-right: 8px; scrollbar-gutter: stable;
}
.admin-scroll::-webkit-scrollbar { width: 10px; }
.admin-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, .28); border-radius: 10px; }
.admin-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 216, 138, .75), rgba(255, 138, 61, .55));
  background-clip: padding-box; border: 3px solid transparent; border-radius: 10px;
}
.admin-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffd88a, #ff8a3d);
  background-clip: padding-box; border: 3px solid transparent;
}
.admin-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 16px; border-top: 1px solid var(--line); flex-shrink: 0;
}

.a-section { margin-bottom: 26px; }
.a-section h4 {
  font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  display: flex; align-items: center; gap: 9px;
}
.a-section h4::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,181,77,.35), transparent); }
.a-hint { font-size: 12.5px; color: var(--muted-2); margin-bottom: 13px; line-height: 1.6; }

.a-row {
  display: flex; gap: 9px; align-items: center;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  padding: 10px; border-radius: 13px; margin-bottom: 9px;
  transition: .2s;
}
.a-row:hover { border-color: var(--line-strong); }
.a-row input.grow { flex: 1; }
.a-row input.narrow { width: 110px; text-align: center; }
.a-del {
  width: 35px; height: 35px; flex-shrink: 0; border-radius: 10px;
  background: var(--danger-soft); border: 1px solid rgba(255, 97, 89, .28);
  color: var(--danger); cursor: pointer; font-size: 14px; transition: .2s;
}
.a-del:hover { background: var(--danger); color: #fff; transform: rotate(90deg); }
.a-move {
  width: 31px; height: 35px; flex-shrink: 0; border-radius: 10px;
  background: var(--surface-3); border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; font-size: 14px; transition: .2s;
}
.a-move:hover:not(:disabled) { color: #17110b; background: var(--lime-grad); border-color: transparent; }
.a-add { display: flex; gap: 9px; margin-top: 13px; flex-wrap: wrap; }
.a-add input { flex: 1; min-width: 160px; }
.a-add-top {
  background: rgba(255, 181, 77, .07);
  border: 1px dashed rgba(255, 181, 77, .38);
  border-radius: 14px; padding: 13px; margin-top: 0; margin-bottom: 16px;
}
.a-add-top input { background: rgba(0, 0, 0, .3); }
.a-add-top .a-btn { background: var(--lime-grad); color: #17110b; border: none; font-weight: 800; white-space: nowrap; }
.a-add-top .a-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(255, 154, 60, .3); }
.a-btn {
  font-family: inherit; font-size: 13.5px; font-weight: 800;
  background: var(--lime-grad); color: #17110b; border: none;
  padding: 11px 17px; border-radius: 12px; cursor: pointer; transition: .24s; white-space: nowrap;
}
.a-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255, 154, 60, .3); }
.a-btn.sec {
  background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid var(--line);
}
.a-btn.sec:hover { color: var(--text); border-color: var(--accent-line); box-shadow: none; }
.a-btn.danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(255, 97, 89, .3); }
.a-btn.danger:hover { background: var(--danger); color: #fff; box-shadow: 0 12px 26px rgba(255, 97, 89, .3); }

.a-card {
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 15px; margin-bottom: 11px; overflow: hidden; transition: .22s;
}
.a-card:hover { border-color: var(--line-strong); }
.a-card-head { display: flex; align-items: center; gap: 11px; padding: 13px 15px; background: rgba(255, 255, 255, .04); flex-wrap: wrap; }
.a-card-head input.cat-name { flex: 1; font-weight: 700; min-width: 130px; }
.a-card-meta { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.a-card-body { padding: 13px 15px; display: flex; flex-direction: column; gap: 8px; }
.a-card-foot { padding: 11px 15px; border-top: 1px solid var(--line); display: flex; gap: 9px; }
.a-card-foot select { flex: 1; }

.a-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line);
  padding: 9px 13px; border-radius: 11px; font-size: 13.5px; color: var(--muted);
}
.a-empty { font-size: 13px; color: var(--muted-2); font-style: italic; }

/* --- полный список пунктов --- */
.a-flat-list { display: flex; flex-direction: column; gap: 7px; }
.a-item.a-flat { gap: 12px; flex-wrap: wrap; }
.a-flat-name { font-weight: 700; color: var(--text); }
.a-flat-tags { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.a-flat-score { font-weight: 800; color: var(--accent); margin-left: auto; white-space: nowrap; }
.a-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 236, 214, .07); border: 1px solid var(--line); color: var(--muted);
}
.a-tag.pinned { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.a-tag.warn { background: var(--danger-soft); border-color: rgba(255, 97, 89, .35); color: var(--danger); }

.swatch {
  width: 37px; height: 37px; border-radius: 11px; flex-shrink: 0;
  border: 2px solid var(--line-strong); cursor: pointer; position: relative; overflow: hidden;
}
.swatch input[type="color"] {
  position: absolute; inset: -8px; width: 155%; height: 155%;
  border: none; padding: 0; cursor: pointer; background: none;
}

.a-preview {
  min-height: 130px; background: rgba(0, 0, 0, .3); border: 1px dashed var(--line-strong);
  border-radius: 13px; display: grid; place-items: center; overflow: hidden; margin-bottom: 11px;
  color: var(--muted-2); font-size: 13px;
}
.a-preview img { max-width: 100%; max-height: 190px; object-fit: contain; border-radius: 10px; }
.a-preview video { max-width: 100%; max-height: 190px; border-radius: 10px; background: #000; }
.a-preview iframe { width: 100%; max-width: 420px; height: 190px; border: 0; border-radius: 10px; }
.a-banner-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 12px;
}
.a-banner-type {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.a-banner-type select {
  width: auto; min-width: 200px; padding: 9px 34px 9px 13px; font-size: 13px; font-weight: 600;
}

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--muted); font-weight: 600; }
.switch input { display: none; }
.switch .track {
  width: 48px; height: 26px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
  position: relative; transition: .25s;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--muted); transition: .25s cubic-bezier(.16, 1, .3, 1);
}
.switch input:checked + .track { background: rgba(255, 181, 77, .25); border-color: var(--accent-line); }
.switch input:checked + .track::after { left: 24px; background: var(--lime-grad); box-shadow: 0 0 12px rgba(255, 181, 77, .6); }

.report-item {
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; transition: .2s;
}
.report-item:hover { border-color: var(--accent-line); }
.report-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.report-kind { font-weight: 800; font-size: 14px; }
.report-date { font-size: 12px; color: var(--muted-2); }
.report-meta { font-size: 13px; color: var(--muted); }
.report-meta b { color: var(--accent); }
.report-actions { display: flex; gap: 9px; margin-top: 11px; }

/* =========================================================
   ЗАГРУЗКА
   ========================================================= */

.loading {
  position: fixed; inset: 0; z-index: 4000; display: none;
  background: rgba(3, 4, 8, .7); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.loading.active { display: flex; }
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .1); border-top-color: var(--accent);
  border-right-color: var(--violet);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   АДАПТИВНОСТЬ
   ========================================================= */

@media (max-width: 900px) {
  .field { grid-template-columns: 1fr; gap: 9px; align-items: stretch; }
  .action-grid { grid-template-columns: 1fr 1fr; }
  .action-grid .fgroup:first-child { grid-column: 1 / -1; }
  .remove-btn { width: 100%; height: 44px; }
  .modal-search { width: 140px; }
}

@media (max-width: 640px) {
  .wrap { padding: 18px 16px 70px; }
  .site-header { padding: 16px 16px 4px; }
  .card { padding: 20px 17px; border-radius: 18px; }
  .points-panel { flex-direction: column; gap: 16px; text-align: center; padding: 24px 18px; }
  .points-breakdown { justify-content: center; }
  .action-grid { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }
  .hero { padding: 22px 0 28px; }
  .hero::before { height: 190px; }
  .admin-tabs { gap: 7px; }
  .admin-tab { font-size: 11.5px; padding: 8px 11px; }
  .bg-glow { filter: blur(90px); opacity: .4; }
  .bg-dots { background-size: 34px 34px; }
  .bg-beams { display: none; }
  .bg-vignette { box-shadow: inset 0 0 140px 30px rgba(0, 0, 0, .8); }
}

/* =========================================================
   ДОСТУПНОСТЬ
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   ВХОД НА САЙТ
   ========================================================= */
.site-gate {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(8, 7, 6, .84);
  backdrop-filter: blur(18px);
  animation: fadeIn .3s ease both;
}
.site-gate.open {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .4s ease, visibility .4s ease;
}
.gate-card {
  width: min(410px, 100%);
  background: linear-gradient(165deg, rgba(32, 27, 23, .97), rgba(17, 15, 13, .97));
  border: 1px solid var(--line-strong);
  border-radius: 22px; padding: 34px 30px 26px;
  box-shadow: var(--shadow-lg), 0 40px 90px rgba(0, 0, 0, .6);
  text-align: center;
}
.gate-card.shake { animation: gateShake .42s ease; }
@keyframes gateShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.gate-mark {
  width: 62px; height: 62px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 18px;
  background: var(--lime-grad); color: #17110b;
  box-shadow: 0 18px 36px rgba(255, 154, 60, .3);
}
.gate-ico > .ico { width: 30px; height: 30px; }
.gate-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.gate-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.gate-input {
  width: 100%; padding: 14px 16px; margin-bottom: 10px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line);
  border-radius: 13px; color: var(--text); font-size: 15px; text-align: center;
  outline: none; transition: .2s;
}
.gate-input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.gate-error { color: var(--danger); font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.gate-hint { margin-top: 16px; font-size: 11.5px; color: var(--muted-2); letter-spacing: .04em; }
body.gate-locked { overflow: hidden; }
