/* =========================================================
   Nexuz Boards — база (фирменный стиль Nexuz)
   ========================================================= */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --mint-200: #a7f3d0;

  --bg: #0a0a0a;
  --bg-soft: #0e100e;
  --surface: rgba(255, 255, 255, .03);
  --surface-hi: rgba(255, 255, 255, .055);
  --ring: rgba(134, 239, 172, .20);
  --ring-hi: rgba(134, 239, 172, .38);

  --panel: rgba(255, 255, 255, .03);
  --panel-hi: rgba(255, 255, 255, .05);
  --pill: rgba(74, 222, 128, .10);
  --pill-hi: rgba(74, 222, 128, .20);
  --hover: rgba(74, 222, 128, .07);
  --w5: rgba(255, 255, 255, .05);
  --w10: rgba(255, 255, 255, .10);

  --t100: #fff;
  --t80: rgba(255, 255, 255, .8);
  --t75: rgba(255, 255, 255, .75);
  --t60: rgba(255, 255, 255, .66);
  --t50: rgba(255, 255, 255, .56);
  --t40: rgba(255, 255, 255, .46);
  --t30: rgba(255, 255, 255, .34);
  --t25: rgba(255, 255, 255, .28);

  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, .12);
  --amber: #fbbf24;

  --r-panel: 24px;
  --r-ui: 16px;
  --r-sm: 12px;
  --r-xs: 8px;

  --smooth: .35s cubic-bezier(.215, .61, .355, 1);
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Manrope", ui-sans-serif, system-ui, sans-serif;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='96' height='96' filter='url(%23n)'/%3E%3C/svg%3E");

  --shell: 118rem;
  --pad: 24px;
  --head-h: 82px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--t100);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(70rem 40rem at 15% -10%, rgba(74, 222, 128, .09), transparent 60%),
    radial-gradient(60rem 40rem at 100% 0%, rgba(134, 239, 172, .05), transparent 55%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .28;
  mix-blend-mode: soft-light;
  image-rendering: pixelated;
  background-image: var(--noise);
  background-size: 96px 96px;
  background-repeat: repeat;
}

::selection { color: #fff; background: rgba(134, 239, 172, .3); }
:focus-visible { outline: 2px dotted var(--green-300); outline-offset: 4px; }
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
svg { display: block; }

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.shell {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.muted { color: var(--t60); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── шапка ─────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(6, 8, 6, .92) 20%, rgba(6, 8, 6, .68) 70%, rgba(10, 10, 10, 0));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-head__in {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 18px;
  min-height: var(--head-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.02em;
  transition: var(--smooth);
}
.logo__img {
  width: 42px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(134, 239, 172, .35));
  transition: var(--smooth);
}
.logo:hover { opacity: .86; }
.logo:hover .logo__img { transform: scale(.94); }
.logo small {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-300);
  background: var(--pill-hi);
  padding: 3px 7px;
  border-radius: 999px;
  margin-left: -4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.site-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}

/* ── кнопки ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--r-ui);
  background: #fff;
  color: #0a0a0a;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 0 0 1px transparent;
  transition: var(--smooth);
}
.btn .icon { width: 17px; height: 17px; }
.btn:hover {
  background: var(--w5);
  color: #fff;
  box-shadow: 0 0 0 1px #fff;
  padding-inline: 26px;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { background: #fff; color: #0a0a0a; box-shadow: none; padding-inline: 22px; }

.btn--green { background: var(--green-300); color: #04120a; }
.btn--green:hover { background: var(--green-200); color: #04120a; box-shadow: 0 0 0 1px var(--green-200); }

.btn--ghost {
  background: transparent;
  color: var(--t80);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.btn--ghost:hover {
  background: var(--w5);
  color: #fff;
  box-shadow: 0 0 0 1px var(--ring-hi);
}

.btn--danger { background: transparent; color: #fca5a5; box-shadow: 0 0 0 1px rgba(248, 113, 113, .3); }
.btn--danger:hover { background: var(--danger-bg); color: #fecaca; box-shadow: 0 0 0 1px rgba(248, 113, 113, .55); }

.btn--sm { padding: 9px 14px; border-radius: 12px; font-size: 13px; gap: 8px; }
.btn--sm:hover { padding-inline: 16px; }
.btn--sm[disabled]:hover { padding-inline: 14px; }
.btn--wide { width: 100%; }
.btn--icon { padding: 12px; }
.btn--icon:hover { padding-inline: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: var(--r-ui);
  background: var(--pill);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--smooth);
}
.pill .icon { width: 16px; height: 16px; }
.pill:hover { background: var(--green-300); color: #06200f; }
.pill[aria-current="page"] { background: var(--pill-hi); }
.pill--ghost { background: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); color: var(--t75); }
.pill--ghost:hover { background: var(--w5); color: #fff; box-shadow: 0 0 0 1px var(--ring-hi); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--t75);
  transition: var(--smooth);
}
.icon-btn .icon { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--w5); color: #fff; }
.icon-btn.is-active { background: var(--pill-hi); color: var(--green-200); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--green-500);
  color: #06200f;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
  overflow: hidden;
}
.avatar--sm { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.avatar--lg { width: 46px; height: 46px; border-radius: 15px; font-size: 16px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--green-200);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
}
.badge--muted { background: var(--w5); color: var(--t60); }
.badge--amber { background: rgba(251, 191, 36, .12); color: #fcd34d; }

/* ── панели и карточки ────────────────────────────────── */

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring);
}

.hl {
  display: inline-block;
  padding: .16em .26em .04em;
  margin-inline: .08em;
  border-radius: .26em;
  line-height: 1;
  background: var(--pill-hi);
}
.hl > span {
  background-image: linear-gradient(90deg, var(--green-300), var(--green-200));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── формы ─────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label,
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--t60);
  text-transform: uppercase;
}
.input,
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 0 0 1px var(--ring);
  color: #fff;
  font-size: 15px;
  transition: var(--smooth);
}
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; cursor: pointer; }
.field select option { background: #101410; color: #fff; }
.input::placeholder,
.field input::placeholder,
.field textarea::placeholder { color: var(--t40); }
.input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 1px var(--ring-hi), 0 0 0 4px rgba(74, 222, 128, .07);
}
.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form__hint { font-size: 12.5px; color: var(--t40); line-height: 1.6; }
.form__error {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--danger-bg);
  color: #fca5a5;
  font-size: 13px;
}

.checkline { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--t60); }
.checkline input { accent-color: var(--green-400); width: 16px; height: 16px; }

/* ── уведомления ───────────────────────────────────────── */

.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(14, 18, 14, .96);
  box-shadow: 0 0 0 1px var(--ring), 0 18px 40px -18px rgba(0, 0, 0, .9);
  color: var(--t80);
  font-size: 13.5px;
  line-height: 1.5;
  backdrop-filter: blur(14px);
  animation: toast-in .3s var(--smooth) both;
  pointer-events: auto;
}
.toast .icon { width: 17px; height: 17px; margin-top: 1px; color: var(--green-300); }
.toast--error { box-shadow: 0 0 0 1px rgba(248, 113, 113, .35); }
.toast--error .icon { color: #fca5a5; }
.toast--success .icon { color: var(--green-300); }
.toast.is-out { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }

/* ── модальные окна ───────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 3, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal__card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: var(--r-panel);
  background: #0c0f0c;
  box-shadow: 0 0 0 1px var(--ring), 0 40px 90px -40px #000;
  animation: modal-in .3s var(--smooth);
}
.modal__card--wide { width: min(760px, 100%); }
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 0;
}
.modal__title { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.2; }
.modal__sub { color: var(--t50); font-size: 13.5px; margin-top: 6px; line-height: 1.6; }
.modal__close { margin: -6px -6px 0 0; }
.modal__body { padding: 22px 28px; }
.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 28px 26px;
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { transform: translateY(14px) scale(.99); } }

/* ── выпадающие меню ──────────────────────────────────── */

.dropdown { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  min-width: 220px;
  padding: 6px;
  border-radius: 16px;
  background: #0c0f0c;
  box-shadow: 0 0 0 1px var(--ring), 0 24px 50px -20px #000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: menu-in .18s ease both;
}
.menu--left { left: 0; right: auto; }
.menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 11px;
  color: var(--t75);
  font-size: 13.5px;
  text-align: left;
  transition: var(--smooth);
}
.menu__item .icon { width: 16px; height: 16px; color: var(--t50); }
.menu__item:hover { background: var(--hover); color: #fff; }
.menu__item:hover .icon { color: var(--green-300); }
.menu__item--danger { color: #fca5a5; }
.menu__item--danger .icon { color: #f87171; }
.menu__item--danger:hover { background: var(--danger-bg); color: #fecaca; }
.menu__label {
  padding: 8px 12px 4px;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t40);
}
.menu__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}
.menu__profile > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.menu__profile b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu__profile small { font-size: 11px; color: var(--t40); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu form { margin: 0; }
.menu-open, body.modal-open { overflow: hidden; }
.menu__sep { height: 1px; margin: 5px 8px; background: rgba(255, 255, 255, .07); }
@keyframes menu-in { from { transform: translateY(-5px); } }

/* ── пустые состояния ─────────────────────────────────── */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 70px 20px;
  text-align: center;
  color: var(--t50);
}
.empty__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--pill);
  color: var(--green-300);
  box-shadow: 0 0 0 1px var(--ring);
}
.empty__icon .icon { width: 28px; height: 28px; }
.empty h3 { font-size: 20px; color: #fff; }
.empty p { font-size: 13.5px; max-width: 42ch; line-height: 1.65; }

/* ── футер ─────────────────────────────────────────────── */

.site-foot {
  position: relative;
  margin-top: 100px;
  padding: 64px 0 42px;
  border-top: 1px solid rgba(255, 255, 255, .05);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .012));
}
.site-foot__grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.site-foot__brand { display: flex; flex-direction: column; gap: 16px; max-width: 34ch; }
.site-foot__brand p { color: var(--t50); font-size: 13px; line-height: 1.75; }
.site-foot h3 {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint-200);
  margin-bottom: 14px;
}
.site-foot__links { display: flex; flex-direction: column; gap: 10px; }
.site-foot__links a {
  font-size: 13px;
  color: var(--t50);
  width: fit-content;
  transition: var(--smooth);
}
.site-foot__links a:hover { color: var(--green-200); transform: translateX(2px); }
.site-foot__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .05);
  font-size: 12px;
  color: var(--t40);
}

/* ── анимации ──────────────────────────────────────────── */

.reveal { opacity: 1; transform: translateY(20px); transition: transform .7s var(--smooth); }
.reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reveal { transform: none; }
}

/* ── адаптив ───────────────────────────────────────────── */

@media (max-width: 900px) {
  :root { --pad: 16px; --head-h: 68px; }
  .site-nav { display: none; }
  .site-head__in { padding-block: 12px; }
  .site-foot__grid { grid-template-columns: 1fr 1fr; }
  .site-foot__brand { grid-column: 1 / -1; }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .logo { font-size: 16px; gap: 9px; }
  .logo__img { width: 34px; height: auto; }
  .site-head__actions { gap: 4px; }
  .site-head__actions .btn { padding: 11px; }
  .site-head__actions .btn span,
  .site-head__actions .pill span { display: none; }
  .site-head__actions .btn:hover { padding-inline: 11px; }
  .site-head__actions .pill { padding: 11px; }
  .modal { padding: 10px; }
  .modal__head { padding: 20px 20px 0; }
  .modal__body { padding: 18px 20px; }
  .modal__foot { padding: 0 20px 20px; }
}
