/*
 * fiberax-lite skeleton CSS override
 *
 * Этот файл - НЕ baseline. Bootstrap 5 (jsdelivr CDN) - baseline. Здесь
 * только то что Bootstrap не покрывает или что мы делаем по-своему:
 *  - layout нашего custom navbar (не Bootstrap .navbar - наш .page-header).
 *  - mega-menu Products dropdown (Bootstrap .dropdown-menu base + наш grid).
 *  - notifications dropdown с custom header/items внутри Bootstrap menu.
 *  - user dropdown с custom info-блоком сверху.
 *  - clientarea sidebar layout.
 *  - auth-form spacing (Bootstrap .form-* классы делают input/label).
 *  - services-list visual.
 *
 * Конвенция: BEM (block, block__element, block--modifier) поверх Bootstrap.
 *
 * Полноценный визуальный дизайн (брендинг, типографика, анимации) -
 * отдельная фаза.
 */

/* ============================================================
   0. Design tokens (brand palette, typography, radii)
   ============================================================ */

:root {
  --color-primary: #0050FF;
  --color-primary-light: #80C6FF;
  --color-accent: #FF5400;
  --color-text: #212126;
  --color-muted: #888888;
  --color-border: #E6EAF5;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F5F5F5;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-control: 10px;
  --radius-pill: 999px;

  --field-height: 52px;
  --field-padding-x: 16px;
}

/* ============================================================
   1. Page layout (minimal beyond Bootstrap)
   ============================================================ */

.page-main {
  padding: 20px 24px;
  min-height: calc(100vh - 220px);
  max-width: 1336px;
  margin: 0 auto;
}

.page-footer {
  background: var(--color-surface-alt);
  padding: 40px 24px 24px;
  font-family: var(--font-sans);
  color: var(--color-text);
}
.page-footer__container {
  max-width: 1336px;
  margin: 0 auto;
}
.page-footer__columns {
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 96px;
  align-items: flex-start;
}
.page-footer__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.page-footer__col--logo {
  padding-top: 4px;
  margin-right: 64px;
}
.page-footer__logo {
  height: 28px;
  width: auto;
  display: block;
}
.page-footer__block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.page-footer__block + .page-footer__block {
  margin-top: 16px;
}
.page-footer__heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
}
.page-footer__text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: #212126;
  margin: 0;
  white-space: nowrap;
}
.page-footer__text a {
  color: var(--color-text);
  text-decoration: none;
}
.page-footer__text a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.page-footer__col--support .page-footer__text a {
  color: var(--color-text);
  text-decoration: underline;
}
.page-footer__col--support .page-footer__text a:hover {
  color: var(--color-text);
  text-decoration: underline;
}
.page-footer__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.page-footer__col--support {
  margin-right: 72px;
}
.page-footer__col--paysoc {
  min-width: 160px;
}
.page-footer__icons--pay {
  max-width: 112px;
}
.page-footer__pay-icon {
  width: 32px;
  height: 21px;
  display: block;
}
.page-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.page-footer__social-icon {
  width: 24px;
  height: 24px;
  display: block;
}
.page-footer__bottom {
  margin-top: 40px;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.page-footer__copyright {
  font-size: 0.8125rem;
  color: var(--color-muted);
}
.page-footer__bottom-nav {
  font-size: 0.8125rem;
  color: var(--color-muted);
}
.page-footer__bottom-nav a {
  color: var(--color-muted);
  text-decoration: none;
}
.page-footer__bottom-nav a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.page-footer__bottom-nav a.page-footer__bottom-link--emph,
.page-footer__bottom-nav a.page-footer__bottom-link--emph:hover {
  font-style: italic;
  text-decoration: underline;
  color: var(--color-muted);
}
@media (max-width: 991.98px) {
  .page-footer__columns {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 575.98px) {
  .page-footer__columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ============================================================
   2. Page header (our custom navbar, not Bootstrap .navbar)
   ============================================================ */

.page-header {
  background: var(--color-surface);
  padding: 8px 24px 6px;
  font-family: var(--font-sans);
  position: relative;
  z-index: 1030;
}
.page-header__container {
  max-width: 1336px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}
.page-header__brand { flex-shrink: 0; display: flex; align-items: center; }
.page-header__brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.page-header__brand-link:hover { text-decoration: none; }
.page-header__brand-logo {
  display: block;
  height: 32px;
  width: auto;
}
.page-header__nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
}
.top-nav {
  transform: translate(-3px, 1px);
}

/* ============================================================
   3. Top-nav primary/secondary lists
   ============================================================ */

.top-nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.top-nav__primary,
.top-nav__secondary {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.top-nav__primary { gap: 22px; margin-left: 9px; }
/* Extra gap after Products only on homepage where it's a plain link (no chevron).
   On other pages Products is a dropdown with chevron - native width is wider,
   no extra margin needed. */
.page--cmd-root .top-nav__primary .top-nav__item--products { margin-right: 20px; }
.top-nav__secondary { gap: 16px; margin-right: 70px; }

.top-nav__link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.21;
  letter-spacing: -0.02em;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.top-nav__link:hover {
  color: var(--color-primary);
  text-decoration: none;
}
.top-nav__link.dropdown-toggle::after {
  /* Bootstrap dropdown chevron - keep its default arrow */
  margin-left: 4px;
}
.top-nav__icon { flex-shrink: 0; color: var(--color-muted); transition: color 0.15s ease; }
.top-nav__link:hover .top-nav__icon { color: var(--color-primary); }
.top-nav__link:hover .top-nav__balance-credit,
.top-nav__link:hover .top-nav__balance-due { color: var(--color-primary); }
.top-nav__chevron {
  flex-shrink: 0;
  color: var(--color-text);
  margin-left: 0;
  transition: transform 0.15s ease;
}
.top-nav__item--products .top-nav__chevron { margin-left: -3px; margin-right: 3px; }
.top-nav__item--language:hover .top-nav__chevron,
.top-nav__item--products:hover .top-nav__chevron,
[aria-expanded="true"] .top-nav__chevron { transform: rotate(180deg); }

.top-nav__flag { display: inline-block; vertical-align: middle; margin-right: 4px; flex-shrink: 0; border-radius: 2px; }

/* Language dropdown - hover trigger + Fiberax.online style */
.top-nav__item--language { position: relative; margin-left: -4px; }
.top-nav__dropdown--language {
  display: none;
  position: absolute;
  top: calc(100% - 6px);
  left: 4px;
  right: auto;
  margin-top: 0;
  min-width: 170px;
  padding: 18px 6px 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  background-clip: padding-box;
}
.top-nav__item--language:hover .top-nav__dropdown--language,
.top-nav__item--language .top-nav__dropdown--language.show {
  display: block;
}
.top-nav__dropdown--language .dropdown-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
}
.top-nav__dropdown--language .dropdown-item:hover {
  background: var(--color-surface-alt);
}
.top-nav__label { font-size: 1rem; }
.top-nav__badge {
  display: inline-block;
  background: #cc0000;
  color: #fff;
  font-size: 0.625rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  margin-left: 4px;
}

.top-nav__link--cta {
  padding: 11px 26px;
  margin-top: -1px;
  font-weight: 600;
}
.top-nav__link--cta-outline { padding: 11px 18px; }
.top-nav__link--cta-outline {
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.top-nav__link--cta-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.top-nav__link--cta-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.top-nav__link--cta-primary:hover {
  background: var(--color-primary);
  color: var(--color-text);
  border-color: var(--color-primary);
}

/* ============================================================
   4. Products dropdown (Bootstrap .dropdown-menu base + mega grid)
   ============================================================ */

.top-nav__item--products { position: relative; }
.top-nav__dropdown--products {
  display: none;
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  margin-top: 0;
  width: 520px;
  padding: 18px 12px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  background-clip: padding-box;
}
.top-nav__item--products:hover .top-nav__dropdown--products,
.top-nav__item--products .top-nav__dropdown--products.show {
  display: block;
}
.products-dropdown {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.products-dropdown__card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-sans);
}
.products-dropdown__card:hover {
  background: var(--color-surface-alt);
  border-color: var(--color-border);
  text-decoration: none;
  color: var(--color-text);
}
.products-dropdown__img {
  flex-shrink: 0;
  display: block;
  width: 56px;
  height: auto;
}
.products-dropdown__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.products-dropdown__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
}
.products-dropdown__desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.3;
}

/* ============================================================
   5. Balance variations
   ============================================================ */

.top-nav__balance-amount {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 2px;
}
.top-nav__balance-credit { font-weight: bold; }
.top-nav__balance-due { font-weight: bold; color: #cc0000; }

/* ============================================================
   6. Card-active (Solidgate) pill
   ============================================================ */

.top-nav__card-icon { font-size: 1rem; }
.top-nav__item--unverified .top-nav__card-icon { color: #cc7700; }
.top-nav__item--verified .top-nav__card-icon { color: #008844; }
.top-nav__card-label { font-size: 0.8125rem; }

/* ============================================================
   7. Notifications dropdown (custom content within Bootstrap menu)
   ============================================================ */

.top-nav__dropdown--notifications {
  min-width: 340px;
  padding: 0;
}
.notifications-dropdown__header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}
.notifications-dropdown__title { font-weight: bold; font-size: 0.8125rem; }
.notifications-dropdown__actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.notifications-dropdown__action { color: #0066cc; font-size: 0.875rem; text-decoration: none; }
.notifications-dropdown__items {
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.notifications-dropdown__item a {
  display: block;
  padding: 8px 14px;
  color: #222;
  text-decoration: none;
}
.notifications-dropdown__item a:hover {
  background: #f5f5f5;
}
.notifications-dropdown__item--seen a { color: #888; }
.notifications-dropdown__item--empty {
  padding: 16px;
  text-align: center;
  color: #888;
}
.notifications-dropdown__item-title { display: block; }
.notifications-dropdown__item-date { color: #888; font-size: 0.6875rem; }

/* ============================================================
   8. User dropdown (custom info-block + standard links)
   ============================================================ */

.top-nav__dropdown--user {
  min-width: 260px;
}
.user-dropdown__info {
  padding: 10px 14px;
}
.user-dropdown__name { display: block; color: #666; font-size: 0.6875rem; }
.user-dropdown__email { display: block; font-size: 0.8125rem; }
.user-dropdown__loggedas {
  display: block;
  color: #666;
  font-size: 0.6875rem;
  margin-top: 4px;
}
.user-dropdown__divider { margin: 4px 0; }
.user-dropdown__link--logout { color: #cc0000; }
.user-dropdown__link--admin { color: #6600cc; }

/* ============================================================
   9. Language dropdown (extra styles - main rules in block 3)
   ============================================================ */

.language-dropdown__item--current > .dropdown-item {
  font-weight: bold;
}

/* ============================================================
   10. Page content layouts
   ============================================================ */

.page-content--auth {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 220px);
}

/* Signup is wider than --auth (login is narrow, signup may have many fields
   incl. company details). Centered, ~2/3 of standard content width.
   Mirrors fiberax/ajax.signup.tpl col-md-8 (8/12 width). */
.page-content--signup { max-width: 720px; margin: 0 auto; }

.page-content--clientarea {
  display: flex;
  flex-direction: row;
  gap: 24px;
}
.clientarea__sidebar {
  flex-shrink: 0;
  width: 250px;
  padding: 16px 0;
  font-family: var(--font-sans);
}
.clientarea__menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.clientarea__menu-item { margin: 0 8px; padding: 0; }
.clientarea__menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: 10px;
  width: 100%;
  text-align: left;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.clientarea__menu-link:hover {
  color: var(--color-primary);
  background: #F7F9FF;
  text-decoration: none;
}
.clientarea__menu-link:focus { outline: none; }
.clientarea__menu-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}
.clientarea__menu-link.active,
.clientarea__menu-item--active > .clientarea__menu-link {
  color: var(--color-primary);
  background: #F7F9FF;
}
.clientarea__menu-link:hover::after,
.clientarea__menu-link.active::after,
.clientarea__menu-item--active > .clientarea__menu-link::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-primary);
  border-radius: 2px 0 0 2px;
}
.clientarea__menu-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: currentColor;
}
.clientarea__menu-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.clientarea__menu-label { flex: 1; }
.clientarea__menu-chevron {
  flex-shrink: 0;
  color: currentColor;
  transition: transform 0.15s ease;
}
.clientarea__menu-item--group { position: relative; }
.clientarea__menu-link--withtoggle { padding-right: 40px; }
.clientarea__menu-chevtoggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 40px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--color-text);
  cursor: pointer;
  z-index: 1;
}
.clientarea__menu-chevtoggle:hover { color: var(--color-primary); }
.clientarea__menu-chevtoggle[aria-expanded="false"] .clientarea__menu-chevron {
  transform: rotate(-90deg);
}
.clientarea__menu-toggle[aria-expanded="true"] .clientarea__menu-chevron,
.clientarea__menu-item--group .clientarea__menu-link[aria-expanded="true"] .clientarea__menu-chevron {
  transform: rotate(180deg);
}
.clientarea__menu-heading {
  padding: 16px 16px 8px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text);
}
.clientarea__submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.clientarea__submenu-loading {
  padding: 8px 16px 8px 48px;
  font-family: var(--font-sans);
}

/* Category group (e.g. "Cloud VPS") - 2nd level */
.clientarea__submenu-group { margin: 0; padding: 0; list-style: none; }
.clientarea__submenu-grouptoggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px 8px 44px;
  background: transparent;
  border: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.clientarea__submenu-grouptoggle:hover { color: var(--color-primary); }
.clientarea__submenu-grouplabel { flex: 1; }
.clientarea__submenu-chevron {
  flex-shrink: 0;
  color: currentColor;
  transition: transform 0.15s ease;
}
.clientarea__submenu-grouptoggle[aria-expanded="false"] .clientarea__submenu-chevron {
  transform: rotate(-90deg);
}

/* Service items inside group - 3rd level */
.clientarea__submenu-items { margin: 0; padding: 0; list-style: none; }
.clientarea__submenu-svc { margin: 0; padding: 0; }
.clientarea__submenu-svclink {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 56px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.clientarea__submenu-svclink:hover,
.clientarea__submenu-svclink.active {
  color: var(--color-primary);
  background: #F7F9FF;
}
.clientarea__submenu-svclink:hover::after,
.clientarea__submenu-svclink.active::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-primary);
  border-radius: 2px 0 0 2px;
}
.clientarea__submenu-arrow {
  flex-shrink: 0;
  color: var(--color-text);
}
.clientarea__submenu-svcname { flex: 1; }
.clientarea__submenu-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 2px 8px;
  background: #F0F2F5;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}
.clientarea__main { flex: 1; min-width: 0; }

/* ============================================================
   11. Auth (login + passreminder) - Figma "sign in" applied
   ============================================================ */

.auth-login {
  font-family: var(--font-sans);
  color: var(--color-text);
  padding: 24px 16px 40px;
}

.auth-login__brand {
  display: inline-flex;
  align-items: center;
  margin: 0 0 24px;
  text-decoration: none;
}
.auth-login__brand img {
  display: block;
  height: 32px;
  width: auto;
}

.auth-login__title {
  margin: 0 0 32px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: -0.01em;
  display: block;
}
.auth-login__title-line { display: block; }
.auth-login__title-line--sub {
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 4px;
  letter-spacing: -0.005em;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

/* Floating-label field: input with placeholder=" " plus following <label>.
   Label sits inside field; collapses to small caption when input is focused
   or filled. Works pure-CSS via :placeholder-shown + :focus selectors. */
.field {
  position: relative;
  display: block;
}
.field__input {
  width: 100%;
  height: var(--field-height);
  padding: 18px var(--field-padding-x) 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.21;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s ease;
}
.field__input::placeholder { color: transparent; }
.field__input:focus { border-color: var(--color-primary); }

.field__label {
  position: absolute;
  top: 50%;
  left: var(--field-padding-x);
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.21;
  color: var(--color-muted);
  pointer-events: none;
  transition: top 0.15s ease, font-size 0.15s ease, transform 0.15s ease;
  background: transparent;
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label {
  top: 10px;
  transform: translateY(0);
  font-size: 0.75rem;
}

.field--password .field__input { padding-right: 48px; }
.field__toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
}
.field__toggle svg { display: block; }

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin: 4px 0 0;
}
.auth-links--centered {
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.auth-links a {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.21;
  color: var(--color-primary);
  text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

.auth-aux-link {
  margin: 20px 0 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}
.auth-aux-link--center { text-align: center; }
.auth-aux-link a {
  color: var(--color-primary);
  text-decoration: none;
}
.auth-aux-link a:hover { text-decoration: underline; }

.auth-form__captcha {
  margin-top: 8px;
}

.auth-submit {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--color-primary-light);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.21;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.auth-submit:hover { background: var(--color-primary); }
.auth-submit:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ============================================================
   11a. Homepage product cards
   ============================================================ */

.homepage__hero { padding: 48px 0 56px; text-align: center; }
.homepage__hero-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 32px;
}
.homepage__hero-title-accent { color: var(--color-primary); }

/* Tier 1 page header (Inter, brand, mirrors homepage hero pattern) */
.tier1__header {
  padding: 48px 0 40px;
}
.tier1__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
}
.tier1__title-accent { color: var(--color-primary); }
.tier1__title-icon { display: inline-block; width: 54px; height: 54px; vertical-align: middle; margin-right: 12px; }

.tier1__plans > h2,
.tier1__templates-section > h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-primary);
}

.tier1__tabs .nav-link { color: var(--color-text); }
.tier1__tabs .nav-link.active { color: var(--color-primary); }

/* Sidebar (Summary card + form fields) */
.tier1__sidebar { font-family: var(--font-sans); color: var(--color-text); }
.tier1__sidebar .card {
  border: 1px solid var(--color-muted);
  border-radius: 16px;
  background: var(--color-surface);
}
.tier1__sidebar .card-title { color: var(--color-text); font-weight: 700; font-family: var(--font-sans); }
.tier1__sidebar .form-label { color: var(--color-text); font-family: var(--font-sans); font-weight: 500; font-size: 0.875rem; }
.tier1__sidebar .form-text { color: var(--color-muted); font-family: var(--font-sans); }
.tier1__sidebar .form-control,
.tier1__sidebar .form-select {
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.15s ease;
}
.tier1__sidebar .form-control:focus,
.tier1__sidebar .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: none;
  outline: none;
}
.tier1__sidebar .form-control::placeholder { color: var(--color-muted); }
.tier1__sidebar .form-check-label { color: var(--color-text); font-family: var(--font-sans); }
.tier1__sidebar .form-check-input:checked { background-color: var(--color-primary); border-color: var(--color-primary); }
.tier1__sidebar .form-check-input:focus { border-color: var(--color-primary); box-shadow: none; }
.tier1__cost { background: var(--color-surface-alt) !important; }
.tier1__cost #tier1-cost { color: var(--color-text); font-family: var(--font-sans); }
.tier1__sidebar .btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  font-weight: 700;
}
.tier1__sidebar .btn-primary:hover:not(:disabled) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  opacity: 0.9;
}
.tier1__sidebar .btn-primary:disabled {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
}
.tier1__subtitle {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-top: 32px;
  margin-bottom: 0;
}

/* Tier 2 page (mirrors Tier 1 styling) */
.tier2__header { padding: 48px 0 40px; }
.tier2__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
}
.tier2__title-accent { color: var(--color-primary); }
.tier2__title-icon { display: inline-block; width: 54px; height: 54px; vertical-align: middle; margin-right: 12px; }
.tier2__subtitle {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-top: 32px;
  margin-bottom: 0;
}

.tier2__sliders > h2,
.tier2__templates-section > h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-primary);
}

.tier2__tabs .nav-link { color: var(--color-text); }
.tier2__tabs .nav-link.active { color: var(--color-primary); }

.tier2__sidebar { font-family: var(--font-sans); color: var(--color-text); }
.tier2__sidebar .card {
  border: 1px solid var(--color-muted);
  border-radius: 16px;
  background: var(--color-surface);
}
.tier2__sidebar .card-title { color: var(--color-text); font-weight: 700; font-family: var(--font-sans); }
.tier2__sidebar .form-label { color: var(--color-text); font-family: var(--font-sans); font-weight: 500; font-size: 0.875rem; }
.tier2__sidebar .form-text { color: var(--color-muted); font-family: var(--font-sans); }
.tier2__sidebar .form-control,
.tier2__sidebar .form-select {
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.15s ease;
}
.tier2__sidebar .form-control:focus,
.tier2__sidebar .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: none;
  outline: none;
}
.tier2__sidebar .form-control::placeholder { color: var(--color-muted); }
.tier2__sidebar .form-check-label { color: var(--color-text); font-family: var(--font-sans); }
.tier2__sidebar .form-check-input:checked { background-color: var(--color-primary); border-color: var(--color-primary); }
.tier2__sidebar .form-check-input:focus { border-color: var(--color-primary); box-shadow: none; }
.tier2__cost { background: var(--color-surface-alt) !important; }
.tier2__cost #tier2-cost { color: var(--color-text); font-family: var(--font-sans); }
.tier2__sidebar .btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  font-weight: 700;
}
.tier2__sidebar .btn-primary:hover:not(:disabled) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  opacity: 0.9;
}
.tier2__sidebar .btn-primary:disabled {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

/* Tier 3 page (mirrors Tier 1/2 styling + plan-card variant) */
.tier3__header { padding: 48px 0 40px; }
.tier3__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
}
.tier3__title-accent { color: var(--color-primary); }
.tier3__title-icon { display: inline-block; width: 54px; height: 54px; vertical-align: middle; margin-right: 12px; }
.tier3__subtitle {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-top: 32px;
  margin-bottom: 0;
}

.tier3__plans > h2,
.tier3__templates-section > h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-primary);
}

.tier3__sidebar { font-family: var(--font-sans); color: var(--color-text); }
.tier3__sidebar .card {
  border: 1px solid var(--color-muted);
  border-radius: 16px;
  background: var(--color-surface);
}
.tier3__sidebar .card-title { color: var(--color-text); font-weight: 700; font-family: var(--font-sans); }
.tier3__sidebar .form-label { color: var(--color-text); font-family: var(--font-sans); font-weight: 500; font-size: 0.875rem; }
.tier3__sidebar .form-text { color: var(--color-muted); font-family: var(--font-sans); }
.tier3__sidebar .form-control,
.tier3__sidebar .form-select {
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.15s ease;
}
.tier3__sidebar .form-control:focus,
.tier3__sidebar .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: none;
  outline: none;
}
.tier3__sidebar .form-control::placeholder { color: var(--color-muted); }
.tier3__cost { background: var(--color-surface-alt) !important; }
.tier3__cost #tier3-cost { color: var(--color-text); font-family: var(--font-sans); }
.tier3__sidebar .form-control:focus,
.tier3__sidebar .form-select:focus { box-shadow: none; outline: none; }
.tier3__sidebar textarea { font-family: var(--font-sans); }
.tier3__sidebar .btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  font-weight: 700;
}
.tier3__sidebar .btn-primary:hover:not(:disabled) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  opacity: 0.9;
}
.tier3__sidebar .btn-primary:disabled {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

/* S3 page (mirrors Tier 1/2/3 styling) */
.order-s3__header { padding: 48px 0 40px; }
.order-s3__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
}
.order-s3__title-accent { color: var(--color-primary); }
.order-s3__title-icon { display: inline-block; width: 54px; height: 54px; vertical-align: middle; margin-right: 12px; }
.order-s3__subtitle {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-top: 32px;
  margin-bottom: 0;
}

.order-s3__config > h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-primary);
}

.order-s3__sidebar { font-family: var(--font-sans); color: var(--color-text); }
.order-s3__sidebar .card {
  border: 1px solid var(--color-muted);
  border-radius: 16px;
  background: var(--color-surface);
}
.order-s3__sidebar .card-title { color: var(--color-text); font-weight: 700; font-family: var(--font-sans); }
.order-s3__cost { background: var(--color-surface-alt) !important; }
.order-s3__cost #order-s3-price { color: var(--color-text); font-family: var(--font-sans); }
.order-s3__sidebar .btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  font-weight: 700;
}
.order-s3__sidebar .btn-primary:hover:not(:disabled) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  opacity: 0.9;
}
.order-s3__sidebar .btn-primary:disabled {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
}
.order-s3__main .form-label { color: var(--color-text); font-family: var(--font-sans); font-weight: 500; font-size: 0.875rem; }
.order-s3__main .form-text { color: var(--color-muted); font-family: var(--font-sans); }

/* Veeam page header (skeleton TBD) */
.order-veeam__header { padding: 48px 0 40px; }
.order-veeam__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
}
.order-veeam__title-accent { color: var(--color-primary); }
.order-veeam__title-icon { display: inline-block; width: 54px; height: 54px; vertical-align: middle; margin-right: 12px; }
.order-veeam__subtitle {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-top: 32px;
  margin-bottom: 0;
}
.homepage__hero-subtitle {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-top: 32px;
}

.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.product-card {
  flex: 0 0 calc((100% - 40px) / 3);
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.product-card:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
  text-decoration: none;
}
.product-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-color: var(--color-primary);
}
.product-card__illustration {
  display: block;
  width: 100%;
  max-width: 160px;
  height: auto;
  margin-bottom: 12px;
}
.product-card__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--color-text);
}
.product-card__desc {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  color: var(--color-muted);
}

@media (max-width: 900px) {
  .product-card { flex: 0 0 calc((100% - 20px) / 2); }
}
@media (max-width: 600px) {
  .product-card { flex: 0 0 100%; }
}

/* ============================================================
   12. Services list (simple flex list)
   ============================================================ */

.services-list__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
}
.services-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease;
}
.services-card:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
  text-decoration: none;
}
.services-card__icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 8px;
}
.services-card__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--color-text);
}
.services-card__id {
  font-weight: 400;
  color: var(--color-muted);
  font-size: 0.875rem;
}
.services-card__category {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--color-muted);
}
.services-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}
.services-card__statusdot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
}
.services-card__status--active .services-card__statusdot { background: #2ea44f; }
.services-card__status--suspended .services-card__statusdot { background: #cc7700; }
.services-card__status--terminated .services-card__statusdot { background: #cc0000; }

/* ============================================================
   13. Signup form - dynamic fields (Bootstrap form layout +
       our toggle for Private/Company)
   ============================================================ */

.signup-form__field {
  margin-bottom: 12px;
}
.signup-form__required-marker {
  color: #cc0000;
  margin-left: 2px;
}
.signup-form__captcha-image {
  display: block;
  max-width: 200px;
  margin-bottom: 6px;
  border: 1px solid #ccc;
}

/* Hide blocks when toggled - vanilla JS toggles .signup-form__field--hidden */
.signup-form__field--hidden {
  display: none;
}
