/* ============================================================================
   Отчётная система СМП · styles.css
   Стиль: STYLE.md (тёплый тёмный интерфейс, стекло, крупные радиусы).
   Палитра: оранжево-чёрная (docs/implementation-brief.md §2).
   Секции:
   01 токены и сброс · 02 фон · 03 каркас · 04 типографика · 05 меню
   06 заголовок экрана · 07 карточки · 08 поля · 09 кнопки/пилюли
   10 строки разбалловки · 11 итог и прогресс · 12 информация
   13 админка · 14 модалки/тосты/гейт · 15 адаптив · 16 reduced-motion
   ========================================================================== */

/* ============================ 01. ТОКЕНЫ ================================= */
:root {
  /* фон и поверхности */
  --bg: #0B0908;
  --bg-soft: rgba(255, 196, 150, .045);
  --surface: rgba(32, 26, 22, .74);
  --surface-2: rgba(40, 33, 27, .8);
  --surface-3: rgba(255, 196, 150, .06);

  /* линии */
  --line: rgba(255, 196, 150, .10);
  --line-strong: rgba(255, 196, 150, .18);

  /* текст */
  --text: #F6F1E9;
  --muted: #A79E91;
  --muted-2: #82786A;
  --ink: #1A0D05;

  /* акцент */
  --accent: #FF7A1A;
  --accent-deep: #E04A00;
  --accent-light: #FFB066;
  --accent-2: #E04A00;
  --lime-grad: linear-gradient(135deg, #FFB066 0%, #FF7A1A 48%, #E04A00 100%);
  --accent-soft: rgba(255, 122, 26, .12);
  --accent-line: rgba(255, 122, 26, .38);

  /* тёплые варианты (исторические имена из STYLE.md) */
  --violet: #FF5C3D;
  --cyan: #FFC46B;
  --pink: #FF9A3C;
  --amber: #FFD08A;

  /* опасность */
  --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(224, 74, 0, .22);

  /* шрифты */
  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --font-mono: 'Cascadia Mono', 'Consolas', 'Courier New', monospace;

  /* прожектор */
  --mx: 50vw;
  --my: 12vh;

  /* easing */
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-light); text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
input, select, textarea, button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

::selection { background: rgba(255, 122, 26, .35); color: #fff; }

/* скроллбар */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 122, 26, .4) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 176, 102, .5), rgba(224, 74, 0, .5));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ============================= 02. ФОН =================================== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1250px 720px at 6% -12%, rgba(255, 122, 26, .16), transparent 62%),
    radial-gradient(1050px 720px at 102% -6%, rgba(224, 74, 0, .13), transparent 58%),
    radial-gradient(1200px 900px at 50% 118%, rgba(255, 176, 102, .10), transparent 62%),
    linear-gradient(180deg, #191009 0%, #0F0B08 48%, #0A0807 100%);
}

.bg-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .55;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .5;
  will-change: transform;
}
.bg-glow-1 {
  top: -320px;
  left: -260px;
  width: 900px;
  height: 640px;
  background: radial-gradient(closest-side, rgba(255, 122, 26, .34), rgba(255, 122, 26, 0) 72%);
  animation: glowDrift1 40s ease-in-out infinite alternate;
}
.bg-glow-2 {
  right: -280px;
  bottom: -360px;
  width: 880px;
  height: 660px;
  background: radial-gradient(closest-side, rgba(255, 176, 102, .26), rgba(255, 176, 102, 0) 74%);
  animation: glowDrift2 52s ease-in-out infinite alternate;
}

.bg-beams {
  position: absolute;
  inset: -40%;
  background: repeating-linear-gradient(64deg,
    transparent 0 58px,
    rgba(255, 176, 102, .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;
}

.bg-dots {
  position: absolute;
  inset: -2px;
  background-image: radial-gradient(rgba(255, 196, 150, .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;
}

.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(8, 5, 4, .82);
}

.halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(560px circle at var(--mx) var(--my), rgba(255, 176, 102, .075), transparent 60%);
  transition: background .18s linear;
}

/* ============================ 03. КАРКАС ================================= */
.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;
}

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

.site-footer {
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.site-footer .footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 10.5px;
  font-weight: 800;
}
.site-footer .footer-mark svg { width: 14px; height: 14px; color: var(--accent); }

.hidden { display: none !important; }
[hidden] { display: none !important; }

/* Программный фокус на заголовке экрана не должен рисовать рамку */
.screen h1:focus,
.screen h2:focus,
.screen h1:focus-visible,
.screen h2:focus-visible { outline: none; }

/* ========================= 04. ТИПОГРАФИКА =============================== */
.hero {
  position: relative;
  padding: 46px 10px 40px;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: min(560px, 90%);
  height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 122, 26, .18), transparent 70%);
  filter: blur(20px);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  background: linear-gradient(180deg, #fff 25%, #d9c3ae 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 14px;
  font-size: clamp(15px, 2.1vw, 19px);
  font-weight: 600;
  letter-spacing: .01em;
  color: #e7d6ba;
}
.hero p {
  max-width: 600px;
  margin: 18px auto 0;
  font-size: 15.5px;
  color: var(--muted);
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }

/* ============================= 05. МЕНЮ ================================== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 8px;
}

.menu-card {
  --c1: 255, 122, 26;
  --c2: 224, 74, 0;
  --ct: #FF9A4D;
  --ci: #1A0D05;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 34px 32px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(255, 236, 214, .07), rgba(255, 236, 214, .02) 55%, rgba(255, 236, 214, .01));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.menu-card.alt { --c1: 255, 196, 107; --c2: 224, 154, 46; --ct: #FFE0AE; }
.menu-card.alt2 { --c1: 255, 138, 61; --c2: 201, 80, 15; --ct: #FFB98F; }
.menu-card.alt3 { --c1: 255, 216, 138; --c2: 224, 168, 60; --ct: #FFEFD0; --ci: #2A1505; }

.menu-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(var(--c1), .6), rgba(var(--c2), .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: opacity .35s;
  pointer-events: none;
}
.menu-card::after {
  content: '';
  position: absolute;
  top: -130px;
  right: -110px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(var(--c1), .28), transparent 65%);
  opacity: 0;
  transition: opacity .45s;
  pointer-events: none;
}
.menu-card:hover {
  transform: translateY(-10px) scale(1.012);
  border-color: var(--line-strong);
  box-shadow: 0 34px 70px rgba(0, 0, 0, .55);
}
.menu-card:hover::before,
.menu-card:hover::after { opacity: 1; }
.menu-card:active { transform: translateY(-4px) scale(1.008); }

.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;
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(255, 236, 214, .16);
  transition: transform .35s var(--ease), -webkit-text-stroke-color .35s;
  pointer-events: none;
}
.menu-card:hover .menu-idx {
  -webkit-text-stroke-color: rgba(var(--c1), .55);
  transform: translateY(-5px);
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border: 1px solid rgba(var(--c1), .32);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(var(--c1), .2), rgba(255, 255, 255, .03));
  color: var(--ct);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.menu-icon svg { width: 30px; height: 30px; }
.menu-card:hover .menu-icon {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(var(--c1), .22);
}

.menu-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.menu-card-desc {
  max-width: 330px;
  font-size: 13.5px;
  color: var(--muted);
}
.menu-card-cta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ct);
}
.menu-card-cta .cta-arrow {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(var(--c1), .16);
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.menu-card-cta .cta-arrow svg { width: 13px; height: 13px; }
.menu-card:hover .cta-arrow {
  transform: translateX(6px);
  background: rgb(var(--c1));
  color: var(--ci);
}

/* ======================= 06. ЗАГОЛОВОК ЭКРАНА ============================ */
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 17px 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: .25s var(--ease);
}
.back-btn svg { width: 17px; height: 17px; }
.back-btn:hover {
  transform: translateX(-4px);
  border-color: var(--accent-line);
  color: var(--text);
}

.page-head {
  position: relative;
  padding-bottom: 22px;
  margin-bottom: 26px;
}
.page-head h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.page-head h2 > .ico {
  flex-shrink: 0;
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(255, 122, 26, .5));
}
.page-head h2 > .ico svg { width: 1em; height: 1em; }
.page-head h2 > span:last-child {
  background: linear-gradient(120deg, #fff 30%, #ffd9a8 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.page-head h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 92px;
  height: 3px;
  border-radius: 3px;
  background: var(--lime-grad);
  box-shadow: 0 0 16px rgba(255, 122, 26, .6);
}
.page-sub {
  max-width: 680px;
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--muted);
}
.page-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
}
.page-rules li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  font-size: 12.5px;
  color: var(--muted-2);
}
.page-rules li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 122, 26, .6);
}

/* =========================== 07. КАРТОЧКИ ================================ */
.card {
  position: relative;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018) 60%, rgba(255, 255, 255, .01));
  box-shadow: 0 22px 50px rgba(0, 0, 0, .38);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  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;
  margin-bottom: 22px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.card-title .title-text { min-width: 0; }
.card-title .title-hint {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.step {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--lime-grad);
  box-shadow: 0 8px 20px rgba(224, 74, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .5);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.card-note {
  margin: -8px 0 20px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.card-note b { color: var(--muted); }

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 24px;
  align-items: start;
}
.form-main { min-width: 0; }
.form-aside { position: sticky; top: 20px; }

/* ============================ 08. ПОЛЯ =================================== */
.field {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}
.field:last-child { margin-bottom: 0; }
.field.column { display: block; }
.field.column .field-label { margin-bottom: 9px; }
.field-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.35;
}
.field-label .req { color: var(--danger); font-weight: 800; margin-left: 2px; }
.field-hint {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-2);
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(0, 0, 0, .32);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(255, 122, 26, .65);
  background: rgba(0, 0, 0, .45);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, .13), 0 8px 24px rgba(0, 0, 0, .3);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input[readonly], textarea[readonly] {
  cursor: default;
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
}
input[type="number"] { -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="date"] { color-scheme: dark; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A79E91' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
textarea { min-height: 104px; resize: vertical; line-height: 1.6; }

.err-field {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px var(--danger-soft) !important;
  animation: shake .35s ease;
}

.field.invalid .field-label { color: #ffc4c0; }

/* ===================== 09. КНОПКИ / ПИЛЮЛИ / ЧИПЫ ======================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  padding: 13px 22px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: .28s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn.primary {
  background: var(--lime-grad);
  box-shadow: 0 16px 34px rgba(224, 74, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
  color: var(--ink);
}
.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: transform .6s;
  pointer-events: none;
}
.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(224, 74, 0, .38);
}
.btn.primary:hover::after { transform: translateX(120%); }
.btn.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn.ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  background: rgba(255, 122, 26, .1);
  color: var(--text);
}
.btn.danger {
  background: linear-gradient(135deg, #ff8a7d, #ff4d43);
  box-shadow: 0 16px 34px rgba(255, 77, 67, .3), inset 0 1px 0 rgba(255, 255, 255, .4);
  color: #2a0d0a;
}
.btn:disabled,
.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}
.btn.block { width: 100%; }
.btn.big { padding: 16px 26px; border-radius: 16px; font-size: 15px; }
.btn.small { padding: 9px 14px; border-radius: 11px; font-size: 12.5px; }
.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 13, 5, .35);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.form-actions .btn { width: 100%; min-height: 48px; }
.form-actions .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  transition: .22s var(--ease);
}
.pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  color: var(--text);
}
.pill.active,
.pill[aria-pressed="true"] {
  border-color: transparent;
  background: var(--lime-grad);
  box-shadow: 0 10px 24px rgba(224, 74, 0, .22);
  color: var(--ink);
}
.pill svg { width: 16px; height: 16px; }

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.pill-grid .pill { flex: 0 1 auto; }

.rank-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.rank-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 72px;
  padding: 13px 15px;
  text-align: left;
}
.rank-pill .rank-from {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.rank-pill .rank-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.rank-pill .rank-threshold {
  margin-top: auto;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.rank-pill.active .rank-name { color: rgba(26, 13, 5, .82); }
.rank-pill.active .rank-threshold { color: rgba(26, 13, 5, .7); }
.rank-pill.active .rank-from { color: var(--ink); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 236, 214, .05);
  color: var(--accent-light);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: .2s;
}
.chip svg { width: 12px; height: 12px; flex-shrink: 0; }
.chip:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.chip .chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip.static { cursor: default; }
.chip.static:hover { border-color: var(--line); background: rgba(255, 236, 214, .05); color: var(--accent-light); }
#infoScreen .chip { min-height: 44px; padding: 10px 13px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.badge.accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.warn {
  border-color: rgba(255, 97, 89, .35);
  background: var(--danger-soft);
  color: var(--danger);
}
.badge.ok {
  border-color: rgba(255, 176, 102, .35);
  background: rgba(255, 176, 102, .1);
  color: var(--accent-light);
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.inline-list .a-tag,
.a-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 236, 214, .07);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ======================= 10. СТРОКИ РАЗБАЛЛОВКИ ========================== */
.group-block { margin-bottom: 26px; }
.group-block:last-child { margin-bottom: 0; }
.group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.group-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.group-count {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.group-note {
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted-2);
}

.score-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 66px;
  gap: 14px;
  align-items: center;
  padding: 9px 10px 9px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background .2s, border-color .2s;
}
.score-row:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, .03);
}
.score-row.has-value { background: rgba(255, 122, 26, .045); border-color: rgba(255, 122, 26, .14); }
.score-label {
  display: block;
  font-size: 13.8px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
.score-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.score-rate {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid rgba(255, 176, 102, .28);
  border-radius: 999px;
  background: rgba(255, 176, 102, .09);
  color: var(--accent-light);
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.score-unit {
  font-size: 11px;
  color: var(--muted-2);
}
.score-note {
  flex-basis: 100%;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted-2);
}
.score-stepper {
  display: flex;
  align-items: center;
  gap: 5px;
}
.step-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
  cursor: pointer;
  transition: .18s;
}
.step-btn:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.step-btn:active { transform: scale(.96); }
.step-btn svg { width: 15px; height: 15px; }
.score-input {
  width: 68px;
  padding: 10px 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
.score-input.hours { width: 76px; }
.score-points {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.03em;
  text-align: right;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  transition: color .2s;
}
.score-row.has-value .score-points { color: var(--accent); }

/* сворачиваемые группы */
.fold {
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015) 60%, rgba(255, 255, 255, .008));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
.fold > summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  transition: background .2s;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: rgba(255, 255, 255, .028); }
.fold > summary .fold-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.fold > summary .fold-meta {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.fold > summary .fold-chevron {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  transition: transform .3s var(--ease), color .2s, border-color .2s;
}
.fold > summary .fold-chevron svg { width: 14px; height: 14px; }
.fold[open] > summary .fold-chevron {
  transform: rotate(180deg);
  border-color: var(--accent-line);
  color: var(--accent);
}
.fold-body {
  padding: 2px 22px 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.fold-body .group-note { margin-top: 0; }

/* ========================= 11. ИТОГ / ПРОГРЕСС =========================== */
.total-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(255, 122, 26, .15), rgba(224, 74, 0, .08) 55%, rgba(255, 176, 102, .07));
  box-shadow: 0 24px 55px rgba(0, 0, 0, .42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.total-panel::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 122, 26, .3), transparent 70%);
  pointer-events: none;
}
.total-label {
  position: relative;
  z-index: 1;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.total-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
}
.total-num {
  font-family: var(--font-display);
  font-size: clamp(46px, 7vw, 62px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  background: var(--lime-grad);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 122, 26, .45));
  font-variant-numeric: tabular-nums;
}
.total-unit {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.total-sub {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.total-breakdown {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 176, 102, .18);
}
.breakdown-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
}
.breakdown-row .bd-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.breakdown-row .bd-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(255, 196, 150, .22);
  transform: translateY(-4px);
}
.breakdown-row .bd-points {
  font-weight: 800;
  color: var(--accent-light);
  font-variant-numeric: tabular-nums;
}
.breakdown-empty {
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted-2);
}
.total-note {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 176, 102, .18);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}
.total-note strong { color: var(--muted); }

.threshold-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.threshold-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.progress {
  position: relative;
  z-index: 1;
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 196, 150, .08);
}
.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--lime-grad);
  box-shadow: 0 0 12px rgba(255, 122, 26, .6);
  transition: width .4s var(--ease);
}
.progress.low > span { background: linear-gradient(135deg, #ffb066, #ff6159); }

.threshold-status {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
}
.threshold-status.ok { color: var(--accent-light); }
.threshold-status.low { color: var(--danger); }
.threshold-status svg { width: 15px; height: 15px; }

.form-errors {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 97, 89, .4);
  border-radius: 13px;
  background: var(--danger-soft);
  color: #ffd9d6;
  font-size: 12.5px;
}
.form-errors .fe-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-weight: 800;
  color: #ffc4c0;
}
.form-errors .fe-title svg { width: 16px; height: 16px; }
.form-errors ul { display: flex; flex-direction: column; gap: 4px; }
.form-errors li { display: flex; gap: 7px; line-height: 1.45; }
.form-errors li::before { content: '•'; color: var(--danger); }

.aside-note {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted-2);
  text-align: center;
}

.shots-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shots-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.shots-meta .shots-count { font-variant-numeric: tabular-nums; }
.shots-meta .shots-count.ok { color: var(--accent-light); }
.hosts-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.hosts-row .hosts-label {
  margin-right: 2px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ============================ 12. ИНФОРМАЦИЯ ============================= */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, .22);
  width: fit-content;
  max-width: 100%;
}
.tabs .pill { min-height: 44px; border-color: transparent; background: transparent; }
.tabs .pill:hover { background: rgba(255, 255, 255, .05); }
.tabs .pill.active { background: var(--lime-grad); }
.tab-panel { animation: fadeIn .3s ease both; }

.info-intro {
  max-width: 760px;
  font-size: 14px;
  color: var(--muted);
}

.score-info-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.score-info-group {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
}
.score-info-group h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.score-info-group h3 .g-count {
  margin-left: auto;
  font-size: 10.5px;
  letter-spacing: 0;
  color: var(--muted-2);
  text-transform: none;
}
.score-info-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 196, 150, .08);
  font-size: 13px;
}
.score-info-row:last-child { border-bottom: 0; }
.score-info-row .si-label { flex: 1; color: var(--text); }
.score-info-row .si-unit { font-size: 11px; color: var(--muted-2); }
.score-info-row .si-points {
  min-width: 44px;
  text-align: right;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.score-info-note {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.rank-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(155deg, rgba(255, 122, 26, .08), rgba(255, 255, 255, .015) 55%);
}
.rank-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.rank-card-badge {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 58px;
  height: 48px;
  border: 1px solid var(--accent-line);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.rank-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.rank-card .rank-position {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.rank-threshold-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 176, 102, .2);
  border-radius: 11px;
  background: rgba(255, 176, 102, .06);
  font-size: 11.5px;
  color: var(--muted);
}
.rank-threshold-line b {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--accent-light);
}
.rank-card .req-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.req-mini-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.req-mini-row .rm-dot {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--accent);
}
.req-mini-row .rm-dot svg { width: 10px; height: 10px; }
.req-mini-row .rm-dot.is-dot {
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
}
.req-mini-row .rm-dot.is-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 122, 26, .55);
}
.req-mini-text { flex: 1; min-width: 0; }
.req-mini-text .chip { margin-top: 5px; }
.rank-license {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
}

.info-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .028);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}
.info-list li .num {
  flex-shrink: 0;
  min-width: 22px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.info-list.is-danger li {
  border-color: rgba(255, 97, 89, .3);
  background: var(--danger-soft);
  color: #ffd9d6;
}
.info-list.is-danger li .num { color: var(--danger); }

.danger-block {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 97, 89, .38);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 97, 89, .12), rgba(255, 97, 89, .04));
}
.danger-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 97, 89, .7), transparent);
}
.danger-block h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--danger);
}
.danger-block h3 svg { width: 18px; height: 18px; }

.side-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
  margin-bottom: 14px;
}
.side-card h3 {
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.side-card .chip { margin: 0 6px 6px 0; }
.side-card .side-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ============================= 13. АДМИНКА =============================== */
.gate-wrap {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding: 20px 0;
}
.gate {
  width: min(420px, 100%);
  padding: 34px 30px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(32, 27, 23, .97), rgba(17, 15, 13, .97));
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
}
.gate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 26, .7), transparent);
}
.gate.shake { animation: gateShake .42s ease; }
.gate-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: var(--lime-grad);
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(224, 74, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.gate-icon svg { width: 28px; height: 28px; }
.gate h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.gate .gate-sub {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.gate form { margin-top: 22px; }
.gate input { text-align: center; letter-spacing: .06em; }
.gate .btn { width: 100%; margin-top: 12px; }
.gate .gate-error {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
}
.gate .gate-note {
  margin-top: 18px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted-2);
  text-align: left;
}
.gate .gate-note b { color: var(--muted); }

.admin-shell { animation: fadeIn .25s ease both; padding-bottom: 86px; }
.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.admin-head .admin-head-text h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
}
.admin-head .admin-head-text p {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-session {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .25);
  font-size: 11px;
  color: var(--muted-2);
}
.admin-session .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.admin-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 6px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, .24);
  scrollbar-width: thin;
}
.admin-tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s;
  white-space: nowrap;
}
.admin-tab:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.admin-tab.active {
  background: var(--lime-grad);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(224, 74, 0, .2);
}
.admin-tab .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .3);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.admin-tab.active .tab-badge { background: rgba(26, 13, 5, .2); }

.admin-panel { min-height: 200px; }
.admin-section {
  position: relative;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.admin-section > h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.admin-section > h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent);
}
.admin-section .section-sub {
  margin: -10px 0 16px;
  font-size: 12px;
  color: var(--muted-2);
}

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.admin-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-grid .span-2 { grid-column: 1 / -1; }

.a-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.a-field > span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}
.a-field input,
.a-field textarea,
.a-field select { font-size: 13px; padding: 10px 12px; border-radius: 10px; }
.a-field textarea { min-height: 76px; }
.a-field .a-hint { font-size: 10.5px; color: var(--muted-2); line-height: 1.4; }

.a-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
}
.a-row + .a-row { margin-top: 7px; }
.a-row .a-grow { flex: 1; min-width: 0; }
.a-row .a-row-num {
  flex-shrink: 0;
  width: 24px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--muted-2);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.a-row input,
.a-row select { font-size: 12.5px; padding: 8px 10px; border-radius: 9px; }

.a-controls { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.a-icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted-2);
  cursor: pointer;
  transition: .18s;
}
.a-icon-btn svg { width: 14px; height: 14px; }
.a-icon-btn:hover:not(:disabled) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.a-icon-btn.danger:hover:not(:disabled) {
  border-color: rgba(255, 97, 89, .45);
  background: var(--danger-soft);
  color: var(--danger);
}
.a-icon-btn:disabled { opacity: .3; cursor: not-allowed; }

.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px dashed rgba(255, 122, 26, .38);
  border-radius: 11px;
  background: rgba(255, 122, 26, .07);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s;
}
.a-btn svg { width: 14px; height: 14px; }
.a-btn:hover {
  border-style: solid;
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.a-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.a-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.admin-subcard {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, .18);
}
.admin-subcard-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.admin-subcard-head .a-subtitle {
  flex: 1;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.scope-row .scope-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.admin-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .028);
  margin-top: 8px;
}
.admin-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-item-head .a-grow { flex: 1; min-width: 0; }
.admin-item-body {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.admin-item-body .a-field > span { font-size: 10.5px; }
.admin-item-body .a-field input,
.admin-item-body .a-field select { padding: 7px 9px; font-size: 12px; }
.admin-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
}

.admin-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(24, 18, 14, .92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.admin-savebar .save-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-2);
}
.admin-savebar .save-state .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  transition: background .2s, box-shadow .2s;
}
.admin-savebar.dirty .save-state .dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.admin-savebar .save-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.admin-savebar .btn { min-height: 44px; padding: 10px 18px; font-size: 13px; }

.admin-error-list {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 97, 89, .4);
  border-radius: 13px;
  background: var(--danger-soft);
  color: #ffd9d6;
  font-size: 12.5px;
}
.admin-error-list ul { display: flex; flex-direction: column; gap: 4px; margin-top: 7px; }
.admin-error-list li { display: flex; gap: 7px; }
.admin-error-list li::before { content: '•'; color: var(--danger); }

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}
.report-toolbar .a-field { min-width: 170px; }
.report-toolbar .a-field.search { flex: 1; }

.report-list { display: flex; flex-direction: column; gap: 8px; }
.report-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.2fr) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .03);
}
.report-row .rr-type { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.report-row .rr-nick { font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-row .rr-meta { font-size: 11.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-row .rr-total {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.report-row .rr-actions { display: flex; gap: 3px; }
.report-empty {
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  text-align: center;
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted-2);
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.data-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, .18);
}
.data-card h4 {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}
.data-card p {
  margin-bottom: 12px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted-2);
}
.data-card .btn,
.data-card .a-btn { width: 100%; margin-top: 6px; }
.data-card .data-row { display: flex; gap: 8px; flex-wrap: wrap; }
.data-card .data-row > * { flex: 1; }

.webhook-card { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .025); }
.webhook-card .wc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.webhook-card .wc-head h5 { flex: 1; margin: 0; font-size: 12px; font-weight: 800; }
.webhook-card .badge { font-size: 10px; }
.webhook-card input:disabled { opacity: .55; }

/* ========================= 14. МОДАЛКИ / ТОСТЫ =========================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 6, 5, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn .2s ease both;
}
.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(730px, 100%);
  max-height: 88vh;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(24, 18, 14, .94);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  animation: modalIn .35s var(--ease) both;
}
.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 26, .6), rgba(224, 74, 0, .5), transparent);
}
.modal.wide { width: min(960px, 100%); }
.modal.small { width: min(460px, 100%); }
.modal-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent);
}
.modal-head h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
}
.modal-head .modal-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted-2);
  overflow-wrap: anywhere;
}
.close-btn {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--muted);
  cursor: pointer;
  transition: .25s;
}
.close-btn svg { width: 16px; height: 16px; }
.close-btn:hover {
  transform: rotate(90deg);
  border-color: rgba(255, 97, 89, .4);
  background: var(--danger-soft);
  color: var(--danger);
}
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 0;
}
.modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .16);
}
.modal-foot .btn { flex: 1 1 150px; min-height: 44px; }
.modal-foot .modal-note {
  flex-basis: 100%;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
  text-align: center;
}

.report-text {
  width: 100%;
  min-height: 320px;
  max-height: 46vh;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, .35);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  resize: vertical;
  white-space: pre;
}
.modal-text-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.confirm-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.confirm-text strong { color: var(--text); }
.confirm-text .danger { color: var(--danger); }

.detail-list { display: flex; flex-direction: column; gap: 10px; }
.detail-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 196, 150, .1);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: 0; }
.detail-row .dr-label { color: var(--muted-2); font-size: 12px; }
.detail-row .dr-value { color: var(--text); word-break: break-word; }

.toast-stack {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(470px, 92vw);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: rgba(24, 21, 18, .92);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .6);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  font-size: 14px;
  pointer-events: auto;
  animation: toastIn .4s var(--ease) both;
}
.toast > svg { flex-shrink: 0; width: 19px; height: 19px; margin-top: 2px; color: var(--accent); }
.toast.error { border-left-color: var(--danger); }
.toast.error > svg { color: var(--danger); }
.toast .t-title { font-weight: 800; margin-bottom: 3px; }
.toast .t-msg { font-size: 13.5px; color: var(--muted); white-space: pre-line; }
.toast .t-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: -4px -8px -4px auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  border-radius: 8px;
}
.toast .t-close:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.toast .t-close svg { width: 14px; height: 14px; margin: 0; }
.toast.out { animation: toastOut .3s ease both; }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
}
.banner svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.banner-danger {
  border-color: rgba(255, 97, 89, .4);
  background: var(--danger-soft);
  color: #ffd9d6;
}
.banner-danger svg { color: var(--danger); }
.banner-accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-light);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 5000;
  padding: 16px 20px;
  border: 1px solid var(--danger);
  border-radius: 14px;
  background: #1a0d0a;
  color: #ffd9d6;
  font-size: 14px;
  text-align: center;
}

/* ============================ 15. АДАПТИВ ================================ */
@media (max-width: 1100px) {
  .form-layout { grid-template-columns: minmax(0, 1fr) 316px; gap: 20px; }
  .admin-item-body { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .form-layout { grid-template-columns: minmax(0, 1fr); }
  .form-aside { position: static; }
  .form-aside .total-panel { margin-top: 4px; }
  .score-info-groups { grid-template-columns: minmax(0, 1fr); }
  .info-columns { grid-template-columns: minmax(0, 1fr); }
  .admin-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .field { grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: stretch; }
  .field.column .field-label { margin-bottom: 7px; }
  .field-label { font-size: 13px; }
  .menu-card { padding: 30px 26px 26px; }
}

@media (max-width: 720px) {
  .score-info-groups,
  .rank-grid,
  .data-grid { grid-template-columns: minmax(0, 1fr); }
  .report-row { grid-template-columns: 74px minmax(0, 1fr) auto; row-gap: 6px; }
  .report-row .rr-meta { grid-column: 2 / 3; }
  .report-row .rr-total { grid-column: 3 / 4; grid-row: 1 / 2; }
  .report-row .rr-actions { grid-column: 2 / 4; justify-content: flex-end; }
  .admin-grid,
  .admin-grid.three { grid-template-columns: minmax(0, 1fr); }
  .admin-item-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-section { padding: 18px; }
  .detail-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}

@media (max-width: 640px) {
  .site-header { padding: 16px 16px 4px; }
  .wrap { padding: 18px 16px 70px; }
  .hero { padding: 22px 0 28px; }
  .hero::before { height: 190px; }
  .hero p { font-size: 14.5px; }
  .menu-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 4px; }
  .menu-card { padding: 26px 22px 24px; border-radius: 18px; }
  .menu-idx { top: 12px; right: 18px; font-size: 48px; }
  .menu-icon { width: 56px; height: 56px; margin-bottom: 12px; border-radius: 14px; }
  .menu-icon svg { width: 26px; height: 26px; }
  .menu-card-title { font-size: 18px; }
  .page-head { margin-bottom: 20px; padding-bottom: 18px; }
  .page-head h2 { gap: 10px; }
  .page-sub { font-size: 13.5px; }
  .card { padding: 20px 17px; border-radius: 16px; margin-bottom: 16px; }
  .card-title { margin-bottom: 18px; font-size: 15px; }
  .rank-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pills-row,
  .tabs { width: 100%; }
  .tabs .pill { flex: 1 1 auto; }
  .fold > summary { padding: 17px 17px; }
  .fold-body { padding: 16px 17px 18px; }
  .total-panel { padding: 20px; }
  .form-errors { margin-top: 12px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .admin-savebar { bottom: 6px; padding: 12px; }
  .admin-savebar .save-actions { width: 100%; }
  .admin-savebar .save-actions .btn { flex: 1; }
  .week-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .week-nav { width: 100%; }
  .week-current { width: 100%; }
  .admin-head { flex-direction: column; }
  .admin-head-actions { width: 100%; }
  .admin-head-actions .btn { flex: 1; }
  .modal { border-radius: 18px; max-height: 92vh; }
  .modal-head { padding: 16px 18px; }
  .modal-body { padding: 18px; }
  .modal-foot { padding: 14px 18px; }
  .modal-foot .btn { flex: 1 1 100%; }
  .toast-stack { bottom: 16px; }
  .report-toolbar { flex-direction: column; align-items: stretch; }
  .report-toolbar .a-field { min-width: 0; }
  .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); }
  .bg-particles { opacity: .35; }
}

@media (max-width: 560px) {
  .score-row {
    grid-template-columns: minmax(0, 1fr) 60px;
    grid-template-areas: 'info points' 'stepper stepper';
    gap: 8px 10px;
  }
  .score-info { grid-area: info; }
  .score-stepper { grid-area: stepper; justify-content: flex-start; }
  .score-points { grid-area: points; }
  .score-input { flex: 1; width: auto; max-width: 110px; }
  .step-btn { width: 46px; height: 46px; }
  .form-actions .row-2 { grid-template-columns: 1fr; }
  .rank-pill { min-height: 68px; }
  .sidebar .side-card { padding: 16px; }
}

@media (max-width: 420px) {
  .rank-pills { grid-template-columns: minmax(0, 1fr); }
  .rank-pill { min-height: 62px; flex-direction: row; align-items: center; gap: 8px; }
  .rank-pill .rank-threshold { margin-top: 0; margin-left: auto; }
  .admin-item-body { grid-template-columns: minmax(0, 1fr); }
  .total-num { font-size: 46px; }
}

/* ========================= 16. REDUCED MOTION ============================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .bg-glow,
  .bg-beams,
  .bg-dots,
  .bg-particles { display: none; }
  .halo { display: none; }
  .screen > * { animation: none !important; }
}

/* ============================ АНИМАЦИИ =================================== */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(12px) scale(.97); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-9px); }
  30% { transform: translateX(8px); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}
@keyframes glowDrift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(80px, 40px, 0) scale(1.08); }
}
@keyframes glowDrift2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-70px, -50px, 0) scale(1.06); }
}
@keyframes beamsDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-160px, 160px, 0); }
}
@keyframes dotsDrift {
  from { background-position: 0 0; }
  to { background-position: 28px 56px; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* вход экрана */
.screen > * { animation: rise .55s var(--ease) 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; }

/* ====================== 17. ДОПОЛНЕНИЯ КОМПОНЕНТОВ ======================= */

/* Иконка админки в шапке */
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: .25s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover {
  transform: translateY(-3px) rotate(-8deg);
  border-color: var(--accent-line);
  color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
}
.icon-btn.active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, .08), 0 12px 28px rgba(0, 0, 0, .35);
}
.admin-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  transition: background .2s, box-shadow .2s;
}
.icon-btn.active .admin-dot {
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
}

body.modal-open { overflow: hidden; }

/* Неделя: переключатель */
.week-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.week-nav {
  display: flex;
  flex: 1;
  align-items: stretch;
  min-width: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(0, 0, 0, .32);
}
.week-btn {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 46px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: .2s;
}
.week-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.week-btn:disabled { cursor: not-allowed; }
.week-btn svg { width: 16px; height: 16px; }
.week-center {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
}
.week-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.week-range {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.week-current { flex-shrink: 0; min-height: 48px; }

/* Счётчики теста */
.pill-points {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(26, 13, 5, .16);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pill:not(.active) .pill-points {
  background: rgba(255, 176, 102, .12);
  color: var(--accent-light);
}

/* Требования ранга в форме */
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .028);
  transition: border-color .2s, background .2s;
}
.req-row:hover { border-color: var(--line-strong); }
.req-row.checked {
  border-color: rgba(255, 122, 26, .3);
  background: rgba(255, 122, 26, .06);
}
.req-check {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.45;
}
.req-check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.req-title { min-width: 0; }
.req-star { flex-shrink: 0; color: var(--danger); font-weight: 800; }
.req-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.req-state {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
.req-row.checked .req-state { color: var(--accent); }

.req-row-info {
  border-style: dashed;
  background: rgba(255, 255, 255, .018);
  align-items: center;
}
.req-row-info .req-info-text {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.req-row-info .req-state {
  color: var(--muted-2);
  font-weight: 700;
  letter-spacing: .04em;
}

/* Сводка details в админке */
.admin-subcard > summary::-webkit-details-marker { display: none; }
.admin-subcard > summary { list-style: none; }
.admin-subcard > summary:hover .a-subtitle { color: var(--accent-light); }
.admin-subcard > summary .a-subtitle { transition: color .2s; }

/* Проверки в админке: аккуратные чекбоксы */
.a-check input[type="checkbox"] { accent-color: var(--accent); }

/* Мобильные тач-цели для чипов */
@media (pointer: coarse) {
  .chip { min-height: 44px; padding: 10px 13px; }
  .a-icon-btn { width: 44px; height: 44px; }
  .close-btn { width: 44px; height: 44px; }
}

/* Тонкая доводка для очень узких экранов */
@media (max-width: 360px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .card { padding: 17px 14px; }
  .week-nav { min-width: 100%; }
  .week-row { gap: 8px; }
  .week-current { width: 100%; }
}

/* ===================== 18. ФОРМЫ В СТИЛЕ РЕФЕРЕНСА ====================== */

/* Правила заполнения */
.rules {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 122, 26, .12), rgba(224, 74, 0, .07));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
.rules::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: -70px;
  right: -60px;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle, rgba(255, 122, 26, .28), transparent 70%);
  pointer-events: none;
}
.rules-title {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.rule-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #ded5c7;
}
.rule-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--lime-grad);
  box-shadow: 0 0 8px var(--accent);
}

/* Полоса фотохостингов */
.photobar {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.photobar-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.photobar-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-link {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  transition: .25s var(--ease);
}
a.ph-link:hover {
  transform: translateY(-2px);
  border-color: transparent;
  background: var(--lime-grad);
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(224, 74, 0, .25);
}
.ph-link.muted { opacity: .5; cursor: not-allowed; }

/* Мои действия */
.actions-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.actions-list:empty { margin-bottom: 0; }
.action-card {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  box-shadow: 0 16px 38px rgba(0, 0, 0, .3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: .28s var(--ease);
}
.action-card::before {
  content: '';
  position: absolute;
  top: 14%;
  bottom: 14%;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--lime-grad);
  opacity: .6;
}
.action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 26, .3);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .4);
}
.action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.action-title { min-width: 0; }
.action-name { font-size: 15.5px; font-weight: 800; line-height: 1.3; }
.action-sub {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.action-tools { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.action-rate {
  padding: 5px 12px;
  border: 1px solid rgba(255, 176, 102, .25);
  border-radius: 999px;
  background: rgba(255, 122, 26, .1);
  color: #ffe6c2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  white-space: nowrap;
}
.remove-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 97, 89, .3);
  border-radius: 13px;
  background: var(--danger-soft);
  color: var(--danger);
  cursor: pointer;
  transition: .25s var(--ease);
}
.remove-btn svg { width: 16px; height: 16px; }
.remove-btn:hover {
  transform: scale(1.08) rotate(90deg);
  background: var(--danger);
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 97, 89, .3);
}
.action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 140px;
  gap: 14px;
  align-items: end;
}
.fgroup label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.fgroup label .req { color: var(--danger); }
.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, 122, 26, .1) !important;
  border-color: rgba(255, 122, 26, .3) !important;
}
.action-note {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}
.add-action-btn {
  min-height: 52px;
  border-style: dashed;
  border-color: rgba(255, 122, 26, .38);
  background: rgba(255, 122, 26, .06);
  color: var(--accent);
  font-size: 13.5px;
}
.add-action-btn:hover {
  border-style: solid;
  background: var(--accent-soft);
  color: var(--accent-light);
}

/* Панель баллов */
.points-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 26px 30px;
  margin-bottom: 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 122, 26, .14), rgba(224, 74, 0, .08) 55%, rgba(255, 226, 178, .07));
  box-shadow: 0 24px 55px rgba(0, 0, 0, .42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
.points-panel::after {
  content: '';
  position: absolute;
  z-index: 0;
  right: -80px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 122, 26, .3), transparent 70%);
  pointer-events: none;
}
.points-num {
  position: relative;
  z-index: 1;
  min-width: 110px;
  font-family: var(--font-display);
  font-size: clamp(46px, 8vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  text-align: center;
  background: var(--lime-grad);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 122, 26, .45));
  font-variant-numeric: tabular-nums;
}
.points-meta { position: relative; z-index: 1; flex: 1; min-width: 0; }
.points-label {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.points-breakdown { display: flex; flex-wrap: wrap; gap: 9px; }
.points-breakdown .badge b { color: var(--accent-light); }
.points-threshold {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 176, 102, .18);
}
.points-threshold-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.points-threshold .progress { margin-top: 8px; }
.points-threshold .threshold-status { margin-top: 8px; }

/* Пикер пунктов */
.picker-search { margin-bottom: 18px; }
.act-category { margin-bottom: 26px; }
.act-category:last-child { margin-bottom: 0; }
.act-category-title {
  margin-bottom: 12px;
  padding-left: 11px;
  border-left: 3px solid var(--accent);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.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;
  min-height: 48px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: .22s var(--ease);
}
.act-item:hover {
  transform: translateY(-3px) translateX(4px);
  border-color: transparent;
  background: var(--lime-grad);
  color: var(--ink);
  box-shadow: 0 16px 30px rgba(224, 74, 0, .3);
}
.act-item .pts {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted-2);
}
.act-item:hover .pts { color: var(--ink); }
.act-empty {
  padding: 18px 0;
  color: var(--muted-2);
  font-size: 13px;
}
.form-actions .btn.ghost.small {
  width: auto;
  min-height: 44px;
  align-self: center;
  padding-left: 18px;
  padding-right: 18px;
}
.submit-note {
  margin-top: 10px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

@media (max-width: 900px) {
  .action-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .action-grid .fgroup:first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .action-grid { grid-template-columns: minmax(0, 1fr); }
  .action-grid .fgroup:first-child { grid-column: auto; }
  .action-head { flex-direction: column; align-items: stretch; }
  .action-tools { justify-content: space-between; }
  .act-items { grid-template-columns: minmax(0, 1fr); }
  .points-panel { flex-direction: column; gap: 16px; padding: 24px 18px; text-align: center; }
  .points-breakdown { justify-content: center; }
  .points-threshold-head { text-align: left; }
  .rules { padding: 19px 18px; }
  .photobar { align-items: flex-start; }
}
.ph-link { min-height: 44px; display: inline-flex; align-items: center; }
.pill,
.btn.small { min-height: 44px; }

.rank-pills.compact { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rank-pills.compact .rank-pill {
  min-height: 50px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  text-align: center;
}
.rank-pills.compact .rank-from { font-size: 14px; }
.rank-selected {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-light);
}
@media (max-width: 900px) {
  .rank-pills.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rank-pills.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .rank-pills.compact { grid-template-columns: minmax(0, 1fr); }
}

/* ===================== 19. ПЕРИОД, КАЛЕНДАРЬ, ПРАВКИ ФОРМ ================= */

.period-picker { position: relative; z-index: 70; }
input.period-input[readonly] {
  min-height: 48px;
  padding-right: 44px;
  cursor: pointer;
  background-color: rgba(0, 0, 0, .32);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23FF9A4D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
input.period-input[readonly]:hover { border-color: var(--line-strong); }
.date-picker {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  display: none;
  width: min(378px, 92vw);
  padding: 18px;
  border: 1px solid var(--accent-line);
  border-radius: 18px;
  background: rgba(24, 18, 14, .985);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 122, 26, .12), 0 30px 70px rgba(0, 0, 0, .6);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}
.date-picker.up { top: auto; bottom: calc(100% + 10px); }
.date-picker.active { display: block; animation: rise .24s var(--ease) both; }
.card.picker-open { z-index: 60; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cal-title { font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; }
.cal-nav {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text);
  cursor: pointer;
  transition: .2s var(--ease);
}
.cal-nav svg { width: 15px; height: 15px; }
.cal-nav:hover { border-color: transparent; background: var(--lime-grad); color: var(--ink); transform: scale(1.06); }
.cal-status {
  padding: 9px 13px;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 236, 214, .05);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.cal-status b { color: var(--accent-light); font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-wd {
  padding: 6px 0;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}
.cal-day {
  min-height: 36px;
  padding: 7px 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
  transition: .16s var(--ease);
}
.cal-day:hover { border-color: var(--accent-line); background: rgba(255, 122, 26, .2); transform: translateY(-1px); }
.cal-day.other { color: var(--muted-2); }
.cal-day.today { box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .45); }
.cal-day.range { border-radius: 0; background: rgba(255, 122, 26, .22); color: var(--text); }
.cal-day.start,
.cal-day.end {
  border-color: transparent;
  background: var(--lime-grad);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(224, 74, 0, .28);
}
.cal-day.start { border-radius: 10px 0 0 10px; }
.cal-day.end { border-radius: 0 10px 10px 0; }
.cal-day.start.end { border-radius: 10px; }
.week-btns { display: flex; gap: 9px; margin-top: 15px; }
.week-btns .btn { flex: 1; min-height: 44px; padding-left: 10px; padding-right: 10px; font-size: 12.5px; }

.test-subcard {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.test-subtitle { font-size: 13.5px; font-weight: 800; letter-spacing: -.01em; }
.test-hint { margin: 6px 0 12px; color: var(--muted-2); font-size: 12px; line-height: 1.5; }
.test-subcard .pill-grid { margin-top: 4px; }
.action-card.test-action .test-subcard { margin-top: 16px; }

.required-card .required-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .028);
  font-size: 13.5px;
  line-height: 1.45;
  cursor: pointer;
}
.required-card .required-row:last-child { margin-bottom: 0; }
.required-card .required-row input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.required-card .required-row:hover { border-color: var(--line-strong); }

.field.accent-field {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: rgba(255, 122, 26, .09);
}
.field.accent-field .field-label { color: var(--accent-light); }
.field.accent-field input { background-color: rgba(0, 0, 0, .28); }

@media (max-width: 640px) {
  .date-picker { width: min(378px, calc(100vw - 64px)); }
  .cal-day { min-height: 38px; }
}
@media (pointer: coarse) {
  .cal-nav { width: 44px; height: 44px; }
  .cal-day { min-height: 44px; }
}
