/* Copyright © 2026 Потехин Ю. А. UCloudCMS. Все права защищены. */
/* SPDX-License-Identifier: LicenseRef-UCloudCMS-Commercial */
/* Базовые токены темы; Manrope используется по SIL OFL 1.1. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@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-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@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;
}

:root {
  color-scheme: light;
  --brand-950: #062452;
  --brand-900: #082f68;
  --brand-700: #0b59c7;
  --brand-600: #1075ee;
  --brand-500: #1685ff;
  --brand-100: #e8f3ff;
  --brand-hover: rgba(232, 243, 255, .42);
  --cyan-400: #1bc9df;
  --ink-950: #0d1f3c;
  --ink-800: #263a58;
  --ink-600: #60708a;
  --ink-500: #7b899d;
  --line: #e2e8f1;
  --line-strong: #d4deea;
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-hover: #f2f6fb;
  --surface-translucent: rgba(255, 255, 255, .88);
  --field: #ffffff;
  --field-placeholder: #9aa7b9;
  --danger: #a82828;
  --danger-soft: #fff0f0;
  --danger-line: #efb4b4;
  --success: #16a36a;
  --success-soft: #e9f8f1;
  --warning: #9a5b00;
  --shadow-sm: 0 2px 8px rgba(13, 31, 60, .04);
  --shadow-md: 0 16px 36px rgba(13, 31, 60, .08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: 180ms cubic-bezier(.2, .8, .2, 1);
  --button-height: 46px;
  --button-min-width: 120px;
  --button-radius: 11px;
  --button-primary: #1075ee;
  --button-primary-hover: #0c68d8;
  --button-primary-active: #0a59bb;
  font-synthesis: none;
}

:root[data-color-scheme="dark"] {
  color-scheme: dark;
  --brand-950: #b9d8ff;
  --brand-900: #9bc8ff;
  --brand-700: #69adff;
  --brand-600: #4f9fff;
  --brand-500: #4095ff;
  --brand-100: #173455;
  --brand-hover: rgba(23, 52, 85, .68);
  --cyan-400: #54dbe9;
  --ink-950: #edf4ff;
  --ink-800: #d4dfef;
  --ink-600: #a8b7cb;
  --ink-500: #8495ad;
  --line: #26364b;
  --line-strong: #354a63;
  --canvas: #0d1522;
  --surface: #121d2c;
  --surface-muted: #172435;
  --surface-hover: #1b2b3f;
  --surface-translucent: rgba(18, 29, 44, .9);
  --field: #111c2a;
  --field-placeholder: #7f90a8;
  --danger: #ff9d9d;
  --danger-soft: #3b1d24;
  --danger-line: #733640;
  --success: #58d6a0;
  --success-soft: #123329;
  --warning: #f0b45c;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .2);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, .28);
  --button-primary: #287fdc;
  --button-primary-hover: #348ce9;
  --button-primary-active: #206fc3;
}

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

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink-950);
  font: 15px/1.55 "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.sidebar-open {
  overflow: hidden;
}

/* Единая фирменная подпись продукта без дополнительной плашки. */
.brand-credit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.brand-credit__copyright {
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: .01em;
}

.brand-credit__divider {
  color: var(--brand-500);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.brand-credit__product {
  color: var(--brand-700);
  font-weight: 800;
  letter-spacing: .015em;
  text-decoration: none;
  transition: color var(--transition);
}

.brand-credit__product:hover,
.brand-credit__product:active {
  color: var(--brand-600);
  text-decoration: none;
  transform: none;
}

.brand-credit__product:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--brand-500);
  outline-offset: 4px;
}

@media (max-width: 420px) {
  .brand-credit {
    gap: 4px;
    font-size: 10px;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

/* Поле сохраняет ширину своей сетки и изменяется пользователем только по высоте. */
textarea {
  max-width: 100%;
  resize: vertical;
}

button {
  cursor: pointer;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(22, 133, 255, .28);
  outline-offset: 3px;
}

.icon {
  display: block;
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--brand-900);
  color: #fff;
  font-weight: 750;
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--brand-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

/* Единый контейнер отделяет действия формы от полей и составных виджетов. */
.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 18px;
}

.form-actions .button {
  flex: 0 0 auto;
}

/* Сохранение завершает форму справа; прочие группы действий сохраняют контекстное положение. */
.form-actions--save {
  justify-content: flex-end;
}

.button {
  position: relative;
  min-width: var(--button-min-width);
  min-height: var(--button-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--button-radius);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.005em;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}

@media (max-width: 480px) {
  .form-actions {
    align-items: stretch;
  }

  .form-actions .button {
    width: 100%;
  }
}

.button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-500) 28%, transparent);
  outline-offset: 2px;
}

.button--primary {
  border-color: transparent;
  background: var(--button-primary);
  box-shadow: none;
  color: #fff;
}

.button--primary:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: transparent;
  background: var(--button-primary-hover);
  box-shadow: none;
}

.button--primary:active:not(:disabled):not([aria-disabled="true"]) {
  background: var(--button-primary-active);
  box-shadow: none;
}

.button--secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: none;
  color: var(--ink-800);
}

.button--secondary:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: color-mix(in srgb, var(--brand-500) 50%, var(--line-strong));
  background: var(--surface-hover);
  box-shadow: none;
  color: var(--brand-700);
}

.button--secondary:active:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--line-strong);
  background: var(--brand-100);
  box-shadow: none;
}

.button--danger {
  border-color: transparent;
  background: var(--danger);
  box-shadow: none;
  color: #fff;
}

.button--danger:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: transparent;
  background: color-mix(in srgb, var(--danger) 86%, #000);
}

.button--danger:active:not(:disabled):not([aria-disabled="true"]) {
  background: color-mix(in srgb, var(--danger) 76%, #000);
}

.button:disabled,
.button[aria-disabled="true"],
.button[aria-busy="true"] {
  cursor: not-allowed;
}

.button:disabled,
.button[aria-disabled="true"] {
  border-color: var(--line);
  background: var(--surface-muted);
  box-shadow: none;
  color: var(--ink-500);
  opacity: .62;
}

.button[aria-busy="true"] {
  color: transparent;
  pointer-events: none;
  opacity: 1;
}

.button[aria-busy="true"] > * {
  visibility: hidden;
}

.button[aria-busy="true"]::after {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--brand-600);
  content: "";
  animation: button-spinner 700ms linear infinite;
}

.button--primary[aria-busy="true"],
.button--primary:disabled[aria-busy="true"] {
  border-color: transparent;
  background: var(--button-primary);
}

.button--primary[aria-busy="true"]::after {
  color: #fff;
}

.button--secondary[aria-busy="true"],
.button--secondary:disabled[aria-busy="true"] {
  border-color: var(--line-strong);
  background: var(--surface);
}

.button--secondary[aria-busy="true"]::after {
  color: var(--brand-700);
}

.button--danger[aria-busy="true"],
.button--danger:disabled[aria-busy="true"] {
  border-color: transparent;
  background: var(--danger);
}

.button--danger[aria-busy="true"]::after {
  color: #fff;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-600);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.icon-button:hover {
  border-color: var(--brand-600);
  background: var(--brand-100);
  color: var(--brand-700);
}

.icon-button:active:not(:disabled) {
  border-color: var(--brand-700);
  background: color-mix(in srgb, var(--brand-100) 78%, var(--surface));
  box-shadow: none;
}

.icon-button:disabled,
.icon-button[aria-disabled="true"] {
  cursor: not-allowed;
  box-shadow: none;
  color: var(--ink-500);
  opacity: .55;
}

@keyframes button-spinner {
  to { transform: rotate(360deg); }
}

.theme-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.theme-switcher button {
  min-width: 0;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-500);
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.theme-switcher button:hover {
  color: var(--brand-600);
}

.theme-switcher button.is-active {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--brand-600);
}

.theme-switcher .icon {
  font-size: 15px;
}

.locale-menu {
  position: relative;
  flex: 0 0 auto;
  color: var(--ink-600);
}

.locale-menu__toggle {
  min-width: 52px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--ink-600);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .035em;
  list-style: none;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.locale-menu__toggle::-webkit-details-marker {
  display: none;
}

.locale-menu__toggle::after {
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg) translate(1px, 1px);
}

.locale-menu__toggle:hover,
.locale-menu[open] .locale-menu__toggle {
  background: var(--surface);
  color: var(--brand-600);
}

.locale-menu__toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-500) 28%, transparent);
  outline-offset: 2px;
}

.locale-menu__popup {
  position: absolute;
  z-index: 80;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  min-width: 174px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.locale-menu__option {
  width: 100%;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.locale-menu__option strong {
  color: var(--ink-500);
  font-size: 10px;
  letter-spacing: .04em;
}

.locale-menu__option:hover {
  background: var(--surface-hover);
  color: var(--brand-700);
}

.locale-menu__option[aria-checked="true"] {
  background: var(--brand-100);
  color: var(--brand-700);
}

.preference-switcher--login .locale-menu__popup {
  top: calc(100% + 8px);
  bottom: auto;
}

.preference-switcher--login .locale-menu__toggle::after {
  transform: rotate(225deg) translate(1px, 1px);
}

.preference-switcher {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.preference-switcher .theme-switcher {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.preference-switcher .locale-menu {
  padding-left: 3px;
}

.preference-switcher .locale-menu::before {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 1px;
  background: var(--line);
  content: "";
  opacity: .65;
}

.preference-switcher .theme-switcher button.is-active {
  background: var(--brand-100);
  box-shadow: none;
}

.preference-switcher button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
}

.preference-switcher .locale-menu__option {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
}

.preference-switcher--sidebar {
  width: 100%;
}

.preference-switcher--sidebar .theme-switcher {
  flex: 1 1 auto;
  grid-template-columns: repeat(3, 1fr);
}

.preference-switcher--sidebar .theme-switcher button {
  width: 100%;
  min-width: 0;
  height: 28px;
}

.preference-switcher--sidebar .locale-menu__toggle {
  height: 28px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

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